/* ====================================
   Global Project CRM - Design System
   ==================================== */

/* --- CSS Custom Properties --- */
:root {
    /* Primary Palette - Techno Vibe */
    --oxford-navy: #0f172a;
    /* Slate 900 */
    --oxford-navy-light: #1e293b;
    /* Slate 800 */
    --oxford-navy-dark: #020617;
    /* Slate 950 */

    --noble-gold: #fbbf24;
    /* Amber 400 */
    --noble-gold-light: #fcd34d;
    /* Amber 300 */
    --noble-gold-dark: #b45309;
    /* Amber 700 */
    --noble-gold-glow: rgba(251, 191, 36, 0.2);

    --cyan-accent: #06b6d4;
    /* Cyan 500 */
    --cyan-glow: rgba(6, 182, 212, 0.3);

    /* Semantic Colors - Deep Space Backgrounds */
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-card-hover: rgba(51, 65, 85, 0.7);
    --bg-input: rgba(15, 23, 42, 0.6);

    /* Text Colors */
    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #cbd5e1;
    /* Slate 300 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-gold: var(--noble-gold);

    /* Status Colors */
    --success: #10b981;
    /* Emerald 500 */
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    /* Amber 500 */
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    /* Red 500 */
    --danger-bg: rgba(239, 68, 68, 0.15);
    --info: #0ea5e9;
    /* Sky 500 */
    --info-bg: rgba(14, 165, 233, 0.15);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Shadows & Glow */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 20px rgba(251, 191, 36, 0.15);
    --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.15);

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input,
select,
textarea {
    font-family: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--oxford-navy-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--noble-gold-dark);
}

/* --- App Layout --- */
#app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ====================================
   Sidebar
   ==================================== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--oxford-navy) 0%, var(--oxford-navy-dark) 100%);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(201, 168, 76, 0.1);
    transition: all var(--transition-slow);
    position: relative;
    z-index: 100;
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(201, 168, 76, 0.08);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--noble-gold), var(--noble-gold-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--oxford-navy);
    box-shadow: var(--shadow-gold);
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.logo-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: var(--space-md) var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px var(--space-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    transition: color var(--transition-base);
}

.nav-item:hover {
    background: rgba(201, 168, 76, 0.06);
    color: var(--text-primary);
}

.nav-item:hover i {
    color: var(--noble-gold);
}

.nav-item.active {
    background: var(--noble-gold-glow);
    color: var(--noble-gold);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--noble-gold);
    border-radius: 0 3px 3px 0;
}

.nav-item.active i {
    color: var(--noble-gold);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid rgba(201, 168, 76, 0.08);
}

.user-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: background var(--transition-base);
}

.user-card:hover {
    background: rgba(255, 255, 255, 0.03);
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--noble-gold), var(--noble-gold-dark));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--oxford-navy);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ====================================
   Main Content
   ==================================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-primary);
}

/* Top Bar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 64px;
    gap: var(--space-lg);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.1rem;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--noble-gold);
}

.search-box {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 10px var(--space-md);
    width: 100%;
    max-width: 480px;
    transition: border-color var(--transition-base);
}

.search-box:focus-within {
    border-color: var(--noble-gold);
}

.search-box i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box input {
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    width: 100%;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    position: relative;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all var(--transition-base);
    position: relative;
}

.topbar-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--noble-gold);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 52px;
    right: 0;
    width: 380px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 200;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notification-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.mark-read {
    font-size: 0.75rem;
    color: var(--noble-gold);
    font-weight: 500;
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background var(--transition-base);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notification-item.unread {
    background: rgba(201, 168, 76, 0.04);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.notif-icon.green {
    background: var(--success-bg);
    color: var(--success);
}

.notif-icon.gold {
    background: var(--noble-gold-glow);
    color: var(--noble-gold);
}

.notif-icon.blue {
    background: var(--info-bg);
    color: var(--info);
}

.notif-content p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notif-content strong {
    color: var(--text-primary);
}

.notif-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.topbar-date {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.topbar-date i {
    color: var(--noble-gold);
    font-size: 0.85rem;
}

/* Page Content */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xl);
}

.page-header {
    margin-bottom: var(--space-xl);
}

.page-header h1 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ====================================
   Cards
   ==================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Brighter border */
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    border-color: rgba(201, 168, 76, 0.15);
    box-shadow: var(--shadow-md);
}

