/* ==========================================================================
   Sphere Global Grid — Design System Foundation
   SABO IT · QHSE Enterprise Platform
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
    /* Brand */
    --gg-primary: #009fe3;
    --gg-primary-light: #4fc3f7;
    --gg-primary-dark: #0055a5;
    --gg-primary-muted: rgba(0, 159, 227, 0.12);
    --gg-primary-border: rgba(0, 159, 227, 0.28);
    --gg-primary-glow: rgba(0, 159, 227, 0.22);

    /* Surfaces */
    --gg-bg-base: #060d19;
    --gg-bg-app: #0a1220;
    --gg-bg-elevated: #111827;
    --gg-bg-sidebar: rgba(14, 20, 32, 0.88);
    --gg-bg-topbar: rgba(6, 13, 25, 0.72);
    --gg-bg-glass: rgba(255, 255, 255, 0.035);
    --gg-bg-glass-hover: rgba(255, 255, 255, 0.06);
    --gg-bg-input: rgba(0, 0, 0, 0.28);
    --gg-bg-input-focus: rgba(0, 0, 0, 0.38);

    /* Text */
    --gg-text: rgba(255, 255, 255, 0.94);
    --gg-text-secondary: rgba(255, 255, 255, 0.62);
    --gg-text-muted: rgba(255, 255, 255, 0.42);
    --gg-text-subtle: rgba(255, 255, 255, 0.28);
    --gg-text-on-primary: #ffffff;

    /* Borders */
    --gg-border: rgba(255, 255, 255, 0.07);
    --gg-border-strong: rgba(255, 255, 255, 0.12);
    --gg-border-focus: rgba(0, 159, 227, 0.682);

    /* Semantic — QHSE context */
    --gg-success: #10b981;
    --gg-success-bg: rgba(16, 185, 129, 0.12);
    --gg-warning: #f59e0b;
    --gg-warning-bg: rgba(245, 158, 11, 0.12);
    --gg-danger: #ef4444;
    --gg-danger-bg: rgba(239, 68, 68, 0.10);
    --gg-info: #3b82f6;
    --gg-info-bg: rgba(59, 130, 246, 0.12);

    /* Dashboard card accents (module tiles) */
    --gg-card-green: linear-gradient(135deg, rgba(40, 140, 108, 0.55), rgba(78, 167, 82, 0.45));
    --gg-card-orange: linear-gradient(135deg, rgba(245, 112, 12, 0.55), rgba(255, 152, 0, 0.45));
    --gg-card-red: linear-gradient(135deg, rgba(210, 40, 36, 0.55), rgba(218, 58, 54, 0.45));
    --gg-card-teal: linear-gradient(135deg, rgba(2, 158, 177, 0.55), rgba(37, 177, 195, 0.45));
    --gg-card-purple: linear-gradient(135deg, rgba(123, 31, 162, 0.55), rgba(145, 63, 158, 0.45));

    /* Typography */
    --gg-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --gg-font-mono: 'SF Mono', 'Consolas', monospace;
    --gg-text-xs: 0.6875rem;
    /* 11px */
    --gg-text-sm: 0.8125rem;
    /* 13px */
    --gg-text-base: 0.875rem;
    /* 14px */
    --gg-text-md: 1rem;
    /* 16px */
    --gg-text-lg: 1.125rem;
    /* 18px */
    --gg-text-xl: 1.375rem;
    /* 22px */
    --gg-text-2xl: 1.75rem;
    /* 28px */
    --gg-weight-normal: 400;
    --gg-weight-medium: 500;
    --gg-weight-semibold: 600;
    --gg-weight-bold: 700;
    --gg-tracking-tight: -0.02em;
    --gg-tracking-wide: 0.06em;
    --gg-tracking-wider: 0.12em;

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

    /* Radius */
    --gg-radius-sm: 8px;
    --gg-radius-md: 12px;
    --gg-radius-lg: 16px;
    --gg-radius-xl: 20px;
    --gg-radius-2xl: 24px;
    --gg-radius-full: 9999px;

    /* Shadows */
    --gg-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
    --gg-shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.22);
    --gg-shadow-md: 0 8px 32px rgba(0, 0, 0, 0.32);
    --gg-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.40);
    --gg-shadow-glow: 0 4px 24px var(--gg-primary-glow);
    --gg-shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);

    /* Glass */
    --gg-blur-sm: blur(8px);
    --gg-blur-md: blur(16px);
    --gg-blur-lg: blur(24px);

    /* Motion */
    --gg-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --gg-duration: 0.2s;
    --gg-duration-slow: 0.35s;

    /* Layout (for sidebar / topbar — used in next steps) */
    --gg-topbar-height: 56px;
    --gg-sidebar-width: 240px;
    --gg-content-max: 1440px;

    /* Z-index scale */
    --gg-z-base: 1;
    --gg-z-dropdown: 200;
    --gg-z-topbar: 300;
    --gg-z-modal: 1000;
    --gg-z-toast: 600;
}


/* --------------------------------------------------------------------------
   2. Base reset & typography
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body.gg-app,
body.bg-kgdark02 {
    font-family: var(--gg-font);
    font-size: var(--gg-text-base);
    font-weight: var(--gg-weight-normal);
    line-height: 1.5;
    color: var(--gg-text-secondary);
    background-color: var(--gg-bg-app);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--gg-text);
    font-weight: var(--gg-weight-semibold);
    letter-spacing: var(--gg-tracking-tight);
    line-height: 1.25;
}

.gg-eyebrow {
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    letter-spacing: var(--gg-tracking-wider);
    text-transform: uppercase;
    color: var(--gg-primary);
}

.gg-page-title {
    font-size: var(--gg-text-xl);
    font-weight: var(--gg-weight-bold);
    color: var(--gg-text);
    letter-spacing: var(--gg-tracking-tight);
}

.gg-page-subtitle {
    font-size: var(--gg-text-sm);
    color: var(--gg-text-muted);
    margin-top: var(--gg-space-1);
}

.gg-divider {
    height: 1px;
    background: var(--gg-border);
    border: none;
    margin: var(--gg-space-4) 0;
}

.gg-divider-accent {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--gg-primary), var(--gg-primary-dark));
    border-radius: var(--gg-radius-full);
    border: none;
}


/* --------------------------------------------------------------------------
   3. Legacy class bridge (keeps existing modules working)
   -------------------------------------------------------------------------- */
.bg-kgdark01 {
    background: var(--gg-bg-sidebar);
    color: var(--gg-text-secondary);
    border-right: 1px solid var(--gg-border);
    box-shadow: var(--gg-shadow-sm), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-sm) saturate(120%);
    backdrop-filter: var(--gg-blur-sm) saturate(120%);
}

.bg-kgdark02 {
    background-color: var(--gg-bg-app);
    color: var(--gg-text-secondary);
}

.bg-kgdark03 {
    background: var(--gg-bg-topbar);
    color: var(--gg-text);
    border-bottom: 1px solid var(--gg-border);
    box-shadow: var(--gg-shadow-xs);
    -webkit-backdrop-filter: var(--gg-blur-md) saturate(130%);
    backdrop-filter: var(--gg-blur-md) saturate(130%);
}

.text-kgdark01 {
    color: var(--gg-text-muted);
}

/* Module dashboard cards — refined glass treatment */
.bg-card01 {
    background: var(--gg-card-green);
    border: 1px solid rgba(78, 167, 82, 0.35);
    color: var(--gg-text-on-primary);
    border-radius: var(--gg-radius-md);
    box-shadow: var(--gg-shadow-sm), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-sm) saturate(140%);
    backdrop-filter: var(--gg-blur-sm) saturate(140%);
}

.bg-card02 {
    background: var(--gg-card-orange);
    border: 1px solid rgba(255, 152, 0, 0.35);
    color: var(--gg-text-on-primary);
    border-radius: var(--gg-radius-md);
    box-shadow: var(--gg-shadow-sm), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-sm) saturate(140%);
    backdrop-filter: var(--gg-blur-sm) saturate(140%);
}

