/* =====================================================================
   SASTHO MEDICAL INTELLIGENCE - DESIGN SYSTEM & STYLESHEET
   Typography: SolaimanLipi (Proportional Bangla) + Ubuntu (English & Numbers)
   Aesthetic: Mayo Clinic / Apple Health / Modern Clinical MedTech
   ===================================================================== */

@font-face {
    font-family: 'SolaimanLipi';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/solaimanlipi-normal-v1.0.woff2') format('woff2'),
         url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-normal-v1.0.woff2') format('woff2');
}

@font-face {
    font-family: 'SolaimanLipi';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/solaimanlipi-bold-v1.0.woff2') format('woff2'),
         url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-bold-v1.0.woff2') format('woff2');
}

@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #e0f2fe;
    --primary-gradient: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    
    --accent: #0d9488;
    --accent-dark: #0f766e;
    --accent-light: #ccfbf1;

    --rx-header-blue: #0f2744;
    --rx-accent-cyan: #0284c7;
    --rx-divider: #e2e8f0;

    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #3b82f6;

    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #0284c7;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-focus: #38bdf8;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Bangla Typography Scale Optimization (SolaimanLipi Calibrated) */
    --bs-body-font-family: 'SolaimanLipi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    --bs-font-sans-serif: 'SolaimanLipi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    --base-font-size: 16.5px;
    --bangla-scale: 1.12;
    --line-height-normal: 1.72;
}

/* Base Reset & Universal SolaimanLipi Font Enforcement */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body, button, input, select, textarea, optgroup, .btn, .badge, .navbar, .card, p, 
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .lead,
.accordion-button, .nav-link, .table {
    font-family: 'SolaimanLipi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* English text & Latin Elements use Ubuntu */
.font-en, [data-lang="en"], .latin-term, th.en-header, code, pre, .en-text, .badge.font-en, .form-control.font-en {
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, sans-serif !important;
    letter-spacing: -0.01em;
}

/* =====================================================================
   GLOBAL MODERN CUSTOM SCROLLBARS (Slim, Smooth, Cross-Browser)
   ===================================================================== */
html, body, * {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.32) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
    transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.55);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

html {
    font-size: var(--base-font-size);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'SolaimanLipi', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: var(--line-height-normal);
    min-height: 100vh;
    overflow-x: hidden;
}

/* English text & Latin Elements use Inter / Ubuntu */
.font-en, .latin-term, th.en-header, code, pre {
    font-family: 'Inter', 'Ubuntu', -apple-system, BlinkMacSystemFont, sans-serif !important;
    letter-spacing: -0.01em;
}

/* Pronunciation pill / phonetic styling & Web Speech Audio */
.pronounce-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #cbd5e1;
    margin-left: 6px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pronounce-badge:hover {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #7dd3fc;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

.pronounce-badge:active {
    transform: scale(0.97);
}

.pronounce-badge i {
    font-size: 0.75rem;
    color: var(--primary);
    transition: transform 0.2s ease;
}

.pronounce-badge:hover i {
    transform: scale(1.15);
}

.pronounce-badge.speaking {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.5) !important;
    animation: pronouncePulse 1.2s infinite alternate ease-in-out;
}

.pronounce-badge.speaking i {
    color: #ffffff !important;
    animation: soundWave 0.6s infinite alternate ease-in-out;
}

@keyframes pronouncePulse {
    from { transform: scale(1); box-shadow: 0 0 4px rgba(2, 132, 199, 0.4); }
    to { transform: scale(1.06); box-shadow: 0 0 14px rgba(2, 132, 199, 0.8); }
}

@keyframes soundWave {
    from { transform: scale(0.9); }
    to { transform: scale(1.25); }
}

body.hide-pronunciation .pronounce-badge {
    display: none !important;
}

/* Layout Architecture */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* =====================================================================
   EXECUTIVE SIDEBAR STYLING (Stripe / Linear / MedTech Clinical Standard)
   ===================================================================== */
.app-sidebar {
    width: 285px;
    background: linear-gradient(180deg, #090e1a 0%, #0f172a 45%, #070d1e 100%);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

/* Sidebar Ultra-Slim Custom Scrollbar */
.app-sidebar::-webkit-scrollbar {
    width: 4px;
}
.app-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}
.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
}

/* Sidebar Brand Header */
.sidebar-header {
    padding: 20px 18px 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.sidebar-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.sidebar-brand-text h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.sidebar-brand-text .portal-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #34d399;
    font-size: 0.72rem;
    font-weight: 600;
}

.live-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Sidebar Navigation Items */
.sidebar-nav {
    padding: 14px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 14px 10px 6px;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin-left: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 11px;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    user-select: none;
}

.nav-item:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.16) 0%, rgba(14, 165, 233, 0.05) 100%);
    border: 1px solid rgba(56, 189, 248, 0.32);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 6px;
    bottom: 6px;
    width: 3.5px;
    background: #38bdf8;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px #38bdf8;
}

.nav-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #94a3b8;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nav-item:hover .nav-icon-box {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-item.active .nav-icon-box {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.4);
}

.nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.nav-pill-badge {
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.70rem;
    font-weight: 600;
    font-family: 'Ubuntu', sans-serif;
    letter-spacing: -0.01em;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    line-height: 1.2;
}

.nav-pill-badge.badge-cyan {
    background: rgba(14, 165, 233, 0.16);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
}

.nav-pill-badge.badge-emerald {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.35);
}

.nav-pill-badge.badge-sky {
    background: rgba(59, 130, 246, 0.16);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.35);
}

.nav-pill-badge.badge-purple {
    background: rgba(168, 85, 247, 0.16);
    color: #c084fc;
    border-color: rgba(192, 132, 252, 0.35);
}

/* Sidebar Footer & Doctor Profile Card */
.sidebar-footer {
    padding: 12px 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(9, 14, 26, 0.75);
    backdrop-filter: blur(10px);
}

.doctor-profile-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.doctor-profile-card:hover {
    background: rgba(255, 255, 255, 0.065);
    border-color: rgba(56, 189, 248, 0.25);
}

.doctor-avatar-box {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7 0%, #1e3a8a 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.avatar-online-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #0f172a;
}

.doctor-info-meta {
    flex: 1;
    min-width: 0;
}

.doctor-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.doctor-phone {
    font-size: 0.72rem;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-family: 'Ubuntu', sans-serif;
}

.sidebar-system-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    font-size: 0.70rem;
    color: #64748b;
}

.cloud-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 500;
}

/* Main Content Area */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-main);
}

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

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    max-width: 500px;
}

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

