/* ========================================
   XBOT ELEGANT WHITE-BLACK DESIGN SYSTEM
   Modern, Clean, Professional Interface
   ======================================== */

/* Root Design Variables */
:root {
    /* Core Colors - Elegant White-Black Palette */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #e5e5e5;
    --color-gray-300: #d4d4d4;
    --color-gray-400: #a3a3a3;
    --color-gray-500: #737373;
    --color-gray-600: #525252;
    --color-gray-700: #404040;
    --color-gray-800: #262626;
    --color-gray-900: #171717;
    
    /* Accent Colors */
    --color-accent: #000000;
    --color-accent-light: #404040;
    --color-accent-lighter: #737373;
    
    /* Status Colors */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* Background System */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --bg-dark: #000000;
    --bg-dark-secondary: #171717;
    --bg-dark-tertiary: #262626;
    
    /* Text Colors */
    --text-primary: #000000;
    --text-secondary: #404040;
    --text-tertiary: #737373;
    --text-muted: #a3a3a3;
    --text-inverse: #ffffff;
    
    /* Border System */
    --border-light: #e5e5e5;
    --border-medium: #d4d4d4;
    --border-dark: #a3a3a3;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Spacing Scale */
    --space-1: 0.2rem;
    --space-2: 0.4rem;
    --space-3: 0.6rem;
    --space-4: 0.8rem;
    --space-5: 1rem;
    --space-6: 1.2rem;
    --space-8: 1.6rem;
    --space-10: 2.0rem;
    --space-12: 2.4rem;
    --space-16: 3.2rem;
    --space-20: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.125rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    position: relative;
    direction: rtl;
    text-align: right;
    cursor: default;
    font-family: var(--font-sans);
    background-color: var(--bg-secondary);
    font-size: 13px;
    font-weight: 400;
    min-height: 100vh;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--text-secondary);
}

/* App Layout */
div#app {
    /* height: 100vh; */
    width: 100%;
    position: fixed;
    z-index: 1;
    direction: ltr;
    background: var(--bg-secondary);
}

div#mainframe {
    display: flex;
    flex-direction: row;
    height: 100%;
    padding-top: 60px; /* Account for fixed topbar */
    background: var(--bg-secondary);
    direction: rtl;
    scrollbar-color: #000000 #fafafa;
    scrollbar-width: thin;
    overflow: auto;
    height: 100vh;
}

/* Content Area */
div#content {
    flex: 1;
    height: fit-content;
    /* overflow-y: auto; */
    padding: var(--space-8) var(--space-8) var(--space-4);
    position: relative;
    background: var(--bg-secondary);
    transition: var(--transition-normal);
    scrollbar-width: thin;
    scrollbar-color: var(--color-gray-300) transparent;
    display: flex;
    width: 100%;
    flex-direction: column;
}

div#content::-webkit-scrollbar {
    width: 5px;
}

div#content::-webkit-scrollbar-track {
    background: transparent;
}

div#content::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
}

div#content::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Typography System */
h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 var(--space-6) 0;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 0 0 var(--space-5) 0;
    letter-spacing: -0.015em;
}

h3 {
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0 0 var(--space-3) 0;
}

p {
    /* color: #ffffff; */
    line-height: 1.6;
    margin: 0 0 var(--space-4) 0;
    font-weight: 500;
    letter-spacing: -0.2px;
}

/* Mobile Toggler */
.mobile-toggler {
    display: none;
}

/* Legacy Compatibility - Gradually being phased out */

/* --------------------------------------------------
   Compact Mode Overrides
   Slightly smaller fonts & spacing for a denser UI
   -------------------------------------------------- */
:root {
    /* Reduce base spacing scale (~20% smaller) */
    --space-1: 0.2rem;   /* ~3.2px */
    --space-2: 0.4rem;   /* ~6.4px */
    --space-3: 0.6rem;   /* ~9.6px */
    --space-4: 0.8rem;   /* ~12.8px */
    --space-5: 1rem;     /* ~16px  (smaller than original 1.25rem) */
    --space-6: 1.2rem;   /* ~19.2px */
    --space-8: 1.6rem;   /* ~25.6px */
    --space-10: 2.0rem;  /* ~32px */
    --space-12: 2.4rem;  /* ~38.4px */
    --space-16: 3.2rem;  /* ~51.2px */
    --space-20: 4rem;    /* ~64px */
}

/* Base font size – 2px smaller site-wide */
body {
    font-size: 11px;
}

/* Headings – reduce by roughly 0.125rem (2px) each */
h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

/* Table cells & form inputs lighter padding for density */
table td, table th,
.form-input,
.nav-item a,
button, input, select, textarea {
    padding: calc(var(--space-2) - 2px) calc(var(--space-3) - 2px);
}

/* Buttons – slightly shorter & narrower */
button, .btn {
    line-height: 1.2;
    font-size: 0.875rem; /* 14px -> 13px approx */
    padding: calc(var(--space-2) - 1px) calc(var(--space-4) - 2px);
}

/* Sidebar & content tweaks after spacing change */
#sidebar.nav-item a { min-height: 40px; }

/* Ensure compact scrollbars appear thinner */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { border-radius: var(--radius-full); }
