/* ============================================
   نظام مركز الكفرة الإيوائي للعلاج الطبيعي
   Kufra Physical Rehabilitation Center System
   ============================================ */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;

    --secondary-color: #22c55e;
    --secondary-dark: #16a34a;

    --accent-color: #d4af37;
    --accent-light: #f7d774;
    --accent-dark: #b8860b;

    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --success-color: #22c55e;

    --bg-light: #f4f7fb;
    --bg-soft: #eef4ff;
    --bg-white: #ffffff;

    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --text-light: rgba(255,255,255,0.92);

    --border-color: #e5e7eb;
    --border-light: rgba(255,255,255,0.18);

    --sidebar-width: 290px;
    --sidebar-collapsed: 88px;
    --header-height: 86px;

    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.14);

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;

    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 45%, #f4f7fb 100%);
    color: var(--text-dark);
    direction: rtl;
    line-height: 1.6;
    min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #edf3fb;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--primary-dark));
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark), #123ea4);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #12306b 0%, #1e3a8a 45%, #17357b 100%);
    color: #fff;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.12);
    border-left: 1px solid rgba(255,255,255,0.08);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 1.2rem 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 28px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 10px 25px rgba(0,0,0,0.12);
}

/* الشعار داخل مستطيل ذهبي بحواف منحنية */
.logo-box {
    position: relative !important;
    width: 96px !important;
    height: 82px !important;
    border-radius: 24px !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.07)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    padding: 10px !important;
    backdrop-filter: blur(8px) !important;
    border: 2px solid #d4af37 !important;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.12),
        0 0 0 3px rgba(247, 215, 116, 0.10),
        inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

.logo-box::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 24px !important;
    box-shadow: inset 0 0 0 1px rgba(248, 231, 161, 0.95) !important;
    pointer-events: none !important;
}

.logo-box::after {
    content: "" !important;
    position: absolute !important;
    inset: 6px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    pointer-events: none !important;
}

.logo-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
    filter: drop-shadow(0 4px 10px rgba(212, 175, 55, 0.22)) !important;
}

.logo-text-wrap {
    min-width: 0;
}

.logo-text {
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 0.2rem;
}

.logo-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 0.76rem;
    font-weight: 500;
}

.sidebar.collapsed .logo-text-wrap,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .logo-subtitle {
    display: none;
}

.sidebar.collapsed .logo-container {
    justify-content: center;
    padding: 0.6rem;
}

.sidebar.collapsed .logo-box {
    width: 58px !important;
    height: 58px !important;
    border-radius: 16px !important;
}

.nav-menu-box {
    position: relative;
    margin: 1rem;
    padding: 0.8rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    overflow: hidden;
}

.nav-menu-box::before {
    content: none !important;
    display: none !important;
}

.nav-menu {
    padding: 0 0 0 1rem;
    list-style: none;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.45rem;
}

.nav-item:last-child {
    margin-bottom: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    border-radius: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-weight: 700;
}

.nav-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

.nav-link:hover {
    transform: translateX(-4px);
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(247, 215, 116, 0.22), rgba(255,255,255,0.08));
    box-shadow: inset 0 0 0 1px rgba(247, 215, 116, 0.25);
}

.nav-link i {
    font-size: 1rem;
    min-width: 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.nav-link.active i {
    color: var(--accent-light);
}

.nav-text {
    font-size: 14px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed + .main-content {
    margin-right: var(--sidebar-collapsed);
}

/* Header */
.header {
    min-height: var(--header-height);
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,251,255,0.95));
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    margin: 1rem 1rem 0;
    padding: 0.95rem 1.25rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.toggle-sidebar,
.mobile-toggle,
.header-icon {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff, #f3f7ff);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f3c88;
    transition: var(--transition);
    cursor: pointer;
}

.toggle-sidebar:hover,
.mobile-toggle:hover,
.header-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
}

.page-title-box {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.2rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 30%, #3b82f6 65%, #60a5fa 100%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
    position: relative;
    overflow: hidden;
}

.page-title-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.03));
}

.page-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff3c4;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.page-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.header-icon {
    position: relative;
}

.header-icon .badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid #fff;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.45rem 0.75rem;
    border-radius: 18px;
    transition: var(--transition);
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.user-menu:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-color));
    color: #5f4600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.22);
}

.user-info {
    text-align: right;
}

.user-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 600;
}

.dropdown-menu {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
    padding: 0.6rem;
}

.dropdown-item {
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    font-weight: 700;
}

.dropdown-item:hover {
    background: #f8fafc;
}

/* Content Area */
.content {
    flex: 1;
    padding: 1rem;
}

/* Cards */
.card {
    background: rgba(255,255,255,0.96);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    border: none;
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.card-body {
    padding: 22px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 1.15rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 12px 28px rgba(0,0,0,0.10);
    transition: var(--transition);
    min-height: 105px;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.02));
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px rgba(0,0,0,0.16);
}

.stat-card.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb, #1d4ed8);
}

