:root {
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --brand-dark: #111827;
    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-light: #eff6ff;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --warning: #f59e0b;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--bg-page);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Navigation - Sticky Enterprise Viewport */
aside {
    width: 255px;
    min-width: 255px;
    background: var(--brand-dark);
    color: #e2e8f0;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    z-index: 40;
    overflow: hidden;
    border-right: 1px solid #1f2937;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    padding: 18px 16px;
    border-bottom: 1px solid #1f2937;
    text-decoration: none;
    flex-shrink: 0;
}
.brand span {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

aside nav {
    margin: 0;
    padding: 14px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Sidebar scrollbar styling */
aside nav::-webkit-scrollbar {
    width: 4px;
}
aside nav::-webkit-scrollbar-track {
    background: transparent;
}
aside nav::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}
aside nav::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

aside nav a {
    color: #94a3b8;
    display: flex;
    align-items: center;
    padding: 8.5px 12px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

aside nav a:hover {
    background: #1f2937;
    color: #ffffff;
    text-decoration: none;
}

aside nav a.active {
    background: var(--brand-primary);
    color: #ffffff;
    font-weight: 600;
}

.aside-footer {
    padding: 14px 16px;
    border-top: 1px solid #1f2937;
    background: rgba(15, 23, 42, 0.6);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.aside-footer a {
    color: #94a3b8;
    font-size: 13px;
}
.aside-footer a:hover {
    color: #ffffff;
}

/* Main Content Canvas - 100% FULL WIDTH */
main {
    padding: 32px 40px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    flex: 1;
    background: var(--bg-page);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    width: 100%;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.4px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

/* Google-style Minimal Cards - FULL WIDTH */
.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    width: 100%;
}

/* KPI Statistics Cards - FULL WIDTH RESPONSIVE GRID */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}

.stat {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.stat-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 6px;
    letter-spacing: -0.5px;
}

/* Toolbar & Actions - FULL WIDTH */
.toolbar {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    flex-wrap: nowrap;
}

.toolbar form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    max-width: none;
    margin: 0;
}

.toolbar form input,
.toolbar form select,
.toolbar form button {
    margin-bottom: 0 !important;
    display: inline-block !important;
    height: 38px !important;
    box-sizing: border-box !important;
}

.toolbar form input {
    width: 260px !important;
}

.toolbar form select {
    width: auto !important;
    min-width: 130px;
}

.toolbar form button {
    width: auto !important;
    white-space: nowrap !important;
}

/* Data Tables */
.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

th {
    background: #f1f5f9;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

tr:hover td {
    background: #f8fafc;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: capitalize;
    background: #f1f5f9;
    color: #475569;
}

.badge-new {
    background: #dbeafe;
    color: #1e40af;
}

.badge-reviewing {
    background: #fef3c7;
    color: #92400e;
}

.badge-quoted {
    background: #dcfce7;
    color: #166534;
}

.badge-closed {
    background: #f1f5f9;
    color: #64748b;
}

/* Buttons */
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--brand-primary);
    color: #ffffff;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.15s;
}

button:hover, .button:hover {
    background: var(--brand-primary-hover);
    text-decoration: none;
}

.button.secondary, button.secondary {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.button.secondary:hover, button.secondary:hover {
    background: #f1f5f9;
}

.button.danger, button.danger {
    background: var(--danger);
    color: #ffffff;
}
.button.danger:hover, button.danger:hover {
    background: #b91c1c;
}

/* Form Controls */
label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #334155;
    margin-bottom: 16px;
}

input, select, textarea {
    font: inherit;
    font-size: 13.5px;
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 6px;
    background: #ffffff;
    color: var(--text-primary);
    transition: border 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    min-height: 100px;
}

textarea.code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12.5px;
    min-height: 260px;
}

