/* ===== CSS Variables ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #0891b2;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --text: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --card-bg: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --card-bg: #1e293b;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --primary-light: #1e3a5f;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    min-height: 100vh;
    direction: rtl;
    text-align: right;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    width: 100%;
    transition: border var(--transition);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
textarea { resize: vertical; min-height: 100px; }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ===== Navbar ===== */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.navbar-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none !important;
}
.navbar-brand img.brand-logo {
    height: 42px;
    width: auto;
    border-radius: 6px;
    object-fit: contain;
}
.navbar-brand i { font-size: 1.5rem; }
.navbar-links { display: flex; gap: 0.3rem; align-items: center; }
.navbar-links a, .navbar-links button {
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    background: none;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.navbar-links a:hover, .navbar-links button:hover {
    background: var(--gray-100);
    color: var(--text);
}
.navbar-links a.active {
    background: var(--primary-light);
    color: var(--primary);
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text);
    padding: 0.3rem;
}
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .navbar-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    .navbar-links.open { display: flex; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: all var(--transition);
    text-decoration: none !important;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-100); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon { padding: 0.5rem; border-radius: 50%; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; }

/* ===== Cards ===== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 1.1rem; font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.stat-card { text-align: center; padding: 1.5rem; }
.stat-card .stat-icon { font-size: 2rem; margin-bottom: 0.5rem; color: var(--primary); }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--text); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* ===== Tables ===== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.75rem 1rem; text-align: right; border-bottom: 1px solid var(--border); }
th { background: var(--gray-50); font-weight: 600; color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover td { background: var(--gray-50); }

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }

/* ===== Forms ===== */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 0.2rem; }

/* ===== Page Header ===== */
.page-header {
    padding: 2rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.page-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.3rem; }
.page-header p { color: var(--text-secondary); }

/* ===== Hero ===== */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    text-align: center;
}
.hero h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 650px; margin: 0 auto 2rem; }
.hero .btn { background: #fff; color: var(--primary); font-weight: 600; padding: 0.8rem 2rem; font-size: 1rem; }
.hero .btn:hover { background: #f0f0f0; }

/* ===== Section ===== */
.section { padding: 3rem 0; }
.section-title { font-size: 1.6rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.section-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 2rem; }

/* ===== Dashboard Layout (sidebar) ===== */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}
.sidebar {
    width: 250px;
    background: var(--card-bg);
    border-left: 1px solid var(--border);
    border-right: none;
    padding: 1.5rem 0;
    flex-shrink: 0;
}
.sidebar-header {
    padding: 0 1rem 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}
.sidebar-header h3 { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.sidebar a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
}
.sidebar a:hover { background: var(--gray-100); color: var(--text); }
.sidebar a.active { background: var(--primary-light); color: var(--primary); border-left: 3px solid var(--primary); }
.sidebar a i { width: 20px; text-align: center; }
.dashboard-content { flex: 1; padding: 1.5rem 2rem; overflow-y: auto; }
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        z-index: 300;
        transform: translateX(110%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    }
    .sidebar.open { transform: translateX(0); }
    .dashboard-content { padding: 1rem; }
}

/* ===== Footer ===== */
.footer-main {
    background: var(--gray-800);
    color: var(--gray-300);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 0.8rem; }
.footer-col a { display: block; color: var(--gray-300); padding: 0.2rem 0; font-size: 0.9rem; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--gray-600); padding-top: 1rem; text-align: center; font-size: 0.85rem; }

