/* ================================================================= */
/* CSS DESIGN SYSTEM & TOKENS */
/* ================================================================= */

:root {
    /* Color Schemes (Default: Physiotherapy Blue-Teal) */
    --primary-hue: 200;
    --primary: hsl(var(--primary-hue), 85%, 45%);
    --primary-hover: hsl(var(--primary-hue), 85%, 35%);
    --primary-soft: hsl(var(--primary-hue), 85%, 95%);
    --primary-glow: hsla(var(--primary-hue), 85%, 45%, 0.15);
    
    /* Semantic Colors */
    --success: #10b981;
    --success-soft: #ecfdf5;
    --danger: #ef4444;
    --danger-soft: #fef2f2;
    --warning: #f59e0b;
    --warning-soft: #fef3c7;
    --orange: #f97316;
    --purple: #8b5cf6;
    
    /* Neutral Palette */
    --bg-app: #f4f6fa;
    --bg-card: rgba(255, 255, 255, 0.75);
    --border-color: rgba(226, 232, 240, 0.8);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Typography */
    --font-arabic: 'Cairo', sans-serif;
    --font-numbers: 'Outfit', 'Cairo', sans-serif;
    
    /* Shadows & Border Radius */
    --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 16px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme Accents (White-Labeling Simulation) */
body.theme-blue {
    --primary-hue: 200;
}
body.theme-green {
    --primary-hue: 142; /* Nutrition Green */
}
body.theme-purple {
    --primary-hue: 262; /* Medical Purple */
}
body.theme-orange {
    --primary-hue: 24; /* Active Orange */
}

/* ================================================================= */
/* GLOBAL STYLES & RESET */
/* ================================================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-arabic);
    background: radial-gradient(circle at 10% 20%, rgb(239, 246, 255) 0%, rgb(244, 246, 250) 90%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

input, select, textarea {
    font-family: var(--font-arabic);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ================================================================= */
/* UTILITIES & REUSABLE CLASSES */
/* ================================================================= */

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.hidden {
    display: none !important;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 30px;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--primary-soft, rgba(99,102,241,0.15)); color: var(--primary, #6366f1); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-dot { width: 8px; height: 8px; padding: 0; border-radius: 50%; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-app);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary-soft);
}
.btn-block {
    width: 100%;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
}
.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #059669;
}
.btn-icon-only {
    padding: 10px;
    border-radius: 50%;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-main);
    box-shadow: var(--shadow-lg);
    border-right: 5px solid var(--primary);
    z-index: 9999;
    transform: translateX(-120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show {
    transform: translateX(0);
}
.toast-icon {
    color: var(--primary);
}

/* ================================================================= */
/* 1. LOGIN SCREEN STYLING */
/* ================================================================= */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at 50% 50%, rgb(240, 249, 255) 0%, rgb(224, 242, 254) 100%);
}

.login-card {
    width: 100%;
    max-width: 480px;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: slideUp 0.6s ease-out;
}

.login-brand {
    margin-bottom: 30px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: 0 8px 24px var(--primary-glow);
}

.brand-logo i {
    width: 32px;
    height: 32px;
}

