/* ═══════════════════════════════════════════════════════════
   MEDTECHNO HAMKOR — PREMIUM CLINICAL DESIGN SYSTEM v5.0
   Enforced Dark Cyber-Clinic Theme matching reference screenshots
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg-main:        #070b13;
    --bg-sidebar:     #0b0f19;
    --bg-card:        #0f1524;
    --bg-card-hover:  #141c30;
    --border-color:   rgba(255, 255, 255, 0.05);
    --border-glow:    rgba(0, 245, 212, 0.15);

    --primary:        #0ea5e9;
    --primary-hover:  #38bdf8;
    --accent:         #00f5d4; /* Vibrant Cyan from mockup */
    --accent-glow:    rgba(0, 245, 212, 0.25);
    
    --success:        #10b981;
    --warning:        #f59e0b;
    --danger:         #ef4444;

    --text-primary:   #ffffff;
    --text-secondary: #94a3b8;
    --text-muted:     #4b5563;

    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-full:99px;

    --transition-fast:   all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-sm:  0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-md:  0 10px 30px rgba(0, 0, 0, 0.6);
    --shadow-lg:  0 20px 48px rgba(0, 0, 0, 0.8);
    --shadow-glow:0 0 15px rgba(0, 245, 212, 0.1);

    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', var(--font-body);
}

/* ─── Base Styles ────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.45;
}

/* Custom background ambient overlay */
.theme-glow-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: radial-gradient(circle at 50% 0%, rgba(0, 245, 212, 0.03) 0%, transparent 60%),
                      radial-gradient(circle at 10% 90%, rgba(14, 165, 233, 0.02) 0%, transparent 55%);
    z-index: 0;
    pointer-events: none;
}

/* Utilities */
.hidden   { display: none !important; }
.m-0      { margin: 0 !important; }
.d-flex   { display: flex !important; }
.align-items-center { align-items: center !important; }
.gap-2    { gap: 8px !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--font-body);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-normal);
    min-height: 42px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.btn--block { width: 100%; }

.btn--login {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: #070b13;
    font-size: 15px;
    font-weight: 700;
    min-height: 48px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0, 245, 212, 0.2);
}
.btn--login:hover { transform: translateY(-1px); filter: brightness(1.08); }

.btn--primary {
    background: var(--accent);
    color: #070b13;
    font-weight: 700;
}
.btn--primary:hover { filter: brightness(1.08); box-shadow: 0 4px 12px var(--accent-glow); }

.btn--success {
    background: var(--success);
    color: #ffffff;
}

.btn--secondary {
    background: #162032;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn--secondary:hover { background: #1c2940; border-color: rgba(255,255,255,0.12); }

.btn--scan {
    background: rgba(0, 245, 212, 0.08);
    border: 1px solid rgba(0, 245, 212, 0.2);
    color: var(--accent);
}

.btn--ghost-danger {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}
.btn--ghost-danger:hover { background: rgba(239, 68, 68, 0.08); }

.btn--sm { padding: 5px 12px; font-size: 12.5px; min-height: 32px; border-radius: var(--radius-sm); }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.input-wrapper { position: relative; }

.form-group input,
.form-group select,
.form-group textarea,
.input-wrapper input {
    width: 100%;
    background: #0f1524;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition-fast);
    min-height: 44px;
    appearance: none;
    -webkit-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300f5d4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px !important;
}

.form-group select option {
    color: #111827 !important;
    background-color: #ffffff !important;
}

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

.form-group input:focus,
.input-wrapper input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.12);
}

.pw-toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}
.pw-toggle:hover { color: var(--accent); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ─── LOGIN QUALITY ENHANCEMENTS ───── */

/* Shake animation for form card on invalid login */
@keyframes shakeForm {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-6px); }
    30%, 70% { transform: translateX(6px); }
}
.shake {
    animation: shakeForm 0.45s ease-in-out;
}

/* Input error highlight */
.input-error,
.input-wrapper .input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
.input-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