/* ====================================
   Dashboard
   ==================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--noble-gold), var(--noble-gold-light));
    opacity: 0;
    transition: opacity var(--transition-base);
    box-shadow: 0 2px 10px var(--noble-gold-glow);
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(201, 168, 76, 0.2);
    box-shadow: var(--shadow-gold);
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.kpi-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.kpi-icon.gold {
    background: var(--noble-gold-glow);
    color: var(--noble-gold);
}

.kpi-icon.green {
    background: var(--success-bg);
    color: var(--success);
}

.kpi-icon.blue {
    background: var(--info-bg);
    color: var(--info);
}

.kpi-icon.purple {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.kpi-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.kpi-change.up {
    color: var(--success);
    background: var(--success-bg);
}

.kpi-change.down {
    color: var(--danger);
    background: var(--danger-bg);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.chart-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.chart-card-header .chart-period {
    display: flex;
    gap: 2px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.chart-period button {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all var(--transition-base);
}

.chart-period button.active {
    background: var(--noble-gold);
    color: var(--oxford-navy);
}

/* Chart Canvas */
.chart-container {
    width: 100%;
    height: 260px;
    position: relative;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: background var(--transition-base);
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.activity-icon.green {
    background: var(--success-bg);
    color: var(--success);
}

.activity-icon.gold {
    background: var(--noble-gold-glow);
    color: var(--noble-gold);
}

.activity-icon.blue {
    background: var(--info-bg);
    color: var(--info);
}

.activity-icon.red {
    background: var(--danger-bg);
    color: var(--danger);
}

.activity-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.activity-text strong {
    color: var(--text-primary);
}

.activity-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ====================================
   Tables
   ==================================== */
.data-table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: var(--space-md) var(--space-lg);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.data-table td {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}

.data-table tr {
    transition: background var(--transition-base);
}

.data-table tbody tr:hover {
    background: rgba(201, 168, 76, 0.04);
}

.data-table tbody tr {
    cursor: pointer;
}

/* ====================================
   Badges & Status
   ==================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge.gold {
    background: var(--noble-gold-glow);
    color: var(--noble-gold);
}

.badge.green {
    background: var(--success-bg);
    color: var(--success);
}

.badge.blue {
    background: var(--info-bg);
    color: var(--info);
}

.badge.red {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge.purple {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.badge.orange {
    background: var(--warning-bg);
    color: var(--warning);
}

/* ====================================
   Buttons
   ==================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--noble-gold), var(--noble-gold-dark));
    color: var(--oxford-navy);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(201, 168, 76, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-ghost {
    color: var(--text-secondary);
    padding: 8px 12px;
}

.btn-ghost:hover {
    color: var(--noble-gold);
    background: var(--noble-gold-glow);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ====================================
   Forms
   ==================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px var(--space-md);
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: border-color var(--transition-base);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--noble-gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7f99' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* ====================================
   Pipeline / Stages
   ==================================== */
.pipeline-stages {
    display: flex;
    gap: 2px;
    margin: var(--space-lg) 0;
}

.pipeline-stage {
    flex: 1;
    text-align: center;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    transition: all var(--transition-base);
    cursor: pointer;
}

.pipeline-stage:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.pipeline-stage:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.pipeline-stage.completed {
    background: var(--success-bg);
}

.pipeline-stage.active {
    background: var(--noble-gold-glow);
    border: 1px solid rgba(201, 168, 76, 0.3);
}

.pipeline-stage .stage-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pipeline-stage.completed .stage-name {
    color: var(--success);
}

.pipeline-stage.active .stage-name {
    color: var(--noble-gold);
}

.pipeline-stage .stage-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.pipeline-stage.completed .stage-icon {
    color: var(--success);
}

.pipeline-stage.active .stage-icon {
    color: var(--noble-gold);
}

/* ====================================
   Grant Matcher
   ==================================== */
.matcher-controls {
    display: flex;
    gap: var(--space-md);
    align-items: flex-end;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.matcher-controls .form-group {
    flex: 1;
    min-width: 250px;
    margin-bottom: 0;
}

.match-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.match-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    transform: translateY(-3px);
    border-color: rgba(201, 168, 76, 0.2);
    box-shadow: var(--shadow-gold);
}

.match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.match-program {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-circle {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    position: relative;
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    border: 3px solid rgba(255, 255, 255, 0.06);
}

.score-circle.high {
    background: var(--success-bg);
    color: var(--success);
}

.score-circle.high::before {
    border-color: var(--success);
}

.score-circle.medium {
    background: var(--warning-bg);
    color: var(--warning);
}

.score-circle.medium::before {
    border-color: var(--warning);
}

.score-circle.low {
    background: var(--danger-bg);
    color: var(--danger);
}

.score-circle.low::before {
    border-color: var(--danger);
}

.score-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.match-provider {
    font-size: 0.82rem;
    color: var(--noble-gold);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.match-criteria {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.criteria-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.82rem;
}

.criteria-item i.fa-check-circle {
    color: var(--success);
}

.criteria-item i.fa-times-circle {
    color: var(--danger);
}

.criteria-item span {
    color: var(--text-secondary);
}

.match-amount {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.match-amount strong {
    color: var(--noble-gold);
    font-size: 1.1rem;
}

/* AI Animation */
.ai-scanning {
    text-align: center;
    padding: var(--space-2xl);
}

.ai-scanning .scan-icon {
    font-size: 3rem;
    color: var(--noble-gold);
    animation: pulse 1.5s ease-in-out infinite;
    margin-bottom: var(--space-lg);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.ai-scanning p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.scan-progress {
    width: 240px;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin: var(--space-md) auto;
    overflow: hidden;
}

.scan-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--noble-gold), var(--noble-gold-light));
    border-radius: 2px;
    animation: scanProgress 2s ease-in-out;
}

@keyframes scanProgress {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* ====================================
   Project Detail
   ==================================== */
.project-stages {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.project-stage-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border-left: 3px solid rgba(255, 255, 255, 0.06);
    transition: all var(--transition-base);
}

.project-stage-item.completed {
    border-left-color: var(--success);
    background: var(--success-bg);
}

.project-stage-item.active {
    border-left-color: var(--noble-gold);
    background: var(--noble-gold-glow);
}

.stage-check {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.project-stage-item.completed .stage-check {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.project-stage-item.active .stage-check {
    border-color: var(--noble-gold);
    color: var(--noble-gold);
    animation: pulse 2s ease-in-out infinite;
}

.stage-info h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stage-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Doc Status */
.doc-status-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.doc-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
}

.doc-status-item .doc-name {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.doc-status-item .doc-name i {
    font-size: 1rem;
}

.doc-status-item .status-indicator {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
}

.status-indicator.uploaded {
    background: var(--success);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.status-indicator.missing {
    background: var(--danger);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.status-indicator.pending {
    background: var(--warning);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* ====================================
   Documents Page
   ==================================== */
.doc-explorer {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-lg);
    min-height: 500px;
}

.folder-tree {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}

.folder-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.folder-item:hover {
    background: rgba(201, 168, 76, 0.06);
    color: var(--text-primary);
}

.folder-item.active {
    background: var(--noble-gold-glow);
    color: var(--noble-gold);
}

.folder-item i {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

.folder-item.active i {
    color: var(--noble-gold);
}

.folder-children {
    padding-left: var(--space-lg);
}

.file-area {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.file-area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.file-area-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.file-area-header h3 i {
    color: var(--noble-gold);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed rgba(201, 168, 76, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    margin-bottom: var(--space-lg);
    transition: all var(--transition-base);
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--noble-gold);
    background: rgba(201, 168, 76, 0.04);
}

.upload-zone i {
    font-size: 2.5rem;
    color: var(--noble-gold);
    margin-bottom: var(--space-md);
    opacity: 0.6;
}

.upload-zone p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.upload-zone .upload-hint {
    font-size: 0.78rem;
    margin-top: var(--space-sm);
}

/* File List */
.file-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.file-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    transition: all var(--transition-base);
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.file-icon.pdf {
    background: var(--danger-bg);
    color: var(--danger);
}

.file-icon.doc {
    background: var(--info-bg);
    color: var(--info);
}

.file-icon.img {
    background: var(--success-bg);
    color: var(--success);
}

.file-icon.xls {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.file-details {
    flex: 1;
}

.file-details .file-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
}

.file-details .file-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: var(--space-md);
    margin-top: 2px;
}

.file-sync {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--success);
}

.file-sync i {
    font-size: 0.7rem;
}

/* ====================================
   Customer Detail
   ==================================== */
.customer-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.detail-section {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.detail-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.detail-section h3 i {
    color: var(--noble-gold);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-key {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

/* Tab system */
.tabs {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 3px;
}

.tab-btn {
    flex: 1;
    padding: 10px var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition-base);
    text-align: center;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--noble-gold);
    color: var(--oxford-navy);
    font-weight: 600;
}

/* ====================================
   Modal
   ==================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-container {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ====================================
   Utilities
   ==================================== */
.hidden {
    display: none !important;
}

.text-gold {
    color: var(--noble-gold);
}

.text-muted {
    color: var(--text-muted);
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: var(--space-md);
}

.empty-state p {
    font-size: 0.95rem;
}

/* Toolbar for pages */
.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.toolbar-filters {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.filter-chip {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    transition: all var(--transition-base);
    cursor: pointer;
}

.filter-chip:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.08);
}

.filter-chip.active {
    background: var(--noble-gold-glow);
    color: var(--noble-gold);
    border-color: rgba(201, 168, 76, 0.3);
}

/* Customer inline avatar */
.customer-inline {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.customer-inline .avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Back button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
    transition: color var(--transition-base);
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.back-btn:hover {
    color: var(--noble-gold);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--noble-gold), var(--noble-gold-light));
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* Drive sync badge */
.drive-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 500;
}

.drive-badge i {
    font-size: 0.8rem;
}

/* ====================================
   Animations
   ==================================== */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Number animation */
.count-up {
    transition: all 0.5s ease;
}

/* ====================================
   Responsive
   ==================================== */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .customer-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 1000;
    }

    .sidebar.open {
        left: 0;
        box-shadow: var(--shadow-lg);
    }

    .menu-toggle {
        display: flex;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .page-content {
        padding: var(--space-md);
    }

    .doc-explorer {
        grid-template-columns: 1fr;
    }

    .match-results {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .topbar-date {
        display: none;
    }

    .matcher-controls {
        flex-direction: column;
    }

    .matcher-controls .form-group {
        min-width: auto;
    }
}

/* ====================================
   Login Page
   ==================================== */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--oxford-navy-dark) 0%, var(--oxford-navy) 50%, #0d2847 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.5s ease;
}

.login-logo {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    font-size: 1.8rem;
    margin: 0 auto var(--space-md);
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.login-error {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
    text-align: center;
}

/* ====================================
   Inline Editable
   ==================================== */
.editable-value {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-base);
    position: relative;
}

.editable-value:hover {
    background: rgba(201, 168, 76, 0.1);
}

.editable-value::after {
    content: '\f303';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.65rem;
    color: var(--noble-gold);
    opacity: 0;
    margin-left: 6px;
    transition: opacity var(--transition-base);
}

.editable-value:hover::after {
    opacity: 0.6;
}

.inline-edit-input {
    background: var(--bg-input);
    border: 1px solid var(--noble-gold);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 4px 8px;
    font-size: inherit;
    font-family: inherit;
    width: 100%;
    outline: none;
}

/* Add button for fields */
.add-field-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: var(--noble-gold);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px dashed rgba(201, 168, 76, 0.3);
    border-radius: var(--radius-sm);
    width: 100%;
    justify-content: center;
    margin-top: var(--space-sm);
    transition: all var(--transition-base);
    cursor: pointer;
    background: none;
    font-family: inherit;
}

.add-field-btn:hover {
    background: rgba(201, 168, 76, 0.06);
    border-color: var(--noble-gold);
}

/* Note cards */
.note-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    position: relative;
}

.note-card .note-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.note-card .note-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.note-card:hover .note-actions {
    opacity: 1;
}

/* Reminder section */
.reminder-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
}

.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--noble-gold);
    margin-bottom: var(--space-sm);
}

