/* ═══════════════════════════════════════════════════════════
   RZ Service AI Panel — base.css
   Tokens · Reset · Body · Typography · Scrollbar
   Design: matching the CS-style from rzcloud/dashboard.php
   ═══════════════════════════════════════════════════════════ */

:root {
    /* ── Core palette ── */
    --cs-bg:       #030712;
    --cs-card:     rgba(17, 24, 39, 0.78);
    --cs-border:   rgba(148, 163, 184, 0.14);
    --cs-text:     #f1f5f9;
    --cs-muted:    #94a3b8;
    --cs-teal:     #2dd4bf;
    --cs-violet:   #a78bfa;
    --cs-indigo:   #6366f1;
    --cs-radius:   18px;
    --cs-radius-sm: 12px;
    --cs-font:     "DM Sans", system-ui, sans-serif;
    --cs-display:  "Outfit", var(--cs-font);
    --cs-shadow:   0 22px 50px rgba(0, 0, 0, 0.45);

    /* ── Background ── */
    --bg-color: #030712;
    --bg-gradient:
        radial-gradient(ellipse 80% 50% at 15% -5%, rgba(45, 212, 191, 0.12), transparent 45%),
        radial-gradient(ellipse 60% 40% at 85% 10%, rgba(167, 139, 250, 0.10), transparent 40%),
        linear-gradient(170deg, #030712 0%, #0b1220 50%, #020617 100%);

    /* ── Surfaces ── */
    --surface-0:   rgba(17, 24, 39, 0.85);
    --surface-1:   rgba(17, 24, 39, 0.75);
    --surface-2:   rgba(30, 41, 59, 0.55);
    --surface-input: rgba(10, 16, 34, 0.80);

    /* ── Borders ── */
    --border:        rgba(148, 163, 184, 0.18);
    --border-strong: rgba(45, 212, 191, 0.35);
    --border-focus:  rgba(99, 102, 241, 0.60);

    /* ── Text ── */
    --text-primary:   #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted:     #94a3b8;
    --text-faint:     #475569;

    /* ── Accents ── */
    --accent:         #6366f1;
    --accent-alt:     #8b5cf6;
    --teal:           #2dd4bf;
    --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --teal-gradient:    linear-gradient(135deg, #2dd4bf, #6366f1);
    --brand-gradient:   linear-gradient(135deg, var(--cs-teal), var(--cs-indigo));

    /* ── Semantic ── */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger:  #ef4444;
    --info:    #38bdf8;

    /* ── Radius ── */
    --r-xs:   6px;
    --r-sm:   10px;
    --r-md:   16px;
    --r-lg:   22px;
    --r-xl:   28px;
    --r-full: 9999px;

    /* ── Shadow ── */
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.20);
    --shadow-md:   0 8px 24px rgba(0,0,0,0.30);
    --shadow-lg:   0 18px 45px rgba(0,0,0,0.40);
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.45);
    --shadow-card: 0 16px 32px rgba(15, 23, 42, 0.35);
    --shadow-glow: 0 0 40px rgba(45, 212, 191, 0.14);

    /* ── Transition ── */
    --t:      all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--cs-font);
    background: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--cs-text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Noise texture overlay ────────────────────────────── */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.028;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.15; color: var(--text-primary); }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(45,212,191,0.35); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(45,212,191,0.6); }

/* ── Selection ─────────────────────────────────────────── */
::selection { background: rgba(45,212,191,0.25); color: var(--text-primary); }

/* ── Focus ─────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity:0; transform: translateY(12px); }
    to   { opacity:1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { opacity:1; }
    50%       { opacity:0.45; }
}

/* ── Page load animation ───────────────────────────────── */
.page-fade { animation: fadeUp 0.4s ease both; }

/* ── Code ──────────────────────────────────────────────── */
code, .mono {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82em;
    background: rgba(45,212,191,0.10);
    border: 1px solid rgba(45,212,191,0.22);
    border-radius: var(--r-xs);
    padding: 2px 7px;
    color: var(--cs-teal);
}
