/**
 * BHARTI UCL PORTAL - Unified Design System & Styling
 * Premium Dark Authentication & Professional Modern SaaS Portal Dashboard
 */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-glow: rgba(37, 99, 235, 0.25);
    
    --navy-900: #070d1e;
    --navy-800: #0b132b;
    --navy-700: #1c2541;
    --navy-600: #2d3748;
    
    --surface-dark: #0f172a;
    --surface-card: #1e293b;
    --surface-light: #ffffff;
    --surface-bg: #f8fafc;
    
    --border-color: #e2e8f0;
    --border-dark: rgba(255, 255, 255, 0.1);
    
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #f8fafc;
    
    --accent-teal: #0d9488;
    --accent-cyan: #06b6d4;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --info: #0284c7;
    --info-bg: #f0f9ff;

    --sidebar-width: 260px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-subtle: 0 2px 8px -2px rgba(0,0,0,0.05), 0 1px 4px -1px rgba(0,0,0,0.03);
    --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-float: 0 20px 35px -10px rgba(15, 23, 42, 0.12);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--surface-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   AUTHENTICATION PAGES (PREMIUM DARK IDENTITY)
   ========================================================================== */
body.auth-body {
    background: radial-gradient(circle at 50% 15%, #1e1b4b 0%, #090d16 65%, #020617 100%);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
}

.auth-bg-glow {
    position: absolute;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 10;
}

.auth-card {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(37, 99, 235, 0.1);
    transition: var(--transition);
}

.auth-brand {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: 18px;
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.auth-brand h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-brand p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #e2e8f0;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i.leading-icon {
    position: absolute;
    left: 16px;
    color: #64748b;
    font-size: 15px;
    pointer-events: none;
    transition: var(--transition);
}

.input-icon-wrapper input,
.input-icon-wrapper select {
    width: 100%;
    padding: 13px 16px 13px 44px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.input-icon-wrapper input:focus,
.input-icon-wrapper select:focus {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-icon-wrapper input:focus + i.leading-icon {
    color: var(--accent-cyan);
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: #cbd5e1;
}

.btn-auth-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    margin-top: 10px;
}

.btn-auth-submit:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-footer a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    text-decoration: underline;
    color: #7dd3fc;
}

/* ==========================================================================
   APP SHELL / LAYOUT (DESKTOP & RESPONSIVE MOBILE)
   ========================================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--navy-800);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.brand-text h2 {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    line-height: 1.2;
}

.brand-text span {
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
}

.nav-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    padding: 10px 12px 6px;
    margin-top: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
    margin-bottom: 4px;
}

.nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: var(--transition);
}

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

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    font-weight: 600;
}

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

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.5);
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.user-mini-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 14px;
}

.user-mini-info {
    flex: 1;
    overflow: hidden;
}

.user-mini-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-mini-role {
    font-size: 10.5px;
    color: #94a3b8;
    text-transform: capitalize;
}

/* MAIN CONTENT AREA */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8fafc;
    transition: var(--transition);
}

.app-header {
    height: var(--header-height);
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px;
}

.page-title-box h1 {
    font-size: 19px;
    font-weight: 700;
    color: var(--navy-900);
}

.breadcrumbs {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 2px;
}

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

.header-wallet-badge {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    padding: 7px 14px;
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.header-role-badge {
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-admin { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-retailer { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-data-admin { background: #fdf4ff; color: #a21caf; border: 1px solid #f5d0fe; }

.header-profile-dropdown {
    position: relative;
}

.header-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.header-profile-btn:hover {
    background: #f1f5f9;
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border-color);
    padding: 8px;
    display: none;
    z-index: 100;
}

.profile-dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--primary);
}

.dropdown-item.text-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

/* PAGE CONTENT CONTAINER */
.page-content {
    flex: 1;
    padding: 28px;
}

/* ==========================================================================
   DASHBOARD CARDS & STATS GRID
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 22px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

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

.stat-info h3 {
    font-size: 26px;
    font-weight: 800;
    color: var(--navy-900);
    margin-top: 6px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-green { background: #ecfdf5; color: #10b981; }
.icon-amber { background: #fffbeb; color: #f59e0b; }
.icon-purple { background: #faf5ff; color: #9333ea; }
.icon-rose { background: #fff1f2; color: #f43f5e; }
.icon-teal { background: #f0fdfa; color: #0d9488; }

/* ==========================================================================
   SERVICE ENROLLMENT CARDS
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.service-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 28px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
    border-color: #bfdbfe;
}

.service-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.service-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
}

.service-icon-mobile { background: linear-gradient(135deg, #0284c7, #2563eb); }
.service-icon-name { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.service-icon-dob { background: linear-gradient(135deg, #0d9488, #059669); }

.service-price-tag {
    font-size: 15px;
    font-weight: 800;
    color: #059669;
    background: #ecfdf5;
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    border: 1px solid #a7f3d0;
}

.service-card h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 8px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.btn-service-apply {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-service-apply:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
    transform: translateY(-2px);
}

/* ==========================================================================
   DATA TABLES & LISTS
   ========================================================================== */
.card-table-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-header-actions {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.card-title-main {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy-900);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.portal-table th {
    background: #f8fafc;
    padding: 14px 20px;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.6px;
}

.portal-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    vertical-align: middle;
}

.portal-table tbody tr:hover {
    background-color: #f8fafc;
}

/* STATUS BADGES */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.status-pending { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.status-approved { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-rejected { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.status-active { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-blocked { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ==========================================================================
   IRIS CAPTURE SECTION & SLOTS
   ========================================================================== */
.iris-capture-wrapper {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 28px;
}

.iris-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 12.5px;
    font-weight: 700;
}

.status-ready { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-not-ready { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.status-checking { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.iris-grid-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.iris-slot-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}

.iris-slot-card.captured {
    border-color: #10b981;
    background: #f0fdf4;
}

.iris-slot-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 10px;
}

.iris-preview-box {
    width: 100%;
    height: 120px;
    background: #0f172a;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #94a3b8;
    overflow: hidden;
    position: relative;
}

.iris-thumb-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn-capture-slot {
    width: 100%;
    padding: 8px 12px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-capture-slot:hover {
    background: #1d4ed8;
}

/* ==========================================================================
   DATA ADMIN READ-ONLY IRIS VIEWER WITH INTERACTIVE FILTERS
   ========================================================================== */
.iris-viewer-container {
    background: #090d16;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    color: #ffffff;
    margin-bottom: 24px;
}

.iris-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.viewer-controls-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-viewer-ctrl {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-viewer-ctrl:hover {
    background: #2563eb;
    border-color: #3b82f6;
}

.viewer-display-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.viewer-eye-cell {
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.viewer-eye-cell h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

.viewer-canvas-wrapper {
    width: 100%;
    height: 240px;
    background: #000;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.viewer-canvas-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

/* ==========================================================================
   TOAST NOTIFICATIONS & ALERTS
   ========================================================================== */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.portal-toast {
    pointer-events: auto;
    background: #ffffff;
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    font-size: 13.5px;
    animation: slideInRight 0.3s ease-out;
}

.portal-toast.toast-success { border-left-color: var(--success); }
.portal-toast.toast-danger { border-left-color: var(--danger); }
.portal-toast.toast-warning { border-left-color: var(--warning); }

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

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

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE / TABLET)
   ========================================================================== */
@media (max-width: 1024px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
    }
    .btn-sidebar-toggle {
        display: block;
    }
    .viewer-display-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-content {
        padding: 16px;
    }
    .auth-card {
        padding: 24px 20px;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
}
