/* ==========================================================================
   AMD Optik PRO — Fuchsia Design System (Inspired by Finnova & EHR Visuals)
   Created by AMD Creativos (https://amdcreativos.com)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --amd-fuchsia-50: #fdf2f8;
    --amd-fuchsia-100: #fce7f3;
    --amd-fuchsia-200: #fbcfe8;
    --amd-fuchsia-300: #f9a8d4;
    --amd-fuchsia-400: #f472b6;
    --amd-fuchsia-500: #ec4899;
    --amd-fuchsia-600: #e11d74;
    --amd-fuchsia-700: #be185d;
    --amd-fuchsia-800: #9d174d;
    --amd-fuchsia-900: #831843;
    --amd-neon-pink: #ff2e93;

    --amd-dark-950: #120e1a;
    --amd-dark-900: #171321;
    --amd-dark-800: #211b2f;
    --amd-dark-700: #2e2640;

    --amd-bg-main: #f6f6fb;
    --amd-bg-card: #ffffff;
    --amd-text-primary: #14121f;
    --amd-text-secondary: #6e6a7c;
    --amd-text-muted: #9e99ad;
    --amd-border: #eceaf4;

    --amd-sidebar-collapsed: 78px;
    --amd-sidebar-expanded: 262px;
    --amd-radius-xl: 26px;
    --amd-radius-lg: 20px;
    --amd-radius-md: 14px;
    --amd-radius-pill: 999px;

    --amd-shadow-soft: 0 14px 34px -10px rgba(23, 19, 33, 0.06), 0 4px 12px -2px rgba(225, 29, 116, 0.04);
    --amd-shadow-fuchsia: 0 14px 28px -6px rgba(225, 29, 116, 0.38);
}

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

body.amd-optik-body,
.amd-optik-root {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--amd-bg-main);
    color: var(--amd-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. COLLAPSIBLE LEFT SIDEBAR (ICONS ONLY -> EXPANDS ON HOVER / PIN)
   ========================================================================== */
.amd-sidebar {
    position: fixed;
    top: 16px;
    left: 16px;
    bottom: 16px;
    width: var(--amd-sidebar-collapsed);
    background: var(--amd-dark-900);
    color: #ffffff;
    border-radius: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 14px;
    transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease;
    box-shadow: 0 20px 45px rgba(18, 14, 26, 0.28);
    overflow: hidden;
}

.amd-sidebar:hover,
.amd-sidebar.is-pinned {
    width: var(--amd-sidebar-expanded);
    box-shadow: 0 24px 60px rgba(225, 29, 116, 0.25);
}

.amd-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 6px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.amd-brand-logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amd-neon-pink) 0%, var(--amd-fuchsia-700) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(225, 29, 116, 0.45);
}

.amd-brand-text {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.amd-sidebar:hover .amd-brand-text,
.amd-sidebar.is-pinned .amd-brand-text {
    opacity: 1;
    transform: translateX(0);
}

.amd-brand-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    display: block;
}

.amd-brand-sub {
    font-size: 11px;
    color: var(--amd-fuchsia-300);
    font-weight: 600;
}

.amd-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    flex: 1;
}

.amd-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 13px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
}

.amd-nav-item svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    stroke-width: 2;
    transition: transform 0.2s ease;
}

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

.amd-nav-item.active {
    background: linear-gradient(135deg, var(--amd-fuchsia-600) 0%, var(--amd-fuchsia-800) 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(225, 29, 116, 0.4);
}

.amd-nav-label {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.amd-sidebar:hover .amd-nav-label,
.amd-sidebar.is-pinned .amd-nav-label {
    opacity: 1;
    transform: translateX(0);
}

.amd-nav-badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.amd-sidebar:hover .amd-nav-badge,
.amd-sidebar.is-pinned .amd-nav-badge {
    opacity: 1;
}

.amd-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.amd-sidebar-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--amd-fuchsia-500);
}

.amd-sidebar-user-meta {
    opacity: 0;
    transition: opacity 0.2s ease;
    overflow: hidden;
}

.amd-sidebar:hover .amd-sidebar-user-meta,
.amd-sidebar.is-pinned .amd-sidebar-user-meta {
    opacity: 1;
}

/* ==========================================================================
   2. MAIN WORKSPACE WRAPPER & TOP HEADER (FINNOVA STYLE IN FUCHSIA)
   ========================================================================== */
.amd-workspace {
    margin-left: calc(var(--amd-sidebar-collapsed) + 32px);
    padding: 20px 28px 48px 12px;
    transition: margin-left 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.amd-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--amd-bg-card);
    padding: 12px 22px;
    border-radius: var(--amd-radius-xl);
    box-shadow: var(--amd-shadow-soft);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

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

