/* ==========================================================================
   GROFAST DIGITAL (GroD) - OFFICIAL BRAND GUIDELINE DESIGN SYSTEM
   Source: E:\MY PC VPS\Brand Guidelines (GroD BG PDF & Slides)
   ========================================================================== */

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

:root {
    /* Official Grofast Digital Brand Canvas */
    --bg-void: #12141F;
    --bg-surface: #171721;
    --surface-container-low: #1C1C2B;
    --surface-container: #222234;
    --surface-container-high: #2C2C42;
    
    /* Official Grofast Digital Brand Flame Gradient Palette */
    --grod-orange: #F67D32;       /* Primary Brand Flame Orange */
    --grod-coral: #F46145;        /* Flame Coral Red */
    --grod-crimson: #DC4055;      /* Deep Crimson Red Accent */
    --grod-gold: #F9AF71;         /* Sunset Gold Accent */
    
    /* Brand Gradient String */
    --grod-flame-gradient: linear-gradient(135deg, #F67D32 0%, #F46145 50%, #DC4055 100%);
    --grod-flame-glow: rgba(246, 125, 50, 0.35);

    /* Telemetry & Secondary Accents */
    --quantum-emerald: #10B981;
    --cyber-cyan: #06B6D4;
    --solar-amber: #F59E0B;

    /* Glass & Refractions */
    --card-glass: rgba(23, 23, 33, 0.78);
    --card-glass-hover: rgba(34, 34, 52, 0.88);
    --border-refractive: rgba(255, 255, 255, 0.08);
    --border-glow-grod: rgba(246, 125, 50, 0.4);

    /* Text Tokens */
    --text-on-surface: #F4F4F8;
    --text-on-variant: #9A9AB0;
    --text-muted: #6C6C84;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-data: 'JetBrains Mono', monospace;

    /* Elevation & Shapes */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-kinetic: 0 16px 40px 0 rgba(0, 0, 0, 0.6);
}

/* Reset & Global Canvas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-void);
    background-image: 
        radial-gradient(at 0% 0%, rgba(246, 125, 50, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(220, 64, 85, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(249, 175, 113, 0.05) 0px, transparent 60%);
    background-attachment: fixed;
    color: var(--text-on-surface);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--surface-container-high); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--grod-orange); }

/* Kinetic Refractive Glass Cards */
.glass {
    background: var(--card-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-refractive);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-kinetic);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-interactive:hover {
    background: var(--card-glass-hover);
    border-color: var(--border-glow-grod);
    transform: scale(1.01);
    box-shadow: 0 12px 30px rgba(246, 125, 50, 0.2);
}

/* Monetary & Technical Data Typography */
.data-mono {
    font-family: var(--font-data);
    letter-spacing: -0.02em;
}

/* TOP COMMAND BAR */
.os-topbar {
    height: 64px;
    background: rgba(23, 23, 33, 0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-refractive);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar-left, .topbar-center, .topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.os-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.logo-text span.brand-flame {
    background: var(--grod-flame-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-badge {
    font-size: 0.65rem;
    background: var(--grod-flame-gradient);
    padding: 3px 9px;
    border-radius: var(--radius-full);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.os-menu {
    display: flex;
    gap: 4px;
}

.os-menu-item {
    background: transparent;
    border: none;
    color: var(--text-on-variant);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.os-menu-item i {
    width: 18px;
    height: 18px;
    stroke-width: 1.5px;
}

.os-menu-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.os-menu-item.active {
    color: #ffffff;
    background: rgba(246, 125, 50, 0.2);
    border: 1px solid rgba(246, 125, 50, 0.4);
    box-shadow: 0 0 15px rgba(246, 125, 50, 0.25);
}

/* Global Search Bar (Ctrl+K) */
.search-wrapper {
    position: relative;
    width: 280px;
}

.search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-on-variant);
    width: 16px;
    height: 16px;
    stroke-width: 1.5px;
}

.global-search {
    width: 100%;
    background: var(--surface-container-low);
    border: 1px solid var(--border-refractive);
    border-radius: var(--radius-full);
    padding: 8px 36px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}

.global-search:focus {
    border-color: var(--grod-orange);
    background: var(--surface-container);
    box-shadow: 0 0 15px rgba(246, 125, 50, 0.2);
}

.search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.68rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-on-variant);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Telemetry & Pulsing Status Rings */
.server-gauge-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--quantum-emerald);
    font-size: 0.78rem;
    font-family: var(--font-data);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-weight: 500;
}

.status-ring {
    width: 8px;
    height: 8px;
    background-color: var(--quantum-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--quantum-emerald);
    animation: ringPulse 2s infinite;
}

@keyframes ringPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.live-clock {
    font-family: var(--font-data);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-on-surface);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--grod-flame-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(246, 125, 50, 0.35);
}

