/* ==========================================================================
   SmartPharma.ug — Clean Medical Light Design System
   AX Technologies Uganda
   ========================================================================== */

:root {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-surface: #f1f5f9;
    --bg-surface-light: #f8fafc;
    
    --primary: #059669;
    --primary-glow: rgba(5, 150, 105, 0.15);
    --primary-dark: #047857;
    --primary-light: #ecfdf5;
    
    --secondary: #0284c7;
    --secondary-light: #f0f9ff;
    
    --accent: #4f46e5;
    --warning: #d97706;
    --danger: #dc2626;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    
    --border-light: #e2e8f0;
    --border-focus: #059669;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.1);

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 0%, #ecfdf5 0%, #f8fafc 500px);
    background-repeat: no-repeat;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.site-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.brand-badge {
    font-size: 0.75rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-link {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.925rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-emerald {
    background: #059669;
    color: #ffffff;
}

.btn-emerald:hover {
    background: #047857;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-momo {
    background: #ffcc00;
    color: #1a1a1a;
    font-weight: 700;
}

.btn-momo:hover {
    background: #f5b700;
}

.btn-cash {
    background: var(--secondary);
    color: #ffffff;
    font-weight: 700;
}

.btn-cash:hover {
    background: #0369a1;
}

/* ==========================================================================
   Hero Section (Simple & Clean)
   ========================================================================== */

.hero-section {
    padding: 4rem 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--primary-light);
    border: 1px solid #bbf7d0;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.825rem;
    color: var(--primary-dark);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
}

.hero-title {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 1.25rem;
    color: var(--text-main);
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.hero-title .highlight {
    color: var(--primary);
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Simple Subdomain Claim Bar */
.subdomain-claim-box {
    max-width: 580px;
    margin: 0 auto 2.5rem;
}

.subdomain-input-group {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.5rem 0.35rem 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.subdomain-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.subdomain-prefix {
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
}

.subdomain-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 0.5rem 0.35rem;
    font-size: 1rem;
    outline: none;
}

.subdomain-suffix {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Trust Badges Simple Row */
.trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 3.5rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.trust-item i {
    color: var(--primary);
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Clean Mockup Preview
   ========================================================================== */

.mockup-card-clean {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 960px;
    margin: 0 auto;
    text-align: left;
}

.mockup-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
}

.mockup-controls {
    display: flex;
    gap: 0.35rem;
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.mockup-dot.red { background: #ef4444; }
.mockup-dot.yellow { background: #f59e0b; }
.mockup-dot.green { background: #10b981; }

.mockup-subdomain-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.mockup-pos-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #ffffff;
}

@media (max-width: 820px) {
    .mockup-pos-body {
        grid-template-columns: 1fr;
    }
}

.mockup-catalog {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mockup-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    color: var(--text-dim);
}

.mockup-search input {
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.mockup-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.mockup-pill-item {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.mockup-pill-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.mockup-pill-title {
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    color: var(--text-main);
}

.mockup-pill-generic {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 0.35rem;
}

.mockup-batch-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.mockup-cart-pane {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mockup-cart-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mockup-cart-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cart-mini-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed var(--border-light);
    color: var(--text-muted);
}

/* ==========================================================================
   Features Section (Clean & Simple)
   ========================================================================== */

.section {
    padding: 4.5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section-tag {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.feature-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.feature-card p {
    font-size: 0.925rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ==========================================================================
   Platforms Section
   ========================================================================== */

.platforms-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.platform-box {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    transition: all 0.2s;
}

.platform-box:hover {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.platform-icon {
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: inline-block;
}

.platform-box h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.platform-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Modals (Clean Light Theme)
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: pointer; /* indicates clicking outside closes the modal */
    animation: modalOverlayFadeIn 0.2s ease-out;
}

@keyframes modalOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-window {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.05);
    cursor: default; /* restores normal cursor inside modal window */
    position: relative;
    z-index: 1001;
    animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

.modal-body {
    padding: 1.5rem;
}

/* Sign In Modal Specific Styles */
.signin-workspace-card {
    background: #f8fafc;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    transition: all 0.2s;
}

.signin-workspace-card:hover {
    border-color: var(--primary);
    background: #ffffff;
}

.signin-pharmacy-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.signin-pharmacy-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: #ffffff;
    border: 1px solid var(--border-light);
    padding: 2px;
}

.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrap input {
    padding-right: 2.5rem;
}

.btn-toggle-pwd {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    transition: color 0.2s;
}

.btn-toggle-pwd:hover {
    color: var(--text-main);
}

.role-pill-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.role-pill-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.role-pill-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.role-pill-btn.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.quick-pharmacies-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    margin-top: 0.5rem;
}

.quick-pharmacy-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.quick-pharmacy-chip:hover {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.quick-pharmacy-chip img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: contain;
}

/* Step progress */
.step-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-dim);
    flex: 1;
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
}

.step-indicator.active .step-circle {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.step-indicator.done .step-circle {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* Form Controls */
.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.925rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Subdomain Feedback */
.subdomain-feedback {
    font-size: 0.825rem;
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.subdomain-feedback.available {
    color: var(--primary);
    font-weight: 600;
}

.subdomain-feedback.unavailable {
    color: var(--danger);
}

/* Logo Upload Dropzone */
.logo-upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    padding: 1.75rem 1rem;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s;
}

.logo-upload-dropzone:hover, .logo-upload-dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 0.35rem;
}

.logo-preview-box {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.preview-thumb {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    padding: 2px;
}

/* ==========================================================================
   Tenant Portal Light Mode
   ========================================================================== */

.portal-body {
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.portal-brand-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.back-home-link:hover {
    color: var(--primary);
}

.portal-badge-pill {
    background: var(--primary-light);
    border: 1px solid #bbf7d0;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--primary-dark);
}

.dot-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
}

.portal-system-status {
    display: flex;
    gap: 0.5rem;
}

.status-chip {
    font-size: 0.775rem;
    color: var(--text-muted);
    background: #ffffff;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.portal-main-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-auth-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.portal-header-branding {
    padding: 2rem 1.5rem 1.25rem;
    text-align: center;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
}

.tenant-logo-frame {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin: 0 auto 1rem;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tenant-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tenant-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.tenant-meta {
    font-size: 0.825rem;
    color: var(--text-muted);
}

.portal-auth-box {
    padding: 1.75rem;
}

.auth-tabs {
    display: flex;
    gap: 0.35rem;
    background: #f1f5f9;
    padding: 3px;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    padding: 0.55rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.auth-tab.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.login-options-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.pos-fast-card {
    text-align: center;
    padding: 0.75rem 0;
}

.pos-icon-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.cashier-shift-info {
    display: flex;
    justify-content: space-around;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    padding: 0.65rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
}

.portal-card-footer {
    padding: 0.85rem 1.75rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ==========================================================================
   Live POS Simulator Modal (Light & Clean)
   ========================================================================== */

.pos-modal-window {
    max-width: 1050px;
    width: 95vw;
    height: 85vh;
    display: flex;
    flex-direction: column;
}

.pos-modal-header {
    padding: 0.85rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pos-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pos-mini-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 2px;
}

.pos-pharmacy-name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-main);
    display: block;
}

.pos-tag {
    font-size: 0.725rem;
    color: var(--primary);
    font-weight: 600;
}

.pos-simulator-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 360px;
    overflow: hidden;
}

@media (max-width: 820px) {
    .pos-simulator-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
}

.pos-catalog-panel {
    padding: 1rem;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pos-search-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    box-shadow: var(--shadow-sm);
}

.pos-search-bar input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.925rem;
    outline: none;
}

.pos-drug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.75rem;
}

.pos-drug-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.pos-drug-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.drug-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    display: block;
}

.drug-generic {
    font-size: 0.725rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 0.4rem;
}

.drug-batch-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.725rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.drug-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 0.35rem;
}

.drug-stock {
    font-size: 0.725rem;
    color: var(--text-dim);
}

.drug-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 0.9rem;
}

.pos-cart-panel {
    background: #ffffff;
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 1.15rem;
}

.cart-items-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    min-height: 120px;
}

.cart-row {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.6rem;
}

.cart-summary {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.85rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.total-line {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    border-top: 1px solid var(--border-light);
    padding-top: 0.4rem;
    margin-top: 0.4rem;
}

.cart-checkout-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.text-emerald { color: var(--primary); }
.text-cyan { color: var(--secondary); }
.text-green { color: #059669; }