.amd-score-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--amd-fuchsia-50);
    border: 1.5px solid var(--amd-fuchsia-200);
    color: var(--amd-fuchsia-700);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amd-pill-nav {
    display: flex;
    align-items: center;
    background: var(--amd-dark-900);
    padding: 5px;
    border-radius: var(--amd-radius-pill);
    gap: 4px;
}

.amd-pill-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--amd-radius-pill);
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.amd-pill-btn:hover {
    color: #ffffff;
}

.amd-pill-btn.active {
    background: linear-gradient(135deg, var(--amd-neon-pink) 0%, var(--amd-fuchsia-600) 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(225, 29, 116, 0.5);
}

.amd-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.amd-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--amd-border);
    background: #ffffff;
    color: var(--amd-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.amd-icon-circle:hover {
    border-color: var(--amd-fuchsia-400);
    color: var(--amd-fuchsia-600);
    transform: translateY(-1px);
}

.amd-notif-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--amd-neon-pink);
    box-shadow: 0 0 0 2px #fff;
}

.amd-role-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--amd-fuchsia-50);
    border: 1px solid var(--amd-fuchsia-200);
    padding: 5px 12px 5px 6px;
    border-radius: var(--amd-radius-pill);
}

.amd-role-switcher img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.amd-role-select {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--amd-fuchsia-800);
    cursor: pointer;
    outline: none;
}

/* ==========================================================================
   3. PAGE HEADER & PRIMARY CTA BUTTON
   ========================================================================== */
.amd-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 14px;
}

.amd-section-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.amd-title-h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--amd-text-primary);
}

.amd-title-sub {
    font-size: 13.5px;
    color: var(--amd-text-secondary);
    margin-top: 2px;
}

.amd-btn-fuchsia {
    background: linear-gradient(135deg, var(--amd-neon-pink) 0%, var(--amd-fuchsia-600) 100%);
    color: #ffffff;
    border: none;
    padding: 12px 22px;
    border-radius: var(--amd-radius-pill);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--amd-shadow-fuchsia);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.amd-btn-fuchsia:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -6px rgba(225, 29, 116, 0.52);
}

/* ==========================================================================
   4. FINNOVA-STYLE 4 KPI CARDS (IMG1 IN FUCHSIA)
   ========================================================================== */
.amd-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.amd-kpi-card {
    background: var(--amd-bg-card);
    border-radius: var(--amd-radius-xl);
    padding: 22px;
    box-shadow: var(--amd-shadow-soft);
    border: 1px solid var(--amd-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 235px;
    position: relative;
    overflow: hidden;
}

.amd-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.amd-kpi-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--amd-text-secondary);
}

.amd-kpi-badge-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.amd-kpi-value {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--amd-text-primary);
    margin: 4px 0;
}

.amd-kpi-delta {
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.amd-kpi-delta.up {
    color: var(--amd-fuchsia-600);
}

.amd-kpi-delta.good {
    color: #0d9488;
}

/* Mini Bar Chart (Card 2) */
.amd-mini-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 92px;
    padding-top: 16px;
    gap: 8px;
}

.amd-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.amd-bar-fill {
    width: 100%;
    max-width: 18px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--amd-fuchsia-300) 0%, var(--amd-fuchsia-100) 100%);
    transition: height 0.4s ease;
}

.amd-bar-col.highlight .amd-bar-fill {
    background: linear-gradient(180deg, var(--amd-neon-pink) 0%, var(--amd-fuchsia-700) 100%);
    box-shadow: 0 6px 14px rgba(225, 29, 116, 0.35);
}

.amd-bar-lbl {
    font-size: 10px;
    color: var(--amd-text-muted);
    font-weight: 600;
}

/* Payment Method Mini Cards (Card 4 from img1) */
.amd-payout-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.amd-pay-pill-card {
    background: #f8f7fc;
    border: 1px solid var(--amd-border);
    border-radius: 14px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 82px;
    font-size: 11px;
    font-weight: 700;
    color: var(--amd-text-secondary);
}