.bg-card03 {
    background: var(--gg-card-red);
    border: 1px solid rgba(218, 58, 54, 0.35);
    color: var(--gg-text-on-primary);
    border-radius: var(--gg-radius-md);
    box-shadow: var(--gg-shadow-sm), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-sm) saturate(140%);
    backdrop-filter: var(--gg-blur-sm) saturate(140%);
}

.bg-card04 {
    background: var(--gg-card-teal);
    border: 1px solid rgba(37, 177, 195, 0.35);
    color: var(--gg-text-on-primary);
    border-radius: var(--gg-radius-md);
    box-shadow: var(--gg-shadow-sm), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-sm) saturate(140%);
    backdrop-filter: var(--gg-blur-sm) saturate(140%);
}

.bg-card05 {
    background: var(--gg-card-purple);
    border: 1px solid rgba(145, 63, 158, 0.35);
    color: var(--gg-text-on-primary);
    border-radius: var(--gg-radius-md);
    box-shadow: var(--gg-shadow-sm), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-sm) saturate(140%);
    backdrop-filter: var(--gg-blur-sm) saturate(140%);
}


/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.gg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gg-space-2);
    padding: 10px 18px;
    font-family: var(--gg-font);
    font-size: var(--gg-text-base);
    font-weight: var(--gg-weight-semibold);
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: var(--gg-radius-md);
    cursor: pointer;
    transition:
        background var(--gg-duration) var(--gg-ease),
        border-color var(--gg-duration) var(--gg-ease),
        color var(--gg-duration) var(--gg-ease),
        box-shadow var(--gg-duration) var(--gg-ease),
        transform var(--gg-duration) var(--gg-ease),
        opacity var(--gg-duration) var(--gg-ease);
    -webkit-user-select: none;
    user-select: none;
}

.gg-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--gg-primary-muted);
}

.gg-btn:disabled,
.gg-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary — matches login .login-btn */
.gg-btn-primary {
    background: linear-gradient(135deg, var(--gg-primary) 0%, var(--gg-primary-dark) 100%);
    color: var(--gg-text-on-primary);
    border-color: transparent;
    box-shadow: var(--gg-shadow-glow);
}

.gg-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(0, 159, 227, 0.38);
}

.gg-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Secondary — outlined, professional */
.gg-btn-secondary {
    background: var(--gg-bg-glass);
    color: var(--gg-text);
    border-color: var(--gg-border-strong);
    box-shadow: var(--gg-shadow-xs);
}

.gg-btn-secondary:hover:not(:disabled) {
    background: var(--gg-bg-glass-hover);
    border-color: var(--gg-primary-border);
    color: var(--gg-text);
}

/* Ghost — minimal */
.gg-btn-ghost {
    background: transparent;
    color: var(--gg-text-secondary);
    border-color: transparent;
}

.gg-btn-ghost:hover:not(:disabled) {
    background: var(--gg-bg-glass);
    color: var(--gg-text);
}

/* Danger */
.gg-btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: var(--gg-text-on-primary);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25);
}

.gg-btn-danger:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.35);
}

/* Sizes */
.gg-btn-sm {
    padding: 6px 12px;
    font-size: var(--gg-text-sm);
    border-radius: var(--gg-radius-sm);
}

.gg-btn-lg {
    padding: 14px 24px;
    font-size: var(--gg-text-md);
    border-radius: var(--gg-radius-md);
}

.gg-btn-block {
    display: flex;
    width: 100%;
}

.gg-btn-icon {
    padding: var(--gg-space-2);
    border-radius: var(--gg-radius-sm);
}

/* Legacy compat */
.buttonb {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-family: var(--gg-font);
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    color: var(--gg-text-on-primary);
    background: linear-gradient(135deg, var(--gg-primary), var(--gg-primary-dark));
    border: none;
    border-radius: var(--gg-radius-sm);
    cursor: pointer;
    transition: opacity var(--gg-duration) var(--gg-ease);
}

.buttonb:hover {
    opacity: 0.88;
}


/* --------------------------------------------------------------------------
   5. Form controls
   -------------------------------------------------------------------------- */
.gg-input,
.gg-select,
.gg-textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-family: var(--gg-font);
    font-size: var(--gg-text-base);
    font-weight: var(--gg-weight-normal);
    color: var(--gg-text);
    background: var(--gg-bg-input);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-md);
    outline: none;

    transition:
        border-color var(--gg-duration) var(--gg-ease),
        background var(--gg-duration) var(--gg-ease),
        box-shadow var(--gg-duration) var(--gg-ease);
}

.gg-input::placeholder,
.gg-textarea::placeholder {
    color: var(--gg-text-subtle);
}

.gg-input:hover,
.gg-select:hover,
.gg-textarea:hover {
    border-color: var(--gg-border-strong);
}

.gg-input:focus,
.gg-select:focus,
.gg-textarea:focus {
    background: var(--gg-bg-input-focus);
    border-color: var(--gg-border-focus);
    box-shadow: 0 0 0 3px var(--gg-primary-muted);
}

.gg-label {
    display: block;
    margin-bottom: var(--gg-space-2);
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    letter-spacing: var(--gg-tracking-wide);
    text-transform: uppercase;
    color: var(--gg-text-muted);
}

.gg-form-group {
    margin-bottom: var(--gg-space-5);
}


/* --------------------------------------------------------------------------
   6. Cards & panels
   -------------------------------------------------------------------------- */
.gg-card {
    background: var(--gg-bg-glass);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-lg);
    box-shadow: var(--gg-shadow-sm);
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
    overflow: hidden;
}

.gg-card-header {
    padding: var(--gg-space-4) var(--gg-space-5);
    border-bottom: 1px solid var(--gg-border);
}

.gg-card-body {
    padding: var(--gg-space-5);
}

.gg-card-footer {
    padding: var(--gg-space-4) var(--gg-space-5);
    border-top: 1px solid var(--gg-border);
    background: rgba(0, 0, 0, 0.15);
}

.gg-glass-panel {
    background: var(--gg-bg-glass);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-xl);
    padding: var(--gg-space-8);
    box-shadow: var(--gg-shadow-md), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-md);
    backdrop-filter: var(--gg-blur-md);
}


/* --------------------------------------------------------------------------
   7. Badges & status chips
   -------------------------------------------------------------------------- */
.gg-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--gg-space-1);
    padding: 3px 10px;
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    letter-spacing: var(--gg-tracking-wide);
    text-transform: uppercase;
    border-radius: var(--gg-radius-sm);
    border: 1px solid transparent;
}

.gg-badge-primary {
    background: var(--gg-primary-muted);
    border-color: var(--gg-primary-border);
    color: var(--gg-primary-light);
}

.gg-badge-success {
    background: var(--gg-success-bg);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--gg-success);
}

.gg-badge-warning {
    background: var(--gg-warning-bg);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--gg-warning);
}

.gg-badge-danger {
    background: var(--gg-danger-bg);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--gg-danger);
}


/* --------------------------------------------------------------------------
   8. Alerts
   -------------------------------------------------------------------------- */
.gg-alert {
    padding: var(--gg-space-3) var(--gg-space-4);
    font-size: var(--gg-text-sm);
    border-radius: var(--gg-radius-md);
    border: 1px solid transparent;
}

.gg-alert-error {
    color: #fca5a5;
    background: var(--gg-danger-bg);
    border-color: rgba(239, 68, 68, 0.25);
}

.gg-alert-success {
    color: #6ee7b7;
    background: var(--gg-success-bg);
    border-color: rgba(16, 185, 129, 0.25);
}

.gg-alert-info {
    color: var(--gg-primary-light);
    background: var(--gg-primary-muted);
    border-color: var(--gg-primary-border);
}


/* --------------------------------------------------------------------------
   9. Tables (for module grids later)
   -------------------------------------------------------------------------- */
.gg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--gg-text-sm);
}

.gg-table th {
    padding: var(--gg-space-3) var(--gg-space-4);
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    letter-spacing: var(--gg-tracking-wide);
    text-transform: uppercase;
    text-align: left;
    color: var(--gg-text-muted);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--gg-border);
    text-align: center;
}

