/* Local Fonts */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-300.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-500.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-600.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-300.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-500.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-600.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Primary Palette */
    --bg-cream: #FDFBF7;
    --aqua-depth: #9435ea;
    --aqua-depth-glass: rgba(148, 53, 234, 0.4);
    
    /* Gradients */
    --gradient-active: linear-gradient(135deg, #9333EA, #FB7185);
    --gradient-glass: linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(251, 113, 133, 0.4));
    
    /* Glass Specs */
    --glass-blur: blur(30px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 20px 50px 0 rgba(0, 0, 0, 0.3);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: #020617; /* Slate 950 */
    background-attachment: fixed;
    font-family: var(--font-body);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Atmospheric Mesh Background */
.mesh-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: #020617;
}

.mesh-blob {
    position: absolute;
    filter: blur(120px);
    opacity: 0.15;
    border-radius: 50%;
}

.blob-1 {
    width: 800px;
    height: 800px;
    background: #9435ea;
    top: -200px;
    right: -100px;
    animation: aurora-mesh 25s infinite alternate;
}

.blob-2 {
    width: 600px;
    height: 600px;
    background: #FB7185;
    bottom: -100px;
    left: -100px;
    animation: aurora-mesh 30s infinite alternate-reverse;
}

.blob-3 {
    width: 700px;
    height: 700px;
    background: #3b82f6; /* Professional Blue */
    bottom: 20%;
    right: 30%;
    animation: aurora-mesh 20s infinite alternate;
    opacity: 0.1;
}

@keyframes aurora-mesh {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, -50px) scale(1.1); }
}

h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
    color: white;
}

/* Glass Utilities */
.glass {
    position: relative; /* Ensure z-index works */
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background: rgba(255, 255, 255, 0.05);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
    transition: var(--transition);
}

.glass:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
}

.glass-aqua {
    background: var(--aqua-depth-glass);
}

.glass-gradient {
    background: var(--gradient-glass);
}

/* Layout */
.container-fluid {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

main {
    padding-bottom: 100px; /* Space for the dock */
    padding-left: 20px;
    padding-right: 20px;
}

@media (max-width: 1200px) {
    .container-fluid {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    main {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Global Navbar */
.global-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    margin: 20px auto;
    max-width: 1520px;
    width: 95%;
    position: sticky;
    top: 20px;
    z-index: 1000;
}

@media (max-width: 1024px) {
    .global-navbar {
        margin: 15px 20px;
        width: calc(100% - 40px);
        padding: 12px 20px;
    }
    .dock-clinic-name {
        display: none; /* Hide clinic name on small tablets to save space */
    }
}

@media (max-width: 768px) {
    .global-navbar {
        flex-direction: column;
        gap: 15px;
        margin: 10px;
        width: calc(100% - 20px);
        top: 10px;
    }
    .header-center {
        width: 100%;
    }
    .search-box {
        width: 100% !important;
    }
}

.avatar-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--aqua-depth);
}

.dr-name {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: white;
}

.role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.search-box {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    width: 400px;
    gap: 10px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    width: 100%;
    font-size: 14px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.qr-trigger {
    cursor: pointer;
    opacity: 0.6;
    color: white;
    transition: var(--transition);
}

.qr-trigger:hover {
    opacity: 1;
    color: #9333EA;
}

.header-right {
    display: flex;
    gap: 15px;
}

@media (max-width: 900px) {
    .header-right {
        display: none !important;
    }
}

.branch-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
}

.branch-selector select {
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    font-weight: 500;
    color: white;
    cursor: pointer;
}

.branch-selector select option {
    background: #9333EA;
}

.notification-bell {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    color: white;
}

.pulse-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #FB7185;
    border-radius: 50%;
}

/* Animations */
@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(251, 113, 133, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 113, 133, 0); }
}

.pulse-badge {
    animation: pulse-red 2s infinite;
}

/* --- Global UI Standardization --- */

/* Modal & Overlay */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2500;
}

.pro-modal {
    position: relative;
    background: rgba(14, 18, 30, 0.98);
    backdrop-filter: blur(30px);
    border: 2px solid var(--aqua-depth);
    border-radius: 40px;
    box-shadow: 0 0 60px rgba(148, 53, 234, 0.25);
    overflow: hidden;
    color: white;
    padding: 40px;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

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

/* Form Standardization */
.pro-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 12px; /* Increased margin for better separation */
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

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

.input-with-icon i {
    position: absolute;
    left: 15px;
    width: 16px;
    height: 16px;
    opacity: 0.4;
}

/* Premium Global Inputs & Selects */
.pro-form input, 
.pro-form select, 
.pro-form textarea,
.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 20px; /* Increased padding slightly for larger hit area and better look */
    border-radius: 15px;
    outline: none;
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition);
}

.input-with-icon input {
    padding-left: 45px;
}

.pro-form input:focus, 
.pro-form select:focus, 
.pro-form textarea:focus,
.glass-input:focus {
    border-color: var(--aqua-depth);
    background: rgba(148, 53, 234, 0.05);
    box-shadow: 0 0 15px rgba(148, 53, 234, 0.1);
}

