/* ── CityFiber Classic Theme ────────────────────────── */
/* Color Palette: Navy + Gold + White (2-3 colors only) */

:root {
    /* Primary Colors */
    --navy: #1e293b;
    --navy-dark: #0f172a;
    --navy-light: #334155;
    --gold: #d4a017;
    --gold-light: #f5d76e;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    
    /* Status Colors (minimal) */
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    
    /* Semantic */
    --primary: var(--navy);
    --primary-dark: var(--navy-dark);
    --accent: var(--gold);
    --bg: var(--gray-50);
    --text: var(--gray-700);
    --text-muted: var(--gray-500);
    --border: var(--gray-200);
    --card-bg: var(--white);
    
    /* Layout */
    --sidebar-width: 260px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
    --transition: all 0.2s ease;
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
    padding: 0.75rem 0;
    background: var(--white) !important;
    box-shadow: var(--shadow);
    border-bottom: 2px solid var(--navy);
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--navy);
    letter-spacing: -0.5px;
}
.navbar-brand span { color: var(--gold); }
.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    color: var(--gray-700);
    transition: var(--transition);
}
.navbar-nav .nav-link:hover { background: var(--gray-100); color: var(--navy); }

/* ── Hero Section ───────────────────────────────────── */
.hero-section {
    background: var(--navy);
    color: var(--white);
    padding: 100px 0 80px;
    position: relative;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold);
}
.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}
.hero-section p {
    font-size: 1.15rem;
    opacity: 0.85;
    max-width: 550px;
    line-height: 1.7;
}
.hero-section .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
}
.hero-section .btn-light {
    background: var(--gold);
    color: var(--navy);
    border: none;
}
.hero-section .btn-light:hover { background: var(--gold-light); }
.hero-section .btn-outline-light {
    border: 2px solid rgba(255,255,255,0.4);
    color: var(--white);
}
.hero-section .btn-outline-light:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
}

/* ── Sections ───────────────────────────────────────── */
.section-padding { padding: 80px 0; }
.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--navy);
    letter-spacing: -0.5px;
}
.section-subtitle {
    color: var(--gray-500);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Feature Cards ──────────────────────────────────── */
.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    height: 100%;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    font-size: 1.5rem;
    color: var(--white);
    background: var(--navy);
}
.feature-card h5 { font-weight: 700; margin-bottom: 0.75rem; color: var(--navy); }
.feature-card p { color: var(--gray-500); font-size: 0.9rem; margin: 0; }

/* ── Pricing Cards ──────────────────────────────────── */
.pricing-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid var(--border);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.pricing-card.popular {
    border-color: var(--gold);
    position: relative;
}
.pricing-card.popular::before {
    content: 'POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--navy);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
}
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.pricing-card h5 { font-weight: 700; color: var(--navy); }
.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--navy);
    margin: 0.75rem 0 0.5rem;
}
.pricing-price span { font-size: 0.9rem; font-weight: 400; color: var(--gray-500); }
.pricing-card ul { list-style: none; padding: 0; margin: 1.25rem 0; text-align: left; flex-grow: 1; }
.pricing-card ul li {
    padding: 0.5rem 0;
    color: var(--gray-500);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}
.pricing-card ul li:last-child { border-bottom: none; }
.pricing-card .btn { margin-top: auto; }

/* ── How It Works ───────────────────────────────────── */
.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

/* ── Auth Pages ─────────────────────────────────────── */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    padding: 1rem;
}
.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}
.auth-card h2 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--navy);
}
.auth-card .subtitle { color: var(--gray-500); text-align: center; margin-bottom: 2rem; }
.auth-card .form-control { padding: 0.7rem 1rem; border-radius: 8px; }
.auth-card .btn { padding: 0.7rem; font-weight: 600; border-radius: 8px; }

/* ── Dashboard Layout ───────────────────────────────── */
.dashboard-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--navy);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: var(--navy-dark);
}
.sidebar-header h5 { margin: 0; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.3px; }
.sidebar-header small { opacity: 0.5; font-size: 0.8rem; }
.sidebar-header .badge {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--gold);
    color: var(--navy);
    margin-top: 0.25rem;
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-nav { padding: 0.75rem 0; flex: 1; overflow-y: auto; overflow-x: hidden; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: rgba(255,255,255,0.65);
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    letter-spacing: 0.01em;
}
.sidebar-nav a:hover {
    background: rgba(255,255,255,0.06);
    color: var(--white);
    text-decoration: none;
}
.sidebar-nav a.active {
    border-left-color: var(--gold);
    background: rgba(212,160,23,0.12);
    color: var(--white);
    font-weight: 600;
}