.gg-table td {
    padding: var(--gg-space-3) var(--gg-space-4);
    color: var(--gg-text-secondary);
    border-bottom: 1px solid var(--gg-border);
}

.gg-table tbody tr:hover td {
    background: var(--gg-bg-glass-hover);
}


/* --------------------------------------------------------------------------
   10. App shell helpers (sidebar & topbar — styled in next steps)
   -------------------------------------------------------------------------- */
.gg-app-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(160deg, rgba(6, 13, 25, 0.92) 0%, rgba(10, 18, 32, 0.88) 100%),
        url("../sphere-background_fit.jpg") center / cover no-repeat;
}

.gg-app-grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 159, 227, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 159, 227, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
}

.gg-app-content {
    position: relative;
    z-index: var(--gg-z-base);
}

/* --------------------------------------------------------------------------
   10.1. Sidebar
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   10b. Sidebar
   -------------------------------------------------------------------------- */

/* Override legacy dashboard.css light-theme rules */
.gg-app .sidebar .nav-link {
    color: var(--gg-text-secondary);
    padding: 0;
}

.gg-app .sidebar .nav-link:hover {
    color: var(--gg-text);
}

/* Richer glass panel */
.gg-app .sidebar.bg-kgdark01 {
    background: linear-gradient(180deg,
            rgba(16, 22, 36, 0.92) 0%,
            rgba(10, 16, 28, 0.88) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        inset -1px 0 0 rgba(255, 255, 255, 0.04),
        4px 0 24px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
}

.gg-app .sidebar {
    top: var(--gg-topbar-height);
    padding-top: 0;
    width: var(--gg-sidebar-width);
}

.gg-app .sidebar-sticky {
    height: calc(100vh - var(--gg-topbar-height));
    padding: var(--gg-space-4) var(--gg-space-3);
    overflow-x: hidden;
    overflow-y: auto;
}

/* User card — glass inset panel */
.gg-sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--gg-space-3);
    padding: var(--gg-space-3) var(--gg-space-4);
    margin-bottom: var(--gg-space-5);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--gg-radius-lg);
    box-shadow: var(--gg-shadow-inset);
}

.gg-sidebar-user .user-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    margin-right: 0;
    font-size: 14px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.gg-sidebar-user .user-name {
    font-size: var(--gg-text-sm);
    font-weight: var(--gg-weight-semibold);
    color: var(--gg-text);
    line-height: 1.3;
}

.gg-sidebar-user .user-role {
    font-size: var(--gg-text-xs);
    color: var(--gg-text-muted);
    letter-spacing: var(--gg-tracking-wide);
    text-transform: uppercase;
    margin-top: 2px;
}

/* Section label */
.gg-sidebar-label {
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    letter-spacing: var(--gg-tracking-wider);
    text-transform: uppercase;
    color: var(--gg-text-subtle);
    padding: 0 var(--gg-space-2);
    margin-bottom: var(--gg-space-1);
}

/* Module group */
.gg-module-group {
    margin-bottom: 0;
    border-radius: var(--gg-radius-md);
    overflow: hidden;
}

.gg-app .sidebar .navbar.gg-module-group,
.gg-app .sidebar .navbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0 !important;
    margin: 3px;
    min-height: 0;
}

/* Module header row */
.gg-module-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--gg-space-1) var(--gg-space-2);
    border-radius: var(--gg-radius-sm);
    transition: background var(--gg-duration) var(--gg-ease);
}

.gg-module-header:hover {
    background: var(--gg-bg-glass-hover);
}

.gg-module-header.is-active {
    background: var(--gg-primary-muted);
}

.gg-module-link {
    flex: 1;
    font-size: var(--gg-text-sm) !important;
    font-weight: var(--gg-weight-semibold) !important;
    color: var(--gg-text) !important;
    text-decoration: none;
    letter-spacing: 0.01em;
    padding: var(--gg-space-1) 0 !important;
}

.gg-module-link:hover {
    color: var(--gg-primary-light) !important;
}

/* Collapse toggle — clean chevron */
.gg-module-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-sm);
    color: var(--gg-text-muted);
    cursor: pointer;
    transition: all var(--gg-duration) var(--gg-ease);
    margin-left: var(--gg-space-4);
}

.gg-module-toggle::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -2px;
    transition: transform var(--gg-duration) var(--gg-ease);
}

.gg-module-toggle[aria-expanded="true"]::after {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.gg-module-toggle:hover {
    border-color: var(--gg-primary-border);
    color: var(--gg-primary-light);
    background: var(--gg-primary-muted);
}

/* Submodule list */
.gg-module-group .navbar-collapse {
    padding: var(--gg-space-1) 0 var(--gg-space-1);
}

.gg-module-group .navbar-nav {
    width: 100%;
    padding-left: var(--gg-space-1);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    margin-left: 0;
}

.gg-module-group .nav-item {
    margin-bottom: 1px;
}

.gg-submodule-link {
    display: flex;
    align-items: center;
    gap: var(--gg-space-1);
    padding: 7px var(--gg-space-1) !important;
    font-size: var(--gg-text-xs) !important;
    font-weight: var(--gg-weight-medium) !important;
    color: var(--gg-text-muted) !important;
    border-radius: var(--gg-radius-sm);
    border-left: 2px solid transparent;
    transition: all var(--gg-duration) var(--gg-ease);
}

.gg-submodule-link svg,
.gg-submodule-link .feather {
    width: 14px;
    height: 14px;
    opacity: 0.55;
    flex-shrink: 0;
}

.gg-submodule-link:hover {
    color: var(--gg-text) !important;
    background: var(--gg-bg-glass-hover);
    border-left-color: rgba(0, 159, 227, 0.35);
}

.gg-submodule-link:hover svg,
.gg-submodule-link:hover .feather {
    opacity: 0.9;
    color: var(--gg-primary-light);
}

.gg-submodule-link.is-active {
    color: var(--gg-primary-light) !important;
    background: var(--gg-primary-muted);
    border-left-color: var(--gg-primary);
    font-weight: var(--gg-weight-semibold) !important;
}

.gg-submodule-link.is-active svg,
.gg-submodule-link.is-active .feather {
    opacity: 1;
    color: var(--gg-primary-light);
}

/* Smooth collapse */
.gg-module-group .navbar-collapse {
    display: block;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height var(--gg-duration-slow) var(--gg-ease),
        padding var(--gg-duration-slow) var(--gg-ease);
}

.gg-module-group .navbar-collapse.show,
.gg-module-group .navbar-collapse.collapsing {
    max-height: 500px;
    /* generous cap, larger than any realistic submenu */
    padding: var(--gg-space-1) 0 var(--gg-space-1);
}

.gg-module-group .navbar-collapse .nav-item {
    opacity: 0;
    transition: opacity var(--gg-duration-slow) var(--gg-ease);
}

.gg-module-group .navbar-collapse.show .nav-item {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   11. Feather icon sizing (existing classes)
   -------------------------------------------------------------------------- */
.feather24 svg {
    width: 24px;
    height: 24px;
}

.feather32 svg {
    width: 32px;
    height: 32px;
}

.feather64 svg {
    width: 64px;
    height: 64px;
}


/* --------------------------------------------------------------------------
   12. Flip cards & utilities (preserved from globalgrid.css)
   -------------------------------------------------------------------------- */
.flip-box {
    background-color: transparent;
    width: auto;
    height: 460px;
    perspective: 1000px;
}

.flip-box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s var(--gg-ease);
    transform-style: preserve-3d;
}

.flip-box:hover .flip-box-inner {
    transform: rotateY(180deg);
}

.flip-box-front,
.flip-box-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-box-back {
    transform: rotateY(180deg);
}

.flip-box-vertical {
    background-color: transparent;
    width: auto;
    height: 150px;
    perspective: 1000px;
}

.flip-box-inner-vertical {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s var(--gg-ease);
    transform-style: preserve-3d;
}

.flip-box-vertical:hover .flip-box-inner-vertical {
    transform: rotateY(180deg);
}

.flip-box-front-vertical,
.flip-box-back-vertical {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-box-back-vertical {
    transform: rotateY(180deg);
}

.zoom {
    transition: transform var(--gg-duration) var(--gg-ease);
}

.zoom:hover {
    transform: scale(1.04);
}

.dbhidden {
    visibility: hidden;
}


/* --------------------------------------------------------------------------
   13. Scrollbar (subtle, professional)
   -------------------------------------------------------------------------- */
.gg-app ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.gg-app ::-webkit-scrollbar-track {
    background: transparent;
}

.gg-app ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--gg-radius-full);
}