input[type="checkbox"] {
    width: auto;
    display: inline-block;
    margin-top: 0;
    margin-right: 6px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Alert Notices */
.notice {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    background: var(--success-light);
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-size: 13.5px;
}

.error {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    background: var(--danger-light);
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-size: 13.5px;
}

/* Auth Cards */
.login-box {
    max-width: 420px;
    margin: 8vh auto;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.login-box h1 {
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
}

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

/* Mobile Topbar (Hidden on Desktop) */
.mobile-topbar {
    display: none;
    background: var(--brand-dark);
    color: #ffffff;
    padding: 12px 18px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid #1f2937;
}

.mobile-brand {
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
}

.sidebar-toggle {
    background: #1f2937;
    border: 1px solid #374151;
    color: #ffffff;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 45;
}

.sidebar-overlay.open {
    display: block;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    aside {
        width: 220px;
        min-width: 220px;
    }
    main {
        padding: 24px 28px;
    }
}

@media (max-width: 850px) {
    .mobile-topbar {
        display: flex;
    }
    .shell {
        display: block;
        width: 100%;
    }
    aside {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: 260px;
        min-width: 260px;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
        overflow-y: auto;
    }
    aside.open {
        transform: translateX(0);
    }
    main {
        padding: 20px 16px;
        width: 100%;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 20px;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .toolbar form {
        max-width: 100%;
        width: 100%;
    }
    .toolbar .button, .toolbar button {
        width: 100%;
        justify-content: center;
    }
    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
        gap: 12px;
    }
    .stat {
        padding: 14px 16px;
    }
    .stat-value {
        font-size: 22px;
    }
    .panel {
        padding: 18px 16px;
        border-radius: var(--radius);
    }
    .login-box {
        margin: 20px auto;
        padding: 20px 16px;
        width: 92%;
    }
}

/* Customer Portal Nav & Container - 100% Full Width & Fully Responsive */
.customer-nav-bar {
    background: var(--brand-dark);
    color: white;
    padding: 14px 40px;
    border-bottom: none;
    margin-bottom: 0;
    width: 100%;
}

.customer-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 16px;
}

.customer-nav-left {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.customer-brand {
    color: white;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.customer-brand:hover {
    color: #ffffff;
    text-decoration: none;
}

.customer-badge {
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
    background: #1f2937;
    padding: 2px 8px;
    border-radius: 4px;
}

.customer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.customer-links a {
    color: #94a3b8;
    font-weight: 500;
    font-size: 13.5px;
    text-decoration: none;
    transition: color 0.15s;
}

.customer-links a:hover,
.customer-links a.active {
    color: #ffffff;
    text-decoration: none;
}

.customer-links a.quote-link {
    color: #60a5fa;
    font-weight: 600;
}

.customer-links a.quote-link:hover {
    color: #93c5fd;
}

.customer-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.customer-user-name {
    font-size: 13px;
    color: #cbd5e1;
}

.customer-main-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 32px 40px;
}

@media (max-width: 850px) {
    .customer-nav-bar {
        padding: 14px 16px;
    }
    .customer-nav-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .customer-nav-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
    }
    .customer-links {
        gap: 12px;
        width: 100%;
    }
    .customer-nav-right {
        width: 100%;
        justify-content: space-between;
        padding-top: 10px;
        border-top: 1px solid #1f2937;
    }
    .customer-main-wrap {
        padding: 20px 16px;
    }
}

/* ========================================================
   MODERN CLIENT PORTAL & DASHBOARD ARCHITECTURE
   ======================================================== */
.portal-shell {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
    color: var(--text-primary);
}

.portal-sidebar {
    width: 270px;
    background: #0f172a;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid #1e293b;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.25s ease;
    z-index: 100;
}

.portal-brand {
    padding: 24px 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #1e293b;
    text-decoration: none;
    color: #ffffff;
}

.portal-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    flex-shrink: 0;
}

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

.portal-brand-title {
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: -0.3px;
    color: #ffffff;
    line-height: 1.2;
}

.portal-brand-badge {
    font-size: 11px;
    color: #93c5fd;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 2px;
}

.portal-user-card {
    padding: 16px 20px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.portal-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.portal-user-meta {
    overflow: hidden;
    line-height: 1.35;
    flex: 1;
}

.portal-user-name {
    font-weight: 600;
    font-size: 13.5px;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-user-company {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-nav {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.portal-nav-heading {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    padding: 8px 12px 4px;
    font-weight: 700;
}

.portal-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.portal-nav-link svg {
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.portal-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    text-decoration: none;
}

.portal-nav-link:hover svg {
    color: #60a5fa;
}

.portal-nav-link.active {
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.portal-nav-link.active svg {
    color: #ffffff;
}

.portal-nav-cta {
    margin: 8px 0 4px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(59, 130, 246, 0.08));
    border: 1px dashed rgba(96, 165, 250, 0.45);
    color: #93c5fd;
    font-weight: 600;
}

.portal-nav-cta:hover {
    background: rgba(37, 99, 235, 0.3);
    color: #ffffff;
}

.portal-sidebar-footer {
    padding: 16px;
    border-top: 1px solid #1e293b;
    background: rgba(0, 0, 0, 0.15);
}

.portal-concierge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 12px;
}

.portal-concierge-title {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portal-concierge-phone {
    color: #38bdf8;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 4px;
}

.portal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #f8fafc;
}

.portal-topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.portal-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    color: #334155;
}

.portal-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-content {
    padding: 32px;
    flex: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Hero Welcome Banner */
.portal-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #1e40af 100%);
    border-radius: 16px;
    padding: 32px 36px;
    color: #ffffff;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
}

.portal-hero-banner::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -30px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.28) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.portal-hero-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
    margin: 0 0 8px;
    color: #ffffff;
}