.search-box {
    position: relative;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.search-input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #f8fafc;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

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

/* Pronunciation Switcher in Topbar */
.pronounce-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    user-select: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 22px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

/* Content Container & Tabs */
.content-area {
    padding: 28px;
    flex: 1;
}

.view-section {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

.view-section.active {
    display: block;
}

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

/* Card Styles */
.med-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.25s ease;
}

.med-card:hover {
    box-shadow: var(--shadow-md);
}

.card-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.card-title-bar h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title-bar h2 i {
    color: var(--primary);
}

/* Stat Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.stat-icon.blue { background: #e0f2fe; color: #0284c7; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.purple { background: #f3e8ff; color: #9333ea; }
.stat-icon.amber { background: #fef3c7; color: #d97706; }

/* Diagnostic Interpreter Box */
.interpreter-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .interpreter-grid {
        grid-template-columns: 1fr;
    }
}

.param-input-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.param-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.param-header label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.param-ref-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-unit input {
    width: 100%;
    height: 44px;
    padding: 0 60px 0 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 600;
    background: #fff;
    transition: all 0.2s;
}

.input-with-unit input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.input-with-unit .unit-tag {
    position: absolute;
    right: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: 'Ubuntu', sans-serif;
}

/* Result Alert Card */
.analysis-result-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 6px solid #10b981;
    transition: all 0.2s ease;
}

.analysis-result-card.status-high {
    border-left-color: #ef4444;
    background: #fffafa;
}

.analysis-result-card.status-low {
    border-left-color: #f59e0b;
    background: #fffdf5;
}

.analysis-result-card.status-critical {
    border-left-color: #b91c1c;
    background: #fef2f2;
}

.result-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.treatment-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 12px;
}

.treatment-box h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

/* Table Design */
.data-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #fff;
}

.med-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.med-table th {
    background: #f8fafc;
    padding: 14px 18px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    white-space: nowrap;
}

.med-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.med-table tr:hover td {
    background-color: #f8fafc;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    box-shadow: 0 4px 8px rgba(2, 132, 199, 0.3);
}

.btn-success {
    background: #0d9488;
    color: #ffffff;
}

.btn-success:hover {
    background: #0f766e;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* =========================================================================
   EXECUTIVE MODAL POPUPS & CONFIRMATION DIALOGS
   ========================================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.22s ease-out;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transform: scale(0.94) translateY(12px);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.26s ease-out;
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    z-index: 10;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

/* -------------------------------------------------------------
   EXECUTIVE CONFIRM & PROMPT DIALOG CARD
   ------------------------------------------------------------- */
.confirm-modal-card {
    max-width: 440px !important;
    border-radius: 24px !important;
    background: #ffffff;
    box-shadow: 0 30px 70px -15px rgba(15, 23, 42, 0.4) !important;
}

.confirm-icon-box {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    transition: transform 0.2s ease;
}

.confirm-icon-box::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 26px;
    opacity: 0.35;
    animation: pulseRing 2s infinite ease-out;
}

@keyframes pulseRing {
    0% { transform: scale(0.95); opacity: 0.4; }
    50% { transform: scale(1.05); opacity: 0.1; }
    100% { transform: scale(0.95); opacity: 0.4; }
}

.confirm-icon-box.danger {
    background: #fee2e2;
    color: #ef4444;
}
.confirm-icon-box.danger::after {
    border: 2px solid #ef4444;
}

.confirm-icon-box.warning {
    background: #fef3c7;
    color: #f59e0b;
}
.confirm-icon-box.warning::after {
    border: 2px solid #f59e0b;
}

.confirm-icon-box.success {
    background: #dcfce7;
    color: #10b981;
}
.confirm-icon-box.success::after {
    border: 2px solid #10b981;
}

.confirm-icon-box.info {
    background: #e0f2fe;
    color: #0284c7;
}
.confirm-icon-box.info::after {
    border: 2px solid #0284c7;
}

/* -------------------------------------------------------------
   TOAST NOTIFICATION HUB
   ------------------------------------------------------------- */
.toast-hub-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
    width: 100%;
}

.sastho-toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
    animation: toastSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.sastho-toast.hiding {
    animation: toastSlideOut 0.28s ease-in forwards;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(50px) scale(0.94); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(60px) scale(0.9); }
}

.sastho-toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.sastho-toast.success .sastho-toast-icon {
    background: #dcfce7;
    color: #16a34a;
}
.sastho-toast.error .sastho-toast-icon,
.sastho-toast.danger .sastho-toast-icon {
    background: #fee2e2;
    color: #ef4444;
}
.sastho-toast.warning .sastho-toast-icon {
    background: #fef3c7;
    color: #d97706;
}
.sastho-toast.info .sastho-toast-icon {
    background: #e0f2fe;
    color: #0284c7;
}

.sastho-toast-content {
    flex: 1;
    min-width: 0;
}

.sastho-toast-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.sastho-toast-msg {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.35;
    word-break: break-word;
}

.sastho-toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px;
    transition: color 0.15s ease;
}
.sastho-toast-close:hover {
    color: #0f172a;
}

.sastho-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    animation: toastProgress linear forwards;
}

.sastho-toast.success .sastho-toast-progress { background: #16a34a; }
.sastho-toast.error .sastho-toast-progress,
.sastho-toast.danger .sastho-toast-progress { background: #ef4444; }
.sastho-toast.warning .sastho-toast-progress { background: #d97706; }
.sastho-toast.info .sastho-toast-progress { background: #0284c7; }

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    height: 64px;
    z-index: 95;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    flex: 1;
    height: 100%;
    cursor: pointer;
}

.bottom-nav-item i {
    font-size: 1.2rem;
}

.bottom-nav-item.active {
    color: var(--primary);
    font-weight: 700;
}

/* =====================================================================
   DOCTOR'S PRESCRIPTION PAD & A4 PRINT TEMPLATE
   Matching Reference Layout with Rokibul Islam & Sastho Watermark
   ===================================================================== */
.rx-pad-container {
    max-width: 860px;
    margin: 0 auto 30px auto;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid #cbd5e1;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.rx-pad {
    padding: 36px 40px;
    min-height: 1050px;
    position: relative;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Watermark centered in prescription */
.rx-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    pointer-events: none;
    user-select: none;
    opacity: 0.06;
    z-index: 1;
}

/* Rx Header */
.rx-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 2.5px solid var(--rx-accent-cyan);
    position: relative;
    z-index: 2;
}

.rx-header-left h2 {
    font-family: 'Ubuntu', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--rx-header-blue);
    margin-bottom: 3px;
    letter-spacing: -0.02em;
}

.rx-header-left .rx-degrees {
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 2px;
}

.rx-header-left .rx-speciality {
    font-size: 0.92rem;
    color: #0284c7;
    font-weight: 600;
    margin-bottom: 4px;
}

.rx-header-left .rx-contact-info {
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.88rem;
    color: #64748b;
}

.rx-header-right {
    text-align: right;
}

.rx-header-right h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f2744;
    margin-bottom: 3px;
}

.rx-header-right .rx-degrees-bn {
    font-size: 0.96rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 2px;
}

.rx-header-right .rx-speciality-bn {
    font-size: 0.92rem;
    color: #0284c7;
    font-weight: 600;
}

.rx-header-right .rx-contact-info-bn {
    font-size: 0.88rem;
    color: #64748b;
    margin-top: 4px;
}