.gg-app ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Header bar module submodule info in each page */
/* --------------------------------------------------------------------------
   15. Page header
   -------------------------------------------------------------------------- */
.gg-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: var(--gg-space-6);
    border-bottom: none;
    position: relative;
    margin-bottom: var(--gg-space-6);
    margin-top: 70px;
}

.gg-page-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--gg-border-focus), transparent);
    border-radius: var(--gg-radius-full);
}

/* Left */
.gg-ph-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.gg-ph-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #0e1e35, #0a1628);
    border: 1px solid var(--gg-primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gg-ph-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(0, 159, 227, 0.18), transparent 65%);
}

.gg-ph-icon img {
    width: 27px;
    height: 27px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    border-radius: 50%;
}

.gg-ph-meta {
    min-width: 0;
}

.gg-ph-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-medium);
    color: var(--gg-text-subtle);
    letter-spacing: 0.03em;
    margin-bottom: 5px;
}

.gg-ph-breadcrumb span {
    color: var(--gg-primary);
    font-weight: var(--gg-weight-semibold);
}

.gg-ph-breadcrumb-sep {
    opacity: 0.3;
    font-size: 10px;
}

.gg-ph-title {
    font-size: var(--gg-text-xl);
    font-weight: var(--gg-weight-bold);
    color: var(--gg-text);
    letter-spacing: var(--gg-tracking-tight);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right */
.gg-ph-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.gg-ph-select-wrap {
    display: flex;
    align-items: center;
}

.gg-ph-select-prefix {
    padding: 0 10px 0 12px;
    height: 36px;
    display: flex;
    align-items: center;
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-medium);
    color: var(--gg-text-subtle);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--gg-border);
    border-right: none;
    border-radius: var(--gg-radius-sm) 0 0 var(--gg-radius-sm);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.gg-ph-select {
    height: 36px;
    appearance: none;
    -webkit-appearance: none;
    padding: 0 30px 0 10px;
    background: rgba(255, 255, 255, 0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.35)' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center;
    border: 1px solid var(--gg-border);
    border-radius: 0 var(--gg-radius-sm) var(--gg-radius-sm) 0;
    font-family: var(--gg-font);
    font-size: var(--gg-text-sm);
    font-weight: var(--gg-weight-semibold);
    color: var(--gg-text);
    cursor: pointer;
    transition: border-color var(--gg-duration) var(--gg-ease),
        background var(--gg-duration) var(--gg-ease);
    min-width: 80px;
}

.gg-ph-select:hover {
    border-color: var(--gg-primary-border);
    background-color: var(--gg-primary-muted);
}

.gg-ph-select:focus {
    outline: none;
    border-color: var(--gg-border-focus);
    box-shadow: 0 0 0 3px var(--gg-primary-muted);
}

.gg-ph-select {
    background-color: rgba(6, 13, 25, 0.85);
    /* was rgba(255,255,255,0.05) */
}

.gg-ph-select:hover {
    background-color: rgba(6, 13, 25, 0.95);
}

.gg-ph-select option {
    background-color: #0a1220;
    color: rgba(255, 255, 255, 0.88);
}


.gg-ph-export {
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    background: var(--gg-primary-muted);
    border: 1px solid var(--gg-primary-border);
    border-radius: var(--gg-radius-sm);
    font-family: var(--gg-font);
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    color: var(--gg-primary-light);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--gg-duration) var(--gg-ease);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.gg-ph-export:hover {
    background: rgba(0, 159, 227, 0.18);
    border-color: rgba(0, 159, 227, 0.45);
    color: var(--gg-text);
    transform: translateY(-1px);
    text-decoration: none;

}

.gg-ph-export svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* Main buttons theme and ghost top buttons */
/* --------------------------------------------------------------------------
   15. Page header
   -------------------------------------------------------------------------- */
.gg-page-header-2 {
    position: relative;
    margin-bottom: var(--gg-space-6);
    margin-top: 70px;
    gap: 24px;
    padding-top: var(--gg-space-6);
    padding-left: var(--gg-space-6);
    padding-right: var(--gg-space-6);
    padding-bottom: var(--gg-space-2);
    border-bottom: none;
    position: relative;
    margin-bottom: var(--gg-space-3);
}

/* ── Row 1 ── */
.gg-ph-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding-bottom: var(--gg-space-6);
    margin-bottom: var(--gg-space-6);
    border: none;
}

.gg-ph-top::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg,
            var(--gg-border-focus),
            transparent);
    border-radius: var(--gg-radius-full);
    border: none;
}

.gg-ph-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}


.gg-ph-meta {
    min-width: 0;
}

.gg-ph-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-medium);
    color: var(--gg-text-subtle);
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.gg-ph-breadcrumb span {
    color: var(--gg-primary);
    font-weight: var(--gg-weight-semibold);
}

.gg-ph-breadcrumb-sep {
    opacity: 0.3;
    font-size: 10px;
}

.gg-ph-title {
    font-size: var(--gg-text-xl);
    font-weight: var(--gg-weight-bold);
    color: var(--gg-text);
    letter-spacing: var(--gg-tracking-tight);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ghost nav buttons — row 1 right */
.gg-ph-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    border: none;
}

.gg-ph-btn {
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    background: transparent;
    border: 1px solid var(--gg-border);
    border-radius: 7px;
    font-family: var(--gg-font);
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    color: var(--gg-text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--gg-duration) var(--gg-ease);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.gg-ph-btn:hover {
    background: var(--gg-bg-glass-hover);
    border-color: var(--gg-border-strong);
    color: var(--gg-text);
    text-decoration: none;
}

.gg-ph-btn [data-feather] {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.gg-ph-nav-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.gg-ph-nav-divider {
    width: 100%;
    height: 1px;
    border: none;
    margin: 2px 0;
    background: linear-gradient(90deg,
            transparent,
            var(--gg-border-strong) 20%,
            var(--gg-border-strong) 80%,
            transparent);
}

.gg-ph-nav-label {
    font-size: 10px;
    font-weight: var(--gg-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gg-text-subtle);
    opacity: 0.7;
    padding-left: 2px;
}

.gg-ph-dropdown {
    position: relative;
}

.gg-ph-dropdown-menu {
    margin-top: 6px;
    min-width: 220px;
    padding: 6px;
    background: var(--gg-bg-glass, #fff);
    backdrop-filter: blur(12px);
    border: 1px solid var(--gg-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.gg-ph-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-medium);
    color: var(--gg-text-muted);
    text-decoration: none;
    transition: all var(--gg-duration) var(--gg-ease);
}

.gg-ph-dropdown-item:hover {
    background: var(--gg-bg-glass-hover);
    color: var(--gg-text);
    text-decoration: none;
}

.gg-ph-dropdown-item [data-feather] {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}



/* Tabs in main info  */

.gg-tab-nav {
    display: flex;
    align-items: center;
    gap: var(--gg-space-1);
    padding: var(--gg-space-2);
    background: var(--gg-bg-glass);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-md);
    flex-wrap: wrap;
}

.gg-tab-btn {
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--gg-radius-sm);
    font-family: var(--gg-font);
    font-size: var(--gg-text-sm);
    font-weight: var(--gg-weight-medium);
    color: var(--gg-text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--gg-duration) var(--gg-ease);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.gg-tab-btn:hover {
    background: var(--gg-bg-glass-hover);
    border-color: var(--gg-border);
    color: var(--gg-text);
    text-decoration: none;
}


.gg-tab-btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
}

/* ── Row 2 — optional toolbar ── */
.gg-ph-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--gg-border);
}