.portal-hero-subtitle {
    font-size: 14.5px;
    color: #cbd5e1;
    max-width: 640px;
    line-height: 1.55;
    margin: 0 0 20px;
}

.portal-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Modern Metric KPI Cards */
.portal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.portal-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.portal-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.portal-kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-kpi-info {
    flex: 1;
}

.portal-kpi-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.portal-kpi-value {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

/* Workflow Steps */
.portal-workflow-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.portal-workflow-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.portal-workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.portal-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.portal-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #bfdbfe;
}

.portal-step-text h4 {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
}

.portal-step-text p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 960px) {
    .portal-sidebar {
        position: fixed;
        left: -280px;
        z-index: 1000;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    .portal-sidebar.open {
        transform: translateX(280px);
    }
    .portal-mobile-toggle {
        display: inline-flex;
    }
    .portal-topbar {
        padding: 0 16px;
    }
    .portal-content {
        padding: 16px;
    }
    .portal-hero-banner {
        padding: 24px 20px;
    }
}

/* ========================================================
   PREMIUM ADMIN DASHBOARD STYLES & REFINEMENTS
   ======================================================== */
.nav-heading {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    padding: 14px 12px 4px;
    display: block;
}

aside nav a svg {
    margin-right: 10px;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    color: #94a3b8;
    transition: color 0.15s ease;
}

aside nav a:hover svg,
aside nav a.active svg {
    color: #ffffff;
}

.admin-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #1e40af 100%);
    border-radius: 16px;
    padding: 28px 32px;
    color: #ffffff;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
}

.admin-hero-banner::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -30px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.admin-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-stat-info {
    flex: 1;
}

.admin-stat-label {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.admin-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.admin-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.admin-quick-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-quick-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-action-btn-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.admin-action-row:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
    text-decoration: none;
    transform: translateX(3px);
}

/* Tablet & Mobile Breakpoints for Admin Dashboard */
@media (max-width: 1200px) {
    .admin-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

@media (max-width: 850px) {
    .admin-hero-banner {
        padding: 20px;
    }
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .admin-stat-card {
        padding: 14px;
        gap: 12px;
    }
    .admin-stat-icon {
        width: 40px;
        height: 40px;
    }
    .admin-stat-value {
        font-size: 22px;
    }
    .admin-quick-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 520px) {
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    .admin-hero-banner h1 {
        font-size: 20px !important;
    }
}

/* ==========================================================
   LARAVEL PAGINATION CONTROLS & SVG CONTAINMENT (ADMIN FIX)
   ========================================================== */
.w-5, svg.w-5 {
    width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    max-height: 20px !important;
}
.h-5, svg.h-5 {
    height: 20px !important;
    max-height: 20px !important;
    width: 20px !important;
    max-width: 20px !important;
}

nav[role="navigation"] {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
    padding: 14px 18px !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    margin-top: 16px !important;
    box-sizing: border-box !important;
}

nav[role="navigation"] svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

nav[role="navigation"] > div:first-child:not([class*="sm:flex"]) {
    display: none !important;
}

nav[role="navigation"] .hidden {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

nav[role="navigation"] p.text-sm {
    margin: 0 !important;
    font-size: 13px !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

nav[role="navigation"] p.text-sm span.font-medium {
    font-weight: 700 !important;
    color: #1e293b !important;
}

nav[role="navigation"] span.relative.z-0 {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: none !important;
    border-radius: 6px !important;
}

nav[role="navigation"] a.relative,
nav[role="navigation"] span.relative {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    line-height: 1 !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
}

nav[role="navigation"] a.relative:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

nav[role="navigation"] span[aria-current="page"] > span,
nav[role="navigation"] span[aria-current="page"] {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25) !important;
}

nav[role="navigation"] span[aria-disabled="true"] {
    color: #94a3b8 !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