.stat-card.warning {
    background: linear-gradient(135deg, #f59e0b, #f97316, #ea580c);
}

.stat-card.success {
    background: linear-gradient(135deg, #22c55e, #16a34a, #15803d);
}

.stat-card.info {
    background: linear-gradient(135deg, #06b6d4, #0891b2, #0e7490);
}

.stat-card.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626, #b91c1c);
}

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
    position: relative;
    z-index: 1;
    color: #fff;
}

.stat-details {
    position: relative;
    z-index: 1;
}

.stat-details h3 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1;
}

.stat-details p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.92);
    margin: 0.45rem 0 0;
    font-weight: 500;
}

/* Tables */
.table-container {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table {
    width: 100%;
    margin-bottom: 0;
}

.table th {
    background: #f8fafc;
    font-weight: 700;
    color: #374151;
    border-bottom: 1px solid var(--border-color);
    padding: 15px;
    white-space: nowrap;
}

.table td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #edf2f7;
}

.table tbody tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

/* Buttons */
.btn {
    padding: 10px 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2c6fff, #1b46ba);
    transform: translateY(-2px);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), var(--secondary-dark));
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #ea580c);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #0891b2);
    color: white;
}

.btn-outline-primary {
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-success {
    border: 1.5px solid var(--success-color);
    color: var(--success-color);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--success-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    transition: var(--transition);
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.form-control::placeholder {
    color: #adb5bd;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge.bg-warning { background: rgba(255, 152, 0, 0.12) !important; color: #c96a00 !important; }
.badge.bg-success { background: rgba(67, 160, 71, 0.12) !important; color: #2e7d32 !important; }
.badge.bg-danger { background: rgba(239, 68, 68, 0.12) !important; color: #c62828 !important; }
.badge.bg-info { background: rgba(6, 182, 212, 0.12) !important; color: #0b7f92 !important; }
.badge.bg-light.text-dark { background: #eef2ff !important; color: #3730a3 !important; }

/* Alerts */
.alert {
    padding: 15px 18px;
    border-radius: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
}

.alert-success {
    background: rgba(67, 160, 71, 0.10);
    border-right: 4px solid var(--success-color);
    color: #2e7d32;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.10);
    border-right: 4px solid var(--danger-color);
    color: #c62828;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.10);
    border-right: 4px solid var(--warning-color);
    color: #ef6c00;
}

.alert-info {
    background: rgba(6, 182, 212, 0.10);
    border-right: 4px solid var(--info-color);
    color: #0b7f92;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 25px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 20px 25px;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #12306b 0%, #1e3a8a 45%, #2563eb 100%);
    padding: 20px;
}

.login-container {
    background: var(--bg-white);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #f8fbff, #eef4ff);
    padding: 40px;
    text-align: center;
}

.login-header img {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    object-fit: contain;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-body {
    padding: 40px;
}

.login-footer {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 13px;
}

/* Print Styles */
@media print {
    .sidebar,
    .header,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .logo-container {
        padding: 0.75rem;
        border-radius: 20px;
    }

    .logo-box {
        width: 70px !important;
        height: 62px !important;
        border-radius: 18px !important;
    }

    .nav-menu-box::before {
        left: 8px;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 15px;
    }

    .card-body {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header {
        margin: 0.8rem 0.8rem 0;
        padding: 0.85rem 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .header-left,
    .header-right {
        justify-content: space-between;
    }

    .page-title {
        font-size: 1rem;
    }

    .page-title-box {
        padding: 0.7rem 1rem;
        border-radius: 16px;
    }

    .user-menu {
        width: 100%;
        justify-content: space-between;
    }

    .logo-text {
        font-size: 0.92rem;
    }

    .logo-subtitle {
        font-size: 0.72rem;
    }
}

/* Utilities */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-light { background-color: var(--bg-light) !important; }

/* Patient Card */
.patient-card {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 55%, #0f2c68 100%);
    color: white;
    padding: 25px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.patient-card h4 {
    margin: 0 0 10px;
    font-size: 20px;
}

.patient-card .patient-id {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.patient-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.patient-info-item {
    background: rgba(255,255,255,0.12);
    padding: 10px 15px;
    border-radius: 14px;
}

.patient-info-item label {
    font-size: 12px;
    opacity: 0.8;
    display: block;
}

.patient-info-item span {
    font-weight: 600;
    font-size: 14px;
}

/* QR Code Container */
.qr-container {
    text-align: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.qr-container img {
    max-width: 200px;
    margin-bottom: 15px;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-pending { background: rgba(255, 152, 0, 0.1); color: #ef6c00; }
.status-pending::before { background: #ef6c00; }

.status-progress { background: rgba(6, 182, 212, 0.1); color: #0b7f92; }
.status-progress::before { background: #0b7f92; }

.status-completed { background: rgba(67, 160, 71, 0.1); color: #2e7d32; }
.status-completed::before { background: #2e7d32; }

.status-cancelled { background: rgba(239, 68, 68, 0.1); color: #c62828; }
.status-cancelled::before { background: #c62828; }

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    gap: 5px;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    border-bottom: 3px solid var(--primary-color);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-right: 40px;
    margin-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: 8px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.timeline-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.timeline-content {
    background: #f8fbff;
    padding: 15px;
    border-radius: 14px;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    padding-right: 45px;
    border-radius: 25px;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
}