.gg-ph-toolbar-left {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.gg-ph-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}



.gg-ph-select-inner {
    display: flex;
    align-items: center;
}

.gg-ph-select:focus {
    outline: none;
    border-color: var(--gg-border-focus);
    box-shadow: 0 0 0 3px var(--gg-primary-muted);
}

.gg-ph-select-2 option {
    background-color: #0a1220;
    color: rgba(255, 255, 255, 0.88);
}

/* Validation message */
.gg-ph-invalid {
    display: none;
    align-items: center;
    gap: 4px;
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-medium);
    color: var(--gg-danger);
}

.gg-ph-invalid [data-feather] {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.was-validated .gg-ph-select:invalid~.gg-ph-invalid {
    display: flex;
}

/* Action buttons */
.gg-ph-action-btn {
    height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-family: var(--gg-font);
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    cursor: pointer;
    transition: all var(--gg-duration) var(--gg-ease);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.gg-ph-action-btn [data-feather] {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.gg-ph-action-btn-tab {
    height: 26px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-family: var(--gg-font);
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    cursor: pointer;
    transition: all var(--gg-duration) var(--gg-ease);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.gg-ph-action-btn-tab [data-feather] {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.gg-ph-action-save {
    background: var(--gg-success-bg);
    border-color: rgba(16, 185, 129, 0.25);
    color: var(--gg-success);
}

.gg-ph-action-save:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.45);
    color: #fff;
    transform: translateY(-1px);
}

.gg-ph-action-add {
    background: var(--gg-primary-muted);
    border-color: var(--gg-primary-border);
    color: var(--gg-primary-light);
}

.gg-ph-action-add:hover {
    background: rgba(0, 159, 227, 0.18);
    border-color: rgba(0, 159, 227, 0.45);
    color: #fff;
    transform: translateY(-1px);
}

.gg-ph-action-delete {
    background: var(--gg-danger-bg);
    border-color: rgba(239, 68, 68, 0.22);
    color: var(--gg-danger);
}

.gg-ph-action-delete:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fff;
    transform: translateY(-1px);
}

/* Orange */
.gg-ph-action-btn1 {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.22);
    color: #f97316;
}

.gg-ph-action-btn1:hover {
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.45);
    color: #fff;
    transform: translateY(-1px);
}

/* Purple */
.gg-ph-action-btn2 {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.22);
    color: #a855f7;
}

.gg-ph-action-btn2:hover {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.45);
    color: #fff;
    transform: translateY(-1px);
}

/* Cyan */
.gg-ph-action-btn3 {
    background: rgba(6, 182, 212, 0.12);
    border-color: rgba(6, 182, 212, 0.22);
    color: #06b6d4;
}

.gg-ph-action-btn3:hover {
    background: rgba(6, 182, 212, 0.18);
    border-color: rgba(6, 182, 212, 0.45);
    color: #fff;
    transform: translateY(-1px);
}

/* Pink */
.gg-ph-action-btn4 {
    background: rgba(236, 72, 153, 0.12);
    border-color: rgba(236, 72, 153, 0.22);
    color: #ec4899;
}

.gg-ph-action-btn4:hover {
    background: rgba(236, 72, 153, 0.18);
    border-color: rgba(236, 72, 153, 0.45);
    color: #fff;
    transform: translateY(-1px);
}

.gg-ph-divider {
    width: 1px;
    height: 20px;
    background: var(--gg-border);
    margin: 0 2px;
    flex-shrink: 0;
}

.gg-page-loader {
    position: fixed;
    inset: 0;
    background: rgba(15, 17, 21, 0.45);
    /* was solid #0f1115 */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.gg-page-loader.gg-loader-hidden {
    opacity: 0;
    pointer-events: none;
}

.gg-spinner-lg {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: gg-spin 0.7s linear infinite;
}


/* Timeline styling */
.gg-timeline-section {
    padding: 24px 12px;
}

.gg-timeline-heading {
    text-align: left;
    margin-bottom: 28px;
}

.gg-timeline-heading-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gg-timeline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--gg-accent-soft, rgba(99, 102, 241, 0.15));
    color: var(--gg-accent, #63c2f1);
    flex-shrink: 0;
}

.gg-timeline-heading h2 {
    font-size: 1.5rem;
    font-weight: bold;

    color: var(--gg-text, #e6e8ec);
    letter-spacing: -0.01em;
    margin: 0;
}

.gg-timeline-heading-line {
    margin-top: 12px;
    height: 1px;
    background: linear-gradient(90deg,
            var(--gg-accent, #63b6f1) 20%,
            var(--gg-accent, #63c4f1) 30%,
            var(--gg-border, rgba(89, 181, 217, 0.6)) 10px,
            transparent 20%);
}

.gg-timeline {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 8px;
}

.gg-timeline-track {
    position: absolute;
    top: 13px;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--gg-border, rgba(255, 255, 255, 0.14)) 15%,
            var(--gg-border, rgba(255, 255, 255, 0.14)) 85%,
            transparent);
    z-index: 0;
}

.gg-timeline-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 160px;
    margin: 0 4px;
}

.gg-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gg-accent, #63c2f1);
    box-shadow: 0 0 0 4px var(--gg-accent-soft, rgba(99, 191, 241, 0.18));
    margin-bottom: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gg-timeline-step:hover .gg-timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px var(--gg-accent-soft, rgba(99, 198, 241, 0.25));
}

.gg-timeline-card {
    width: 100%;
    text-align: center;
    padding: 14px 12px;
    border-radius: var(--gg-radius, 14px);
    background: var(--gg-glass-bg, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--gg-border, rgba(255, 255, 255, 0.10));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--gg-shadow, 0 4px 16px rgba(0, 0, 0, 0.18));
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.gg-timeline-step:hover .gg-timeline-card {
    transform: translateY(-3px);
    border-color: var(--gg-accent, #63c6f1);
    background: var(--gg-glass-bg-hover, rgba(255, 255, 255, 0.07));
}

.gg-timeline-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gg-text, #e6e8ec);
    margin: 0 0 4px;
}

.gg-timeline-label {
    font-size: 0.75rem;
    color: var(--gg-text-muted, rgba(255, 255, 255, 0.55));
    margin: 0;
}

/* --------------------------------------------------------------------------
   Modal shell
   -------------------------------------------------------------------------- */
.gg-modal .modal-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)), rgba(30, 60, 110, 0.28);
    border: 1px solid var(--gg-border-strong);
    border-radius: var(--gg-radius-xl);
    box-shadow: var(--gg-shadow-lg), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-lg) saturate(180%);
    backdrop-filter: var(--gg-blur-lg) saturate(180%);
    color: var(--gg-text-secondary);
    overflow: hidden;
}

.gg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gg-space-4) var(--gg-space-5);
    border-bottom: 1px solid var(--gg-border);
    background: rgba(120, 170, 255, 0.06);
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
}

.gg-modal-header .gg-modal-title {
    display: flex;
    align-items: center;
    gap: var(--gg-space-2);
    font-size: var(--gg-text-lg);
    font-weight: var(--gg-weight-semibold);
    color: var(--gg-text);
    letter-spacing: var(--gg-tracking-tight);
    margin: 0;
}

.gg-modal-header .gg-modal-title svg,
.gg-modal-header .gg-modal-title img {
    width: 18px;
    height: 18px;
    color: var(--gg-primary-light);
    filter: drop-shadow(0 0 6px var(--gg-primary-glow));
}

.gg-modal-body {
    padding: var(--gg-space-5);
    background: transparent;
}

.gg-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--gg-space-2);
    padding: var(--gg-space-4) var(--gg-space-5);
    border-top: 1px solid var(--gg-border);
    background: rgba(120, 170, 255, 0.06);
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
}

/* --------------------------------------------------------------------------
   Banners — replaces bootstrap .alert
   -------------------------------------------------------------------------- */
.gg-banner {
    display: flex;
    align-items: center;
    gap: var(--gg-space-3);
    padding: var(--gg-space-3) var(--gg-space-4);
    border-radius: var(--gg-radius-md);
    font-size: var(--gg-text-sm);
    margin-bottom: var(--gg-space-4);
    border: 1px solid transparent;
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
}