.reminder-item .reminder-info {
    flex: 1;
}

.reminder-item .reminder-title {
    font-weight: 600;
    font-size: 0.88rem;
}

.reminder-item .reminder-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Read only mode indicator */
.readonly-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--info-bg);
    color: var(--info);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
}

/* ====================================
   CRM v2 - Enhanced Components
   ==================================== */

/* Stage Cards */
.stage-card {
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all var(--transition-fast);
}

.stage-card:hover {
    border-color: rgba(201, 168, 76, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Payment Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Admin Tabs */
.admin-tab {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.admin-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--noble-gold);
}

.admin-tab.active {
    background: rgba(201, 168, 76, 0.1);
    color: var(--noble-gold);
    border-color: var(--noble-gold);
}

/* Checklist Items */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.checklist-item input[type="checkbox"] {
    accent-color: var(--noble-gold);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checklist-item.completed span {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Note Cards */
.note-card {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

.note-card:last-child {
    border-bottom: none;
}

.note-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.note-actions {
    position: absolute;
    top: 10px;
    right: 0;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.note-card:hover .note-actions {
    opacity: 1;
}

/* Inline Edit */
.inline-edit-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--noble-gold);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: inherit;
    font-family: inherit;
    outline: none;
    min-width: 120px;
    width: 100%;
    max-width: 300px;
}

.inline-edit-input:focus {
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.2);
}

/* Editable Values */
.editable-value {
    cursor: pointer;
    border-bottom: 1px dashed rgba(201, 168, 76, 0.3);
    padding-bottom: 1px;
    transition: all var(--transition-fast);
}

.editable-value:hover {
    color: var(--noble-gold);
    border-color: var(--noble-gold);
}

/* Add Field Button */
.add-field-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.add-field-btn:hover {
    border-color: var(--noble-gold);
    color: var(--noble-gold);
    background: rgba(201, 168, 76, 0.05);
}

/* Data Table Wrapper */
.data-table-wrapper {
    overflow-x: auto;
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* KPI Card (enhanced) */
.kpi-card {
    text-align: center;
    position: relative;
}

.kpi-card .kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: white;
    font-size: 1.1rem;
}

.kpi-card .kpi-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.kpi-card .kpi-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}  
/* High Contrast Fixes */  
input, select, textarea { color: var(--text-primary) !important; background-color: var(--bg-input); border-color: rgba(255,255,255,0.1); }  
option { background-color: var(--oxford-navy); color: var(--text-primary); }  
::placeholder { color: var(--text-muted) !important; opacity: 1; } 