/* ===== Toast ===== */
#toast-container {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    color: #fff;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 280px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
@keyframes slideIn { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== Misc ===== */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.loading { text-align: center; padding: 3rem; color: var(--text-secondary); }
.loading i { font-size: 2rem; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 3rem; color: var(--text-secondary); }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.avatar {
    width: 40px; height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}
.steps { display: flex; gap: 0; margin-bottom: 2rem; }
.step {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid var(--border);
}
.step.active { color: var(--primary); border-color: var(--primary); }
.step.done { color: var(--success); border-color: var(--success); }
.hidden { display: none !important; }
.tab-bar { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}
.tab-btn.active { color: var(--primary); border-color: var(--primary); }
.tab-btn:hover { color: var(--text); }
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}
.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 0;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal h2 { font-size: 1.2rem; margin-bottom: 1rem; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── Patient Profile & Modal Additions ──────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.25rem; flex-wrap: wrap; }
.tab-panel { animation: fadeIn 0.15s ease; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; padding: 1rem 1.25rem 0.75rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 1.1rem; }
.modal-body { margin-bottom: 0; padding: 1rem 1.25rem; }
.modal-footer { display: flex; gap: 0.5rem; justify-content: flex-end; padding: 0.75rem 1.25rem; border-top: 1px solid var(--border); }
.btn-close { background: none; border: none; color: var(--text-secondary); font-size: 1.1rem; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: var(--radius); }
.btn-close:hover { background: var(--bg-secondary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 540px) { .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
    .modal { width: 97%; padding: 1rem; }
    .modal-body[style*="grid-template-columns"] { display: block !important; }
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.5rem; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.flex-col { flex-direction: column; }
.btn-danger { background: var(--danger, #dc2626); color: #fff; border-color: var(--danger, #dc2626); }
.btn-danger:hover { opacity: 0.9; }
.gap-2 { gap: 1rem; }

/* ─── File Upload & Thumbnails ─────────────────────────── */
.upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}
.upload-dropzone:hover, .upload-dropzone.drag-over {
    border-color: var(--primary);
    background: rgba(37,99,235,0.04);
}
.files-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.file-thumb {
    position: relative;
    width: 100px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: visible;
    background: var(--bg-secondary);
    text-align: center;
}
.file-thumb-img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    display: block;
    cursor: zoom-in;
}
.file-thumb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 80px;
    font-size: 2.2rem;
    color: var(--primary);
    text-decoration: none;
}
.file-thumb-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.3rem 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-thumb-del {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--danger, #dc2626);
    color: #fff;
    border: none;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 5;
}
.file-thumb:hover .file-thumb-del { opacity: 1; }
.mt-1 { margin-top: 0.5rem; }

/* ===== Permissions Panel ===== */
.perm-panel { max-width: 700px; }

.perm-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.perm-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.perm-header-icon i { color: #fff; font-size: 1.2rem; }
.perm-header h3 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.perm-header p { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--text-secondary); }

.perm-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--card-bg);
}
.perm-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.perm-section-title i { font-size: 0.85rem; }

/* Toggle switch - RTL aware */
.perm-toggle {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    background: var(--bg-secondary);
    transition: all 0.2s;
    user-select: none;
}
.perm-toggle:hover { border-color: var(--primary); }
.perm-toggle.is-on { border-color: var(--primary); background: var(--primary-light); }
.perm-toggle input { display: none; }
.perm-toggle .toggle-track {
    width: 48px;
    height: 26px;
    border-radius: 13px;
    background: var(--gray-300);
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
    margin-top: 2px;
}
.perm-toggle input:checked + .toggle-track { background: var(--primary); }
.perm-toggle .toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.perm-toggle input:checked + .toggle-track::after { transform: translateX(22px); }
.perm-toggle .toggle-label { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.perm-toggle .toggle-desc { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; line-height: 1.5; }
.perm-toggle .toggle-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--gray-200);
    color: var(--text-secondary);
    margin-right: 0.4rem;
    vertical-align: middle;
}
.perm-toggle.is-on .toggle-badge { background: var(--primary); color: #fff; }

/* Module grid */
.perm-modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    transition: opacity 0.35s, filter 0.35s;
}
@media (max-width: 540px) { .perm-modules-grid { grid-template-columns: 1fr; } }
.perm-modules-grid.disabled { opacity: 0.3; pointer-events: none; filter: grayscale(0.6) blur(1px); }