/* Smooth focus transition for inputs */
.form-group input,
.input-wrapper input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Loading spinner for login button */
@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spinner-icon {
    animation: spinLoader 0.8s linear infinite;
}
.btn--login-brand:disabled {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

/* ─── AUTHENTICATION SPLIT CONTAINER (Mockup Redesign) ───── */
.auth-split-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 100vh;
    min-height: 100dvh;
    background: #070b13;
    z-index: 1;
    position: relative;
    overflow: hidden;
}

/* A. PROMO PANEL (Left Panel) */
.auth-promo-panel {
    background: radial-gradient(circle at 40% 30%, #0e172a 0%, #070b13 100%);
    border-right: 1px solid var(--border-color);
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-promo-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle at 40% 40%, rgba(0, 245, 212, 0.04) 0%, transparent 50%);
    pointer-events: none;
}
.promo-mini-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.promo-mini-logo img {
    width: 24px;
    height: 24px;
}
.promo-mini-logo span {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
    color: var(--text-primary);
}

.promo-center-content {
    max-width: 460px;
    margin: auto 0;
}

/* Glowing pulse block */
.promo-glowing-pulse, .mobile-promo-glowing-pulse {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(0, 245, 212, 0.03);
    border: 1.5px solid rgba(0, 245, 212, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 24px;
    box-shadow: 0 0 30px rgba(0, 245, 212, 0.08);
}
.pulse-ring, .mobile-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(0, 245, 212, 0.3);
    animation: ripple 2s infinite ease-out;
}
@keyframes ripple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}
.pulse-icon-svg {
    filter: drop-shadow(0 0 10px rgba(0, 245, 212, 0.4));
}
.promo-glowing-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 245, 212, 0.35));
}
.promo-title {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.promo-title span {
    color: var(--accent);
    filter: drop-shadow(0 0 15px var(--accent-glow));
}
.promo-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.promo-bullet-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.promo-bullet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    color: var(--text-primary);
    font-weight: 500;
}
.bullet-check-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}
.version-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}
.copyright-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* B. FORM PANEL (Right Panel) */
.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 40px 60px;
    position: relative;
    background: #070b13;
}

.auth-lang-selector {
    position: absolute;
    top: 32px;
    right: 48px;
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 3px;
    border-radius: var(--radius-sm);
}
.lang-option {
    padding: 2px 8px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    text-transform: uppercase;
}
.lang-option.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.mobile-auth-brand-wrap {
    display: none; /* Desktop hidden */
}

.auth-form-card {
    width: 100%;
    max-width: 380px;
    margin: auto 0;
}

.form-header-title {
    margin-bottom: 28px;
}
.form-header-title h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}
.form-header-title p {
    color: var(--text-secondary);
    font-size: 14px;
}

.input-wrapper--icon input {
    padding-left: 42px !important;
}
.input-icon-svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.input-wrapper--icon input:focus ~ .input-icon-svg {
    color: var(--accent);
}

.form-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.remember-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
}
.remember-checkbox-label input {
    width: 16px !important;
    min-height: auto !important;
    cursor: pointer;
}
.forgot-pwd-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.forgot-pwd-link:hover {
    color: var(--primary-hover);
}

.btn--login-brand {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: #070b13;
    font-size: 14.5px;
    font-weight: 700;
    min-height: 46px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0, 245, 212, 0.15);
}
.btn--login-brand:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}
.btn--login-brand svg {
    margin-left: 4px;
    transition: transform 0.2s ease;
}
.btn--login-brand:hover svg {
    transform: translateX(2px);
}

.auth-or-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}
.auth-or-divider::before, .auth-or-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border-color);
}
.auth-or-divider span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: lowercase;
}

.btn--qr-login {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    min-height: 46px;
    border-radius: var(--radius-md);
}
.btn--qr-login:hover {
    background: rgba(255, 255, 255, 0.05);
}

.form-panel-footer {
    width: 100%;
    text-align: center;
    margin-top: 24px;
}
.form-panel-footer span {
    font-size: 12px;
    color: var(--text-muted);
}

.pwa-install-box--card {
    border-top: none !important;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px !important;
}