/* Patient Demographic Strip */
.rx-patient-bar {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1.5fr;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 2px solid var(--rx-accent-cyan);
    margin-bottom: 16px;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
    background: #f8fafc;
    border-radius: 6px;
}

.patient-field {
    display: flex;
    align-items: center;
    gap: 6px;
}

.patient-field label {
    font-weight: 700;
    color: #0f2744;
    margin: 0;
    font-family: 'Ubuntu', sans-serif;
}

.patient-field input {
    border: none;
    border-bottom: 1px dotted #94a3b8;
    background: transparent;
    font-family: inherit;
    font-weight: 600;
    color: #1e293b;
    width: 100%;
    outline: none;
    padding: 2px 4px;
}

.patient-field input:focus {
    border-bottom: 1.5px solid var(--primary);
    background: #ffffff;
}

/* Rx Two Column Body */
.rx-body-grid {
    display: grid;
    grid-template-columns: 28% 72%;
    gap: 0;
    min-height: 720px;
    position: relative;
    z-index: 2;
}

/* Left Sidebar (Dx, Complaints, Investigations) */
.rx-col-left {
    border-right: 2px solid var(--rx-accent-cyan);
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rx-section-block h4 {
    font-family: 'Ubuntu', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f2744;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.rx-section-block textarea, .rx-section-block input {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-family: inherit;
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.6;
    resize: none;
    outline: none;
    padding: 4px;
}

.rx-section-block textarea:hover, .rx-section-block textarea:focus {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.rx-inv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rx-inv-list li {
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rx-inv-list li i {
    font-size: 0.75rem;
    color: var(--primary);
}

/* Right Main Prescription Area (Rx) */
.rx-col-right {
    padding-left: 28px;
    display: flex;
    flex-direction: column;
}

.rx-symbol {
    font-family: 'Ubuntu', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #0284c7;
    margin-bottom: 12px;
    line-height: 1;
}

.rx-med-item {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e2e8f0;
}

.rx-med-item:last-child {
    border-bottom: none;
}

.rx-med-name-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.rx-med-number {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    color: #0284c7;
    font-size: 1.05rem;
}

.rx-med-brand {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #0f172a;
}

.rx-med-generic {
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.88rem;
    color: #64748b;
    font-style: italic;
}

.rx-med-instruction {
    margin-top: 5px;
    padding-left: 24px;
    font-size: 0.96rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 16px;
}

.rx-med-dose-pill {
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 4px;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #0f2744;
}

.rx-med-duration {
    font-weight: 600;
    color: #0369a1;
}

.rx-med-meal-timing {
    color: #475569;
}

.rx-general-advice {
    margin-top: auto;
    padding: 16px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
}

.rx-general-advice h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f2744;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Rx Footer */
.rx-footer {
    padding-top: 18px;
    margin-top: 24px;
    border-top: 2px solid var(--rx-accent-cyan);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.rx-footer-clinic h3 {
    font-family: 'Ubuntu', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f2744;
    margin-bottom: 2px;
}

.rx-footer-clinic p {
    font-size: 0.84rem;
    color: #64748b;
    margin-bottom: 0;
}

.rx-footer-stamp {
    text-align: right;
}

/* Rx Doctor Digital Signature & Seal Box */
.rx-doctor-signature-box {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 180px;
}

.rx-doctor-cursive-sig {
    font-family: 'Brush Script MT', 'Segoe Script', cursive, sans-serif;
    font-size: 1.85rem;
    line-height: 1.1;
    transform: rotate(-3deg);
    color: #0c4a6e;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    user-select: none;
}

.rx-doctor-sign-line {
    width: 170px;
    border-top: 1.5px solid #475569;
    margin-left: auto;
    margin-bottom: 4px;
}

.rx-doc-sign-meta {
    font-family: 'Inter', 'Ubuntu', sans-serif;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #334155;
    text-align: right;
}

.rx-footer-stamp span {
    font-size: 0.82rem;
    color: #475569;
    font-family: 'Ubuntu', sans-serif;
}

/* Prescription Pad: suppress audio badge / pronunciation badge on clinical Rx pad */
#printableRxPad .pronounce-badge,
.rx-pad .pronounce-badge {
    display: none !important;
}

/* =====================================================================
   PRINT MEDIA RULES (For Clean PDF & Direct Printing)
   ===================================================================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 5mm 7mm 5mm 7mm;
    }

    html, body {
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 13px;
        overflow: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Total suppression of UI shell and non-printing views */
    .app-sidebar,
    .app-topbar,
    .mobile-bottom-nav,
    .rx-control-toolbar,
    .card-title-bar,
    .btn,
    .modal-overlay,
    .app-modal-backdrop,
    .app-toast-container,
    .app-toast,
    #appToastContainer,
    .toast,
    .alert,
    .d-print-none,
    .pronounce-badge,
    #view-dashboard,
    #view-test-calculator,
    #view-report-interpreter,
    #view-medicine-list,
    #view-medicine-auditor,
    #view-study-hub,
    #view-doctor-guide,
    #view-history,
    .invoice-no-print,
    .invoice-control-card {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        overflow: hidden !important;
        opacity: 0 !important;
    }

    /* Neutralize all wrappers so they take zero extra height */
    .content-area,
    .app-wrapper,
    .app-main {
        display: block !important;
        position: static !important;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        background: transparent !important;
        float: none !important;
        overflow: visible !important;
    }

    #view-prescription-pad,
    #view-pharmacy-invoice {
        display: none !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Selective Activation per Print Mode */
    body.printing-rx #view-prescription-pad {
        display: block !important;
    }
    body.printing-rx .view-section:not(#view-prescription-pad) {
        display: none !important;
    }

    body.printing-invoice #view-pharmacy-invoice,
    body.printing-pos #view-pharmacy-invoice {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
    }
    body.printing-invoice .view-section:not(#view-pharmacy-invoice),
    body.printing-pos .view-section:not(#view-pharmacy-invoice) {
        display: none !important;
    }

    /* -------------------------------------------------------------
       A4 CASH MEMO PRINTING ENGINE (Pic 3 Color & Pic 4 Mono)
       ------------------------------------------------------------- */
    body.printing-invoice .pharmacy-invoice-wrapper,
    body.printing-invoice .invoice-paper-wrapper {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        border: none !important;
        background: transparent !important;
        float: none !important;
    }

    body.printing-invoice .pharmacy-cash-memo {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        box-shadow: none !important;
        padding: 8px 14px 10px 14px !important;
        background: #ffffff !important;
        border-radius: 6px !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    body.printing-invoice .pharmacy-cash-memo.theme-color {
        border: 1.5px solid #0a2540 !important;
    }

    body.printing-invoice .pharmacy-cash-memo.theme-mono {
        border: 1.5px solid #000000 !important;
    }

    /* -------------------------------------------------------------
       THERMAL POS RECEIPT PRINTING ENGINE (80mm / 58mm Roll)
       ------------------------------------------------------------- */
    body.printing-pos {
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    body.printing-pos @page {
        size: 80mm auto;
        margin: 2mm 3mm;
    }

    body.printing-pos .pharmacy-invoice-wrapper,
    body.printing-pos .invoice-paper-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }

    body.printing-pos .pharmacy-cash-memo.theme-pos {
        display: block !important;
        width: 74mm !important;
        max-width: 74mm !important;
        margin: 0 auto !important;
        padding: 2mm 1mm !important;
        border: none !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        font-family: 'Consolas', 'Courier New', Courier, monospace, 'Ubuntu', sans-serif !important;
        color: #000000 !important;
    }

    /* -------------------------------------------------------------
       PRESCRIPTION PAD PRINTING ENGINE (A4 Single-Page Precision)
       Strictly fits on exactly ONE single A4 page with 0 page overflow
       ------------------------------------------------------------- */
    body.printing-rx {
        overflow: hidden !important;
        height: 100% !important;
        background: #ffffff !important;
    }

    body.printing-rx #view-prescription-pad {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        float: none !important;
        overflow: visible !important;
    }

    body.printing-rx .rx-pad-container {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        border: 1.5px solid #0284c7 !important;
        border-radius: 6px !important;
        background: #ffffff !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
        height: 280mm !important;
        max-height: 280mm !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    body.printing-rx .rx-pad {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
        padding: 10px 18px 8px 18px !important;
        height: 100% !important;
        min-height: 100% !important;
        max-height: 100% !important;
        background: #ffffff !important;
        position: relative !important;
        overflow: hidden !important;
    }

    body.printing-rx .rx-watermark {
        position: absolute !important;
        top: 52% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 250px !important;
        height: 250px !important;
        opacity: 0.05 !important;
        z-index: 1 !important;
        pointer-events: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.printing-rx .rx-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        padding-bottom: 8px !important;
        margin-bottom: 0 !important;
        border-bottom: 2px solid #0284c7 !important;
        position: relative !important;
        z-index: 2 !important;
    }

    body.printing-rx .rx-header-left h2,
    body.printing-rx .rx-header-right h2 {
        font-size: 1.35rem !important;
        margin-bottom: 1px !important;
        color: #0f2744 !important;
    }

    body.printing-rx .rx-degrees,
    body.printing-rx .rx-degrees-bn {
        font-size: 0.82rem !important;
        color: #334155 !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
    }

    body.printing-rx .rx-speciality,
    body.printing-rx .rx-speciality-bn {
        font-size: 0.78rem !important;
        color: #0284c7 !important;
        font-weight: 600 !important;
    }

    body.printing-rx .rx-contact-info,
    body.printing-rx .rx-contact-info-bn {
        font-size: 0.75rem !important;
        color: #64748b !important;
    }

    body.printing-rx .rx-patient-bar {
        display: grid !important;
        grid-template-columns: 2.5fr 1fr 1fr 1.5fr !important;
        gap: 10px !important;
        padding: 5px 10px !important;
        margin-top: 6px !important;
        margin-bottom: 8px !important;
        background: #f1f5f9 !important;
        border-bottom: 1px solid #0284c7 !important;
        border-radius: 4px !important;
        font-size: 0.82rem !important;
        position: relative !important;
        z-index: 2 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.printing-rx .patient-field input {
        border: none !important;
        border-bottom: 1px dotted #94a3b8 !important;
        background: transparent !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        font-size: 0.85rem !important;
        padding: 0 4px !important;
    }

    body.printing-rx .rx-body-grid {
        display: grid !important;
        grid-template-columns: 29% 71% !important;
        gap: 0 !important;
        flex: 1 !important;
        min-height: 0 !important;
        position: relative !important;
        z-index: 2 !important;
        overflow: hidden !important;
    }

    body.printing-rx .rx-col-left {
        border-right: 1.5px solid #0284c7 !important;
        padding-right: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        overflow: hidden !important;
    }

    body.printing-rx .rx-col-left .rx-section-block h4 {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        color: #0f2744 !important;
        margin-bottom: 2px !important;
    }

    body.printing-rx .rx-section-block textarea {
        width: 100% !important;
        border: none !important;
        background: transparent !important;
        font-size: 0.80rem !important;
        line-height: 1.4 !important;
        color: #1e293b !important;
        padding: 0 !important;
        margin: 0 !important;
        resize: none !important;
        overflow: hidden !important;
        box-shadow: none !important;
    }

    body.printing-rx .rx-inv-list li {
        font-size: 0.78rem !important;
        margin-bottom: 2px !important;
        color: #0f172a !important;
    }

    body.printing-rx .rx-col-right {
        padding-left: 16px !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    body.printing-rx .rx-symbol {
        font-size: 1.6rem !important;
        color: #0284c7 !important;
        margin-bottom: 4px !important;
        line-height: 1 !important;
    }

    body.printing-rx .rx-med-item {
        margin-bottom: 7px !important;
        padding-bottom: 4px !important;
        border-bottom: 1px dashed #cbd5e1 !important;
    }

    body.printing-rx .rx-med-brand {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: #0f172a !important;
    }

    body.printing-rx .rx-med-generic {
        font-size: 0.78rem !important;
        color: #64748b !important;
    }

    body.printing-rx .rx-med-instruction {
        margin-top: 2px !important;
        padding-left: 14px !important;
        font-size: 0.82rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    body.printing-rx .rx-med-dose-pill {
        background: #f1f5f9 !important;
        padding: 1px 6px !important;
        border-radius: 4px !important;
        font-weight: 700 !important;
        font-size: 0.80rem !important;
        color: #0f2744 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.printing-rx .rx-general-advice {
        margin-top: auto !important;
        padding: 6px 10px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 4px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.printing-rx .rx-general-advice h5 {
        font-size: 0.80rem !important;
        font-weight: 700 !important;
        margin-bottom: 2px !important;
        color: #0f2744 !important;
    }

    body.printing-rx .rx-general-advice ul {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }

    body.printing-rx .rx-footer {
        padding-top: 6px !important;
        margin-top: 8px !important;
        border-top: 1.5px solid #0284c7 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: relative !important;
        z-index: 2 !important;
    }

    body.printing-rx .rx-footer-clinic h3 {
        font-size: 0.88rem !important;
        font-weight: 700 !important;
        color: #0f2744 !important;
        margin-bottom: 1px !important;
    }

    body.printing-rx .rx-footer-clinic p {
        font-size: 0.72rem !important;
        color: #64748b !important;
        margin-bottom: 0 !important;
    }

    body.printing-rx .rx-doctor-signature-box {
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        min-width: 150px !important;
    }

    body.printing-rx .rx-doctor-cursive-sig {
        font-family: 'Brush Script MT', 'Segoe Script', cursive, sans-serif !important;
        font-size: 1.55rem !important;
        color: #0f172a !important;
        line-height: 1.1 !important;
        transform: rotate(-3deg) !important;
        display: inline-block !important;
        margin-bottom: 2px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body.printing-rx .rx-doctor-sign-line {
        width: 140px !important;
        border-top: 1.5px solid #0f172a !important;
        margin-bottom: 2px !important;
    }

    body.printing-rx .rx-doc-sign-meta {
        font-size: 0.70rem !important;
        line-height: 1.25 !important;
        color: #0f172a !important;
        text-align: right !important;
    }

    body.printing-rx .rx-footer-stamp span {
        font-size: 0.70rem !important;
        color: #334155 !important;
    }
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .app-sidebar {
        position: fixed;
        left: -295px;
        top: 0;
        bottom: 0;
        box-shadow: var(--shadow-xl);
    }
    .app-sidebar.open {
        left: 0;
    }
    .menu-toggle-btn {
        display: block;
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .content-area {
        padding: 16px 16px 80px 16px;
    }
    .app-topbar {
        padding: 0 16px;
    }
    .rx-body-grid {
        grid-template-columns: 1fr;
    }
    .rx-col-left {
        border-right: none;
        border-bottom: 2px solid var(--rx-accent-cyan);
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    .rx-col-right {
        padding-left: 0;
    }
    .rx-patient-bar {
        grid-template-columns: 1fr 1fr;
    }
}
/* Compact Medicine List & Prescription Cart - Eliminates All Horizontal Scrollbars */
.med-item-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.med-item-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.med-header-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.med-brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.med-meta-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.med-meta-text strong {
    color: #334155;
}

.med-indications-preview {
    font-size: 0.88rem;
    color: #475569;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #f1f5f9;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.med-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.med-price-tag {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #059669;
}

.med-price-tag .strip-cost {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin-left: 6px;
}

/* Compact Prescription Cart Item (Right Side) */
.presc-cart-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.presc-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.presc-cart-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f2744;
}

.presc-cart-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.86rem;
}

.presc-cart-controls .qty-control-box {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.presc-cart-controls input {
    width: 44px;
    height: 28px;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 2px;
}

.presc-cart-price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.88rem;
}

/* Pagination UI */
.med-pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
}

.med-page-info {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.med-page-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.med-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-primary);
    font-family: 'Ubuntu', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.med-page-btn:hover:not(:disabled) {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
}

.med-page-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.med-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =====================================================================
   PHARMACY INVOICE & CASH MEMO (১০% ছাড় ও রসিদ সিস্টেম)
   ===================================================================== */
.pharmacy-invoice-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1100px) {
    .pharmacy-invoice-wrapper {
        grid-template-columns: 1fr;
    }
}

.invoice-control-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

/* =====================================================================
   TORITX PHARMACY AUTHENTIC CASH MEMO & SALES BILL (Pic 3 Color & Pic 4 Mono)
   ===================================================================== */
.pharmacy-cash-memo {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    padding: 0 0 10px 0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    font-size: 13.5px;
    color: #1e293b;
    overflow: hidden;
    max-width: 760px;
    margin: 0 auto;
    transition: all 0.2s ease;
}

/* Color Version Styling (Pic 3) */
.pharmacy-cash-memo.theme-color {
    border: 2px solid #0a2540;
}

.pharmacy-cash-memo.theme-color .color-only { display: flex !important; }
.pharmacy-cash-memo.theme-color .mono-only { display: none !important; }
.pharmacy-cash-memo.theme-color .color-motto { display: block !important; }
.pharmacy-cash-memo.theme-color .mono-motto { display: none !important; }

/* Monochrome / B&W Version Styling (Pic 4) */
.pharmacy-cash-memo.theme-mono {
    border: 2px solid #000000;
}

.pharmacy-cash-memo.theme-mono .color-only { display: none !important; }
.pharmacy-cash-memo.theme-mono .mono-only { display: flex !important; }
.pharmacy-cash-memo.theme-mono .color-motto { display: none !important; }
.pharmacy-cash-memo.theme-mono .mono-motto { display: block !important; }

/* Top Ribbon Wave */
.txp-top-ribbon {
    width: 100%;
    height: 32px;
    overflow: hidden;
    line-height: 0;
}

.txp-wave-svg {
    width: 100%;
    height: 100%;
}

.theme-color .wave-layer-1 { fill: #0a2540; }
.theme-color .wave-layer-2 { fill: #10b981; }

.theme-mono .wave-layer-1 { fill: #000000; }
.theme-mono .wave-layer-2 { fill: #475569; }

/* Header Branding */
.txp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 24px 6px 24px;
}

.txp-brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.txp-logo-box {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.txp-logo-svg {
    width: 100%;
    height: 100%;
}

.theme-color .cross-rect { fill: #0a2540; }
.theme-color .leaf-shape { fill: #10b981; }

.theme-mono .cross-rect { fill: #000000; }
.theme-mono .leaf-shape { fill: #ffffff; stroke: #000000; stroke-width: 1.5; }

.txp-brand-title {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.02em;
}

.theme-color .txp-brand-title { color: #0a2540; }
.theme-mono .txp-brand-title { color: #000000; }

.txp-brand-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.theme-color .txp-brand-tagline { color: #059669; }
.theme-mono .txp-brand-tagline { color: #334155; }

.txp-motto-wrap {
    text-align: right;
}

.txp-motto-calligraphy {
    font-family: 'SolaimanLipi', 'Kalpurush', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1.2;
}

.theme-color .txp-motto-calligraphy { color: #059669; }
.theme-mono .txp-motto-calligraphy { color: #000000; }

.txp-capsule-icons {
    font-size: 1.35rem;
    margin-top: 4px;
    opacity: 0.85;
}

.theme-color .txp-capsule-icons { color: #0284c7; }
.theme-mono .txp-capsule-icons { color: #000000; }

/* Contact Bar */
.txp-contact-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 24px;
    margin: 4px 0 12px 0;
}

.theme-color .txp-contact-bar {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}
.theme-color .txp-contact-bar i { color: #0284c7; }

.theme-mono .txp-contact-bar {
    background: #ffffff;
    border-top: 1.5px solid #000000;
    border-bottom: 1.5px solid #000000;
    color: #000000;
}
.theme-mono .txp-contact-bar i { color: #000000; }

/* Sales Bill Pill Banner */
.txp-banner-wrap {
    text-align: center;
    margin-bottom: 12px;
}

.txp-banner-pill {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 36px;
    min-width: 340px;
    text-align: center;
}

.theme-color .txp-banner-pill {
    background: #0a2540;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.2);
}

.theme-mono .txp-banner-pill {
    background: #000000;
    color: #ffffff;
}

.txp-banner-main {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    line-height: 1.1;
}

.txp-banner-sub {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Customer & Invoice Meta Grid */
.txp-meta-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 14px;
    padding: 0 24px;
    margin-bottom: 12px;
}

.txp-meta-box {
    border-radius: 8px;
    padding: 10px 14px;
}

.theme-color .txp-meta-box {
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
}

.theme-mono .txp-meta-box {
    border: 1.5px solid #000000;
    background: #ffffff;
}

.txp-meta-header {
    font-size: 0.84rem;
    font-weight: 700;
    padding-bottom: 4px;
    margin-bottom: 6px;
}

.theme-color .txp-meta-header {
    color: #0a2540;
    border-bottom: 1px dashed #cbd5e1;
}

.theme-mono .txp-meta-header {
    color: #000000;
    border-bottom: 1px dashed #000000;
}

.txp-info-row {
    display: flex;
    font-size: 0.83rem;
    line-height: 1.5;
}

.txp-lbl {
    width: 80px;
    font-weight: 600;
}

.theme-color .txp-lbl { color: #475569; }
.theme-mono .txp-lbl { color: #000000; }

.txp-colon {
    margin: 0 6px;
    font-weight: bold;
}

.txp-val {
    flex: 1;
    color: #0f172a;
}

/* Itemized Medicine Table */
.txp-table-wrap {
    padding: 0 24px;
    margin-bottom: 12px;
}

.txp-sales-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.txp-sales-table th {
    padding: 7px 10px;
    font-weight: 700;
    font-size: 0.82rem;
    text-align: left;
}

.theme-color .txp-sales-table th {
    background: #0a2540 !important;
    color: #ffffff !important;
    border: 1px solid #0a2540;
}

.theme-mono .txp-sales-table th {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #000000;
}

.txp-sales-table td {
    padding: 6px 10px;
    vertical-align: middle;
}

.theme-color .txp-sales-table td {
    border: 1px solid #cbd5e1;
    color: #1e293b;
}

.theme-color .txp-sales-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.theme-mono .txp-sales-table td {
    border: 1px solid #000000;
    color: #000000;
}

.theme-mono .txp-sales-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* Bottom Split: Notes Left | Calc Right */
.txp-bottom-split {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
    padding: 0 24px;
    align-items: start;
    margin-bottom: 10px;
}

.txp-notes-box {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
}

.theme-color .txp-notes-box {
    border: 1.5px solid #0a2540;
    background: #f0fdf4;
}

.theme-mono .txp-notes-box {
    border: 1.5px solid #000000;
    background: #ffffff;
}

.txp-notes-title {
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.theme-color .txp-notes-title { color: #0a2540; }
.theme-mono .txp-notes-title { color: #000000; }

.txp-notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1.5;
}

.txp-notes-list li {
    margin-bottom: 2px;
}

/* Slogan / Inspiration */
.txp-slogan-strip {
    margin-top: 10px;
}

.txp-slogan-color {
    align-items: center;
    gap: 12px;
}

.txp-heartbeat-box {
    font-size: 2.2rem;
    color: #0284c7;
}

.txp-heartbeat-text {
    font-family: 'SolaimanLipi', sans-serif;
    font-size: 1.15rem;
    color: #059669;
    line-height: 1.25;
}

.txp-slogan-mono {
    display: flex;
    align-items: center;
}

.txp-mono-cursive {
    font-family: 'SolaimanLipi', cursive, sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: #000000;
    font-style: italic;
}

/* Calculations Box */
.txp-calc-box {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.84rem;
}

.theme-color .txp-calc-box {
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
}

.theme-mono .txp-calc-box {
    border: 1.5px solid #000000;
    background: #ffffff;
}

.txp-calc-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.txp-calc-lbl {
    font-weight: 600;
}

.txp-calc-val {
    font-weight: 600;
}

.txp-grand-total-row {
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
}

.theme-color .txp-grand-total-row {
    background: #0a2540;
    color: #ffffff;
}

.theme-mono .txp-grand-total-row {
    background: #000000;
    color: #ffffff;
}

.txp-gt-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.txp-gt-amount {
    font-size: 1.15rem;
    font-weight: 800;
}

/* Signature Area */
.txp-signature-area {
    text-align: right;
    margin-top: 12px;
    padding-right: 4px;
}

.txp-cursive-sig {
    font-family: 'Brush Script MT', 'Segoe Script', cursive, sans-serif;
    font-size: 1.6rem;
    line-height: 1;
    transform: rotate(-3deg);
    display: inline-block;
    margin-bottom: 2px;
}

.theme-color .txp-cursive-sig { color: #0a2540; }
.theme-mono .txp-cursive-sig { color: #000000; }

.txp-sig-rule {
    width: 160px;
    margin-left: auto;
    margin-bottom: 2px;
}

.theme-color .txp-sig-rule { border-top: 1.5px solid #cbd5e1; }
.theme-mono .txp-sig-rule { border-top: 1.5px solid #000000; }

.txp-sig-title {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #0f172a;
    letter-spacing: 0.5px;
}

.txp-sig-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.theme-mono .txp-sig-sub { color: #000000; }

/* Bottom Footer Ribbon */
.txp-footer-strip {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    margin: 8px 14px 0 14px;
    border-radius: 4px;
}

.theme-color .txp-footer-strip {
    background: #0a2540;
    color: #ffffff;
}

.theme-mono .txp-footer-strip {
    background: #000000;
    color: #ffffff;
}

/* =====================================================================
   THERMAL POS RECEIPT MODE (58mm / 80mm ROLL STYLING)
   ===================================================================== */
.pharmacy-cash-memo.theme-pos {
    max-width: 360px !important;
    margin: 0 auto !important;
    padding: 16px 14px 14px 14px !important;
    border: 1.5px dashed #475569 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    font-family: 'Consolas', 'Courier New', Courier, monospace, 'Ubuntu', sans-serif !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}

.pharmacy-cash-memo.theme-pos .txp-top-ribbon {
    display: none !important;
}

.pharmacy-cash-memo.theme-pos .txp-header {
    flex-direction: column !important;
    text-align: center !important;
    padding: 4px 0 8px 0 !important;
    border-bottom: 1px dashed #000000 !important;
}

.pharmacy-cash-memo.theme-pos .txp-brand-wrap {
    flex-direction: column !important;
    gap: 4px !important;
    margin: 0 auto !important;
}

.pharmacy-cash-memo.theme-pos .txp-logo-box {
    width: 38px !important;
    height: 38px !important;
    margin: 0 auto !important;
}

.pharmacy-cash-memo.theme-pos .cross-rect { fill: #000000 !important; }
.pharmacy-cash-memo.theme-pos .leaf-shape { fill: #ffffff !important; stroke: #000000 !important; stroke-width: 1.5; }

.pharmacy-cash-memo.theme-pos .txp-brand-title {
    font-size: 1.35rem !important;
    color: #000000 !important;
    font-weight: 800 !important;
    text-align: center !important;
    margin: 0 !important;
}

.pharmacy-cash-memo.theme-pos .txp-brand-tagline {
    font-size: 0.74rem !important;
    color: #475569 !important;
    text-align: center !important;
}

.pharmacy-cash-memo.theme-pos .txp-motto-wrap {
    display: none !important;
}

.pharmacy-cash-memo.theme-pos .txp-contact-bar {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    font-size: 0.72rem !important;
    border-bottom: 1px dashed #000000 !important;
    padding: 6px 0 !important;
    margin-top: 6px !important;
    text-align: center !important;
}

.pharmacy-cash-memo.theme-pos .txp-banner-wrap {
    margin: 6px 0 !important;
    text-align: center !important;
}

.pharmacy-cash-memo.theme-pos .txp-banner-pill {
    background: #000000 !important;
    color: #ffffff !important;
    padding: 2px 14px !important;
    border-radius: 4px !important;
    display: inline-block !important;
}

.pharmacy-cash-memo.theme-pos .txp-banner-main {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
}

.pharmacy-cash-memo.theme-pos .txp-banner-sub {
    display: none !important;
}

.pharmacy-cash-memo.theme-pos .txp-meta-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    border-bottom: 1px dashed #000000 !important;
    padding-bottom: 6px !important;
    margin-bottom: 6px !important;
}

.pharmacy-cash-memo.theme-pos .txp-meta-box {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.pharmacy-cash-memo.theme-pos .txp-meta-header {
    display: none !important;
}

.pharmacy-cash-memo.theme-pos .txp-info-row {
    font-size: 0.76rem !important;
    margin-bottom: 1px !important;
}

.pharmacy-cash-memo.theme-pos .txp-table-wrap {
    margin: 6px 0 !important;
}

.pharmacy-cash-memo.theme-pos .txp-sales-table {
    font-size: 0.76rem !important;
    width: 100% !important;
}

.pharmacy-cash-memo.theme-pos .txp-sales-table th {
    border-top: 1px dashed #000000 !important;
    border-bottom: 1px dashed #000000 !important;
    background: transparent !important;
    color: #000000 !important;
    font-weight: 700 !important;
    padding: 4px 2px !important;
    font-size: 0.74rem !important;
}

.pharmacy-cash-memo.theme-pos .txp-sales-table td {
    border-bottom: 1px dotted #e2e8f0 !important;
    padding: 4px 2px !important;
}

.pharmacy-cash-memo.theme-pos .txp-bottom-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.pharmacy-cash-memo.theme-pos .txp-notes-box,
.pharmacy-cash-memo.theme-pos .txp-slogan-strip {
    display: none !important;
}

.pharmacy-cash-memo.theme-pos .txp-calc-box {
    border: none !important;
    background: transparent !important;
    padding: 4px 0 !important;
    border-top: 1px dashed #000000 !important;
}

.pharmacy-cash-memo.theme-pos .txp-grand-total-row {
    background: transparent !important;
    color: #000000 !important;
    border-top: 1.5px solid #000000 !important;
    border-bottom: 1.5px solid #000000 !important;
    padding: 4px 0 !important;
    margin: 4px 0 !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
}

.pharmacy-cash-memo.theme-pos .txp-gt-amount {
    color: #000000 !important;
    font-size: 1.1rem !important;
}

.pharmacy-cash-memo.theme-pos .txp-signature-grid {
    border-top: 1px dashed #000000 !important;
    padding-top: 8px !important;
    margin-top: 6px !important;
    text-align: center !important;
}

.pharmacy-cash-memo.theme-pos .txp-cursive-sig,
.pharmacy-cash-memo.theme-pos .txp-sig-rule {
    display: none !important;
}

.pharmacy-cash-memo.theme-pos .txp-sig-box {
    text-align: center !important;
    width: 100% !important;
}

.pharmacy-cash-memo.theme-pos .txp-footer-strip {
    background: transparent !important;
    color: #000000 !important;
    border-top: 1px dashed #000000 !important;
    padding: 6px 0 0 0 !important;
    margin: 6px 0 0 0 !important;
    font-size: 0.74rem !important;
    text-align: center !important;
    font-weight: 600 !important;
}

/* Modern Clean Discount Selector */
.discount-selector-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}

.discount-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.quick-discount-pill,
.quick-discount-btn {
    padding: 7px 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    outline: none;
}

.quick-discount-pill:hover,
.quick-discount-btn:hover {
    border-color: #0284c7;
    color: #0284c7;
    background: #f0f9ff;
}

.quick-discount-pill.active,
.quick-discount-btn.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3) !important;
}

.custom-discount-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.memo-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 4px;
}

.memo-search-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s ease;
}

.memo-search-item:hover {
    background: #f0fdfa;
}

.price-strike {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.85em;
    margin-right: 4px;
}

/* =====================================================================
   DOCTOR SPECIALIST & SYMPTOM FINDER STYLING (কোন রোগে কোন ডাক্তার?)
   ===================================================================== */
.doc-guide-tabs {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.doc-guide-tab-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.doc-guide-tab-btn:hover {
    color: #0284c7;
    background: rgba(255, 255, 255, 0.6);
}

.doc-guide-tab-btn.active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.doc-guide-tab-content {
    display: none;
    animation: fadeIn 0.2s ease;
}

.doc-guide-tab-content.active {
    display: block;
}

.symptom-card, .specialist-guide-card {
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

.symptom-card:hover, .specialist-guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.07) !important;
    border-color: #38bdf8 !important;
}

.spec-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.wizard-choice-box {
    padding: 20px 14px;
    text-align: center;
    border-radius: 14px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.22s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wizard-choice-box:hover {
    border-color: #0284c7;
    background: #f0f9ff;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.15);
}

.bg-purple-subtle {
    background-color: #f3e8ff !important;
}
.text-purple {
    color: #7e22ce !important;
}
.bg-rose-subtle {
    background-color: #ffe4e6 !important;
}
.text-rose {
    color: #e11d48 !important;
}
.bg-amber-subtle {
    background-color: #fef3c7 !important;
}
.text-amber {
    color: #d97706 !important;
}

/* =====================================================================
   TEST CALCULATOR & MULTI-HOSPITAL COMPARATOR EXECUTIVE DESIGN SYSTEM
   ===================================================================== */
.calc-selected-test-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.calc-selected-test-card:hover {
    border-color: #cbd5e1;
    border-left-color: #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.calc-rate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.calc-rate-pill {
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.78rem;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calc-rate-pill.ibn-sina {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.calc-rate-pill.islami-bank {
    background: #f0fdfa;
    border-color: #99f6e4;
    color: #0f766e;
}

.calc-rate-pill.popular {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.calc-rate-pill.govt {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.calc-rate-pill .rate-hosp {
    font-weight: 700;
    font-size: 0.76rem;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'SolaimanLipi', sans-serif;
}

.calc-rate-pill .rate-net {
    font-size: 0.92rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
}

.calc-rate-pill .rate-del {
    font-size: 0.74rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 3px;
}

.calc-rate-pill .rate-badge {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Hospital Summary Tiles */
.calc-hosp-summary-tile {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.calc-hosp-summary-tile.tile-ibn-sina {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 40%);
    border-color: #86efac;
}

.calc-hosp-summary-tile.tile-islami-bank {
    background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 40%);
    border-color: #99f6e4;
}

.calc-hosp-summary-tile.tile-popular {
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 40%);
    border-color: #bfdbfe;
}

.calc-hosp-summary-tile.tile-labaid {
    background: linear-gradient(180deg, #fdf2f8 0%, #ffffff 40%);
    border-color: #fbcfe8;
}

.calc-hosp-summary-tile.tile-govt {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 40%);
    border-color: #cbd5e1;
}

.calc-hosp-summary-tile:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.calc-hosp-summary-tile .hosp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.calc-hosp-summary-tile .hosp-title {
    font-weight: 700;
    font-size: 0.96rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'SolaimanLipi', sans-serif;
}

.calc-hosp-summary-tile .hosp-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    font-family: 'Inter', 'SolaimanLipi', sans-serif;
}

.calc-discount-control {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 10px;
}

.calc-discount-control .disc-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    font-family: 'SolaimanLipi', sans-serif;
}

.calc-discount-control .disc-input-box {
    display: flex;
    align-items: center;
    gap: 2px;
}

.calc-discount-control input {
    width: 48px;
    height: 26px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    padding: 0 2px;
}

.calc-discount-control input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.calc-preset-pills {
    display: flex;
    gap: 3px;
}

.calc-preset-pills button {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 1px 5px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    color: #475569;
    transition: all 0.15s;
}

.calc-preset-pills button:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.calc-fin-list {
    margin-top: 6px;
}

.calc-fin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
    margin-bottom: 4px;
    color: #64748b;
    font-family: 'SolaimanLipi', sans-serif;
}

.calc-fin-row .val {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
}

.calc-net-box {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-net-box .net-label {
    font-weight: 700;
    font-size: 0.92rem;
    color: #1e293b;
    font-family: 'SolaimanLipi', sans-serif;
}

.calc-net-box .net-amount {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

/* Recommendation Banner */
.calc-rec-banner {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #86efac;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.calc-rec-banner .rec-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.calc-rec-banner .rec-title {
    font-weight: 800;
    font-size: 0.98rem;
    color: #166534;
    margin-bottom: 2px;
    font-family: 'SolaimanLipi', sans-serif;
}

.calc-rec-banner .rec-desc {
    font-size: 0.88rem;
    color: #1e293b;
    line-height: 1.5;
    font-family: 'SolaimanLipi', sans-serif;
}

/* =====================================================================
   246 MEDICAL LAB TESTS CLINICAL ENCYCLOPEDIA & STUDY HUB STYLES
   ===================================================================== */
#view-test-encyclopedia .med-table tbody tr {
    transition: all 0.15s ease-in-out;
}

#view-test-encyclopedia .med-table tbody tr:hover {
    background-color: #f0f9ff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#studyNavTabs {
    border-bottom: 2px solid #e2e8f0;
}

#studyNavTabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: #475569 !important;
    font-size: 0.88rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

#studyNavTabs .nav-link:hover {
    color: #0284c7 !important;
    background: transparent;
}

#studyNavTabs .nav-link.active {
    color: #0284c7 !important;
    background: transparent !important;
    border-bottom: 3px solid #0284c7 !important;
}

.study-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.study-sec-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1.5px solid #f1f5f9;
    padding-bottom: 6px;
}

.study-highlight-box {
    background: #f8fafc;
    border-left: 4px solid #0284c7;
    padding: 12px 14px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 14px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.study-alert-high {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 0 8px 8px 0;
    padding: 14px;
    margin-bottom: 14px;
}

.study-alert-low {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    padding: 14px;
    margin-bottom: 14px;
}

.study-alert-normal {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    border-radius: 0 8px 8px 0;
    padding: 14px;
    margin-bottom: 14px;
}

.study-med-box {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-left: 4px solid #ec4899;
    border-radius: 0 8px 8px 0;
    padding: 14px;
    margin-bottom: 14px;
}

.study-connect-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0284c7;
    border-radius: 0 8px 8px 0;
    padding: 14px;
    margin-bottom: 14px;
}

.study-redflag-box {
    background: #fff1f2;
    border: 1.5px solid #f43f5e;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}

/* =====================================================================
   EXECUTIVE CLINICAL DASHBOARD REDESIGN (Mayo Clinic & Stripe MedTech)
   ===================================================================== */
.dashboard-hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #eff6ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
}

.stat-executive-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 20px 22px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer;
}

.stat-executive-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

.stat-executive-card .stat-category-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
    display: block;
}

.stat-executive-card .stat-number {
    font-size: 2.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    margin-top: 4px;
    font-family: 'SolaimanLipi', sans-serif !important;
}

.stat-executive-card .stat-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.stat-icon-badge.badge-blue { background: #eff6ff; color: #0284c7; }
.stat-icon-badge.badge-green { background: #ecfdf5; color: #059669; }
.stat-icon-badge.badge-purple { background: #f5f3ff; color: #7c3aed; }
.stat-icon-badge.badge-amber { background: #fffbeb; color: #d97706; }

.dashboard-encyclopedia-spotlight {
    background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.04);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-encyclopedia-spotlight:hover {
    box-shadow: 0 10px 25px -4px rgba(16, 185, 129, 0.12);
    border-color: #86efac;
    transform: translateY(-2px);
}

.spotlight-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* =====================================================================
 * AUTHENTICATION OVERLAY & LOGIN SCREEN
 * ===================================================================== */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 20%, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.96));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.25s ease-out;
}

.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 460px;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.auth-card-header {
    background: linear-gradient(135deg, #090e1a 0%, #0f172a 45%, #0284c7 100%);
    padding: 28px 24px 24px 24px;
    color: #ffffff;
    text-align: center;
    position: relative;
}

.auth-brand-logo {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #38bdf8;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
}

.auth-card-body {
    padding: 28px 28px 24px 28px;
}

.auth-input-group {
    position: relative;
    margin-bottom: 18px;
}

.auth-input-group .auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 15px;
    pointer-events: none;
}

.auth-input-group .form-control {
    padding-left: 42px;
    padding-right: 42px;
    height: 48px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 14.5px;
    transition: all 0.2s ease;
}

.auth-input-group .form-control:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.auth-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
}

.auth-submit-btn {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 15.5px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit-btn:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

.auth-policy-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 18px;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.45;
}

/* =====================================================================
 * USER & PERMISSION MANAGEMENT (RBAC) STYLES
 * ===================================================================== */
.rbac-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
    padding: 4px;
}

.rbac-module-card {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rbac-module-card:hover {
    border-color: #38bdf8;
    background: #f0f9ff;
}

.rbac-module-card.selected {
    border-color: #0284c7;
    background: #e0f2fe;
}

.rbac-module-card input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #0284c7;
    cursor: pointer;
}

.module-pill-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11.5px;
    margin: 2px 3px 2px 0;
    font-weight: 600;
}

.module-pill-tag.all-access {
    background: #fdf2f8;
    color: #db2777;
    border-color: #fbcfe8;
    font-weight: 700;
}

.role-badge-superadmin {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    font-weight: 700;
}

.role-badge-doctor {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-weight: 600;
}

.role-badge-pharmacist {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-weight: 600;
}

.role-badge-staff {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    font-weight: 600;
}