/* Premium Global Dropdown Styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 15px;
    padding-right: 50px !important;
    cursor: pointer;
}

select option {
    background: #0f172a;
    color: white;
    padding: 12px;
}

/* Global Action Buttons */
.btn-primary-v2 {
    background: var(--aqua-depth);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary-v2:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(148, 53, 234, 0.4);
    filter: brightness(1.1);
}

.btn-secondary-v2 {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 32px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary-v2:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Form Layout Utilities */
.form-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.full-width { grid-column: span 2; }

.modal-actions-v2 {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 50px; /* Substantial clearance from the form */
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Subtle anchor separator */
}

.modal-header-v2 {
    text-align: center;
    margin-bottom: 50px; /* More breathing room after header */
}

.modal-header-v2 h2 { 
    font-size: 28px; 
    margin-bottom: 8px; 
    letter-spacing: -0.5px;
}
.modal-header-v2 p { opacity: 0.5; font-size: 14px; }

/* Expert UI Controls */
.expert-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.expert-input-group i {
    position: absolute;
    left: 20px;
    z-index: 2;
    opacity: 0.5;
    pointer-events: none;
    font-size: 18px;
}

.expert-select, 
.expert-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 20px 16px 52px; /* Extra left padding for icon */
    border-radius: 18px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    appearance: none; /* Remove default styling */
}

.expert-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px;
}

/* Premium Expert Switch (Toggle) */
.expert-switch {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    user-select: none;
}

.expert-switch input {
    display: none;
}