.mobile-title-el, .mobile-subtitle-el {
    display: none;
}
/* ─── MAIN APP GRID LAYOUT (Desktop Sidebar Split) ────────── */
.app-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
    background: var(--bg-main);
    z-index: 1;
    position: relative;
}

/* Sidebar Layout */
.app-sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 24px 16px;
    z-index: 110;
}

.brand-logo-block {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(0, 245, 212, 0.05);
    border: 1px solid rgba(0, 245, 212, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.brand-logo-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}
.sidebar-brand h2 {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
}
.sidebar-brand h2 span { color: var(--accent); }

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.menu-header {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 12px 8px 6px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}
.menu-item:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}
.menu-item.active {
    background: var(--accent);
    color: #070b13;
    font-weight: 700;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.badge-count {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}
.menu-item.active .badge-count {
    background: #070b13;
    color: var(--accent);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.profile-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}
.profile-details h4 { font-size: 13px; font-weight: 700; }
.profile-details p { font-size: 11px; color: var(--text-secondary); }

/* Main Content columns */
.app-main-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}
.desktop-header h1 { font-family: var(--font-heading); font-size: 20px; font-weight: 800; }
.desktop-header-right { display: flex; align-items: center; gap: 16px; }

.desktop-search {
    position: relative;
    width: 260px;
}
.desktop-search input {
    padding: 8px 12px 8px 36px;
    font-size: 13px;
    min-height: 38px;
}
.desktop-search .search-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
}

.desktop-notif {
    position: relative;
    cursor: pointer;
    color: var(--text-secondary);
}
.desktop-notif:hover { color: var(--text-primary); }

.notif-badge {
    position: absolute; top: -2px; right: -2px;
    background: var(--danger); color: #fff;
    font-size: 9px; font-weight: 800;
    width: 14px; height: 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.app-body-content {
    flex: 1;
    padding: 24px 28px;
}

/* Split panel grid */
.dashboard-split-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.split-left-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}
.split-right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.section-title-row h3 { font-family: var(--font-heading); font-size: 16px; font-weight: 800; }
.section-title-row a { font-size: 12.5px; font-weight: 700; color: var(--accent); text-decoration: none; }
.section-title-row a:hover { text-decoration: underline; }

/* ─── STATS CARDS ────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stats-grid .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.stat-icon--blue   { background: rgba(14, 165, 233, 0.08); color: var(--primary); }
.stat-icon--amber  { background: rgba(245, 158, 11, 0.08); color: var(--warning); }
.stat-icon--purple { background: rgba(139, 92, 246, 0.08); color: #a78bfa; }
.stat-icon--green  { background: rgba(16, 185, 129, 0.08); color: var(--success); }

.stat-val {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* ─── ACTIVE CALLS CARDS (Left Accent Bar) ───────────────── */
.widget-requests-list, .mobile-requests-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.active-call-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.active-call-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

/* Status variants for accent bar & dots */
.active-call-card--pending::before  { background: var(--danger); }
.active-call-card--progress::before { background: var(--warning); }
.active-call-card--success::before  { background: var(--success); }

.active-call-card--pending .status-dot  { background: var(--danger); }
.active-call-card--progress .status-dot { background: var(--warning); }
.active-call-card--success .status-dot  { background: var(--success); }

.call-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.call-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.call-device-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vip-badge {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-size: 9px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.call-issue-desc {
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 16px;
}

.call-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-left: 16px;
    font-size: 11.5px;
    color: var(--text-secondary);
}

.call-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ─── CATEGORY PILLS ─────────────────────────────────────── */
.pills-scroll-container {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 16px;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.pills-scroll-container::-webkit-scrollbar { display: none; }

.filter-pills { display: flex; gap: 8px; width: max-content; }
.pill {
    background: #111827;
    border: 1px solid var(--border-color);
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}
.pill:hover { border-color: rgba(255,255,255,0.1); color: var(--text-primary); }
.pill.active {
    background: #1f2937;
    color: var(--accent);
    border-color: var(--accent);
}

/* ─── MOBILE CARD VIEW (Image 1 layout) ──────────────────── */
.equipment-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.equipment-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    position: relative;
}

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

