/*
 * ============================================================
 * FORGE by Gitana — Design System v1.0
 * From Idea. To Blueprint. To Build.
 * ============================================================
 * Dark theme, glassmorphism, teal/blue palette from brand logo.
 * ============================================================
 */

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

/* ══════════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ══════════════════════════════════════════════════════════════ */
:root {
    /* ── Brand Colors ── */
    --forge-teal:          #3CB4A0;
    --forge-teal-light:    #5DCDB9;
    --forge-teal-dark:     #2A8F7E;
    --forge-blue:          #2B6CB0;
    --forge-blue-light:    #4299E1;
    --forge-blue-dark:     #1A4971;

    /* ── Gradient ── */
    --forge-gradient:      linear-gradient(135deg, var(--forge-teal) 0%, var(--forge-blue) 100%);
    --forge-gradient-hover:linear-gradient(135deg, var(--forge-teal-light) 0%, var(--forge-blue-light) 100%);
    --forge-gradient-subtle:linear-gradient(135deg, rgba(60,180,160,0.15) 0%, rgba(43,108,176,0.15) 100%);

    /* ── Surface Colors (Dark Theme) ── */
    --surface-900:         #0B0F19;
    --surface-800:         #0F172A;
    --surface-700:         #1E293B;
    --surface-600:         #334155;
    --surface-500:         #475569;
    --surface-400:         #64748B;
    --surface-300:         #94A3B8;
    --surface-200:         #CBD5E1;
    --surface-100:         #E2E8F0;
    --surface-50:          #F1F5F9;

    /* ── Text Colors ── */
    --text-primary:        #F1F5F9;
    --text-secondary:      #94A3B8;
    --text-muted:          #64748B;
    --text-inverse:        #0F172A;

    /* ── Status Colors ── */
    --color-success:       #10B981;
    --color-success-bg:    rgba(16,185,129,0.12);
    --color-warning:       #F59E0B;
    --color-warning-bg:    rgba(245,158,11,0.12);
    --color-danger:        #EF4444;
    --color-danger-bg:     rgba(239,68,68,0.12);
    --color-info:          #3B82F6;
    --color-info-bg:       rgba(59,130,246,0.12);

    /* ── Confidence Colors (Blueprint) ── */
    --confidence-explicit:     #10B981;
    --confidence-strong:       #3B82F6;
    --confidence-weak:         #F59E0B;
    --confidence-unknown:      #EF4444;

    /* ── Typography ── */
    --font-body:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:           'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    --text-xs:             0.75rem;
    --text-sm:             0.8125rem;
    --text-base:           0.875rem;
    --text-lg:             1rem;
    --text-xl:             1.125rem;
    --text-2xl:            1.375rem;
    --text-3xl:            1.75rem;
    --text-4xl:            2.25rem;

    /* ── Spacing ── */
    --space-1:             0.25rem;
    --space-2:             0.5rem;
    --space-3:             0.75rem;
    --space-4:             1rem;
    --space-5:             1.25rem;
    --space-6:             1.5rem;
    --space-8:             2rem;
    --space-10:            2.5rem;
    --space-12:            3rem;
    --space-16:            4rem;

    /* ── Border Radius ── */
    --radius-sm:           0.375rem;
    --radius-md:           0.5rem;
    --radius-lg:           0.75rem;
    --radius-xl:           1rem;
    --radius-2xl:          1.25rem;
    --radius-full:         9999px;

    /* ── Shadows ── */
    --shadow-sm:           0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:           0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
    --shadow-lg:           0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.2);
    --shadow-xl:           0 20px 25px -5px rgba(0,0,0,0.5), 0 8px 10px -6px rgba(0,0,0,0.3);
    --shadow-glow:         0 0 20px rgba(60,180,160,0.3), 0 0 40px rgba(60,180,160,0.1);

    /* ── Glass ── */
    --glass-bg:            rgba(15,23,42,0.6);
    --glass-border:        rgba(148,163,184,0.1);
    --glass-blur:          16px;

    /* ── Layout ── */
    --sidebar-width:       260px;
    --sidebar-collapsed:   72px;
    --header-height:       64px;
    --content-max-width:   1400px;

    /* ── Transitions ── */
    --transition-fast:     150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:     250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:     350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring:   500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ── Z-Index ── */
    --z-sidebar:           100;
    --z-header:            110;
    --z-dropdown:          200;
    --z-modal:             300;
    --z-toast:             400;
}