.username {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Executive Role Badges */
.role-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-founder { background: rgba(246, 125, 50, 0.2); color: var(--grod-orange); border: 1px solid rgba(246, 125, 50, 0.4); }
.badge-cofounder { background: rgba(244, 97, 69, 0.2); color: var(--grod-coral); border: 1px solid rgba(244, 97, 69, 0.4); }
.badge-admin { background: rgba(220, 64, 85, 0.2); color: var(--grod-crimson); border: 1px solid rgba(220, 64, 85, 0.4); }
.badge-dev { background: rgba(6, 182, 212, 0.2); color: var(--cyber-cyan); border: 1px solid rgba(6, 182, 212, 0.4); }
.badge-staff { background: rgba(16, 185, 129, 0.2); color: var(--quantum-emerald); border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-client { background: rgba(249, 175, 113, 0.2); color: var(--grod-gold); border: 1px solid rgba(249, 175, 113, 0.4); }

.btn-logout {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-refractive);
    color: var(--text-on-variant);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-logout i { stroke-width: 1.5px; }

.btn-logout:hover {
    background: rgba(220, 64, 85, 0.2);
    color: var(--grod-crimson);
    border-color: rgba(220, 64, 85, 0.4);
}

/* MAIN VIEWPORT */
.os-viewport {
    flex: 1;
    padding: 28px 36px 120px 36px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.app-window {
    display: none;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-window.active {
    display: block;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.window-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: var(--text-on-variant);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* KINETIC BUTTON SYSTEM */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn i { stroke-width: 1.5px; }

.btn-primary {
    background: var(--grod-flame-gradient);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(246, 125, 50, 0.35);
}

.btn-primary:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 25px rgba(246, 125, 50, 0.5);
}

.btn-secondary {
    background: var(--surface-container);
    color: #ffffff;
    border: 1px solid var(--border-refractive);
}

.btn-secondary:hover {
    background: var(--surface-container-high);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-xs { padding: 5px 10px; font-size: 0.78rem; border-radius: var(--radius-sm); }

/* METRICS GRID */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 22px;
    margin-bottom: 28px;
}

.metric-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.card-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon i { stroke-width: 1.5px; width: 24px; height: 24px; }

.card-icon.blue { background: rgba(246, 125, 50, 0.15); color: var(--grod-orange); }
.card-icon.purple { background: rgba(244, 97, 69, 0.15); color: var(--grod-coral); }
.card-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--quantum-emerald); }
.card-icon.orange { background: rgba(249, 175, 113, 0.15); color: var(--grod-gold); }

.card-label {
    font-size: 0.82rem;
    color: var(--text-on-variant);
    font-weight: 500;
}

.card-value {
    font-family: var(--font-data);
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 3px 0 6px 0;
}

.card-trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.card-trend.positive { color: var(--quantum-emerald); }
.card-trend.neutral { color: var(--grod-orange); }

/* CHARTS SECTION */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.chart-card {
    padding: 28px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i { stroke-width: 1.5px; color: var(--grod-orange); }

.chart-container {
    height: 300px;
    position: relative;
}

.chart-container.tall { height: 400px; }

/* DATA TABLES */
.table-card {
    padding: 28px;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    padding: 16px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-on-variant);
    border-bottom: 1px solid var(--border-refractive);
    font-weight: 700;
    font-family: var(--font-body);
}

.data-table td {
    padding: 18px 16px;
    font-size: 0.92rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid var(--grod-orange);
}

.status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.status-badge.active { background: rgba(16, 185, 129, 0.15); color: var(--quantum-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-badge.pending { background: rgba(246, 125, 50, 0.15); color: var(--grod-orange); border: 1px solid rgba(246, 125, 50, 0.3); }

/* KANBAN BOARD */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.kanban-column {
    padding: 24px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.column-header h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.column-header h4 i { stroke-width: 1.5px; }

.kanban-card {
    background: var(--surface-container);
    border: 1px solid var(--border-refractive);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.kanban-card:hover {
    border-color: var(--grod-orange);
    transform: translateY(-2px);
}

.tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
}

.tag.orange { background: rgba(246, 125, 50, 0.2); color: var(--grod-orange); }
.tag.blue { background: rgba(6, 182, 212, 0.2); color: var(--cyber-cyan); }
.tag.green { background: rgba(16, 185, 129, 0.2); color: var(--quantum-emerald); }
.tag.purple { background: rgba(244, 97, 69, 0.2); color: var(--grod-coral); }

.kanban-card h5 {
    font-size: 0.98rem;
    margin-bottom: 8px;
    color: #ffffff;
}

.kanban-card p {
    font-size: 0.88rem;
    color: var(--text-on-variant);
    margin-bottom: 14px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* AI COPILOT INTERFACE */
.ai-chat-container {
    height: 640px;
    display: flex;
    flex-direction: column;
    padding: 28px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
    padding-right: 12px;
}

.message {
    display: flex;
    gap: 14px;
    max-width: 82%;
}

.message.bot { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }

.bot-avatar {
    width: 40px;
    height: 40px;
    background: var(--grod-flame-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(246, 125, 50, 0.35);
}

.message-bubble {
    background: var(--surface-container);
    border: 1px solid var(--border-refractive);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    line-height: 1.6;
}

.message.user .message-bubble {
    background: var(--grod-flame-gradient);
    color: #ffffff;
}

.chat-input-box {
    display: flex;
    gap: 14px;
}

.chat-input-box input {
    flex: 1;
    background: var(--surface-container-low);
    border: 1px solid var(--border-refractive);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
}

.chat-input-box input:focus {
    border-color: var(--grod-orange);
    box-shadow: 0 0 15px rgba(246, 125, 50, 0.2);
}

/* KINETIC FLOATING GLASS DOCK */
.os-dock {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(23, 23, 33, 0.88);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-refractive);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    display: flex;
    gap: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    z-index: 2000;
}

.dock-item {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: none;
    color: var(--text-on-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dock-item i { stroke-width: 1.5px; width: 22px; height: 22px; }

.dock-item:hover {
    transform: translateY(-8px) scale(1.15);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.dock-item.active {
    color: #ffffff;
    background: var(--grod-flame-gradient);
    box-shadow: 0 6px 20px rgba(246, 125, 50, 0.45);
}