.perm-module-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    position: relative;
}
.perm-module-card:hover {
    border-color: var(--gray-400);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.perm-module-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.perm-module-card .mod-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.perm-module-card .mod-name { font-size: 0.9rem; font-weight: 600; flex: 1; }
.perm-module-card input { display: none; }
.perm-module-card .mod-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 0.7rem;
    color: transparent;
}
.perm-module-card.active .mod-check {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Effective permissions preview */
.perm-effective {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.perm-effective .perm-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.perm-chip-active { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
[data-theme="dark"] .perm-chip-active { background: #14532d; color: #86efac; border-color: #166534; }

.perm-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.perm-actions .btn { padding: 0.65rem 1.5rem;     flex-shrink: 0;
}
.perm-module-card .mod-name { font-size: 0.9rem; font-weight: 600; flex: 1; }
.perm-module-card input { display: none; }
.perm-module-card .mod-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 0.7rem;
    color: transparent;
}
.perm-module-card.active .mod-check {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Effective permissions preview */
.perm-effective {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.perm-effective .perm-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.perm-chip-active { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
[data-theme="dark"] .perm-chip-active { background: #14532d; color: #86efac; border-color: #166534; }

.perm-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.perm-actions .btn { padding: 0.65rem 1.5rem; }

/* ===== Patient Search Dropdown ===== */
.patient-search-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.patient-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.patient-dd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
}
.patient-dd-item:last-child { border-bottom: none; }
.patient-dd-item:hover { background: var(--primary-light); }
.patient-dd-name { font-weight: 500; font-size: 0.9rem; }
.patient-dd-phone { font-size: 0.8rem; color: var(--text-secondary); direction: ltr; font-family: monospace; }
.patient-dd-empty { padding: 0.75rem; text-align: center; color: var(--text-secondary); font-size: 0.85rem; }

/* ===== Mobile Sidebar Drawer ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 299;
}
.sidebar-overlay.open { display: block; }

.mobile-sidebar-btn {
    display: none;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    cursor: pointer;
    font-family: inherit;
}
.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius);
}
.sidebar-close-btn:hover { background: var(--bg-secondary); color: var(--text); }

/* ===== Mobile Responsive Additions ===== */
@media (max-width: 768px) {
    .mobile-sidebar-btn { display: inline-flex; }
    .sidebar-close-btn { display: block; }
    .sidebar-header { display: flex; align-items: center; justify-content: space-between; }

    .hero { padding: 2.5rem 0; }
    .hero h1 { font-size: 1.9rem; }
    .hero p { font-size: 1rem; }

    .page-header { padding: 1.25rem 0; }
    .page-header h1 { font-size: 1.4rem; }

    .flex-between { flex-wrap: wrap; }
    .card-header { flex-wrap: wrap; gap: 0.5rem; }

    .tab-bar, .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .tab-bar::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }

    .steps { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .step { min-width: 90px; }

    #toast-container { left: 0.5rem; right: 0.5rem; }
    .toast { min-width: unset; width: 100%; }

    .section { padding: 2rem 0; }

    th { white-space: nowrap; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.5rem; }
    .hero { padding: 2rem 0; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .card { padding: 1rem; }
    .modal { padding: 1.25rem; }
    .modal-header, .modal-body, .modal-footer { padding-left: 0.75rem; padding-right: 0.75rem; }
}

/* ===== Public Pages — Enhanced Design ===== */

/* Extra palette */
:root {
    --pub-gradient: linear-gradient(135deg, #1e40af 0%, #2563eb 55%, #0891b2 100%);
    --pub-gradient-rev: linear-gradient(135deg, #0891b2 0%, #2563eb 45%, #1e40af 100%);
    --radius-xl: 18px;
    --radius-2xl: 26px;
    --blue-deep: #1e3a8a;
}

/* ── Navbar polish ─────────────────────────────────── */
.navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.92) !important;
    transition: box-shadow 0.3s ease;
}
[data-theme="dark"] .navbar { background: rgba(15,23,42,0.92) !important; }
.navbar-brand {
    background: var(--pub-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.05rem;
    font-weight: 800;
}
[data-theme="dark"] .navbar-brand { -webkit-text-fill-color: unset; background: none; color: var(--primary) !important; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
    padding: 0;
    background: var(--pub-gradient);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -180px; right: -160px;
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -100px;
    width: 440px; height: 440px;
    background: radial-gradient(circle, rgba(8,145,178,0.22) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-inner {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 2.5rem;
    align-items: center;
    padding: 5rem 0 4.5rem;
    position: relative;
    z-index: 1;
}
.hero-text { text-align: right; }
.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.1rem;
    color: #fff;
    letter-spacing: -0.02em;
}
.hero p { font-size: 1.05rem; line-height: 1.85; color: rgba(255,255,255,0.88); max-width: 480px; }

/* Animated badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.16);
    color: #fff;
    padding: 0.38rem 1.1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.3rem;
    border: 1px solid rgba(255,255,255,0.28);
    backdrop-filter: blur(6px);
    animation: pulse-ring 3s ease-in-out infinite;
}
@keyframes pulse-ring {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
    50%      { box-shadow: 0 0 0 7px rgba(255,255,255,0); }
}

/* Hero visual (CSS illustration — no image) */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-visual-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.18);
    animation: hero-spin 18s linear infinite;
}
.hero-visual-ring::before,
.hero-visual-ring::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: rgba(255,255,255,0.55);
    border-radius: 50%;
}
.hero-visual-ring::before { top: -7px; left: 50%; transform: translateX(-50%); }
.hero-visual-ring::after  { bottom: -7px; left: 50%; transform: translateX(-50%); }
@keyframes hero-spin { to { transform: rotate(360deg); } }

.hero-visual-core {
    width: 65%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.28), rgba(255,255,255,0.08));
    border: 1.5px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(255,255,255,0.12), inset 0 0 30px rgba(255,255,255,0.06);
    animation: hero-pulse 4s ease-in-out infinite;
}
@keyframes hero-pulse {
    0%,100% { transform: scale(1);   box-shadow: 0 0 60px rgba(255,255,255,0.12); }
    50%      { transform: scale(1.04); box-shadow: 0 0 90px rgba(255,255,255,0.22); }
}
.hero-visual-icon {
    font-size: clamp(4rem, 10vw, 7rem);
    color: rgba(255,255,255,0.92);
    filter: drop-shadow(0 4px 18px rgba(0,0,0,0.22));
}

/* Floating info cards */
.hero-float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.28);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.hero-float-card i { font-size: 0.9rem; color: rgba(255,255,255,0.85); }
.hero-float-1 { top: 8%;  right: -8%; animation: hf1 5s ease-in-out infinite; }
.hero-float-2 { bottom: 20%; right: -12%; animation: hf2 6s ease-in-out infinite 0.8s; }
.hero-float-3 { bottom: 6%;  left: 2%;  animation: hf3 5.5s ease-in-out infinite 1.4s; }
@keyframes hf1 { 0%,100%{transform:translateY(0)}   50%{transform:translateY(-10px)} }
@keyframes hf2 { 0%,100%{transform:translateY(0)}   50%{transform:translateY(8px)}  }
@keyframes hf3 { 0%,100%{transform:translateY(0)}   50%{transform:translateY(-8px)} }

/* Floating decorative dots */
.hero-float-dot {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
}
.dot-a { width:10px;height:10px; top:18%;  left:10%;  animation:hf1 7s ease-in-out infinite; }
.dot-b { width:6px; height:6px;  top:45%;  left:0%;   animation:hf2 5s ease-in-out infinite 1s; }
.dot-c { width:8px; height:8px;  bottom:30%;right:2%; animation:hf3 6s ease-in-out infinite 0.5s; }

/* Hero stats */
.hero-stats {
    display: flex;
    align-items: center;
    margin-top: 2.2rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    overflow: hidden;
    width: fit-content;
}
.hero-stat { text-align: center; padding: 0.8rem 1.4rem; }
.hero-stat-num { display: block; font-size: 1.7rem; font-weight: 800; color: #fff; line-height: 1; }
.hero-stat-label { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.75); margin-top: 0.3rem; white-space: nowrap; }
.hero-stat-divider { width: 1px; height: 42px; background: rgba(255,255,255,0.25); flex-shrink: 0; }

/* Hero buttons */
.hero-btns { display: flex; gap: 0.75rem; margin-top: 1.6rem; flex-wrap: wrap; }
.btn-hero-primary { background: #fff !important; color: #1e3a8a !important; font-weight: 700; box-shadow: 0 4px 18px rgba(0,0,0,0.18) !important; }
.btn-hero-primary:hover { background: #eef4ff !important; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.25) !important; text-decoration: none !important; }
.btn-hero-outline { background: transparent !important; color: #fff !important; border: 2px solid rgba(255,255,255,0.65) !important; font-weight: 600; }
.btn-hero-outline:hover { background: rgba(255,255,255,0.16) !important; border-color: rgba(255,255,255,0.9) !important; transform: translateY(-2px); text-decoration: none !important; }

@media (max-width: 768px) {
    .hero-inner { grid-template-columns: 1fr; padding: 3rem 0 2.5rem; }
    .hero-visual { max-width: 280px; order: -1; }
    .hero-float-1 { right: -2%; }
    .hero-float-2 { right: -4%; }
    .hero h1 { font-size: 2.2rem; }
    .hero-btns, .hero-stats { justify-content: center; }
    .hero-text { text-align: center; }
    .hero-stats { width: auto; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .hero-stat { padding: 0.65rem 1rem; }
    .hero-stat-num { font-size: 1.4rem; }
    .hero-stat-divider { display: none; }
    .hero-stats { gap: 0; }
}

/* ── Section ──────────────────────────────────────── */
.section { padding: 4.5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, var(--primary-light), #e0f2fe);
    color: var(--primary);
    padding: 0.28rem 1rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(37,99,235,0.15);
}
.section-title { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.section-subtitle { color: var(--text-secondary); font-size: 1rem; max-width: 520px; margin: 0 auto; line-height: 1.7; }

/* ── Service Cards ────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }

.service-card {
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--border);
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--pub-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s ease;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.service-card:hover { transform: translateY(-7px); box-shadow: 0 24px 55px rgba(37,99,235,0.13); border-color: rgba(37,99,235,0.22); }
.service-card:hover::after { transform: scaleX(1); }

.service-icon {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 18px rgba(37,99,235,0.3);
}
.service-card:hover .service-icon { transform: scale(1.12) rotate(-6deg); }
.service-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }

.service-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 1.4rem; padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.service-price { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

/* Per-card icon colors */
.service-card:nth-child(1) .service-icon { background: linear-gradient(135deg,#2563eb,#1e40af); box-shadow: 0 6px 18px rgba(37,99,235,0.35); }
.service-card:nth-child(2) .service-icon { background: linear-gradient(135deg,#0891b2,#0e7490); box-shadow: 0 6px 18px rgba(8,145,178,0.35); }
.service-card:nth-child(3) .service-icon { background: linear-gradient(135deg,#7c3aed,#5b21b6); box-shadow: 0 6px 18px rgba(124,58,237,0.35); }
.service-card:nth-child(4) .service-icon { background: linear-gradient(135deg,#dc2626,#b91c1c); box-shadow: 0 6px 18px rgba(220,38,38,0.35); }
.service-card:nth-child(5) .service-icon { background: linear-gradient(135deg,#059669,#047857); box-shadow: 0 6px 18px rgba(5,150,105,0.35); }
.service-card:nth-child(6) .service-icon { background: linear-gradient(135deg,#d97706,#b45309); box-shadow: 0 6px 18px rgba(217,119,6,0.35); }
.service-card:nth-child(7) .service-icon { background: linear-gradient(135deg,#db2777,#9d174d); box-shadow: 0 6px 18px rgba(219,39,119,0.35); }
.service-card:nth-child(8) .service-icon { background: linear-gradient(135deg,#0891b2,#164e63); box-shadow: 0 6px 18px rgba(8,145,178,0.35); }
.service-card:nth-child(9) .service-icon { background: linear-gradient(135deg,#16a34a,#14532d); box-shadow: 0 6px 18px rgba(22,163,74,0.35); }

/* ── Implants Spotlight ───────────────────────────── */
.implants-section {
    background: linear-gradient(140deg, #0c1f6b 0%, #1e3a8a 45%, #0c6b8e 100%);
    position: relative;
    overflow: hidden;
}
.implants-section::before {
    content: '';
    position: absolute;
    top: -200px; right: -200px;
    width: 650px; height: 650px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}
.implants-section .section-tag { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.22); }
.implants-section .text-secondary { color: rgba(255,255,255,0.8) !important; }
.implants-section h2 { color: #fff; font-size: 2.1rem; line-height: 1.3; font-weight: 800; }
.implants-section .btn-primary { background: #fff !important; color: #1e3a8a !important; font-weight: 700; box-shadow: 0 4px 18px rgba(0,0,0,0.2); }
.implants-section .btn-primary:hover { background: #eef4ff !important; transform: translateY(-2px); }
.implants-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: center; }
.implants-visual { display: flex; align-items: center; justify-content: center; }
.implants-icon-wrap {
    width: 240px; height: 240px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 7rem; color: rgba(255,255,255,0.9);
    border: 2px solid rgba(255,255,255,0.14);
    box-shadow: 0 0 90px rgba(255,255,255,0.05), inset 0 0 40px rgba(255,255,255,0.03);
    animation: float-icon 4.5s ease-in-out infinite;
}
@keyframes float-icon {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}
.implants-features { list-style: none; padding: 0; margin: 0; }
.implants-features li {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 0; font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.implants-features li:last-child { border-bottom: none; }
.implants-features li i { color: #6ee7b7; font-size: 1.05rem; flex-shrink: 0; }
@media (max-width: 768px) { .implants-grid { grid-template-columns: 1fr; gap: 2rem; } .implants-visual { display: none; } }

/* ── Why Us ───────────────────────────────────────── */
.why-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px) { .why-grid { grid-template-columns: 1fr; } }

.why-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.why-card:hover { transform: translateY(-7px); box-shadow: 0 22px 55px rgba(37,99,235,0.14); border-color: rgba(37,99,235,0.2); }

.why-icon {
    width: 70px; height: 70px;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem; color: #fff;
    margin: 0 auto 1.25rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--pub-gradient);
    box-shadow: 0 8px 24px rgba(37,99,235,0.28);
}
.why-card:hover .why-icon { transform: scale(1.12) rotate(-8deg); }
.why-card:nth-child(1) .why-icon { background: linear-gradient(135deg,#2563eb,#1e40af); box-shadow: 0 8px 24px rgba(37,99,235,0.3); }
.why-card:nth-child(2) .why-icon { background: linear-gradient(135deg,#0891b2,#0e7490); box-shadow: 0 8px 24px rgba(8,145,178,0.3); }
.why-card:nth-child(3) .why-icon { background: linear-gradient(135deg,#dc2626,#b91c1c); box-shadow: 0 8px 24px rgba(220,38,38,0.3); }
.why-card:nth-child(4) .why-icon { background: linear-gradient(135deg,#059669,#047857); box-shadow: 0 8px 24px rgba(5,150,105,0.3); }
.why-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.6rem; }
.why-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.75; }

/* ── Review Cards ─────────────────────────────────── */
.review-card {
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    background: var(--card-bg);
}
.review-card::before {
    content: '\201C';
    position: absolute;
    top: 0.6rem; left: 1.2rem;
    font-size: 5.5rem;
    line-height: 1;
    font-family: Georgia, serif;
    color: var(--primary);
    opacity: 0.07;
    pointer-events: none;
    font-weight: 900;
}
.review-card:hover { transform: translateY(-5px); box-shadow: 0 22px 55px rgba(0,0,0,0.1); border-color: rgba(37,99,235,0.2); }
.review-stars { color: #f59e0b; font-size: 1rem; margin-bottom: 1rem; letter-spacing: 0.1em; }
.review-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.85; margin-bottom: 1.25rem; font-style: italic; }
.review-author { display: flex; align-items: center; gap: 0.75rem; }
.review-author .avatar { background: var(--pub-gradient); color: #fff; width: 44px; height: 44px; font-size: 0.9rem; }
.review-author strong { font-size: 0.9rem; font-weight: 700; }

/* ── CTA Section ──────────────────────────────────── */
.cta-section {
    padding: 5rem 0;
    background: var(--pub-gradient);
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}
.cta-section::after {
    content: '';
    position: absolute;
    bottom: -90px; left: -90px;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(8,145,178,0.22) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}
.cta-section > .container { position: relative; z-index: 1; }
.cta-section h2 { font-size: 2.2rem; color: #fff; margin-bottom: 0.75rem; font-weight: 800; }
.cta-section p { color: rgba(255,255,255,0.88); font-size: 1.05rem; margin-bottom: 2.5rem; line-height: 1.7; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-cta-primary { background: #fff !important; color: #1e3a8a !important; font-weight: 700; box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important; }
.btn-cta-primary:hover { background: #eef4ff !important; transform: translateY(-2px); text-decoration: none !important; }
.btn-cta-outline { background: transparent !important; color: #fff !important; border: 2px solid rgba(255,255,255,0.65) !important; }
.btn-cta-outline:hover { background: rgba(255,255,255,0.15) !important; transform: translateY(-2px); text-decoration: none !important; }

/* ── Page Hero (inner pages) ──────────────────────── */
.page-hero {
    background: var(--pub-gradient);
    padding: 3.5rem 0 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 56px;
    background: var(--bg);
    clip-path: ellipse(56% 100% at 50% 100%);
    pointer-events: none;
}
.page-hero h1 { color: #fff; font-size: 2.3rem; font-weight: 800; margin-bottom: 0.5rem; }
.page-hero p { color: rgba(255,255,255,0.88); font-size: 1rem; margin-bottom: 0; }
.page-hero .breadcrumb { color: rgba(255,255,255,0.7); font-size: 0.82rem; margin-bottom: 0.85rem; }
.page-hero .breadcrumb a { color: rgba(255,255,255,0.88); text-decoration: none; }
.page-hero .breadcrumb a:hover { color: #fff; }
@media (max-width: 480px) { .page-hero h1 { font-size: 1.8rem; } .page-hero { padding: 2.5rem 0 2.5rem; } }

/* ── About ────────────────────────────────────────── */
.about-story { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
@media (max-width: 768px) { .about-story { grid-template-columns: 1fr; gap: 2rem; } }
.about-visual { border-radius: var(--radius-xl); overflow: hidden; box-shadow: 0 28px 70px rgba(0,0,0,0.14); }
.values-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.75rem; margin-top: 1.75rem; }
@media (max-width: 480px) { .values-grid { grid-template-columns: 1fr; } }
.value-item {
    display: flex; align-items: flex-start; gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.25s ease;
}
.value-item:hover { border-color: var(--primary); background: var(--primary-light); }
.value-item i { color: var(--primary); font-size: 1.05rem; margin-top: 0.1rem; flex-shrink: 0; }
.value-item h4 { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.2rem; }
.value-item p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; }

/* Stats bar */
.stats-bar {
    display: grid; grid-template-columns: repeat(4,1fr);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--pub-gradient);
    padding: 3px;
    margin: 2.5rem 0;
    box-shadow: 0 10px 40px rgba(37,99,235,0.22);
}
@media (max-width: 640px) { .stats-bar { grid-template-columns: repeat(2,1fr); } }
.stat-bar-item {
    background: var(--card-bg);
    padding: 1.75rem 1rem;
    text-align: center;
    border-radius: calc(var(--radius-xl) - 3px);
}
.stat-bar-num {
    font-size: 2.1rem; font-weight: 800; line-height: 1;
    background: var(--pub-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-bar-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.4rem; }

/* ── Contact Info ─────────────────────────────────── */
.contact-info-item {
    display: flex; align-items: flex-start; gap: 1.1rem;
    padding: 1.1rem 0; border-bottom: 1px solid var(--border);
}
.contact-info-item:last-child { border-bottom: none; }
.contact-icon {
    width: 48px; height: 48px;
    background: var(--pub-gradient);
    color: #fff;
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(37,99,235,0.22);
}
.contact-info-item h4 { font-size: 0.76rem; color: var(--text-secondary); margin-bottom: 0.25rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.contact-info-item p { font-size: 0.98rem; font-weight: 600; margin: 0; }

/* ── Social Buttons ───────────────────────────────── */
.social-links { display: flex; gap: 0.6rem; margin-top: 1.5rem; flex-wrap: wrap; }
.social-btn {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #fff; text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.social-btn:hover { transform: translateY(-3px) scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,0.25); text-decoration: none !important; }
.social-btn-ig { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-btn-wa { background: linear-gradient(135deg,#25d366,#128c7e); }
.social-btn-fb { background: linear-gradient(135deg,#1877f2,#0c5dc8); }

/* ── WhatsApp Floating Button ─────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 1.75rem;
    left: 1.75rem;
    width: 56px; height: 56px;
    background: linear-gradient(135deg,#25d366,#128c7e);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.65rem; color: #fff;
    text-decoration: none !important;
    box-shadow: 0 4px 22px rgba(37,211,102,0.55);
    z-index: 998;
    animation: wa-float 3.5s ease-in-out infinite;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.whatsapp-float:hover { animation: none; transform: scale(1.12); box-shadow: 0 8px 32px rgba(37,211,102,0.65); }
@keyframes wa-float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

/* ── Footer ───────────────────────────────────────── */
.footer-main {
    background: linear-gradient(160deg, #0a1628 0%, #0f172a 40%, #1a2744 100%);
    color: #94a3b8;
    padding: 4rem 0 2rem;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}
.footer-main::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--pub-gradient);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.footer-col h4 { color: #e2e8f0; font-size: 0.95rem; font-weight: 700; margin-bottom: 1.25rem; }
.footer-col p, .footer-col .footer-desc { font-size: 0.87rem; line-height: 1.8; color: #64748b; }
.footer-col a {
    display: flex; align-items: center; gap: 0.4rem;
    color: #64748b; padding: 0.28rem 0; font-size: 0.87rem;
    text-decoration: none; transition: color 0.2s ease, transform 0.2s ease;
}
.footer-col a:hover { color: #e2e8f0; transform: translateX(-3px); text-decoration: none; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.82rem;
    color: #475569;
}

/* ── Hours table ──────────────────────────────────── */
.hours-table { width: 100%; }
.hours-table td { padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.hours-table tr:last-child td { border-bottom: none; }
.hours-table .day { font-weight: 600; width: 55%; }
.hours-table .closed { color: var(--danger); font-weight: 600; }
.hours-table .open { color: var(--success); font-weight: 600; }

/* ── Date-select row ──────────────────────────────── */
.date-select-row { display: flex; gap: 0.5rem; }
.date-select-row select { flex: 1; min-width: 0; }

/* ── Fade-in on scroll ────────────────────────────── */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
    .section { padding: 3rem 0; }
    .cta-section { padding: 3rem 0; }
}
