/* =====================================================
   MyCitra Manual - Base CSS
   Variables, reset, typography
   ===================================================== */

:root {
    /* Primary palette - Green to Bluish (Emerald → Cyan → Sky Blue) */
    --color-primary-900: #00629a;
    --color-primary-800: #03669c;
    --color-primary-700: #0b70c8;
    --color-primary-600: #02a6e2;
    --color-primary-500: #26AFA5;
    --color-primary-400: #5DC7BE;
    --color-primary-300: #8FDDD5;
    --color-primary-200: #B8EAE4;
    --color-primary-100: #DCF3F0;
    --color-primary-50:  #F0FAF8;

    /* Accents */
    --color-accent-red:    #E63946;
    --color-accent-red-d:  #C1303C;
    --color-accent-orange: #F4A261;
    --color-accent-orange-d: #E08E4A;
    --color-accent-amber:  #F59E0B;
    --color-accent-green:  #10B981;
    --color-accent-sky:    #3B82F6;  /* bluish accent for gradients */

    /* Neutrals */
    --color-text:        #0A2A33;
    --color-text-muted:  #5C7480;
    --color-text-soft:   #8AA0AB;
    --color-text-invert: #FFFFFF;

    --color-bg:          #F2F7F9;
    --color-bg-soft:     #F8FBFC;
    --color-surface:     #FFFFFF;
    --color-border:      rgba(19, 120, 116, 0.10);
    --color-border-soft: rgba(19, 120, 116, 0.06);

    /* Sidebar (dark green-cyan) */
    --color-sidebar-bg:     linear-gradient(180deg, #072743 0%, #009c78 100%);
    --color-sidebar-text:   #C9EAE7;
    --color-sidebar-text-muted: #88B8B3;
    --color-sidebar-hover:  rgba(244, 162, 97, 0.10);
    --color-sidebar-active: rgba(244, 162, 97, 0.18);

    /* Status */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger:  #E63946;
    --color-info:    #3B82F6;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(19, 120, 116, 0.05);
    --shadow-sm: 0 2px 4px rgba(19, 120, 116, 0.06), 0 1px 2px rgba(19, 120, 116, 0.04);
    --shadow-md: 0 4px 12px rgba(19, 120, 116, 0.08), 0 2px 4px rgba(19, 120, 116, 0.04);
    --shadow-lg: 0 12px 32px rgba(19, 120, 116, 0.10), 0 4px 8px rgba(19, 120, 116, 0.05);
    --shadow-xl: 0 24px 48px rgba(19, 120, 116, 0.14), 0 8px 16px rgba(19, 120, 116, 0.06);

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-width-mini: 76px;
    --topbar-height: 68px;
    --content-max: 1440px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 150ms;
    --duration-base: 240ms;
    --duration-slow: 360ms;

    /* Type */
    --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', Menlo, Consolas, monospace;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-text);
    background: var(--color-bg);
    background-image:
        radial-gradient(ellipse at top left, rgba(38, 175, 165, 0.12), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(59, 130, 246, 0.08), transparent 50%),
        radial-gradient(ellipse at center right, rgba(244, 162, 97, 0.05), transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

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

a:hover { color: var(--color-primary-700); }

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

p { color: var(--color-text); }

/* Auth pages - no sidebar layout */
body.auth-page {
    background: linear-gradient(135deg, #0A3B3A 0%, #137874 50%, #1A938D 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(38, 175, 165, 0.30), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.20), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(244, 162, 97, 0.15), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body.auth-page::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.4;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 0;
}

/* Utility */
.text-muted { color: var(--color-text-muted); }
.text-soft  { color: var(--color-text-soft); }
.text-danger { color: var(--color-accent-red); }
.text-success { color: var(--color-accent-green); }
.text-warning { color: var(--color-accent-orange); }
.text-link { color: var(--color-primary-600); font-weight: 500; cursor: pointer; }
.text-link:hover { text-decoration: underline; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(19, 120, 116, 0.15); border-radius: 10px; border: 2px solid var(--color-bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(19, 120, 116, 0.25); }