.card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.device-tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.device-sn-price {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.device-health-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.health-track-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.health-fill {
    height: 100%;
    border-radius: var(--radius-full);
}

.health-percentage {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 28px;
    text-align: right;
}

.card-qr-circle-btn {
    position: absolute;
    right: 16px; top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #162032;
    border: 1px solid var(--border-color);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}
.card-qr-circle-btn:active { transform: translateY(-50%) scale(0.9); }

/* ─── DESKTOP TABLE VIEW (Image 2 layout) ────────────────── */
.table-view-container {
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}
.data-table th, .data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}
.data-table th {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.01); }

.desktop-health-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── SIDEBAR WIDGET PANELS ─────────────────────────────── */
.widget-panel {
    padding: 16px;
}
.camera-widget-box {
    margin: 12px 0 8px;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.widget-reader-frame {
    aspect-ratio: 16/10;
    background: #080c14;
    border: 1.5px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}
.scanner-frame-placeholder {
    text-align: center;
    color: var(--text-muted);
}
.scanner-frame-placeholder p { font-size: 11.5px; margin-top: 6px; }

.print-widget-card {
    border-color: rgba(0, 245, 212, 0.12);
}
.widget-print-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.widget-print-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background: rgba(0, 245, 212, 0.06);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.widget-print-header h4 { font-size: 13.5px; font-weight: 700; }
.widget-print-header p { font-size: 11.5px; color: var(--text-secondary); margin-top: 1px; }

/* ─── MODALS ─────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(3, 5, 12, 0.75);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 90%; max-width: 450px; padding: 24px;
    box-shadow: var(--shadow-lg);
    max-height: 90vh; overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { font-family: var(--font-heading); font-size: 16px; font-weight: 800; color: var(--text-primary); }
.modal-close-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; }
.modal-close-btn:hover { color: var(--danger); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Passport Details */
.passport-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; background: rgba(255,255,255,0.02); padding: 12px; border-radius: var(--radius-md); }
.passport-icon { width: 36px; height: 36px; background: rgba(0, 245, 212, 0.08); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.passport-header h3 { font-size: 14px; font-weight: 700; }
.passport-header p { font-size: 11.5px; color: var(--text-secondary); }

.qr-code-box { display: flex; flex-direction: column; align-items: center; background: #fff; padding: 16px; border-radius: var(--radius-md); margin-bottom: 16px; }
.qr-help-text { font-size: 11px; color: #64748b; text-align: center; margin-top: 8px; }

/* Price Notices */
.price-notice-box { padding: 12px; border-radius: var(--radius-md); font-size: 12px; margin-bottom: 16px; display: flex; gap: 8px; align-items: flex-start; }
.price-notice-box--premium { background: rgba(16, 185, 129, 0.08); color: #a7f3d0; border: 1px solid rgba(16, 185, 129, 0.15); }
.price-notice-box--regular { background: rgba(14, 165, 233, 0.08); color: #bae6fd; border: 1px solid rgba(14, 165, 233, 0.15); }

/* ─── TOAST ──────────────────────────────────────────────── */
.toast {
    position: fixed; top: max(20px, env(safe-area-inset-top, 20px)); left: 50%; transform: translateX(-50%);
    z-index: 2000; padding: 12px 24px; border-radius: var(--radius-md); font-size: 13.5px; font-weight: 700;
    box-shadow: var(--shadow-lg); color: #fff; display: flex; align-items: center; gap: 10px;
    width: 90%; max-width: 480px; box-sizing: border-box; justify-content: center;
    text-align: center;
    line-height: 1.4;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }

/* ─── MOBILE BOTTOM NAV ──────────────────────────────────── */
.bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(11, 15, 25, 0.96);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color); justify-content: space-around; align-items: center; z-index: 100;
}
.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--text-secondary); text-decoration: none; font-size: 9.5px; font-weight: 700; flex: 1; height: 60px;
}
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item.active svg { filter: drop-shadow(0 0 4px var(--accent-glow)); }

/* Float Scanner FAB */
.bottom-nav-scan { position: relative; top: -8px; }
.scan-fab {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--accent); display: flex; align-items: center; justify-content: center; color: #070b13;
    box-shadow: 0 4px 12px var(--accent-glow);
}
.scan-label { margin-top: 6px !important; }

