/* ============================================
   ركن الحطيم للحج - تصميم احترافي
   IBM Plex Sans Arabic
   ============================================ */

/* Font loaded inline in HTML with display=swap for speed */

:root {
    --primary: #1b7a3d;
    --primary-light: #239b4e;
    --primary-dark: #145c2e;
    --primary-bg: #f0f7f2;
    --secondary: #d4af37;
    --secondary-light: #e6c85a;
    --bg: #f4f6f8;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #059669;
    --success-bg: #ecfdf5;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --info: #2563eb;
    --info-bg: #eff6ff;
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 40px -10px rgba(0,0,0,0.12);
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.7;
    min-height: 100vh;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--primary-light); }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; }

/* ============================================
   Strip Bar (Public)
   ============================================ */
.strip-bar {
    background: var(--primary-dark);
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.strip-logo {
    height: 38px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.strip-center {
    flex: 1;
    text-align: center;
    overflow: hidden;
    padding: 0 0.5rem;
}

.strip-title {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

@media (max-width: 400px) {
    .strip-title { font-size: 0.75rem; }
    .strip-login { font-size: 0.7rem; padding: 0.25rem 0.4rem; }
    .strip-logo { height: 30px; }
}

.strip-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strip-login {
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    transition: var(--transition);
}

.strip-login:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.strip-menu {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.strip-menu:hover { opacity: 0.8; }

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--bg);
}

.hero-slider.compact { height: 220px; max-height: 220px; min-height: 180px; }

.hero-slider .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slider .slide.active { opacity: 1; }

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.2);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.slider-arrow:hover { background: rgba(0,0,0,0.4); }
.arrow-right { right: 0.75rem; }
.arrow-left { left: 0.75rem; }

.slider-dots {
    position: absolute;
    bottom: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.35rem;
    z-index: 2;
}

.slider-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dots .dot.active {
    background: white;
    width: 16px;
    border-radius: 3px;
}

/* Content Area */
.content-area {
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
}

.info-section {
    margin-bottom: 1.75rem;
}

.info-section h2 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.info-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Services Grid 2x2 */
.services-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.svc-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
}

.svc-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.svc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
}

.svc-card strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.svc-card small {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

@media (max-width: 380px) {
    .services-grid-2x2 { grid-template-columns: 1fr; }
}

/* Old navbar - keep for admin header.php */
.navbar {
    background: white;
    color: var(--text);
    padding: 0 1.25rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 0 var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.navbar .logo img {
    height: 36px;
    object-fit: contain;
}

.navbar nav { display: none; }

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text);
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ============================================
   Sidebar (Admin)
   ============================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0c3d1f 0%, #145c2e 50%, #1b7a3d 100%);
    color: white;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 101;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.sidebar .brand {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}

.sidebar .brand img {
    height: 56px;
    filter: brightness(0) invert(1);
}

.sidebar .brand h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.75rem;
    letter-spacing: -0.01em;
}

.sidebar .brand small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

.sidebar-nav {
    padding: 0.75rem 0;
    flex: 1;
}

.sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.5rem;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
    border-right: 3px solid transparent;
    font-size: 0.9rem;
    font-weight: 400;
    position: relative;
}

.sidebar .nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: white;
}

.sidebar .nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-right-color: var(--secondary);
    font-weight: 500;
}

.sidebar .nav-item .icon {
    width: 20px;
    text-align: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: auto;
}

.sidebar-footer .user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-footer .user-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.sidebar-footer .user-role {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
}

.sidebar-footer .logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    padding: 0.4rem 0;
    transition: var(--transition);
}

.sidebar-footer .logout-btn:hover { color: #fca5a5; }

.admin-content {
    margin-right: 270px;
    padding: 2rem 2.5rem;
    width: calc(100% - 270px);
    min-height: 100vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.5rem;
    color: var(--text);
}

.page-header .subtitle {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 0.15rem;
}

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

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.card-header h2, .card-header h3 {
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 600;
}

/* ============================================
   Stats Grid
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-card .label {
    color: var(--text-light);
    font-size: 0.82rem;
    margin-top: 0.4rem;
    font-weight: 400;
}

/* ============================================
   Tables
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

table th {
    background: var(--bg);
    padding: 0.85rem 1rem;
    text-align: right;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-secondary);
}

table tbody tr {
    transition: var(--transition);
}

table tbody tr:hover td {
    background: var(--primary-bg);
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   Forms & Inputs
   ============================================ */
.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    direction: rtl;
    transition: var(--transition);
    background: white;
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,122,61,0.08);
}