/* ── Sidebar Dropdown ───────────────────────────────── */
.sidebar-dropdown { margin: 0; }
.sidebar-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.5rem;
    color: rgba(255,255,255,0.4);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}
.sidebar-dropdown-header:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.03);
}
.sidebar-dropdown-header .arrow {
    font-size: 0.5rem;
    transition: var(--transition);
    opacity: 0.6;
}
.sidebar-dropdown.open .sidebar-dropdown-header {
    color: rgba(255,255,255,0.8);
}
.sidebar-dropdown.open .sidebar-dropdown-header .arrow {
    color: var(--gold);
    opacity: 1;
}
.sidebar-dropdown-items { overflow: hidden; }
.sidebar-dropdown-items a {
    padding-left: 2.75rem !important;
    font-size: 0.85rem;
    font-weight: 400;
}
.sidebar-dropdown-items a.active {
    background: rgba(212,160,23,0.12) !important;
    color: var(--gold) !important;
    font-weight: 600;
    border-left-color: var(--gold);
}

.sidebar-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 0.5rem 1.5rem; }

/* ── Sidebar Footer ─────────────────────────────────── */
.sidebar-footer {
    flex-shrink: 0;
    background: var(--navy-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 0.75rem 0 2.5rem 0;
    margin-top: auto;
}
.sidebar-footer-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
}
.sidebar-footer-link:hover,
.sidebar-footer-link.active {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}
.sidebar-footer .sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 0;
    margin: 0;
}
.sidebar-footer .sidebar-logout:hover {
    background: transparent !important;
    color: rgba(255,255,255,0.4) !important;
}

.disabled-link { color: rgba(255,255,255,0.2) !important; cursor: not-allowed !important; pointer-events: none; }

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    min-height: 100vh;
    background: var(--bg);
}

/* ── Stat Cards ─────────────────────────────────────── */
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-lg); border-color: var(--gold); }
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--white);
    flex-shrink: 0;
    background: var(--navy);
}
.stat-info h3 { margin: 0; font-weight: 800; font-size: 1.5rem; color: var(--navy); }
.stat-info p { margin: 0; color: var(--gray-500); font-size: 0.8rem; font-weight: 500; }

/* ── Tables ─────────────────────────────────────────── */
.table-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}
.table-card .card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--navy);
}
.table-card .table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 1rem;
}
.table-card .table td {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: var(--gray-700);
}
.table-card .table tr:hover td { background: var(--gray-50); }

/* ── Badges ─────────────────────────────────────────── */
.badge {
    font-weight: 600;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 6px;
    text-transform: capitalize;
}
.badge-available { background: #dcfce7; color: #166534; }
.badge-sold { background: #dbeafe; color: #1e40af; }
.badge-expired { background: #fef3c7; color: #92400e; }
.badge-revoked { background: #fee2e2; color: #991b1b; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
}
.btn-primary { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn-success { background: var(--success); border-color: var(--success); }
.btn-warning { background: var(--warning); border-color: var(--warning); }
.btn-danger { background: var(--danger); border-color: var(--danger); }

/* ── Forms ──────────────────────────────────────────── */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30,41,59,0.1);
}
.form-label { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--navy); }

/* ── Footer ─────────────────────────────────────────── */
.footer {
    background: var(--navy);
    color: rgba(255,255,255,0.6);
    padding: 3rem 0 1.5rem;
}
.footer h6 { color: var(--gold); font-weight: 700; margin-bottom: 1rem; }
.footer a { color: rgba(255,255,255,0.6); }
.footer a:hover { color: var(--gold); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
}

/* ── Sidebar Toggle (Mobile) ────────────────────────── */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .hero-section h1 { font-size: 2.5rem; }
    .section-title { font-size: 1.75rem; }
}

@media (max-width: 768px) {
    .hero-section { padding: 60px 0 50px; text-align: center; }
    .hero-section h1 { font-size: 2rem; }
    .hero-section p { font-size: 1rem; margin: 0 auto 1.5rem; }
    .hero-section .btn { display: block; width: 100%; margin-bottom: 0.75rem; }
    .section-padding { padding: 50px 0; }
    .section-title { font-size: 1.5rem; }
    .section-subtitle { font-size: 0.95rem; margin-bottom: 2rem; }
    .pricing-card { padding: 1.5rem; }
    .pricing-price { font-size: 2rem; }
    .navbar-collapse { background: var(--white); padding: 1rem; border-radius: 12px; margin-top: 0.5rem; box-shadow: var(--shadow-lg); }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-content { margin-left: 0; padding: 1rem; padding-top: 3.5rem; }
    .sidebar-toggle { display: block; }
    .stat-card { padding: 1rem; }
    .stat-icon { width: 40px; height: 40px; font-size: 1.1rem; }
    .stat-info h3 { font-size: 1.25rem; }
    .table-card .table th, .table-card .table td { padding: 0.5rem 0.75rem; }
}