.gg-banner svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.gg-banner strong {
    color: var(--gg-text);
}

.gg-banner-warning {
    background: var(--gg-warning-bg);
    border-color: rgba(245, 158, 11, 0.28);
    color: var(--gg-warning);
}

.gg-banner-info {
    background: var(--gg-info-bg);
    border-color: rgba(59, 130, 246, 0.28);
    color: var(--gg-info);
}

.gg-banner-danger {
    background: var(--gg-danger-bg);
    border-color: rgba(239, 68, 68, 0.32);
    color: #f87171;
}

.gg-banner-success {
    background: var(--gg-success-bg);
    border-color: rgba(16, 185, 129, 0.28);
    color: #34d399;
}

/* --------------------------------------------------------------------------
   Stat cards
   -------------------------------------------------------------------------- */
.gg-stat-card {
    position: relative;
    background: var(--gg-bg-glass);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-lg);
    box-shadow: var(--gg-shadow-sm), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-md) saturate(150%);
    backdrop-filter: var(--gg-blur-md) saturate(150%);
    overflow: hidden;
    height: 100%;
    transition: transform var(--gg-duration) var(--gg-ease),
        border-color var(--gg-duration) var(--gg-ease),
        box-shadow var(--gg-duration) var(--gg-ease),
        background var(--gg-duration) var(--gg-ease);
}

.gg-stat-card:hover {
    transform: translateY(-2px);
    background: var(--gg-bg-glass-hover);
}

.gg-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.gg-stat-card-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gg-space-2);
    padding: var(--gg-space-3);
    font-size: var(--gg-text-sm);
    font-weight: var(--gg-weight-semibold);
    letter-spacing: var(--gg-tracking-wide);
    text-transform: uppercase;
    border-bottom: 1px solid var(--gg-border);
    background: rgba(255, 255, 255, 0.02);
}

.gg-stat-card-head svg {
    width: 16px;
    height: 16px;
}

.gg-stat-card-primary::before {
    background: linear-gradient(90deg, transparent, var(--gg-primary-light), transparent);
    box-shadow: 0 0 12px var(--gg-primary-glow);
}

.gg-stat-card-primary {
    border-color: var(--gg-primary-border);
}

.gg-stat-card-primary .gg-stat-card-head {
    color: var(--gg-primary-light);
}

.gg-stat-card-primary .gg-stat-card-head svg {
    filter: drop-shadow(0 0 5px var(--gg-primary-glow));
}

.gg-stat-card-success::before {
    background: linear-gradient(90deg, transparent, #34d399, transparent);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.gg-stat-card-success {
    border-color: rgba(16, 185, 129, 0.28);
}

.gg-stat-card-success .gg-stat-card-head {
    color: #34d399;
}

.gg-stat-card-success .gg-stat-card-head svg {
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.45));
}

.gg-stat-card-warning::before {
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.gg-stat-card-warning {
    border-color: rgba(245, 158, 11, 0.28);
}

.gg-stat-card-warning .gg-stat-card-head {
    color: #fbbf24;
}

.gg-stat-card-warning .gg-stat-card-head svg {
    filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.45));
}

.gg-stat-card-danger::before {
    background: linear-gradient(90deg, transparent, #f87171, transparent);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.gg-stat-card-danger {
    border-color: rgba(239, 68, 68, 0.28);
}

.gg-stat-card-danger .gg-stat-card-head {
    color: #f87171;
}

.gg-stat-card-danger .gg-stat-card-head svg {
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.45));
}


/* ===========================
   INFO / CYAN
=========================== */

.gg-stat-card-info::before {
    background: linear-gradient(90deg, transparent, #22d3ee, transparent);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}

.gg-stat-card-info {
    border-color: rgba(34, 211, 238, 0.28);
}

.gg-stat-card-info .gg-stat-card-head {
    color: #22d3ee;
}

.gg-stat-card-info .gg-stat-card-head svg {
    filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.45));
}


/* ===========================
   PURPLE
=========================== */

.gg-stat-card-purple::before {
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

.gg-stat-card-purple {
    border-color: rgba(168, 85, 247, 0.28);
}

.gg-stat-card-purple .gg-stat-card-head {
    color: #c084fc;
}

.gg-stat-card-purple .gg-stat-card-head svg {
    filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.45));
}


/* ===========================
   PINK
=========================== */

.gg-stat-card-pink::before {
    background: linear-gradient(90deg, transparent, #ec4899, transparent);
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.35);
}

.gg-stat-card-pink {
    border-color: rgba(236, 72, 153, 0.28);
}

.gg-stat-card-pink .gg-stat-card-head {
    color: #f472b6;
}

.gg-stat-card-pink .gg-stat-card-head svg {
    filter: drop-shadow(0 0 5px rgba(236, 72, 153, 0.45));
}


.gg-stat-card-body {
    padding: var(--gg-space-4);
    text-align: center;
}

.gg-stat-label {
    font-size: var(--gg-text-xs);
    color: var(--gg-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--gg-tracking-wide);
    margin-bottom: var(--gg-space-1);
}

.gg-stat-value {
    font-size: var(--gg-text-lg);
    font-weight: var(--gg-weight-semibold);
    color: var(--gg-text);
}

.gg-stat-value-accent {
    color: var(--gg-primary-light);
}

.gg-stat-divider {
    height: 1px;
    background: var(--gg-border);
    margin: var(--gg-space-3) 0;
}

.gg-stat-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gg-space-1);
    background: var(--gg-bg-input);
    border: 1px solid var(--gg-border-strong);
    border-radius: var(--gg-radius-sm);
    padding: var(--gg-space-1) var(--gg-space-2);
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
}

.gg-stat-input-group span {
    color: var(--gg-text-muted);
    font-size: var(--gg-text-sm);
}

.gg-stat-input-group input {
    background: transparent;
    border: none;
    color: var(--gg-text);
    font-size: var(--gg-text-xl);
    font-weight: var(--gg-weight-bold);
    text-align: center;
    width: 100%;
    outline: none;
}

.gg-stat-input-group input:focus {
    color: var(--gg-primary-light);
}

/* --------------------------------------------------------------------------
   Modal table wrap (paired with .gg-table from section 9 of the base file —
   .gg-table-wrap adds the glass container; column/header styling below
   overrides section 9's .gg-table th intentionally for modal contexts)
   -------------------------------------------------------------------------- */
.gg-table-wrap {
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-lg);
    overflow: hidden;
    background: var(--gg-bg-glass);
    -webkit-backdrop-filter: var(--gg-blur-md) saturate(140%);
    backdrop-filter: var(--gg-blur-md) saturate(140%);
    box-shadow: var(--gg-shadow-inset);
}

.gg-table thead th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--gg-text-muted);
    font-size: var(--gg-text-xs);
    text-transform: uppercase;
    letter-spacing: var(--gg-tracking-wide);
    font-weight: var(--gg-weight-semibold);
    padding: var(--gg-space-3);
    text-align: left;
    border-bottom: 1px solid var(--gg-border);
}

.gg-table td {
    padding: var(--gg-space-3);
    border-bottom: 1px solid var(--gg-border);
    background: transparent;
}

.gg-table tbody tr {
    cursor: pointer;
    transition: background var(--gg-duration) var(--gg-ease);
}

.gg-table tbody tr:hover td {
    background: var(--gg-bg-glass-hover);
}

.gg-table tbody tr.table-active td,
.gg-table tbody tr.is-active-row td {
    background: var(--gg-primary-muted);
}

.gg-table tfoot td {
    background: rgba(255, 255, 255, 0.03);
    color: var(--gg-text);
    font-weight: var(--gg-weight-semibold);
    border-bottom: none;
    border-top: 1px solid var(--gg-border-strong);
}

.gg-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.gg-table th.sortable:hover {
    color: var(--gg-text);
}

.gg-table th.sortable::after {
    content: "⇅";
    margin-left: 6px;
    opacity: 0.4;
    font-size: 10px;
}