.amd-pay-pill-card.active {
    background: linear-gradient(160deg, var(--amd-neon-pink) 0%, var(--amd-fuchsia-700) 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 20px -4px rgba(225, 29, 116, 0.45);
}

/* ==========================================================================
   5. FILTER PILLS BAR & DARK SPLIT BOARD (IMG1 BOTTOM BOARD IN FUCHSIA)
   ========================================================================== */
.amd-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.amd-filter-pill {
    background: #ffffff;
    border: 1px solid var(--amd-border);
    padding: 9px 16px;
    border-radius: var(--amd-radius-pill);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--amd-text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.amd-search-input {
    margin-left: auto;
    background: #ffffff;
    border: 1px solid var(--amd-border);
    padding: 9px 18px;
    border-radius: var(--amd-radius-pill);
    font-family: inherit;
    font-size: 12.5px;
    min-width: 220px;
    outline: none;
}

.amd-search-input:focus {
    border-color: var(--amd-fuchsia-500);
}

.amd-dark-board {
    background: var(--amd-dark-900);
    border-radius: 30px;
    padding: 26px;
    color: #ffffff;
    box-shadow: 0 24px 55px rgba(18, 14, 26, 0.22);
    position: relative;
    margin-bottom: 32px;
}

.amd-board-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.amd-board-tabs {
    background: #ffffff;
    padding: 5px;
    border-radius: var(--amd-radius-pill);
    display: inline-flex;
    gap: 4px;
}

.amd-board-tab {
    border: none;
    background: transparent;
    color: var(--amd-text-primary);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: var(--amd-radius-pill);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.amd-board-tab.active {
    background: linear-gradient(135deg, var(--amd-neon-pink) 0%, var(--amd-fuchsia-600) 100%);
    color: #ffffff;
}

.amd-board-split {
    display: grid;
    grid-template-columns: 395px 1fr;
    gap: 22px;
}

.amd-order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.amd-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.amd-order-row:hover {
    background: rgba(255, 255, 255, 0.07);
}

.amd-order-row.active {
    background: linear-gradient(135deg, var(--amd-neon-pink) 0%, var(--amd-fuchsia-600) 100%);
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(225, 29, 116, 0.45);
}

.amd-order-user {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.amd-order-user img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.amd-order-folio {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
}

.amd-order-due {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.68);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.amd-order-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: var(--amd-radius-pill);
    background: rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.amd-order-row.active .amd-order-badge {
    background: #ffffff;
    color: var(--amd-fuchsia-700);
}

.amd-order-amount {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
}

/* Vibrant Fuchsia Detail Panel (Right side of Dark Board) */
.amd-fuchsia-detail-card {
    background: linear-gradient(135deg, #d91b68 0%, #8f1448 100%);
    border-radius: 24px;
    padding: 26px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 18px 40px rgba(225, 29, 116, 0.3);
}

.amd-detail-header {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 22px;
}

.amd-detail-meta-lbl {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 6px;
}

.amd-detail-folio-big {
    font-size: 24px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.amd-detail-items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.amd-glass-item-box {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 108px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.amd-glass-item-box:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.amd-glass-item-box.dashed {
    background: transparent;
    border: 1.5px dashed rgba(255, 255, 255, 0.38);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 6px;
}

.amd-detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    flex-wrap: wrap;
    gap: 16px;
}

.amd-btn-white-pill {
    background: #ffffff;
    color: var(--amd-text-primary);
    border: none;
    padding: 13px 26px;
    border-radius: var(--amd-radius-pill);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}

.amd-btn-white-pill:hover {
    transform: scale(1.03);
}

/* ==========================================================================
   6. EHR EYE LENS DIAGNOSIS & CLINICAL GRAPHICS (IMG2 ADAPTED TO FUCHSIA)
   ========================================================================== */
.amd-ehr-board {
    background: #ffffff;
    border-radius: 30px;
    padding: 28px;
    box-shadow: var(--amd-shadow-soft);
    border: 1px solid var(--amd-border);
    margin-bottom: 28px;
}

.amd-ehr-hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 24px;
}

.amd-eye-stage {
    background: radial-gradient(circle at 58% 48%, rgba(252, 231, 243, 0.9) 0%, rgba(246, 246, 251, 0.5) 68%, #ffffff 100%);
    border-radius: 26px;
    padding: 26px;
    position: relative;
    min-height: 390px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--amd-fuchsia-100);
    overflow: hidden;
}

.amd-eye-headline {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--amd-text-primary);
    max-width: 310px;
    z-index: 2;
}

.amd-lens-inline-pill {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    width: 84px;
    height: 36px;
    border-radius: 99px;
    background: linear-gradient(135deg, var(--amd-fuchsia-200) 0%, var(--amd-fuchsia-600) 100%);
    margin-right: 8px;
    position: relative;
    box-shadow: inset 0 2px 6px rgba(255,255,255,0.6);
}

.amd-eye-callout-card {
    position: absolute;
    top: 24px;
    right: 36px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    padding: 14px 20px;
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(23, 19, 33, 0.08);
    border: 1px solid var(--amd-fuchsia-100);
    z-index: 3;
}

.amd-eye-urgent-pill {
    background: linear-gradient(135deg, var(--amd-neon-pink) 0%, var(--amd-fuchsia-700) 100%);
    color: #ffffff;
    border-radius: 22px;
    padding: 18px 22px;
    max-width: 270px;
    box-shadow: var(--amd-shadow-fuchsia);
    z-index: 2;
    position: relative;
}

.amd-eye-svg-wrap {
    position: absolute;
    right: -10px;
    bottom: 10px;
    width: 350px;
    height: 320px;
    z-index: 1;
    pointer-events: none;
}

.amd-ehr-right-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.amd-rehab-banner {
    background: linear-gradient(120deg, rgba(23, 19, 33, 0.78) 0%, rgba(157, 23, 77, 0.65) 100%),
                url('https://images.unsplash.com/photo-1579684385127-1ef15d508118?w=800&auto=format&fit=crop&q=80') center/cover no-repeat;
    border-radius: 24px;
    padding: 24px;
    color: #ffffff;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.amd-ehr-subcards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    flex: 1;
}

.amd-astigmatism-card {
    background: linear-gradient(145deg, var(--amd-fuchsia-600) 0%, var(--amd-fuchsia-200) 100%);
    border-radius: 22px;
    padding: 18px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
}

.amd-oct-card {
    background: var(--amd-dark-950);
    border-radius: 22px;
    padding: 18px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
}

/* Care Plan & Visits Row (Bottom of img2) */
.amd-ehr-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 22px;
}

.amd-careplan-box,
.amd-visits-box {
    background: #faf9fe;
    border: 1px solid var(--amd-border);
    border-radius: 24px;
    padding: 22px;
}

.amd-care-pills-track {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.amd-care-pill {
    background: #ffffff;
    border: 1px solid var(--amd-border);
    border-radius: var(--amd-radius-pill);
    padding: 8px 14px 8px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.amd-visits-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.amd-visit-mini-card {
    background: #ffffff;
    border: 1px solid var(--amd-border);
    border-radius: 18px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 138px;
}

/* ==========================================================================
   7. MOBILE BOTTOM APP NAVIGATION BAR (HIDDEN ON DESKTOP, NATIVE APP ON MOBILE)
   ========================================================================== */
.amd-mobile-bottom-nav {
    display: none;
}

@media (max-width: 1180px) {
    .amd-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .amd-board-split,
    .amd-ehr-hero-grid,
    .amd-ehr-bottom-grid {
        grid-template-columns: 1fr;
    }
    .amd-detail-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Hide Desktop Left Sidebar completely on mobile */
    .amd-sidebar {
        display: none !important;
    }

    /* Full width workspace with bottom padding for app bar */
    .amd-workspace {
        margin-left: 0 !important;
        padding: 14px 14px 96px 14px !important;
    }

    .amd-pill-nav {
        display: none;
    }

    .amd-kpi-grid {
        grid-template-columns: 1fr;
    }

    .amd-detail-header,
    .amd-detail-items-grid,
    .amd-visits-cards-row {
        grid-template-columns: 1fr;
    }

    .amd-eye-svg-wrap {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        height: 240px;
        margin: 12px 0;
    }

    /* Show Mobile App Bottom Bar */
    .amd-mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 74px;
        background: rgba(23, 19, 33, 0.96);
        backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 2000;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px env(safe-area-inset-bottom);
        box-shadow: 0 -10px 30px rgba(18, 14, 26, 0.35);
    }

    .amd-mob-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: rgba(255, 255, 255, 0.6);
        font-size: 10.5px;
        font-weight: 700;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px 10px;
        border-radius: 14px;
    }

    .amd-mob-tab svg {
        width: 21px;
        height: 21px;
    }

    .amd-mob-tab.active {
        color: #ffffff;
        background: linear-gradient(135deg, var(--amd-neon-pink) 0%, var(--amd-fuchsia-600) 100%);
        box-shadow: 0 4px 14px rgba(225, 29, 116, 0.45);
    }
}

/* ==========================================================================
   8. LOGIN MODAL / LOCK SCREEN & DATA TABLES
   ========================================================================== */
.amd-login-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, #3b0d2c 0%, #120e1a 70%);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.amd-login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 28px;
    padding: 36px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.amd-table-wrap {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--amd-shadow-soft);
    border: 1px solid var(--amd-border);
    overflow-x: auto;
    margin-bottom: 24px;
}

.amd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.amd-table th {
    text-align: left;
    padding: 12px 14px;
    color: var(--amd-text-secondary);
    font-weight: 700;
    border-bottom: 1px solid var(--amd-border);
}

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

.amd-badge-fuchsia {
    background: var(--amd-fuchsia-100);
    color: var(--amd-fuchsia-800);
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
}

.amd-badge-green {
    background: #dcfce7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
}

.amd-toast {
    position: fixed;
    bottom: 26px;
    right: 26px;
    background: var(--amd-dark-900);
    color: #ffffff;
    border-left: 4px solid var(--amd-neon-pink);
    padding: 14px 20px;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    z-index: 6000;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