@media (max-width: 480px) {
    .hero-section h1 { font-size: 1.75rem; }
    .pricing-price { font-size: 1.75rem; }
    .auth-card { padding: 1.25rem; }
    .main-content { padding: 0.75rem; padding-top: 3.5rem; }
}

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* ── CityFiber Compact Row Components ───────────────── */
/* Order Row */
.cf-order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
}
.cf-order-row:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.cf-order-row-left { display: flex; align-items: center; gap: 0.75rem; }
.cf-order-id {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.cf-order-name { font-weight: 600; font-size: 0.88rem; color: var(--navy); }
.cf-order-meta { font-size: 0.78rem; color: var(--gray-500); }
.cf-order-row-right { display: flex; align-items: center; gap: 0.5rem; }

/* Peer Row */
.cf-peer-row {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}
.cf-peer-row:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.cf-peer-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
}
.cf-peer-name { font-weight: 600; font-size: 0.88rem; color: var(--navy); }
.cf-peer-meta { font-size: 0.75rem; color: var(--gray-500); }
.cf-peer-row-creds {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
}
.cf-cred-mini {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.cf-cred-mini span {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.cf-cred-mini code {
    background: var(--gray-50);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}
.cf-copy-mini {
    width: 22px;
    height: 22px;
    background: var(--gray-200);
    border: none;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.cf-copy-mini:hover { background: var(--gold); color: var(--navy); }

/* Extra Small Button */
.cf-btn-xs {
    padding: 0.3rem 0.65rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}
.cf-btn-xs:hover { background: var(--navy-dark); }

/* ── CityFiber Custom UI Components ─────────────────── */
/* Tabs */
.cf-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}
.cf-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    color: var(--gray-500);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}
.cf-tab:hover { color: var(--navy); }
.cf-tab.active {
    color: var(--navy);
    border-bottom-color: var(--gold);
}
.cf-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--gray-200);
    font-size: 0.7rem;
    font-weight: 700;
}
.cf-tab.active .cf-tab-icon { background: var(--gold); color: var(--navy); }
.cf-tab-badge {
    background: var(--danger);
    color: var(--white);
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* Tutorial */
.cf-tutorial {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.cf-tutorial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border);
}
.cf-tutorial-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.cf-tutorial-steps { padding: 1.5rem; }
.cf-step {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.cf-step:last-child { border-bottom: none; }
.cf-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.cf-step-content h6 { color: var(--navy); font-weight: 700; margin-bottom: 0.25rem; }
.cf-step-content p { color: var(--gray-500); font-size: 0.85rem; margin: 0; }

/* Code Block */
.cf-code-block {
    background: var(--navy-dark);
    color: var(--gold);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.82rem;
    overflow-x: auto;
}

/* Form Card */
.cf-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.cf-form-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--gray-50);
}
.cf-form-body { padding: 1.5rem; }
.cf-label {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--navy);
    margin-bottom: 0.35rem;
}
.cf-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    transition: var(--transition);
}
.cf-input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30,41,59,0.08);
}
.cf-input-error { border-color: var(--danger); }
.cf-error { color: var(--danger); font-size: 0.75rem; margin-top: 0.25rem; display: block; }

/* Summary */
.cf-summary {
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}
.cf-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.88rem;
    color: var(--gray-700);
}
.cf-summary-total {
    border-top: 2px solid var(--border);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    color: var(--navy);
}

/* Buttons */
.cf-btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}
.cf-btn-primary:hover { background: var(--navy-dark); }
.cf-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.cf-btn-outline {
    padding: 0.5rem 1rem;
    background: none;
    color: var(--navy);
    border: 1px solid var(--navy);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}
.cf-btn-outline:hover { background: var(--navy); color: var(--white); }
.cf-btn-sm {
    padding: 0.4rem 0.8rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}
.cf-btn-sm:hover { background: var(--navy-dark); }

/* Order Cards */
.cf-order-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.cf-order-card:hover { box-shadow: var(--shadow); }
.cf-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.cf-order-details {
    display: flex;
    gap: 2rem;
    padding: 1rem 1.25rem;
}
.cf-detail span {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}
.cf-detail strong, .cf-detail code { font-size: 0.9rem; }
.cf-order-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--gray-50);
}