.gg-text-right {
    text-align: right;
}

.gg-text-center {
    text-align: center;
}

.gg-text-muted-sm {
    color: var(--gg-text-muted);
    font-size: var(--gg-text-xs);
}

/* --------------------------------------------------------------------------
   Badges — single definition (glass pill), used everywhere
   -------------------------------------------------------------------------- */
.gg-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--gg-space-1);
    padding: 3px 10px;
    border-radius: var(--gg-radius-full);
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 1px solid transparent;
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
}

.gg-badge-danger {
    background: var(--gg-danger-bg);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.28);
}

.gg-badge-success {
    background: var(--gg-success-bg);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.28);
}

.gg-badge-primary {
    background: var(--gg-primary-muted);
    color: var(--gg-primary-light);
    border-color: var(--gg-primary-border);
}

.gg-badge-warning {
    background: var(--gg-warning-bg);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.28);
}

.gg-badge-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gg-text-muted);
    border-color: var(--gg-border);
}

/* --------------------------------------------------------------------------
   Glass button variants — fills the gap: .gg-btn-primary/-secondary/-ghost
   already exist in section 4; these two were missing and are used by
   deleteRecordBtn / addRecordBtn / confirmSendBtn
   -------------------------------------------------------------------------- */
.gg-btn-success-glass {
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.32);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.12);
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
}

.gg-btn-success-glass:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.22);
}

.gg-btn-danger-glass {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.32);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.12);
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
}

.gg-btn-danger-glass:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.22);
}

/* --------------------------------------------------------------------------
   Form controls — single definition for input/select/textarea/label/group
   -------------------------------------------------------------------------- */
.gg-form-group {
    margin-bottom: var(--gg-space-4);
}

.gg-label {
    display: block;
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--gg-tracking-wide);
    color: var(--gg-text-muted);
    margin-bottom: var(--gg-space-2);
}

.gg-input,
.gg-select,
.gg-textarea {
    display: block;
    width: 100%;
    background: var(--gg-bg-input);
    border: 1px solid var(--gg-border-strong);
    border-radius: var(--gg-radius-md);
    color: var(--gg-text);
    font-family: var(--gg-font);
    font-size: var(--gg-text-base);
    padding: 10px 14px;
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
    transition: background var(--gg-duration) var(--gg-ease),
        border-color var(--gg-duration) var(--gg-ease),
        box-shadow var(--gg-duration) var(--gg-ease);
}

.gg-input::placeholder,
.gg-textarea::placeholder {
    color: var(--gg-text-subtle);
}

.gg-input:hover,
.gg-select:hover,
.gg-textarea:hover {
    border-color: var(--gg-border-strong);
}

.gg-input:focus,
.gg-select:focus,
.gg-textarea:focus {
    outline: none;
    background: var(--gg-bg-input-focus);
    border-color: var(--gg-border-focus);
    box-shadow: 0 0 0 3px var(--gg-primary-muted);
}

.gg-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.gg-select option {
    background: var(--gg-bg-elevated);
    color: var(--gg-text);
}

.gg-input-sm {
    padding: 6px 12px;
    font-size: var(--gg-text-sm);
    width: auto;
}

.gg-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Tabs — styles bootstrap's real nav-tabs, structure stays bootstrap's
   -------------------------------------------------------------------------- */
.gg-tabs {
    border: none;
}

.gg-tabs .nav-link.gg-tab {
    padding: 8px 20px;
    border-radius: var(--gg-radius-md) !important;
    background: var(--gg-bg-glass);
    border: 1px solid var(--gg-border) !important;
    color: var(--gg-text-secondary) !important;
    font-size: var(--gg-text-sm);
    font-weight: var(--gg-weight-semibold);
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
    transition: background var(--gg-duration) var(--gg-ease),
        color var(--gg-duration) var(--gg-ease),
        border-color var(--gg-duration) var(--gg-ease);
    margin-right: var(--gg-space-2);
}

.gg-tabs .nav-link.gg-tab:hover {
    background: var(--gg-bg-glass-hover);
    color: var(--gg-text) !important;
}

.gg-tabs .nav-link.gg-tab.active {
    background: linear-gradient(135deg, var(--gg-primary) 0%, var(--gg-primary-dark) 100%) !important;
    border-color: transparent !important;
    color: var(--gg-text-on-primary) !important;
    box-shadow: var(--gg-shadow-glow);
}

/* Standalone tab-button variant (non nav-tabs usage, e.g. page toolbars) */
.gg-tab-btn.is-active {
    background: var(--gg-primary-muted);
    border-color: var(--gg-primary-border);
    color: var(--gg-primary-light);
    font-weight: var(--gg-weight-semibold);
}

/* --------------------------------------------------------------------------
   Chips — preset-btn, structure/class stays as JS expects it
   -------------------------------------------------------------------------- */
.preset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--gg-radius-full);
    font-size: var(--gg-text-xs);
    font-weight: var(--gg-weight-semibold);
    background: transparent;
    cursor: pointer;
    margin-right: var(--gg-space-2);
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
    transition: background var(--gg-duration) var(--gg-ease), transform var(--gg-duration) var(--gg-ease);
}

.preset-btn:hover {
    transform: translateY(-1px);
}

.preset-icon {
    display: inline-flex;
}

.preset-icon svg {
    width: 12px;
    height: 12px;
}

.preset-btn.gg-chip-primary {
    color: var(--gg-primary-light);
    border: 1px solid var(--gg-primary-border);
}

.preset-btn.gg-chip-primary:hover,
.preset-btn.gg-chip-primary.active {
    background: var(--gg-primary-muted);
}

.preset-btn.gg-chip-info {
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.32);
}

.preset-btn.gg-chip-info:hover,
.preset-btn.gg-chip-info.active {
    background: var(--gg-info-bg);
}

.preset-btn.gg-chip-success {
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.32);
}

.preset-btn.gg-chip-success:hover,
.preset-btn.gg-chip-success.active {
    background: var(--gg-success-bg);
}

.preset-btn.gg-chip-warning {
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.32);
}

.preset-btn.gg-chip-warning:hover,
.preset-btn.gg-chip-warning.active {
    background: var(--gg-warning-bg);
}

/* --------------------------------------------------------------------------
   Confirm modal — glass list + message box
   -------------------------------------------------------------------------- */
.gg-confirm-list {
    list-style: none;
    padding: 0;
    margin: var(--gg-space-2) 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gg-confirm-list li {
    background: var(--gg-bg-glass);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-sm);
    padding: 6px 12px;
    font-size: var(--gg-text-sm);
    color: var(--gg-text);
}

.gg-message-box {
    background: var(--gg-bg-glass);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-md);
    padding: var(--gg-space-3);
    color: var(--gg-text-secondary);
    -webkit-backdrop-filter: var(--gg-blur-sm);
    backdrop-filter: var(--gg-blur-sm);
    min-height: 60px;
}

/* --------------------------------------------------------------------------
   Spinner — glass loading state
   -------------------------------------------------------------------------- */
.gg-spinner-wrap {
    text-align: center;
    padding: var(--gg-space-6) 0;
}

.gg-spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid var(--gg-border);
    border-top-color: var(--gg-primary);
    animation: gg-spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes gg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   Note cards — glass panel grid
   -------------------------------------------------------------------------- */
.gg-note-card {
    background: var(--gg-bg-glass);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-lg);
    box-shadow: var(--gg-shadow-sm), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-md) saturate(140%);
    backdrop-filter: var(--gg-blur-md) saturate(140%);
    height: 100%;
    overflow: hidden;
    transition: border-color var(--gg-duration) var(--gg-ease), transform var(--gg-duration) var(--gg-ease);
}

.gg-note-card:hover {
    border-color: var(--gg-primary-border);
}

.gg-note-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gg-space-3) var(--gg-space-4);
    border-bottom: 1px solid var(--gg-border);
    background: rgba(255, 255, 255, 0.02);
}

.gg-note-card-head-left {
    display: flex;
    align-items: center;
    gap: var(--gg-space-2);
}