.switch-track {
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch-thumb {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    left: 4px;
    top: 3px;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.expert-switch input:checked + .switch-track {
    background: #9435ea;
    border-color: #9435ea;
    box-shadow: 0 0 15px rgba(148, 53, 234, 0.4);
}

.expert-switch input:checked + .switch-track .switch-thumb {
    left: 26px;
}

.switch-label {
    font-size: 13px;
    font-weight: 700;
    opacity: 0.7;
}

/* Integrated Discount Component */
.expert-discount-hub {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    overflow: hidden;
    height: 54px;
    transition: var(--transition);
}

.expert-discount-hub:focus-within {
    border-color: rgba(148, 53, 234, 0.5);
    box-shadow: 0 0 20px rgba(148, 53, 234, 0.1);
}

.discount-field {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 700;
    outline: none;
    width: 100px;
}

.unit-selector {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 800;
    outline: none;
    cursor: pointer;
    appearance: none;
    text-align: center;
}

/* Expert Inventory Specifics */
.expert-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.expert-stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.expert-stat-card .viz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.expert-stat-card .viz-header span {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
}

.expert-stat-card .viz-header strong {
    font-size: 18px;
    font-weight: 900;
}

/* Glowing Progress Bars */
.expert-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.expert-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.expert-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: expert-shine 2s infinite;
}

@keyframes expert-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.fill-healthy { 
    background: linear-gradient(90deg, #10b981, #34d399); 
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
.fill-warning { 
    background: linear-gradient(90deg, #f59e0b, #fbbf24); 
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}
.fill-critical { 
    background: linear-gradient(90deg, #ef4444, #f87171); 
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* Polished Table Rows */
.inventory-table-container-expert {
    background: rgba(14, 18, 30, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 40px;
    margin-top: 30px;
}

.expert-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.expert-table th {
    text-align: left;
    padding: 0 25px 20px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    opacity: 0.4;
    text-transform: uppercase;
}

.expert-row {
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.expert-row:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: scale(1.005);
}

.expert-row td {
    padding: 20px 25px;
    font-size: 14px;
}

.expert-row td:first-child { border-radius: 20px 0 0 20px; }
.expert-row td:last-child { border-radius: 0 20px 20px 0; }

.expert-row td strong { font-size: 15px; letter-spacing: -0.2px; }

.stock-badge {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stock-badge.critical { color: #f87171; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); }
.stock-badge.warning { color: #fbbf24; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); }
.stock-badge.healthy { color: #34d399; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); }

/* --- Responsive Utilities --- */
.responsive-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(var(--grid-cols, 4), 1fr);
}

@media (max-width: 1400px) {
    .responsive-grid {
        grid-template-columns: repeat(min(var(--grid-cols, 4), 3), 1fr);
    }
}

@media (max-width: 1024px) {
    .responsive-grid {
        grid-template-columns: repeat(min(var(--grid-cols, 4), 2), 1fr);
    }
}

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

.flex-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

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

/* Page Specific Overrides for Responsiveness */
.dashboard-wrapper, .inventory-wrapper, .patients-container {
    max-width: 1520px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .dashboard-wrapper, .inventory-wrapper, .patients-container {
        padding: 10px;
    }
}

/* Stat Cards Responsiveness */
.stats-row, .stock-viz-grid, .patients-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.action-btn-pro {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-right: 8px;
}

.action-btn-pro:hover {
    background: rgba(148, 53, 234, 0.2);
    border-color: #9435ea;
    color: #9435ea;
    transform: translateY(-2px);
}

/* --- Dashboard Layout --- */
.dashboard-wrapper {
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.alert-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
}

/* Consolidated with line 903 */

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-content h3 {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.stat-content p {
    font-size: 12px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 15px 30px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table td {
    padding: 20px 30px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.appointment-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.badge-info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

.bills-list {
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bill-info strong {
    display: block;
    font-size: 14px;
}

.bill-info span {
    font-size: 11px;
    opacity: 0.5;
}

.bill-amount {
    text-align: right;
}

.bill-amount .amount {
    display: block;
    font-weight: 800;
    font-size: 16px;
}

/* --- Clinical CRM / Patient Modules --- */
.patients-container {
    padding: 30px 40px;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.master-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-scanner-box {
    display: flex;
    align-items: center;
    padding: 10px 25px;
    gap: 15px;
    min-width: 500px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-scanner-box input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    width: 100%;
    font-size: 15px;
}

.scanner-btn {
    cursor: pointer;
    color: #FB7185;
    transition: var(--transition);
}

.scanner-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Stats Grid for All Clinical Pages */
.patients-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.stat-glass-card {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    transition: var(--transition);
}

.stat-glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.stat-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
}

.stat-icon-circle.blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; box-shadow: 0 10px 20px rgba(59, 130, 246, 0.15); }
.stat-icon-circle.purple { background: rgba(148, 53, 234, 0.2); color: #a855f7; box-shadow: 0 10px 20px rgba(148, 53, 234, 0.15); }
.stat-icon-circle.green { background: rgba(16, 185, 129, 0.2); color: #34d399; box-shadow: 0 10px 20px rgba(16, 185, 129, 0.15); }
.stat-icon-circle.amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; box-shadow: 0 10px 20px rgba(245, 158, 11, 0.15); }

.stat-details h3 { font-size: 28px; font-weight: 800; margin-bottom: 2px; }
.stat-details p { font-size: 13px; opacity: 0.5; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Table Cards */
.patients-table-card {
    background: rgba(14, 18, 30, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 30px;
}

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

.pro-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.pro-table th {
    text-align: left;
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.4;
}

.pro-table tr.patient-row {
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
    cursor: pointer;
}

.pro-table tr.patient-row:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.002);
}

.pro-table td {
    padding: 20px;
    font-size: 14px;
}

.pro-table td:first-child { border-radius: 15px 0 0 15px; }
.pro-table td:last-child { border-radius: 0 15px 15px 0; }

.row-actions {
    display: flex;
    gap: 8px;
}

.row-actions button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.row-actions button:hover {
    background: var(--aqua-depth);
    border-color: rgba(148, 53, 234, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(148, 53, 234, 0.2);
}

.row-actions button i {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.row-actions button:hover i {
    opacity: 1;
}

.btn-op.complete:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.2);
}

.btn-op.postpone:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    color: #f59e0b;
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.2);
}

.btn-op.prescription:hover {
    background: rgba(148, 53, 234, 0.2);
    border-color: #a855f7;
    color: #a855f7;
    box-shadow: 0 5px 15px rgba(148, 53, 234, 0.2);
}

/* Common Modal Elements */
.tag-glass {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.modal-tabs {
    display: flex;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 30px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    font-size: 14px;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 12px;
    transition: var(--transition);
}

.tab-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: white;
    background: var(--aqua-depth);
    box-shadow: 0 5px 15px rgba(148, 53, 234, 0.3);
}

/* Consultation Modal Styles */
.consultation-modal {
    width: 90% !important;
    max-width: 650px !important;
}

.consult-header {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.medicine-entry-area {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 20px;
    margin-top: 15px;
}

.rx-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) 40px;
    gap: 12px;
    margin-bottom: 12px;
}

.rx-row input {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.rx-row input:focus {
    border-color: #9435ea;
    background: rgba(148, 53, 234, 0.05);
}

.btn-add-rx {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.2);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-rx:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.3);
}

.main-grid-responsive {
    width: 100%;
}

.grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}


/* End of Global Styles - Media queries moved to responsive.css */

/* --- Clinical Journey Pro Components --- */
.clinical-journey-wrapper {
    margin-top: 20px;
}

.timeline-rail {
    display: flex;
    flex-direction: column;
}

.vitals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.vital-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
}

.vital-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
}

.vital-value {
    font-size: 24px;
    font-weight: 800;
    color: #a855f7;
    margin: 10px 0;
}

.vital-label {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dental-map-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
    background: rgba(0,0,0,0.2);
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.05);
}

.tooth-row {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.tooth-box {
    width: 35px;
    height: 45px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tooth-box:hover {
    background: rgba(147, 51, 234, 0.2);
    border-color: #9333ea;
}

.tooth-box.active {
    background: linear-gradient(135deg, #9333EA, #FB7185);
    border: none;
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.5);
    color: white;
}

.workspace-header-pill {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 12px 25px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-discard {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 12px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-discard:hover {
    background: #ef4444;
    color: white;
}