/* Scanner laser & frame HUD */
#reader-wrapper { position: relative; overflow: hidden; border-radius: var(--radius-md); }
.scanner-laser { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--accent); animation: scanLaser 2s linear infinite; z-index: 10; }
@keyframes scanLaser { 0% { top: 0; } 50% { top: 100%; } 100% { top: 0; } }
.scanner-frame { position: absolute; inset: 10%; border: 1px dashed rgba(255,255,255,0.25); box-shadow: 0 0 0 9999px rgba(0,0,0,0.6); z-index: 9; }

/* ─── MOBILE DRAWER MENU ─────────────────────────────────── */
.mobile-drawer-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(3, 5, 12, 0.7);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 1020; display: flex; justify-content: flex-start;
}
.mobile-drawer {
    width: 280px; max-width: 80vw; height: 100%; background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color); padding: 24px 16px;
    display: flex; flex-direction: column; gap: 20px;
    animation: slideRight 0.25s ease-out;
}
@keyframes slideRight { from { transform: translateX(-100%); } to { transform: translateX(0); } }

.drawer-header { display: flex; align-items: center; gap: 10px; }
.drawer-header h2 { font-family: var(--font-heading); font-size: 19px; font-weight: 800; }
.drawer-header h2 span { color: var(--accent); }
.drawer-close-btn { background: transparent; border: none; color: var(--text-muted); margin-left: auto; cursor: pointer; }

