/* ==========================================================================
   Geeepats Corporation — Shared Design System
   Brand: Geeepats green (lime #6AB719 · primary #2E9E2C · deep #1D8D2B)
   Linked by every login + every role panel. Keep all existing class names.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- Design tokens ---------- */
:root {
    /* Brand greens (sampled from the Geeepats logo) */
    --brand-900: #0a3d1e;
    --brand-800: #14672a;
    --brand-700: #1d8d2b;   /* deep logo ring */
    --brand-600: #2e9e2c;   /* primary */
    --brand-500: #4fa621;
    --brand-400: #6ab719;   /* logo lime */
    --brand-300: #8fd152;
    --brand-100: #d6f0bf;
    --brand-50:  #eef9e3;

    /* Fresh lime accent (replaces old gold accent) */
    --accent-600: #4d9a12;
    --accent-500: #6ab719;
    --accent-400: #8cc63f;

    /* Neutrals / text */
    --ink:       #1f2937;
    --ink-soft:  #4b5563;
    --muted:     #6b7280;
    --line:      #e5e7eb;
    --surface:   #ffffff;
    --canvas:    #f5f8f2;

    /* Effects */
    --ring:        0 0 0 4px rgba(46, 158, 44, 0.18);
    --shadow-sm:   0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.10);
    --shadow-md:   0 4px 12px rgba(16, 24, 40, 0.08), 0 2px 6px rgba(16, 24, 40, 0.06);
    --shadow-lg:   0 18px 40px -12px rgba(16, 24, 40, 0.22), 0 8px 18px -10px rgba(16, 24, 40, 0.14);
    --shadow-brand:0 18px 40px -12px rgba(20, 103, 42, 0.45);

    --radius-sm: 10px;
    --radius:    14px;
    --radius-lg: 20px;

    --grad-brand: linear-gradient(135deg, #34a02a 0%, #1d8d2b 52%, #136a27 100%);
    --grad-brand-soft: linear-gradient(135deg, #4fa621 0%, #2e9e2c 60%, #1d8d2b 100%);

    /* Premium full-page green scene */
    --scene-green:
        radial-gradient(1200px 800px at 80% -10%, #2e9e2c 0%, transparent 55%),
        radial-gradient(1000px 700px at -10% 110%, #0a3d1e 0%, transparent 50%),
        linear-gradient(135deg, #14672a 0%, #1d8d2b 45%, #0a3d1e 100%);
}

/* ---------- Base ---------- */
* {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(46, 158, 44, 0.20);
    color: var(--brand-800);
}

:focus-visible {
    outline: 3px solid rgba(46, 158, 44, 0.5);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Slim, branded scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(46, 158, 44, 0.30);
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(46, 158, 44, 0.5); background-clip: padding-box; }

/* ---------- Premium scene (landing + login backdrops) ---------- */
.brand-scene {
    background: var(--scene-green);
    background-attachment: fixed;
}
.scene-dots {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
    mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}

/* Brand surfaces (panel headers via .gradient-bg) */
.gradient-bg {
    background: var(--grad-brand);
    position: relative;
    overflow: hidden;
}
.gradient-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 240px at 12% -40%, rgba(255, 255, 255, 0.18), transparent 60%),
        radial-gradient(900px 200px at 100% 0%, rgba(140, 198, 63, 0.22), transparent 55%);
    pointer-events: none;
}

/* Full-page brand backdrop (legacy helpers, now green) */
.brand-bg {
    background:
        radial-gradient(1100px 700px at 85% -10%, rgba(46, 158, 44, 0.55), transparent 55%),
        radial-gradient(900px 600px at -10% 110%, rgba(10, 61, 30, 0.65), transparent 50%),
        linear-gradient(135deg, #1d8d2b 0%, #14672a 100%);
    background-attachment: fixed;
}
.brand-bg-animated {
    background: linear-gradient(135deg, #1d8d2b 0%, #2e9e2c 35%, #14672a 70%, #0a3d1e 100%);
    background-size: 220% 220%;
    animation: brandShift 18s ease infinite;
}
@keyframes brandShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Decorative soft blobs */
.brand-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}
.brand-blob--gold { background: radial-gradient(circle, rgba(140, 198, 63, 0.6), transparent 70%); }
.brand-blob--light { background: radial-gradient(circle, rgba(255, 255, 255, 0.32), transparent 70%); }

/* ---------- Cards / glass ---------- */
.card-shadow { box-shadow: var(--shadow-lg); }

.glass,
.glass-card {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Elevated auth/login card */
.auth-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--grad-brand);
}

/* Role icon badge (login cards) */
.icon-badge {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 26px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 12px 24px -12px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Role cards (legacy landing helper) ---------- */
.role-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.35s ease, border-color 0.35s ease;
    overflow: hidden;
}
.role-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--grad-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}
.role-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-100);
}
.role-card:hover::before { transform: scaleX(1); }

/* ---------- Inputs ---------- */
.input-focus {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.input-focus:hover { border-color: #c3ccbb; }
.input-focus:focus {
    border-color: var(--brand-500);
    box-shadow: var(--ring);
    background-color: #fff;
}

.pw-toggle { color: var(--muted); transition: color 0.2s ease; }
.pw-toggle:hover { color: var(--brand-600); }

/* ---------- Buttons ---------- */
.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    border: none;
    box-shadow: 0 8px 18px -8px rgba(20, 103, 42, 0.6);
    transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
    cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
    filter: saturate(1.08) brightness(1.04);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px -8px rgba(20, 103, 42, 0.6);
}
.btn-primary:disabled,
.btn-primary[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.15);
}

.btn-ghost {
    background: transparent;
    color: var(--brand-600);
    border: 1.5px solid var(--brand-100);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-ghost:hover { background: var(--brand-50); border-color: var(--brand-300); }

.link-brand { color: var(--brand-600); transition: color 0.2s ease; }
.link-brand:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Star rating ---------- */
.star-rating { display: flex; gap: 8px; }
.star {
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.2s ease, transform 0.15s ease;
    font-size: 28px;
}
.star.active,
.star:hover { color: var(--accent-500); transform: scale(1.12); }

/* ---------- Spinner / loading ---------- */
.loading { display: none; }
.loading.active { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---------- Entrance animations ---------- */
.success-message { animation: slideIn 0.5s ease; }
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.pop-in {
    opacity: 0;
    transform: scale(0.96);
    animation: popIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes popIn { to { opacity: 1; transform: scale(1); } }

/* ---------- Accessibility: respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Dashboard shell helpers (panels)
   ========================================================================== */
.dash-canvas { background: var(--canvas); }

.dash-logo {
    background: #fff;
    border-radius: 12px;
    padding: 4px;
    display: inline-flex;
    box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.45);
}

/* Header nav buttons (on the green header band) */
.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition: transform 0.2s ease, background 0.2s ease;
}
.nav-pill:hover { background: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
.nav-pill--solid { background: #fff; color: var(--brand-700); border-color: transparent; }
.nav-pill--solid:hover { background: #eef0ee; }
.nav-pill--danger { background: rgba(220, 38, 38, 0.92); border-color: transparent; }
.nav-pill--danger:hover { background: #dc2626; }

/* Modern stat tile */
.stat-tile {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-tile__icon {
    width: 54px; height: 54px; border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 16px -10px rgba(0, 0, 0, 0.5);
}

/* White content card with optional header bar */
.section-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.section-card__head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}