.form-control::placeholder {
    color: var(--text-light);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2394a3b8' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
    cursor: pointer;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Checkbox / Radio styled */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-left: 0.4rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:active { transform: scale(0.97); }

.btn:disabled, .btn[disabled] {
    background: var(--border);
    color: var(--text-light);
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
    opacity: 0.6;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(27,122,61,0.2);
}
.btn-primary:hover {
    background: var(--primary-light);
    color: white;
    box-shadow: 0 2px 8px rgba(27,122,61,0.25);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: white;
    border-color: var(--text-light);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { background: #b91c1c; color: white; }

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

.btn-warning {
    background: var(--warning);
    color: white;
}

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

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* ============================================
   Badges & Status
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-secondary { background: var(--bg); color: var(--text-light); }

/* ============================================
   Flash Messages
   ============================================ */
.flash {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: flashIn 0.3s ease;
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-success { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: var(--danger-bg); color: #991b1b; border: 1px solid #fecaca; }
.flash-info { background: var(--info-bg); color: #1e40af; border: 1px solid #bfdbfe; }

/* ============================================
   Hero Section (Public)
   ============================================ */
.hero {
    background: linear-gradient(160deg, #0c3d1f 0%, #145c2e 40%, #1b7a3d 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.hero > * { position: relative; z-index: 1; }

.hero .logo-hero {
    height: 80px;
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 1.15rem;
    opacity: 0.85;
    max-width: 550px;
    font-weight: 300;
    line-height: 1.8;
}

.hero .btn {
    margin-top: 2.5rem;
    padding: 0.85rem 2.5rem;
    font-size: 1rem;
    background: var(--secondary);
    color: #1a1a1a;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(212,175,55,0.3);
}

.hero .btn:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212,175,55,0.4);
}

/* ============================================
   Services Grid
   ============================================ */
.section-title {
    text-align: center;
    padding: 3.5rem 0 1rem;
}

.section-title h2 {
    font-size: 1.6rem;
    color: var(--text);
}

.section-title p {
    color: var(--text-light);
    margin-top: 0.4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem 0 4rem;
}

.service-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::after { transform: scaleX(1); }

.service-card .icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.service-card h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.5rem;
}

.pagination a, .pagination span {
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
}

.pagination a {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

/* ============================================
   Notifications
   ============================================ */
.notification-item {
    padding: 1rem 1.25rem;
    border-right: 3px solid var(--primary);
    background: var(--primary-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.notification-item:hover {
    background: #e3f1e7;
}

.notification-item .title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
}

.notification-item .date {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0c3d1f 0%, #145c2e 40%, #1b7a3d 100%);
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212,175,55,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.login-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.75rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.login-box .login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-box .login-logo img {
    height: 64px;
    margin-bottom: 0.75rem;
}

.login-box h1 {
    text-align: center;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-size: 1.35rem;
}

.login-box .login-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.88rem;
    margin-bottom: 1.75rem;
}

/* ============================================
   Search & Filter Bar
   ============================================ */
.filter-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
}

.filter-bar .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 150px;
}

.filter-bar .btn { align-self: flex-end; }

/* ============================================
   Room Cards
   ============================================ */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.room-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.room-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--success);
}

.room-card.full::before { background: var(--danger); }

.room-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.room-card .room-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 0.25rem;
}

.room-card .room-info {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

.room-card .occupancy {
    margin-top: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   Field Builder
   ============================================ */
.field-item {
    border: 1.5px dashed var(--border);
    background: var(--bg);
}

.field-item .card-header {
    border-bottom: 1px dashed var(--border);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 1.25rem;
    font-size: 0.82rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 220px;
    z-index: 50;
}

.content-area { padding-bottom: 60px; }

@media (max-width: 768px) {
    .footer { right: 0; }
}

.footer a { color: var(--secondary); }

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state .icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.5; }
.empty-state p { font-size: 0.95rem; }

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================
   Side Drawer (Public)
   ============================================ */
/* Drawer - مخفي دائماً ويفتح بالزر */
.side-drawer { display: none; }
.side-drawer.open { display: block; }
.side-drawer .drawer-overlay { display: none; }
.side-drawer .drawer-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 270px;
    height: 100vh;
    background: white;
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}
.side-drawer.open .drawer-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 199;
}

.content-area { margin-right: 0; max-width: 100%; }
.strip-menu { display: flex; }
.hero-slider { margin-right: 0; }

/* Mobile: drawer overlay */
@media (max-width: 768px) {
    .side-drawer { display: none; }
    .side-drawer.open { display: block; }
    .side-drawer .drawer-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 150;
    }
    .side-drawer.open .drawer-overlay {
        display: block;
        animation: fadeIn 0.2s ease;
    }
    .side-drawer .drawer-content {
        position: fixed;
        top: 0;
        right: -270px;
        width: 260px;
        height: 100vh;
        z-index: 151;
        border-left: none;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        transition: right 0.25s ease;
    }
    .side-drawer.open .drawer-content {
        right: 0;
    }
    .content-area { margin-right: 0; max-width: 100%; }
    .footer { right: 0; }
    .hero-slider { margin-right: 0; }
    .strip-menu { display: flex; }
}

@keyframes drawerSlide {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.drawer-header {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.drawer-header h3 {
    margin-top: 0.5rem;
    color: var(--primary-dark);
    font-size: 1rem;
}

.drawer-nav {
    padding: 1rem 0;
    flex: 1;
}

.drawer-nav a {
    display: block;
    padding: 0.85rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-right: 3px solid transparent;
    transition: var(--transition);
}

.drawer-nav a:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.drawer-nav a.active {
    color: var(--primary);
    border-right-color: var(--primary);
    background: var(--primary-bg);
    font-weight: 600;
}

.drawer-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: var(--text-light);
    font-size: 0.75rem;
}

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

    .sidebar.open {
        transform: translateX(0);
        box-shadow: -5px 0 30px rgba(0,0,0,0.3);
    }

    .admin-content {
        margin-right: 0;
        width: 100%;
        padding: 1.25rem;
    }

    .menu-toggle { display: flex; align-items: center; justify-content: center; }

    .navbar { padding: 0 1.25rem; }
    .navbar nav { display: none; }
    .navbar nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: white;
        padding: 0.75rem;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border);
        gap: 0.25rem;
    }

    .hero { padding: 3rem 1.5rem; min-height: 50vh; }
    .hero h1 { font-size: 2rem; }
    .hero .subtitle { font-size: 1rem; }
    .hero .logo-hero { height: 60px; }

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

    .page-header { flex-direction: column; gap: 0.75rem; align-items: flex-start; }

    .filter-bar { flex-direction: column; }
    .filter-bar .form-group { min-width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .card { padding: 1.15rem; }
    .hero h1 { font-size: 1.7rem; }
    .rooms-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
}