.drawer-profile { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.drawer-menu { display: flex; flex-direction: column; gap: 6px; }
.drawer-item { display: flex; align-items: center; padding: 10px 12px; color: var(--text-secondary); text-decoration: none; font-size: 13.5px; font-weight: 600; border-radius: var(--radius-md); }
.drawer-item.active { background: var(--accent); color: #070b13; font-weight: 700; }

/* ─── RESPONSIVE BREAKPOINTS (Tablet / Mobile ≤ 1024px) ───── */
.mobile-header { display: none; }
.mobile-only { display: none !important; }
.desktop-only { display: block !important; }
table.desktop-only { display: table !important; }
@media (max-width: 1024px) {
    .auth-split-container {
        grid-template-columns: 1fr;
    }
    .auth-promo-panel {
        display: none !important;
    }

    .auth-form-panel {
        padding: calc(32px + env(safe-area-inset-top, 0px)) 20px 32px 20px !important;
        justify-content: center;
        min-height: 100vh;
        min-height: 100dvh;
    }
    .mobile-auth-brand-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 24px;
        margin-top: 20px;
    }
    .mobile-promo-glowing-pulse {
        width: 90px;
        height: 90px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(0, 245, 212, 0.12) 0%, transparent 70%);
        border: 1.5px solid rgba(0, 245, 212, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        margin-bottom: 16px;
        box-shadow: 0 0 25px rgba(0, 245, 212, 0.12);
    }
    .mobile-promo-title {
        font-family: var(--font-heading);
        font-size: 26px;
        font-weight: 800;
        line-height: 1.2;
        margin-bottom: 4px;
        color: var(--text-primary);
    }
    .mobile-promo-title span {
        color: var(--accent);
    }
    .mobile-promo-subtitle {
        font-size: 10.5px;
        color: var(--accent);
        letter-spacing: 0.12em;
        font-weight: 800;
    }
    
    .desktop-title-el, .desktop-subtitle-el {
        display: none !important;
    }
    .mobile-title-el {
        display: block !important;
        font-size: 20px !important;
        font-weight: 800 !important;
        text-align: left;
    }
    .mobile-subtitle-el {
        display: block !important;
        font-size: 13px !important;
        color: var(--text-secondary) !important;
        text-align: left;
    }

    .mobile-only { display: block !important; }
    .mobile-only.d-flex { display: flex !important; }
    .desktop-only { display: none !important; }
    .desktop-header { display: none !important; }

    .app-shell { display: block; }
    .app-sidebar { display: none; }
    
    .mobile-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: calc(56px + env(safe-area-inset-top, 0px)) !important;
        padding-top: env(safe-area-inset-top, 0px) !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: var(--bg-sidebar) !important;
        border-bottom: 1px solid var(--border-color) !important;
        z-index: 100 !important;
    }
    .mobile-brand { display: flex; align-items: center; gap: 8px; }
    .mobile-brand h1 { font-family: var(--font-heading); font-size: 17px; font-weight: 800; }
    .mobile-brand h1 span { color: var(--accent); }
    .mobile-menu-btn, .mobile-notif-bell { background: transparent; border: none; color: var(--text-primary); cursor: pointer; position: relative; }

    .app-body-content {
        padding: 16px !important;
        padding-top: calc(72px + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .stats-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; margin-bottom: 20px !important; }
    .stats-grid .stat-card { padding: 12px !important; min-height: 80px !important; }
    .stat-val { font-size: 22px !important; }
    .stat-label { font-size: 9.5px !important; }
    .stat-icon { width: 26px !important; height: 26px !important; top: 12px !important; right: 12px !important; }

    .dashboard-split-layout { display: block; }
    .section-container { margin-bottom: 20px; }

    .bottom-nav { display: flex !important; }
    body { padding-bottom: calc(68px + env(safe-area-inset-bottom)) !important; }

    .control-panel { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
    .sort-wrapper { width: 100% !important; }

    /* Modal mobile sheets (Scrollable block layout to avoid flexbox collapse in WebViews) */
    .modal-overlay {
        display: block !important;
        position: fixed !important;
        top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        background: rgba(3, 5, 12, 0.75) !important;
        backdrop-filter: blur(4px) !important; -webkit-backdrop-filter: blur(4px) !important;
        padding: 40px 16px !important;
        z-index: 1000 !important;
    }
    .modal-overlay.hidden {
        display: none !important;
    }
    .modal {
        display: block !important;
        max-width: 450px !important; width: 100% !important;
        height: auto !important;
        min-height: 380px !important;
        border-radius: 20px !important;
        margin: 40px auto !important;
        padding: 24px 20px !important;
        animation: zoomInModal 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
        background: var(--bg-card) !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    }
    @keyframes zoomInModal { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

    .modal--scanner {
        position: fixed !important; inset: 0 !important; border-radius: 0 !important;
        max-width: 100vw !important; max-height: 100vh !important; padding: 16px !important;
        display: flex !important; flex-direction: column !important; justify-content: space-between !important;
        background: #000 !important;
    }

    .section-title-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 16px !important;
    }
    .section-title-row h3 {
        font-size: 18px !important;
        width: 100% !important;
    }
    .section-title-row .d-flex {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .section-title-row .btn {
        flex: 1 1 auto !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        height: 38px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
    }
}

/* ─── PRINT LAYOUTS ──────────────────────────────────────── */
@media print {
    html, body {
        background: #fff !important;
        color: #000 !important;
    }
    body * { visibility: hidden !important; }
    #bulk-qr-print-area, #bulk-qr-print-area * { visibility: visible !important; }
    #bulk-qr-print-area {
        position: absolute; left: 0; top: 0; width: 100%;
        display: block !important;
        background: #fff !important;
    }
    .print-qr-card {
        border: 1px solid #000 !important; border-radius: 8px; padding: 16px;
        text-align: center; page-break-inside: avoid; background: #fff !important;
        color: #000 !important;
    }
    .print-qr-card img { width: 130px; height: 130px; }
    .print-qr-title { font-weight: bold; font-size: 13px; margin-top: 8px; color: #000 !important; }
    .print-qr-subtitle { font-size: 11px; color: #000 !important; margin-top: 2px; }
    
    .print-order-card {
        visibility: visible !important;
        display: block !important;
        page-break-inside: avoid;
        background: #fff !important;
        color: #000 !important;
    }
}
.print-only { display: none; }

/* Screen only hiding for print container to prevent it from overlaying on screen */
@media screen {
    #bulk-qr-print-area {
        display: none !important;
    }
}

/* Ensure forms inside modals are fully visible and don't collapse on mobile layouts */
.modal form {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}