/* ══════════════════════════════════════════════════════════════
   2. CSS RESET & BASE
   ══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--surface-900);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--forge-teal);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--forge-teal-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ══════════════════════════════════════════════════════════════
   3. LAYOUT: App Shell
   ══════════════════════════════════════════════════════════════ */
.forge-app {
    display: flex;
    min-height: 100vh;
}

.forge-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--surface-800);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: var(--z-sidebar);
    transition: width var(--transition-base);
    overflow: hidden;
}

.forge-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition-base);
}

.forge-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: rgba(11,15,25,0.8);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    padding: 0 var(--space-6);
    z-index: var(--z-header);
}

.forge-content {
    flex: 1;
    padding: var(--space-6);
    max-width: var(--content-max-width);
    width: 100%;
    margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   4. SIDEBAR
   ══════════════════════════════════════════════════════════════ */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-5);
    border-bottom: 1px solid var(--glass-border);
    min-height: var(--header-height);
}

.sidebar-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-name {
    font-size: var(--text-lg);
    font-weight: 700;
    background: var(--forge-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.sidebar-brand-tagline {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-3) var(--space-3);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: var(--space-4);
}

.sidebar-section-title {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-1);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(148,163,184,0.08);
}

.sidebar-link.active {
    color: var(--forge-teal);
    background: rgba(60,180,160,0.1);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--forge-gradient);
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.sidebar-link-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-link.active .sidebar-link-icon {
    opacity: 1;
}