.login-brand h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.login-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tenant selection style */
.tenant-badge-selector {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}
.tenant-badge-selector label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.tenant-badge-selector .input-wrapper {
    margin: 0;
}
.tenant-badge-selector select {
    border: none;
    background: transparent;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

/* Inputs & Form Groups */
.form-group {
    margin-bottom: 20px;
    text-align: right;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    right: 14px;
    color: var(--text-light);
    width: 20px;
    height: 20px;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 46px 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: white;
}

/* Custom Checkbox */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 25px;
    cursor: pointer;
    user-select: none;
    color: var(--text-muted);
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.checkbox-container:hover input ~ .checkmark {
    background-color: var(--bg-app);
}
.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-pass {
    font-weight: 600;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--color-primary, #3b82f6);
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
    text-decoration: underline;
}
.forgot-pass:hover {
    color: var(--color-primary-dark, #2563eb);
}

.login-footer {
    margin-top: 30px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ================================================================= */
/* 2. MAIN APP CONTAINERS */
/* ================================================================= */

.app-container {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

/* SIDEBAR STYLING */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 30px 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo i {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.sidebar-logo {
    flex: 1;
    min-width: 0;
}
.sidebar-logo h2 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar-menu {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.menu-item i {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.menu-item:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.menu-item.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 8px 16px var(--primary-glow);
}

.menu-item.active i {
    color: white;
}

.sidebar-footer {
    padding: 24px 16px;
    border-top: 1px solid var(--border-color);
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.profile-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
}

.profile-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: white;
    color: var(--danger);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.btn-logout:hover {
    background: var(--danger-soft);
}

/* MAIN WRAPPER (HEADER + CONTENT) */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

/* HEADER STYLING */
.main-header {
    height: 80px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-search {
    position: relative;
    width: 320px;
}

.header-search i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 18px;
    height: 18px;
}

.header-search input {
    width: 100%;
    padding: 10px 42px 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.6);
    outline: none;
    transition: var(--transition);
}
.header-search input:focus {
    border-color: var(--primary);
    background: white;
}

/* Quick Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    width: 100%;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
}

.search-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}
.search-item:last-child {
    border-bottom: none;
}
.search-item:hover {
    background: var(--primary-soft);
}
.search-item .pt-name {
    font-weight: 700;
    font-size: 0.9rem;
}
.search-item .pt-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-quick-select {
    display: flex;
    gap: 8px;
    background: rgba(255,255,255,0.8);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.theme-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.theme-btn:hover {
    transform: scale(1.2);
}
.theme-btn.active {
    box-shadow: 0 0 0 2px var(--primary);
}
.theme-blue { background: #0284c7; }
.theme-green { background: #10b981; }
.theme-purple { background: #8b5cf6; }

.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.notification-bell:hover {
    background: var(--bg-app);
}
.notification-bell i {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 380px;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}
.notifications-dropdown .dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.notifications-dropdown .dropdown-header h3 {
    font-size: 0.95rem;
}
.notifications-dropdown .dropdown-header button {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-arabic);
}
.notifications-dropdown .dropdown-header button:hover {
    text-decoration: underline;
}
.notifications-list {
    padding: 8px;
}
.notifications-list .search-item {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    cursor: default;
}
.notifications-list .search-item:hover {
    background: var(--bg-app);
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
}

.current-date {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    direction: ltr; /* English formatting for numbers if Outfit applied */
}

/* ================================================================= */
/* 2.1 DASHBOARD VIEW */
/* ================================================================= */

.content-body {
    padding: 32px;
    flex-grow: 1;
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.view-header h1 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.view-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.metric-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
}
.metric-icon i {
    width: 28px;
    height: 28px;
}

.bg-soft-blue { background: #e0f2fe; color: #0284c7; }
.bg-soft-green { background: #d1fae5; color: #10b981; }
.bg-soft-purple { background: #f3e8ff; color: #8b5cf6; }
.bg-soft-orange { background: #ffedd5; color: #f97316; }

.metric-data {
    display: flex;
    flex-direction: column;
}
.metric-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}
.metric-value {
    font-size: 1.6rem;
    font-family: var(--font-numbers);
    margin: 4px 0;
}
.metric-trend {
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.metric-trend.success { color: var(--success); }
.metric-trend.warning { color: var(--warning); }
.metric-trend i { width: 12px; height: 12px; }

.metric-sub {
    display: block;
    font-size: 0.8rem;
    margin-top: 4px;
    color: var(--text-light);
}

/* Dashboard Grid split */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-size: 1.1rem;
}

.card-action-link {
    font-size: 0.85rem;
    font-weight: 700;
}

.card-body {
    padding: 24px;
}

.chart-container-wrapper {
    position: relative;
    height: 280px;
    width: 100%;
}

/* Simplified appointments list on Dashboard */
.appointments-list-simplified {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.apt-simple-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-app);
    border-right: 4px solid var(--primary);
    transition: var(--transition);
}
.apt-simple-item:hover {
    transform: scale(1.02);
}

.apt-time-badge {
    font-family: var(--font-numbers);
    font-weight: 700;
    background: white;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.apt-details {
    display: flex;
    flex-direction: column;
    margin-right: 12px;
    flex-grow: 1;
}
.apt-details h4 {
    font-size: 0.9rem;
}
.apt-details span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ================================================================= */
/* 2.2 PATIENTS VIEW STYLING */
/* ================================================================= */

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.search-input-box {
    position: relative;
    width: 350px;
}
.search-input-box .search-icon-fixed {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-input-box input {
    width: 100%;
    padding: 10px 42px 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    outline: none;
}

.filter-actions select {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: white;
    outline: none;
    font-weight: 600;
}

/* Split Layout */
.patients-split-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
    align-items: start;
}

.patients-list-panel {
    max-height: 700px;
    overflow-y: auto;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}
.table th {
    padding: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}
.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}
.table tbody tr {
    cursor: pointer;
    transition: var(--transition);
}
.table tbody tr:hover {
    background: rgba(var(--primary-hue), 85%, 98%);
}
.table tbody tr.active-row {
    background: var(--primary-soft);
    border-right: 3px solid var(--primary);
}

.pt-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pt-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Detailed Patient File Panel */
.patient-details-panel {
    min-height: 600px;
}

.details-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 550px;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
.details-placeholder i {
    width: 64px;
    height: 64px;
    color: var(--text-light);
    margin-bottom: 20px;
}
.details-placeholder h3 {
    margin-bottom: 10px;
}

.details-content {
    animation: fadeIn 0.4s ease;
}

.patient-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}
.patient-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.patient-meta-info h2 {
    font-size: 1.3rem;
}
.patient-meta-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.patient-actions {
    margin-right: auto;
    display: flex;
    gap: 10px;
}

/* Tabs */
.patient-tabs {
    display: flex;
    border-bottom: 1.5px solid var(--border-color);
    background: rgba(255,255,255,0.4);
}
.tab-link {
    padding: 16px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}
.tab-link:hover {
    color: var(--primary);
}
.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.patient-tab-content {
    padding: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
.info-box {
    background: rgba(255, 255, 255, 0.5);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.info-box .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.info-box p {
    font-weight: 700;
}
.highlight-text {
    color: var(--primary);
}

.notes-section textarea {
    width: 100%;
    height: 120px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    outline: none;
    resize: none;
    font-size: 0.9rem;
    margin-top: 10px;
}
.notes-section textarea:focus {
    border-color: var(--primary);
}

/* PHYSIOTHERAPY MODULE STYLING */
.physio-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.body-chart-wrapper {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.svg-body-map {
    width: 100%;
    max-height: 280px;
}

.pain-zone {
    fill: #cbd5e1;
    cursor: pointer;
    transition: var(--transition);
    stroke: white;
    stroke-width: 1px;
}
.pain-zone:hover {
    fill: #94a3b8;
}
.pain-zone.pain-active {
    fill: #ef4444 !important;
    animation: pulseGlow 1.5s infinite;
}

.body-label {
    font-size: 10px;
    font-weight: 800;
    fill: var(--text-muted);
}

.treatment-plan-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.visit-history-widget {
    margin-top: 24px;
}

.visit-history-widget .visits-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 320px;
    overflow-y: auto;
    padding-left: 8px;
}

.visit-history-widget .visit-progress-summary {
    margin-bottom: 12px;
}

.timeline-item {
    position: relative;
    padding-right: 24px;
    border-right: 2px solid var(--border-color);
}
.timeline-item::before {
    content: '';
    position: absolute;
    right: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
}
.timeline-date {
    font-family: var(--font-numbers);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}
.timeline-item h5 {
    font-size: 0.85rem;
    margin: 2px 0;
}
.timeline-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* NUTRITION MODULE STYLING */
.nutrition-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.inbody-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 16px;
}
.inbody-stat {
    background: var(--bg-app);
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
}
.inbody-stat .inbody-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.inbody-stat h3 {
    font-size: 1.1rem;
    font-family: var(--font-numbers);
    margin-top: 4px;
}

.inbody-chart-wrapper {
    margin-top: 20px;
    height: 240px;
    position: relative;
}

.diet-target-macros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.macro-badge {
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
}
.macro-badge.protein { background: #eff6ff; color: #2563eb; }
.macro-badge.carb { background: #fef2f2; color: #dc2626; }
.macro-badge.fat { background: #fef3c7; color: #d97706; }
.macro-badge.calories { background: #f0fdf4; color: #16a34a; }

.meals-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.meal-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.meal-row .meal-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}
.meal-row input {
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    outline: none;
    font-size: 0.85rem;
}
.meal-row input:focus {
    border-color: var(--primary);
}

/* ================================================================= */
/* 2.3 APPOINTMENTS & CALENDAR STYLING */
/* ================================================================= */

.calendar-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.waiting-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.waiting-item {
    background: var(--bg-app);
    padding: 12px;
    border-radius: var(--radius-md);
    border-right: 3px solid var(--warning);
}
.waiting-item h4 {
    font-size: 0.85rem;
}
.waiting-item p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.calendar-header-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.calendar-nav-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calendar-view-type {
    display: flex;
    gap: 6px;
}
.calendar-view-type .btn-outline.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Calendar Grid */
.calendar-grid-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.calendar-grid-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.day-col, .time-col {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}
.day-num {
    display: block;
    font-family: var(--font-numbers);
    font-size: 1.1rem;
    margin-top: 4px;
}

.calendar-grid-body {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    grid-auto-rows: 36px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}
.calendar-grid-body.month-view {
    grid-auto-rows: minmax(80px, auto);
}
.calendar-grid-header.day-view,
.calendar-grid-body.day-view {
    grid-template-columns: 80px 1fr;
}

.calendar-time-label {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-numbers);
    font-size: 0.8rem;
    color: var(--text-light);
    border-left: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.calendar-cell {
    border-left: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

/* Week view: side-by-side appointments in same time slot */
.calendar-grid-body:not(.month-view) .calendar-cell {
    display: flex;
    flex-direction: row;
    gap: 2px;
    padding: 2px;
}

.calendar-grid-body:not(.month-view) .calendar-apt-block {
    position: static;
    inset: unset;
    flex: 1 1 0%;
    min-width: 0;
    padding: 2px 4px;
    font-size: 0.6rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.calendar-grid-body:not(.month-view) .calendar-apt-block h4 {
    font-size: 0.6rem;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

.calendar-grid-body:not(.month-view) .calendar-apt-block span {
    font-size: 0.5rem;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}
.calendar-month-cell {
    min-height: 70px;
    padding: 4px;
    position: relative;
    cursor: default;
}
.day-num-month {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: var(--font-numbers);
    display: inline-block;
    margin-bottom: 2px;
}
.day-num-month.today {
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.month-cell-apts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.month-apt-dot {
    font-size: 0.65rem;
    padding: 2px 4px;
    border-radius: 4px;
    background: var(--primary-soft, rgba(99,102,241,0.12));
    color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.month-apt-dot:hover {
    background: var(--primary);
    color: #fff;
}

/* Appointment block placement in calendar */
.calendar-apt-block {
    position: absolute;
    inset: 4px;
    border-radius: var(--radius-sm);
    padding: 6px;
    font-size: 0.75rem;
    color: white;
    cursor: pointer;
    overflow: hidden;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.calendar-apt-block:hover {
    transform: scale(1.05);
    z-index: 20;
}
.calendar-apt-block h4 {
    color: white;
    font-size: 0.75rem;
    margin-bottom: 2px;
}
.calendar-apt-block span {
    font-size: 0.65rem;
    opacity: 0.85;
}

.apt-bg-blue { background: #3b82f6; }
.apt-bg-green { background: #10b981; }
.apt-bg-purple { background: #8b5cf6; }

/* ================================================================= */
/* 2.4 BILLING VIEW STYLING */
/* ================================================================= */

.billing-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.bill-summary-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.bill-summary-card .card-title {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.bill-summary-card h2 {
    font-size: 1.8rem;
    font-family: var(--font-numbers);
    margin: 8px 0;
}
.bill-summary-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.billing-split-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

.packages-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.package-item-card {
    background: var(--bg-app);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-right: 4px solid var(--primary);
}
.package-item-card h4 {
    font-size: 0.9rem;
}
.package-item-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.package-price {
    text-align: left;
}
.package-price h3 {
    font-family: var(--font-numbers);
    font-size: 1.1rem;
    color: var(--primary);
}
.package-price span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ================================================================= */
/* 2.5 SETTINGS & MULTI-TENANT White-Labeling */
/* ================================================================= */

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.settings-card {
    height: 100%;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.price-row:last-child {
    border-bottom: none;
}
.price-row label {
    font-size: 0.9rem;
    font-weight: 500;
}
.price-input {
    width: 120px !important;
    text-align: center;
    font-family: var(--font-numbers);
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}
.settings-section-header i {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.theme-picker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 12px;
    margin-bottom: 20px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
}
.theme-option:hover {
    background: var(--bg-app);
}
.theme-option.active {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.theme-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}
.theme-blue-large .theme-dot { background: #0284c7; }
.theme-green-large .theme-dot { background: #10b981; }
.theme-purple-large .theme-dot { background: #8b5cf6; }
.theme-orange-large .theme-dot { background: #f97316; }

.subscription-status-box {
    background: var(--bg-app);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.subscription-status-box .status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.limits-progress-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.limit-progress-row span {
    font-size: 0.85rem;
    font-weight: 700;
}
.progress-bar-container {
    height: 8px;
    width: 100%;
    background: #e2e8f0;
    border-radius: 10px;
    margin-top: 6px;
}
.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.8s ease-in-out;
}

.saas-demo-info {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 16px;
    border-radius: var(--radius-md);
    color: #b45309;
}
.saas-demo-info h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b45309;
    font-size: 0.9rem;
    margin-bottom: 6px;
}
.saas-demo-info p {
    font-size: 0.8rem;
}

/* ================================================================= */
/* 4. MODALS STYLING */
/* ================================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-card {
    width: 100%;
    max-width: 640px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

@media (max-width: 768px) {
    .modal-card {
        max-width: 100%;
        margin: 10px;
        max-height: 90vh;
    }
    .modal-body {
        padding: 16px;
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }
    .modal-header {
        padding: 14px 16px;
        flex-shrink: 0;
    }
    .modal-header h2 {
        font-size: 1rem;
    }
    .modal-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
        flex-shrink: 0;
    }
    .modal-footer .btn {
        flex: 1;
        min-width: 120px;
    }
    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .form-group textarea.form-control {
        font-size: 0.85rem;
    }
    .form-group {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .modal-card {
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 92vh;
    }
    .modal-body {
        padding: 12px;
    }
    .modal-header {
        padding: 12px 12px;
    }
    .modal-footer {
        padding: 10px 12px;
    }
    .modal-footer .btn {
        font-size: 0.82rem;
        padding: 8px 12px;
    }
    .form-group label {
        font-size: 0.82rem;
    }
    .form-group input.form-control:not([type=range]),
    .form-group select.form-control {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
    .form-row-2,
    .form-row-3 {
        gap: 8px;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h2 {
    font-size: 1.15rem;
}
.btn-close-modal {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
}
.btn-close-modal:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    outline: none;
    box-sizing: border-box;
    min-width: 0;
}

input[type=range].form-control {
    padding: 0;
    height: 6px;
    appearance: auto;
    -webkit-appearance: auto;
    background: transparent;
    border: none;
    cursor: pointer;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: white;
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ================================================================= */
/* KEYFRAMES & ANIMATIONS */
/* ================================================================= */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.pulse-icon {
    animation: pulseIcon 2s infinite;
}
@keyframes pulseIcon {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Mobile Hamburger & Header Panel */
.mobile-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 8px;
    border-radius: var(--radius-sm);
}
.mobile-hamburger:hover {
    background: rgba(0,0,0,0.05);
}
.mobile-hamburger i {
    width: 24px;
    height: 24px;
}
#mobile-header-panel {
    padding: 0 16px 16px;
    border-bottom: 1px solid var(--border-color);
}
#mobile-header-panel .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}
#mobile-header-panel .notification-bell {
    position: relative;
    cursor: pointer;
}
#mobile-header-panel .badge-success {
    font-size: 0.7rem;
    padding: 2px 8px;
    margin-right: auto;
    white-space: nowrap;
}
#mobile-header-panel .mobile-doctor-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-bottom: 12px;
}
#mobile-header-panel .mobile-doctor-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
#mobile-header-panel .mobile-doctor-info .profile-info h4 {
    font-size: 0.9rem;
    margin: 0;
}
#mobile-header-panel .mobile-doctor-info .profile-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
}
#mobile-header-panel .btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
#mobile-header-panel .btn-logout:hover {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
    border-color: var(--danger);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .mobile-hamburger {
        display: flex;
        align-items: center;
    }
    .sidebar-footer {
        display: none;
    }
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
    }
    .main-header {
        display: none;
    }
    .main-wrapper {
        height: auto;
    }
    .patients-split-layout {
        grid-template-columns: 1fr;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .calendar-layout-grid {
        grid-template-columns: 1fr;
    }
    .billing-split-layout {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .view-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .view-header .header-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    .view-header .header-actions .btn {
        flex: 1;
        min-width: 0;
        font-size: 0.82rem;
        padding: 8px 12px;
        white-space: nowrap;
    }
    .view-header .header-actions select {
        width: auto;
        min-width: 80px !important;
        flex: 1;
        max-width: 120px;
    }
}