.gg-note-number-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gg-primary), var(--gg-primary-dark));
    color: var(--gg-text-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: var(--gg-weight-bold);
    box-shadow: var(--gg-shadow-glow);
}

.gg-note-card-head-title {
    font-size: var(--gg-text-sm);
    font-weight: var(--gg-weight-semibold);
    color: var(--gg-text-secondary);
}

.gg-note-card-body {
    padding: var(--gg-space-3);
}

.gg-note-textarea {
    resize: vertical;
    min-height: 110px;
    font-size: var(--gg-text-sm);
    line-height: 1.6;
}

.gg-note-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--gg-space-2);
}

/* --------------------------------------------------------------------------
   Toggle switch (notes "Done" control)
   -------------------------------------------------------------------------- */
.gg-toggle-track {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: var(--gg-bg-input);
    border: 1px solid var(--gg-border-strong);
    transition: background 0.25s;
    flex-shrink: 0;
}

.gg-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gg-text-secondary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s, background 0.25s;
    pointer-events: none;
}

.note-active-checkbox:checked~.gg-toggle-thumb {
    transform: translateX(18px);
    background: var(--gg-text-on-primary);
}

.note-active-checkbox:checked~.gg-toggle-track,
.gg-toggle-track:has(.note-active-checkbox:checked) {
    background: linear-gradient(135deg, var(--gg-primary), var(--gg-primary-dark));
    border-color: transparent;
}

/* Analytics Theme */
/* --------------------------------------------------------------
     Page-local compact overrides (scoped to .gg-analytics-compact —
     does NOT touch the shared gg- global stylesheet)
     -------------------------------------------------------------- */
.gg-analytics-compact .gg-row-tight {
    margin-left: -4px;
    margin-right: -4px;
}

.gg-analytics-compact .gg-row-tight>[class*="col-"] {
    padding-left: 4px;
    padding-right: 4px;
    margin-bottom: 8px;
}


/* ==========================
   KPI Cards
========================== */

.gg-analytics-compact .gg-stat-card-head {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    min-height: 44px;
}

.gg-analytics-compact .gg-stat-card-body {
    padding: 12px 14px;
}

.gg-analytics-compact .gg-stat-value {
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}


/* ==========================
   Chart Cards
========================== */

.gg-analytics-compact .gg-card-header {
    padding: 10px 14px;
    min-height: 48px;

    display: flex;
    align-items: center;

    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.gg-analytics-compact .gg-card-header h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.gg-analytics-compact .gg-card-body {
    padding: 8px 10px 4px;
}

.gg-analytics-compact .gg-card-footer {
    padding: 8px 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 36px;

    border-top: 1px solid rgba(255, 255, 255, .06);
}


/* ==========================
   Body Diagram
========================== */

.gg-body-diagram-panel {
    padding: 18px 20px;
}


.gg-toast-container {
    position: fixed;
    top: 76px;              /* clears the fixed navbar */
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.gg-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
    max-width: 380px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-left: 4px solid var(--gg-toast-accent, #6b7280);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    font-size: 14px;
    color: #1f2937;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: auto;
}

.gg-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.gg-toast-hide {
    opacity: 0;
    transform: translateX(30px);
}

/* Type-based tint + accent color, layered on top of the base glass */
.gg-toast-success {
    --gg-toast-accent: #22c55e;
    background: linear-gradient(0deg, rgba(34, 197, 94, 0.14), rgba(34, 197, 94, 0.14)),
                rgba(255, 255, 255, 0.55);
}

.gg-toast-error {
    --gg-toast-accent: #ef4444;
    background: linear-gradient(0deg, rgba(239, 68, 68, 0.14), rgba(239, 68, 68, 0.14)),
                rgba(255, 255, 255, 0.55);
}

.gg-toast-info {
    --gg-toast-accent: #3b82f6;
    background: linear-gradient(0deg, rgba(59, 130, 246, 0.14), rgba(59, 130, 246, 0.14)),
                rgba(255, 255, 255, 0.55);
}

/* Icon badge instead of a plain dot */
.gg-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--gg-toast-accent, #6b7280);
}

.gg-toast-success .gg-toast-icon::before { content: '\2713'; }   /* check */
.gg-toast-error   .gg-toast-icon::before { content: '\2715'; }   /* x */
.gg-toast-info    .gg-toast-icon::before { content: '\2139'; }   /* i */

.gg-toast-msg {
    flex: 1;
    line-height: 1.4;
}

.gg-toast-close {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0 2px;
    flex-shrink: 0;
}

.gg-toast-close:hover {
    color: #1f2937;
}
/* --------------------------------------------------------------------------
   Timeline responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .gg-timeline-track {
        display: none;
    }

    .gg-timeline {
        flex-direction: column;
        align-items: center;
    }

    .gg-timeline-step {
        width: 220px;
        margin-bottom: 12px;
    }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .flip-box:hover .flip-box-inner,
    .flip-box-vertical:hover .flip-box-inner-vertical {
        transform: none;
    }
}

@keyframes gg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   Note cards — glass panel grid, replaces white bootstrap cards
   -------------------------------------------------------------------------- */
.gg-note-card {
    background: var(--gg-bg-glass);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-radius-lg);
    box-shadow: var(--gg-shadow-sm), var(--gg-shadow-inset);
    -webkit-backdrop-filter: var(--gg-blur-md) saturate(140%);
    backdrop-filter: var(--gg-blur-md) saturate(140%);
    height: 100%;
    overflow: hidden;
    transition: border-color var(--gg-duration) var(--gg-ease), transform var(--gg-duration) var(--gg-ease);
}

.gg-note-card:hover {
    border-color: var(--gg-primary-border);
}

.gg-note-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gg-space-3) var(--gg-space-4);
    border-bottom: 1px solid var(--gg-border);
    background: rgba(255, 255, 255, 0.02);
}

.gg-note-card-head-left {
    display: flex;
    align-items: center;
    gap: var(--gg-space-2);
}

.gg-note-number-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gg-primary), var(--gg-primary-dark));
    color: var(--gg-text-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: var(--gg-weight-bold);
    box-shadow: var(--gg-shadow-glow);
}

.gg-note-card-head-title {
    font-size: var(--gg-text-sm);
    font-weight: var(--gg-weight-semibold);
    color: var(--gg-text-secondary);
}

.gg-note-card-body {
    padding: var(--gg-space-3);
}

.gg-note-textarea {
    resize: vertical;
    min-height: 110px;
    font-size: var(--gg-text-sm);
    line-height: 1.6;
}

.gg-note-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--gg-space-2);
}


.gg-toggle-track {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: var(--gg-bg-input);
    border: 1px solid var(--gg-border-strong);
    transition: background 0.25s;
    flex-shrink: 0;
}

.gg-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gg-text-secondary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s, background 0.25s;
    pointer-events: none;
}

.note-active-checkbox:checked~.gg-toggle-thumb {
    transform: translateX(18px);
    background: var(--gg-text-on-primary);
}

.note-active-checkbox:checked~.gg-toggle-track,
.gg-toggle-track:has(.note-active-checkbox:checked) {
    background: linear-gradient(135deg, var(--gg-primary), var(--gg-primary-dark));
    border-color: transparent;
}



@media (max-width: 768px) {
    .gg-timeline-track {
        display: none;
    }

    .gg-timeline {
        flex-direction: column;
        align-items: center;
    }

    .gg-timeline-step {
        width: 220px;
        margin-bottom: 12px;
    }
}

/* Tabs Active state */
.gg-tab-btn.is-active {
    background: var(--gg-primary-muted);
    border-color: var(--gg-primary-border);
    color: var(--gg-primary-light);
    font-weight: var(--gg-weight-semibold);
}

.gg-table tbody tr.is-active-row {
    background: var(--gg-accent-soft, rgba(99, 102, 241, 0.10));
}

.gg-table tbody tr.is-active-row td {
    color: var(--gg-text, #e6e8ec);
}

@keyframes gg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   14. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .flip-box:hover .flip-box-inner,
    .flip-box-vertical:hover .flip-box-inner-vertical {
        transform: none;
    }
}