.sidebar-footer {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--glass-border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.sidebar-user:hover {
    background: rgba(148,163,184,0.08);
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: var(--forge-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-sm);
    color: white;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════
   5. HEADER
   ══════════════════════════════════════════════════════════════ */
.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex: 1;
}

.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.header-breadcrumb-sep {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.header-breadcrumb a {
    color: var(--text-secondary);
}

.header-breadcrumb a:hover {
    color: var(--text-primary);
}

.header-breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* ══════════════════════════════════════════════════════════════
   6. CARDS & GLASS PANELS
   ══════════════════════════════════════════════════════════════ */
.card {
    background: var(--surface-800);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: rgba(148,163,184,0.2);
}

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

.card-body {
    color: var(--text-secondary);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(60,180,160,0.3);
}

/* ══════════════════════════════════════════════════════════════
   7. BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    line-height: 1.5;
    text-decoration: none;
}

.btn:focus-visible {
    outline: 2px solid var(--forge-teal);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--forge-gradient);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(60,180,160,0.3);
}

.btn-primary:hover {
    background: var(--forge-gradient-hover);
    box-shadow: 0 4px 12px rgba(60,180,160,0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface-700);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.btn-secondary:hover {
    background: var(--surface-600);
    border-color: rgba(148,163,184,0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: rgba(148,163,184,0.08);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
    box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.btn-sm {
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ══════════════════════════════════════════════════════════════
   8. FORMS
   ══════════════════════════════════════════════════════════════ */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--surface-700);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    line-height: 1.5;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--forge-teal);
    box-shadow: 0 0 0 3px rgba(60,180,160,0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-input.error,
.form-textarea.error {
    border-color: var(--color-danger);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-error {
    font-size: var(--text-xs);
    color: var(--color-danger);
    margin-top: var(--space-1);
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* ══════════════════════════════════════════════════════════════
   9. BADGES & PILLS
   ══════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    line-height: 1.5;
}

.badge-teal {
    background: rgba(60,180,160,0.15);
    color: var(--forge-teal);
}

.badge-blue {
    background: rgba(59,130,246,0.15);
    color: var(--color-info);
}

.badge-success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge-danger {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.badge-neutral {
    background: rgba(100,116,139,0.15);
    color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════════════
   10. TABLES
   ══════════════════════════════════════════════════════════════ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.table th {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-700);
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid rgba(148,163,184,0.05);
    color: var(--text-primary);
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: rgba(148,163,184,0.04);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ══════════════════════════════════════════════════════════════
   11. CODE & MONO TEXT
   ══════════════════════════════════════════════════════════════ */
.code-id {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--forge-teal);
    background: rgba(60,180,160,0.1);
    padding: 1px var(--space-2);
    border-radius: var(--radius-sm);
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--surface-700);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
}

pre {
    background: var(--surface-800);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   12. TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
}

.toast {
    background: var(--surface-700);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    min-width: 320px;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    pointer-events: auto;
    animation: toastSlideIn var(--transition-spring) forwards;
}

.toast-success { border-left: 3px solid var(--color-success); }
.toast-error   { border-left: 3px solid var(--color-danger); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-info    { border-left: 3px solid var(--color-info); }

.toast-message {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.toast-close {
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: var(--space-1);
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-exit {
    animation: toastSlideOut 300ms forwards;
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ══════════════════════════════════════════════════════════════
   13. MODAL
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    background: var(--surface-800);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    width: 90%;
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform var(--transition-spring);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: 700;
}

.modal-close {
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: var(--space-1);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(148,163,184,0.08);
}

/* ══════════════════════════════════════════════════════════════
   14. SCORE GAUGE
   ══════════════════════════════════════════════════════════════ */
.score-gauge {
    width: 120px;
    height: 120px;
    position: relative;
}

.score-gauge-circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-gauge-bg {
    stroke: var(--surface-600);
}

.score-gauge-value {
    stroke: var(--forge-teal);
}

.score-gauge-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-gauge-number {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.score-gauge-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* ══════════════════════════════════════════════════════════════
   15. STATS GRID
   ══════════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.stat-card {
    background: var(--surface-800);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: rgba(60,180,160,0.2);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
}

.stat-icon-teal    { background: rgba(60,180,160,0.15); color: var(--forge-teal); }
.stat-icon-blue    { background: rgba(59,130,246,0.15); color: var(--color-info); }
.stat-icon-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.stat-icon-success { background: var(--color-success-bg); color: var(--color-success); }

.stat-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════════════
   16. EMPTY STATE
   ══════════════════════════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-8);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    border-radius: var(--radius-2xl);
    background: var(--forge-gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.empty-state-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto var(--space-6);
}

/* ══════════════════════════════════════════════════════════════
   17. LOADING / SKELETON
   ══════════════════════════════════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, var(--surface-700) 25%, var(--surface-600) 50%, var(--surface-700) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--surface-600);
    border-top-color: var(--forge-teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ══════════════════════════════════════════════════════════════
   18. AUTH LAYOUT
   ══════════════════════════════════════════════════════════════ */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-900);
    position: relative;
    overflow: hidden;
}

/* Animated background orbs */
.auth-layout::before,
.auth-layout::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    pointer-events: none;
}

.auth-layout::before {
    width: 500px;
    height: 500px;
    background: var(--forge-teal);
    top: -150px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.auth-layout::after {
    width: 400px;
    height: 400px;
    background: var(--forge-blue);
    bottom: -100px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33%      { transform: translate(30px, -30px); }
    66%      { transform: translate(-20px, 20px); }
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    width: 90%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-8);
}

.auth-logo img {
    width: 56px;
    height: 56px;
    margin-bottom: var(--space-3);
    border-radius: var(--radius-xl);
}

.auth-logo-name {
    font-size: var(--text-2xl);
    font-weight: 800;
    background: var(--forge-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo-tagline {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.auth-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-6);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--forge-teal);
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   19. UTILITIES
   ══════════════════════════════════════════════════════════════ */
.text-center    { text-align: center; }
.text-right     { text-align: right; }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-teal      { color: var(--forge-teal); }
.text-sm        { font-size: var(--text-sm); }
.text-xs        { font-size: var(--text-xs); }
.font-mono      { font-family: var(--font-mono); }
.font-bold      { font-weight: 700; }
.mt-2           { margin-top: var(--space-2); }
.mt-4           { margin-top: var(--space-4); }
.mt-6           { margin-top: var(--space-6); }
.mb-2           { margin-bottom: var(--space-2); }
.mb-4           { margin-bottom: var(--space-4); }
.mb-6           { margin-bottom: var(--space-6); }
.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2          { gap: var(--space-2); }
.gap-3          { gap: var(--space-3); }
.gap-4          { gap: var(--space-4); }
.w-full         { width: 100%; }
.hidden         { display: none !important; }
.truncate       { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════
   20. PAGE TITLE
   ══════════════════════════════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.page-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-primary);
}

.page-description {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-1);
}

/* ══════════════════════════════════════════════════════════════
   21. RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .forge-sidebar {
        transform: translateX(-100%);
    }
    .forge-sidebar.open {
        transform: translateX(0);
    }
    .forge-main {
        margin-left: 0;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .auth-card {
        padding: var(--space-6);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════════
   22. SCROLLBAR (Custom)
   ══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-600);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--surface-500);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--surface-600) transparent;
}

/* ══════════════════════════════════════════════════════════════
   23. TABS & WORKSPACE COMPONENTS
   ══════════════════════════════════════════════════════════════ */
.tabs-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: var(--space-6);
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-header::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    top: 1px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(148,163,184,0.04);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tab-btn.active {
    color: var(--forge-teal);
    border-bottom-color: var(--forge-teal);
}

.tab-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.2s ease-in-out;
}