/* Status Badges */
.cf-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: capitalize;
}
.cf-status-pending { background: #fef9c3; color: #854d0e; }
.cf-status-confirmed { background: #dcfce7; color: #166534; }
.cf-status-completed { background: #dbeafe; color: #1e40af; }
.cf-status-rejected { background: #fee2e2; color: #991b1b; }
.cf-status-active { background: #dcfce7; color: #166534; }
.cf-status-expired { background: #fef3c7; color: #92400e; }

/* Peer Cards */
.cf-peer-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.cf-peer-card:hover { box-shadow: var(--shadow); }
.cf-peer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.cf-peer-credentials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.25rem;
}
.cf-cred { text-align: center; }
.cf-cred-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}
.cf-cred-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.cf-cred-value code {
    background: var(--gray-50);
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.85rem;
}
.cf-copy-btn {
    padding: 0.25rem 0.5rem;
    background: var(--gray-200);
    border: none;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.cf-copy-btn:hover { background: var(--gold); color: var(--navy); }

/* Empty State */
.cf-empty {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

/* Modal */
.cf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cf-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}
.cf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.cf-modal-header h5 { color: var(--navy); font-weight: 700; }
.cf-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
}
.cf-modal-body { padding: 1.5rem; }

/* Info Grid */
.cf-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.cf-info-box {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}
.cf-info-box span {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}
.cf-info-box code { font-size: 0.9rem; font-weight: 600; }

/* Order Limit Warning */
.cf-limit-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    color: #92400e;
    font-size: 0.88rem;
}
.cf-limit-warning strong { display: block; margin-bottom: 0.25rem; }

/* Responsive */
@media (max-width: 768px) {
    .cf-peer-credentials { grid-template-columns: 1fr; }
    .cf-info-grid { grid-template-columns: repeat(2, 1fr); }
    .cf-order-details { flex-direction: column; gap: 0.5rem; }
    .cf-tabs { flex-wrap: wrap; }
    .cf-tab { font-size: 0.8rem; padding: 0.5rem 0.75rem; }
    .cf-order-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .cf-peer-row-creds { flex-direction: column; gap: 0.5rem; }
}

/* ── Nav Icons ──────────────────────────────────────── */
.nav-icon {
    width: 20px;
    height: 20px;
    fill: var(--gold);
    flex-shrink: 0;
}
.nav-icon-sm {
    width: 16px;
    height: 16px;
    fill: var(--gold);
    flex-shrink: 0;
    opacity: 0.8;
}

/* ── Content Page Enhancements ──────────────────────── */
/* Stat Cards */
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}
.stat-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
    transform: translateY(-2px);
}
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
    flex-shrink: 0;
    background: var(--navy);
}
.stat-info h3 {
    margin: 0;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--navy);
    letter-spacing: -0.5px;
}
.stat-info p {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Tables */
.table-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}
.table-card .card-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--navy);
}
.table-card .table { margin-bottom: 0; }
.table-card .table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    border-bottom: 2px solid var(--border);
    padding: 0.75rem 1rem;
}
.table-card .table td {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: var(--gray-700);
}
.table-card .table tr:last-child td { border-bottom: none; }
.table-card .table tr:hover td { background: var(--gray-50); }

/* Badges */
.badge {
    font-weight: 600;
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.88rem;
    padding: 0.55rem 1.1rem;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn-outline-primary { color: var(--navy); border-color: var(--navy); }
.btn-outline-primary:hover { background: var(--navy); color: var(--white); }

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30,41,59,0.1);
}
.form-label {
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
    color: var(--navy);
}

/* Modals */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
}
.modal-title { font-weight: 700; color: var(--navy); }
.modal-body { padding: 1.5rem; }
.modal-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    font-size: 0.88rem;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* Terminal */
.bg-dark {
    background: var(--navy-dark) !important;
    color: #e2e8f0;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
}

/* Accordion */
.accordion-item {
    border: 1px solid var(--border);
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.accordion-button { font-weight: 600; color: var(--navy); }
.accordion-button:not(.collapsed) { background: var(--gray-50); color: var(--navy); }
.accordion-button:focus { box-shadow: none; }

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
    background: var(--gray-200);
}
.progress-bar {
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Clickable Elements */
.clickable-card { cursor: pointer; }
.clickable-card:hover .stat-card { border-color: var(--gold); box-shadow: var(--shadow-lg); }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: var(--gray-50) !important; }