.tab-pane.active {
    display: block;
}

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

/* Prompt Card & Feed */
.prompt-card {
    background: var(--surface-800);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    transition: all var(--transition-base);
}

.prompt-card:hover {
    border-color: rgba(60,180,160,0.25);
    box-shadow: var(--shadow-md);
}

.prompt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.prompt-body {
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: 1.65;
    background: rgba(15,23,42,0.5);
    border-left: 3px solid var(--forge-teal);
    padding: var(--space-3) var(--space-4);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    white-space: pre-wrap;
    font-family: inherit;
}

/* Quick Prompt Template Pills */
.template-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.template-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--surface-700);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.template-pill:hover {
    background: rgba(60,180,160,0.15);
    color: var(--forge-teal);
    border-color: var(--forge-teal);
    transform: translateY(-1px);
}

/* Project Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--surface-800);
    border: 1px solid var(--glass-border);
    padding: var(--space-1);
    border-radius: var(--radius-lg);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--forge-gradient);
    color: white;
    box-shadow: 0 1px 4px rgba(60,180,160,0.3);
}

/* Project Info Grid */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-4);
}

.meta-item {
    background: var(--surface-700);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
}

.meta-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: 2px;
}

.meta-val {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

/* =========================================================
   24. KANBAN BOARD & TASK WORKSPACE
   ========================================================= */
.kanban-board-container::-webkit-scrollbar {
    height: 8px;
}
.kanban-board-container::-webkit-scrollbar-track {
    background: var(--surface-900);
    border-radius: var(--radius-full);
}
.kanban-board-container::-webkit-scrollbar-thumb {
    background: var(--surface-700);
    border-radius: var(--radius-full);
}
.kanban-board-container::-webkit-scrollbar-thumb:hover {
    background: var(--forge-teal);
}

.kanban-task-card:hover {
    transform: translateY(-2px);
    border-color: rgba(60, 180, 160, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.kanban-cards-body::-webkit-scrollbar {
    width: 4px;
}
.kanban-cards-body::-webkit-scrollbar-thumb {
    background: var(--surface-700);
    border-radius: var(--radius-full);
}

/* =========================================================
   25. ANTIGRAVITY PACKAGE EXPORT & DOCUMENT VIEWER
   ========================================================= */
#txtDocContent::-webkit-scrollbar,
#txtAntigravityPrompt::-webkit-scrollbar {
    width: 6px;
}
#txtDocContent::-webkit-scrollbar-thumb,
#txtAntigravityPrompt::-webkit-scrollbar-thumb {
    background: var(--surface-700);
    border-radius: var(--radius-full);
}

