/* تعريف الخطوط الرسمية لبراند مستقر */
@font-face {
  font-family: 'Huwiya';
  font-weight: 400;
  font-style: normal;
  src: url('itfHuwiyaArabic-Regular.otf') format('opentype');
}
@font-face {
  font-family: 'Huwiya';
  font-weight: 700;
  font-style: normal;
  src: url('itfHuwiyaArabic-Bold.otf') format('opentype');
}

/* المتغيرات اللونية الرسمية لـ Mustqr (من دليل الهوية الرسمي) */
:root {
    --bg-main: #171717;           /* أسود - Primary Color Scheme */
    --bg-card: #4F4F50;           /* رمادي داكن - بطاقات الحساب */
    --primary-color: #BF4A2A;     /* برتقالي - Main account */
    --text-main: #FFFFFF;
    --text-muted: #FFFFFF;
    --border-color: #D5D5D5;
}

[data-theme="light"] {
    --bg-main: #F4F3F4;           /* أبيض مائل - Primary Color Scheme */
    --bg-card: #E0E2E2;           /* رمادي فاتح - Neutrals */
    --primary-color: #BF4A2A;
    --text-main: #171717;
    --text-muted: #4F4F50;        /* رمادي غامق - Neutrals */
    --border-color: #D5D5D5;
}

/* التنسيقات العامة */
body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Huwiya', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

.main-header {
    background-color: var(--bg-card);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative; /* لضمان حساب تموضع القائمة بناءً على الهيدر */
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 64px;
    width: auto;
    display: block;
    transition: filter 0.3s;
}

/* الشعار أبيض بالأساس (مصمم للخلفيات الغامقة)
   بالوضع الفاتح نعكس ألوانه ليصير أسود ويبقى واضح */
[data-theme="light"] .logo-img {
    filter: invert(1) brightness(0);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-bell {
    position: relative;
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #FFFFFF;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.notification-bell:hover { border-color: var(--primary-color); background: rgba(191, 74, 42, 0.14); }
.notification-badge {
    position: absolute;
    top: -6px;
    inset-inline-end: -7px;
    min-width: 17px;
    height: 17px;
    padding: 0 3px;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    border: 2px solid var(--bg-main);
    border-radius: 999px;
    background: var(--primary-color);
    color: #FFFFFF;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.user-profile {
    cursor: pointer;
    background-color: var(--bg-main);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

/* القائمة المنسدلة الموسعة والمصلحة تماماً */
.profile-dropdown {
    display: none;
    position: absolute;
    top: 100%; /* تفتح تحت الهيدر مباشرة */
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); /* زيادة الظل لتبدو عائمة */
    z-index: 9999 !important; /* رفع الطبقة لأعلى شيء لمنع التداخل مع الكروت والتقويم */
    padding: 5px 0;
}
.profile-dropdown.show { display: block; }

/*
   ✅ الإصلاح: التحقق من dir على أي عنصر أب (html أو body)
   بدل الاعتماد فقط على body[dir], لأن الـ HTML الأصلي يضع
   dir="rtl" على وسم <html> وليس <body> عند التحميل الأول
*/
[dir="rtl"] .profile-dropdown {
    left: 20px;   /* إذا كانت الواجهة عربية تظهر على اليسار تحت الاسم */
    right: auto;
}
[dir="ltr"] .profile-dropdown {
    right: 20px;  /* إذا كانت الواجهة إنجليزية تظهر على اليمين تحت الاسم */
    left: auto;
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 15px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}
.profile-dropdown a:hover { background-color: var(--bg-main); }

.profile-dropdown a i {
    color: var(--text-muted);
    width: 16px;
    text-align: center;
}
.profile-dropdown a:hover i {
    color: var(--primary-color);
}

.dropdown-controls {
    display: flex;
    padding: 10px;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
}
.control-btn {
    flex: 1;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: 'Huwiya', sans-serif;
}

.dashboard-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.widget-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.widget-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.widget-card h3 {
    margin-top: 0;
    color: var(--text-main);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.info-row span { color: #FFFFFF; }
.info-row:last-child { border: none; }

.calendar-iframe {
    width: 100%;
    height: 260px;
    border: none;
    border-radius: 8px;
    background-color: #FFFFFF !important;
    margin-top: 12px;
}

[data-theme="dark"] .calendar-iframe {
    background-color: var(--bg-card) !important;
    filter: invert(90%) hue-rotate(190deg) brightness(90%) contrast(95%);
}

/* ============================
   قائمة الميزات الإضافية (متاح / مقفول)
   ============================ */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    transition: opacity 0.2s;
}

.feature-item.locked {
    opacity: 0.55;
}

.feature-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background-color: var(--primary-color);
    color: #ffffff;
}

.feature-item.locked .feature-icon {
    background-color: var(--border-color);
    color: var(--text-muted);
}

.feature-text {
    flex: 1;
    min-width: 0;
}

.feature-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.feature-item.locked .feature-title {
    color: var(--text-muted);
}

.feature-value {
    font-size: 12px;
    color: var(--primary-color);
    margin-top: 3px;
}

.feature-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================
   تحسينات خاصة بأجهزة الجوال
   ============================ */
@media (max-width: 480px) {
    .main-header {
        padding: 12px 15px;
    }

    .logo-img {
        height: 54px;
    }

    .user-profile {
        font-size: 12px;
        padding: 6px 10px;
    }

    .header-actions {
        gap: 10px;
    }

    /* القائمة المنسدلة تاخذ عرض أوسع نسبياً بدل عرض ثابت 250px */
    .profile-dropdown {
        width: 220px;
    }

    body[dir="rtl"] .profile-dropdown,
    [dir="rtl"] .profile-dropdown {
        left: 10px;
    }
    body[dir="ltr"] .profile-dropdown,
    [dir="ltr"] .profile-dropdown {
        right: 10px;
    }

    .dashboard-container {
        padding: 15px;
    }

    .widget-card {
        padding: 15px;
    }

    .widget-card h3 {
        font-size: 16px;
    }

    .info-row {
        font-size: 14px;
    }

    .calendar-iframe {
        height: 220px;
    }
}

.meeting-usage {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--primary-color) 15%, var(--bg-main));
    color: var(--text-main);
    font-size: 13px;
}

.meeting-usage i { color: var(--primary-color); }

/* Expandable membership benefits */
.membership-card {
    margin-top: 20px;
    padding: 18px 20px;
}

.membership-dropdown > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
    list-style: none;
}

.membership-dropdown > summary::-webkit-details-marker { display: none; }
.membership-dropdown > summary span { display: inline-flex; align-items: center; gap: 8px; }
.membership-chevron { font-size: 14px; transition: transform 0.2s ease; }
.membership-dropdown[open] .membership-chevron { transform: rotate(180deg); }
.membership-dropdown .features-list,
.membership-dropdown .feature-list {
    margin-top: 16px;
}

.features-list { display: grid; gap: 8px; }

.feature-item {
    padding: 0;
    overflow: hidden;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
}

.feature-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    color: var(--primary-color);
}

.feature-text { font-weight: 600; }

.feature-item p {
    margin: 0;
    padding: 0 48px 14px;
    color: var(--text-muted);
    font-size: 13px;
}

.feature-item.locked {
    opacity: 1;
    background: color-mix(in srgb, var(--border-color) 32%, var(--bg-main));
    border-color: color-mix(in srgb, var(--border-color) 80%, var(--bg-card));
}

.feature-item.locked .feature-status,
.feature-item.locked .feature-text,
.feature-item.locked .feature-chevron,
.feature-item.locked p { color: var(--text-muted); }

.document-request-button,
.primary-button,
.secondary-button,
.text-button {
    font-family: inherit;
    cursor: pointer;
    border-radius: 7px;
    text-decoration: none;
}

.document-request-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 48px 14px;
    padding: 8px 11px;
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
}

.request-page { max-width: 760px; }
.request-page .widget-card { margin-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.request-help { color: var(--text-muted); font-size: 14px; }
.request-form { display: grid; gap: 14px; margin-top: 18px; }
.request-form label { display: grid; gap: 7px; font-weight: 600; }
.request-form input,
.request-form select,
.request-form textarea,
.admin-controls input,
.admin-controls select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    padding: 10px;
    background: var(--bg-main);
    color: var(--text-main);
    font: inherit;
}
.request-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.primary-button { border: 0; padding: 10px 14px; background: var(--primary-color); color: #fff; }
.secondary-button { border: 1px solid var(--border-color); padding: 10px 14px; background: transparent; color: var(--text-main); }
.text-button { border: 0; background: transparent; padding: 6px; color: var(--primary-color); }
.form-message { min-height: 1.2em; color: #8fcf9f; }
.form-message.is-error { color: #ff8383; }
.request-history { margin-top: 25px; border-top: 1px solid var(--border-color); padding-top: 12px; }
.request-record,
.admin-request { display: grid; gap: 8px; padding: 13px; margin-top: 9px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-main); }
.request-record strong,
.admin-request strong { display: block; }
.request-record small,
.admin-request small { color: var(--text-muted); }
.request-status { display: inline-flex; width: fit-content; padding: 3px 8px; border-radius: 999px; font-size: 12px; background: var(--border-color); }
.status-approved,
.status-provided { background: #2e6b48; }
.status-rejected { background: #7c3434; }
.admin-request { grid-template-columns: 1fr minmax(200px, 280px); align-items: start; }
.admin-controls { display: grid; gap: 8px; }

@media (max-width: 600px) {
    .document-request-button { margin-right: 40px; }
    .admin-request { grid-template-columns: 1fr; }
}

.membership-dropdown .feature-list {
    display: grid;
    gap: 8px;
}

.membership-dropdown .feature-list .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
}

.membership-dropdown .feature-list .feature-text { padding-top: 1px; }
.membership-dropdown .feature-list .feature-note { margin-top: 5px; }

/* Shared-office benefits: compact orange checks with muted locks. */
.feature-list .feature-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: transparent;
    color: var(--primary-color);
    font-size: 16px;
}

.feature-list .feature-item.locked .feature-icon {
    background: transparent;
    color: var(--text-muted);
}

/* Admin dashboard */
.admin-page { max-width: 1180px; }
.admin-login { max-width: 500px; margin: 28px auto; }
.admin-page-header { display: flex; justify-content: space-between; align-items: start; gap: 24px; padding: 28px 0 22px; }
.admin-page-header h1 { margin: 3px 0 7px; font-size: 30px; }
.admin-page-header p { margin: 0; color: var(--text-muted); }
.eyebrow { color: var(--primary-color) !important; font-weight: 700; font-size: 13px; letter-spacing: 0.08em; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.admin-stats article { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 18px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; }
.admin-stats i { grid-row: span 2; color: var(--primary-color); font-size: 21px; }
.admin-stats span { color: var(--text-muted); font-size: 13px; }
.admin-stats strong { font-size: 25px; }
.admin-section { margin-top: 18px; padding: 20px; }
.admin-section h3 { margin-bottom: 4px; }
.admin-search { width: min(100%, 280px); border: 1px solid var(--border-color); border-radius: 7px; padding: 10px; background: var(--bg-main); color: var(--text-main); font: inherit; }
.admin-table-wrap { overflow-x: auto; margin-top: 16px; }
.admin-table { width: 100%; min-width: 730px; border-collapse: collapse; text-align: right; }
.admin-table th { color: var(--text-muted); font-size: 13px; font-weight: 500; padding: 10px; border-bottom: 1px solid var(--border-color); }
.admin-table td { padding: 12px 10px; border-bottom: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent); }
.admin-table small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11px; }
.admin-table select { border: 1px solid var(--border-color); padding: 7px; border-radius: 6px; background: var(--bg-main); color: var(--text-main); font: inherit; }
.role-badge { display: inline-block; padding: 4px 8px; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 99px; font-size: 12px; background: #32473B; color: #FFFFFF; }
.role-admin { background: var(--primary-color); color: #FFFFFF; }
.empty-cell { text-align: center; color: var(--text-muted); }
.activity-feed { display: grid; gap: 3px; margin-top: 12px; }
.activity-item { display: flex; align-items: start; gap: 11px; padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--border-color) 55%, transparent); }
.activity-item > i { color: var(--primary-color); font-size: 8px; margin-top: 7px; }
.activity-item p { margin: 4px 0; color: var(--text-muted); font-size: 13px; }
.activity-item small { color: var(--text-muted); font-size: 11px; }
.admin-requests { display: grid; gap: 10px; margin-top: 12px; }

@media (max-width: 800px) {
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-page-header { flex-direction: column; }
    .admin-search { width: 100%; }
}

@media (max-width: 460px) {
    .admin-stats { grid-template-columns: 1fr; }
    .admin-section { padding: 15px; }
}

/* Monthly meeting-room calendar and booking slots */
.meeting-usage { display: flex; width: 100%; box-sizing: border-box; justify-content: flex-start; margin-bottom: 9px; background: rgba(0, 0, 0, 0.16); }
.usage-progress { height: 8px; overflow: hidden; margin-bottom: 18px; border-radius: 999px; background: rgba(0, 0, 0, 0.32); }
.usage-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary-color); transition: width 0.25s ease; }
.booking-calendar { border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, 0.12); }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.calendar-toolbar h4 { margin: 0; font-size: 15px; }
.calendar-nav { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 6px; background: transparent; color: var(--text-main); cursor: pointer; }
.calendar-nav:hover { border-color: var(--primary-color); color: var(--primary-color); }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { padding: 9px 7px 4px; color: var(--text-main); font-size: 10px; text-align: center; }
.calendar-grid { gap: 3px; padding: 7px; }
.calendar-empty { min-height: 43px; }
.calendar-day { position: relative; display: grid; place-items: center; min-height: 43px; padding: 4px 1px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text-main); font: inherit; cursor: pointer; }
.calendar-day:hover:not(:disabled) { border-color: var(--primary-color); }
.calendar-day.is-today { border-color: rgba(255, 255, 255, 0.55); }
.calendar-day.is-selected { background: var(--primary-color); border-color: var(--primary-color); }
.calendar-day.has-bookings:not(.is-selected) { background: rgba(0, 0, 0, 0.25); }
.calendar-day.is-past { opacity: 0.35; cursor: not-allowed; }
.calendar-day small { display: block; margin-top: 1px; font-size: 8px; }
.booking-open-button { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; border: 0; border-radius: 8px; padding: 11px; background: var(--primary-color); color: #FFFFFF; font: inherit; font-weight: 700; cursor: pointer; }
.booking-open-button:hover { filter: brightness(1.08); }
.booking-interface { margin-top: 12px; }
.booking-instruction { margin: 0 0 7px; color: rgba(255, 255, 255, 0.72); font-size: 11px; }
.booking-slots { margin-top: 12px; padding: 12px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 10px; background: rgba(0, 0, 0, 0.18); }
.booking-slots h4 { margin: 0 0 3px; }
.booking-slots p { margin: 0; color: var(--text-main); font-size: 13px; }
.time-slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 11px; }
.time-slot { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; padding: 7px 5px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 7px; background: transparent; color: var(--text-main); font: inherit; cursor: pointer; }
.time-slot:hover:not(:disabled) { border-color: var(--primary-color); background: rgba(191, 74, 42, 0.15); }
.time-slot small { color: var(--text-main); font-size: 9px; }
.time-slot.is-booked { background: rgba(0, 0, 0, 0.3); color: rgba(255, 255, 255, 0.55); cursor: not-allowed; }
.time-slot.is-booked small { color: rgba(255, 255, 255, 0.55); }
.time-slot.is-selected { border-color: var(--primary-color); background: rgba(191, 74, 42, 0.2); }
.booking-confirmation { display: grid; gap: 10px; margin-top: 14px; padding: 13px; border: 1px solid rgba(191, 74, 42, 0.72); border-radius: 10px; background: rgba(191, 74, 42, 0.12); }
.booking-confirmation p { margin: 0; font-size: 13px; font-weight: 700; }
.booking-confirmation > div { display: flex; justify-content: flex-end; gap: 8px; }
.booking-confirmation .primary-button,
.booking-confirmation .secondary-button { padding: 8px 12px; font-size: 12px; }

/* Aligned private/shared benefit cards */
.membership-card .features-list { margin-top: 16px; gap: 10px; }
.membership-card .features-list .feature-item { display: block; border-color: rgba(255, 255, 255, 0.26); }
.membership-card .feature-row { display: flex; width: 100%; box-sizing: border-box; min-height: 50px; padding: 0 16px; }
.membership-card .feature-text { line-height: 1.45; }
.membership-card .feature-item p { margin: 0; padding: 0 50px 14px; line-height: 1.55; text-align: right; }
.membership-card .document-request-button { margin: 0 50px 15px; }

.booking-admin-list { display: grid; gap: 8px; margin-top: 12px; }
.booking-admin-item { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid rgba(255, 255, 255, 0.26); border-radius: 8px; background: rgba(0, 0, 0, 0.16); }
.booking-admin-item > i { color: var(--primary-color); font-size: 18px; }
.booking-admin-item div { flex: 1; }
.booking-admin-item p { margin: 4px 0 0; color: var(--text-main); font-size: 13px; }

@media (max-width: 600px) {
    .calendar-weekdays { font-size: 9px; }
    .calendar-day { min-height: 38px; font-size: 12px; }
    .calendar-day small { display: none; }
    .time-slot-grid { grid-template-columns: repeat(3, 1fr); }
    .membership-card { padding: 15px; }
    .membership-card .feature-row { padding: 0 12px; }
    .membership-card .feature-item p { padding: 0 42px 13px; }
    .membership-card .document-request-button { margin: 0 42px 13px; }
}

/* Benefits list style: unified dark-green panel with simple divider rows. */
.membership-card {
    background-color: #32473B;
    border-color: rgba(255, 255, 255, 0.42);
}
.membership-card .features-list,
.membership-dropdown .feature-list { gap: 0; }
.membership-card .features-list .feature-item,
.membership-card .feature-list .feature-item {
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 0;
    box-shadow: none;
}
.membership-card .features-list .feature-item:last-child,
.membership-card .feature-list .feature-item:last-child { border-bottom: 0; }
.membership-card .feature-row { min-height: 47px; padding: 0 8px; }
.membership-card .feature-item p { padding-right: 30px; padding-left: 30px; padding-bottom: 12px; }
.membership-card .document-request-button { margin-right: 30px; margin-bottom: 14px; }
.membership-card .feature-list .feature-item { padding: 12px 8px; }
.membership-card .feature-list .feature-icon { color: var(--primary-color); }

@media (max-width: 600px) {
    .membership-card .feature-row { padding: 0 4px; }
    .membership-card .feature-item p { padding-right: 22px; padding-left: 22px; }
    .membership-card .document-request-button { margin-right: 22px; }
}

/* Booking ownership markers and admin booking calendar */
.calendar-day.has-own-booking::after { content: ''; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary-color); }
.admin-booking-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); gap: 16px; margin-top: 14px; }
.admin-booking-calendar,
.admin-slot-panel { border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, 0.15); }
.admin-slot-panel { padding: 14px; }
.admin-slot-panel h4 { margin: 0; }
.admin-slot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 12px; }
.admin-time-slot { display: grid; gap: 3px; padding: 9px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 7px; background: transparent; }
.admin-time-slot small { color: var(--text-main); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-time-slot.is-booked { background: rgba(0, 0, 0, 0.34); border-color: rgba(255, 255, 255, 0.45); }
.cancel-booking { border: 0; border-radius: 5px; padding: 5px; background: var(--primary-color); color: #FFFFFF; font: inherit; font-size: 11px; cursor: pointer; }

/* Notifications */
.notifications-page { max-width: 760px; }
.notifications-list { display: grid; gap: 8px; margin-top: 14px; }
.notification-item { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 9px; background: rgba(0, 0, 0, 0.15); cursor: pointer; }
.notification-item > i { color: var(--primary-color); margin-top: 3px; }
.notification-item div { flex: 1; }
.notification-item p { margin: 5px 0; color: var(--text-main); font-size: 13px; }
.notification-item small { color: var(--text-main); font-size: 11px; }
.notification-item.is-read { opacity: 0.62; }
.notification-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-color); }
.notification-browser-control { margin-top: 13px; }
.notifications-page .notification-browser-control .secondary-button { padding: 8px 12px; font-size: 12px; }
.notifications-page .notification-browser-control .secondary-button:disabled { cursor: default; opacity: 0.72; }
.member-alert-toast { position: fixed; inset-inline: 16px; bottom: 18px; z-index: 10000; width: min(390px, calc(100% - 32px)); margin-inline: auto; display: flex; align-items: flex-start; gap: 10px; padding: 14px; box-sizing: border-box; border: 1px solid rgba(255,255,255,0.7); border-radius: 14px; background: #252525; color: #FFFFFF; box-shadow: 0 16px 34px rgba(0,0,0,0.35); text-decoration: none; }
.member-alert-toast > i { margin-top: 3px; color: var(--primary-color); }
.member-alert-toast strong, .member-alert-toast span { display: block; }
.member-alert-toast span { margin-top: 3px; font-size: 12px; line-height: 1.45; }

@media (max-width: 720px) {
    .admin-booking-layout { grid-template-columns: 1fr; }
    .admin-slot-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Editorial admin layout inspired by Mustqr's spacious, restrained site language. */
.admin-page { max-width: 1120px; }
.admin-page-header { align-items: end; padding: 42px 0 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.68); }
.admin-page-header h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 700; letter-spacing: -0.03em; }
.admin-page-header p { max-width: 440px; line-height: 1.6; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.45); }
.admin-stats article { min-height: auto; padding: 4px 20px; border: 0; border-inline-start: 1px solid rgba(255, 255, 255, 0.32); border-radius: 0; background: transparent; }
.admin-stats article:first-child { border-inline-start: 0; }
.admin-stats i { display: none; }
.admin-stats span { color: #FFFFFF; font-size: 12px; }
.admin-stats strong { margin-top: 4px; font-size: 30px; line-height: 1; }
.admin-tabs { display: flex; gap: 0; overflow-x: auto; margin-top: 25px; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.admin-tabs button { flex: 0 0 auto; border: 0; border-bottom: 2px solid transparent; padding: 11px 16px 12px; background: transparent; color: rgba(255, 255, 255, 0.65); font: inherit; font-size: 14px; cursor: pointer; }
.admin-tabs button i { margin-left: 7px; }
.admin-tabs button:hover,
.admin-tabs button.is-active { color: #FFFFFF; border-bottom-color: var(--primary-color); }
.admin-page .admin-section { margin-top: 0; padding: 30px 0 8px; border: 0; border-radius: 0; background: transparent; }
.admin-page .admin-section .section-heading { align-items: end; margin-bottom: 18px; }
.admin-page .admin-section h3 { margin: 0; font-size: 23px; }
.admin-page .admin-section h3 i { color: var(--primary-color); }
.admin-page .admin-section .request-help { margin: 4px 0 0; color: rgba(255, 255, 255, 0.72); }
.admin-search { border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.6); border-radius: 0; padding: 9px 2px; background: transparent; }
.admin-search:focus { outline: 0; border-bottom-color: var(--primary-color); }
.admin-table-wrap { margin-top: 0; border-top: 1px solid rgba(255, 255, 255, 0.45); }
.admin-table th { color: rgba(255, 255, 255, 0.68); font-size: 11px; letter-spacing: 0.03em; }
.admin-table td { border-bottom-color: rgba(255, 255, 255, 0.28); }
.admin-table select { border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.45); border-radius: 0; padding: 6px 0; background: transparent; }
.admin-page .secondary-button { border-color: rgba(255, 255, 255, 0.55); border-radius: 0; background: transparent; }
.admin-page .primary-button { border-radius: 0; }
.activity-feed { border-top: 1px solid rgba(255, 255, 255, 0.45); }
.activity-item { padding: 16px 0; border-bottom-color: rgba(255, 255, 255, 0.28); }
.admin-booking-layout { margin-top: 0; }
.admin-booking-calendar,
.admin-slot-panel { border-color: rgba(255, 255, 255, 0.42); border-radius: 0; background: transparent; }
.booking-admin-list { margin-top: 18px; }
.booking-admin-item,
.admin-request { border-color: rgba(255, 255, 255, 0.35); border-radius: 0; background: transparent; }

@media (max-width: 720px) {
    .admin-page-header { align-items: start; padding: 28px 0 18px; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-stats article:nth-child(3) { border-inline-start: 0; margin-top: 16px; }
    .admin-tabs button { padding-inline: 12px; font-size: 13px; }
    .admin-page .admin-section .section-heading { align-items: start; flex-direction: column; }
}

/* Shared Mustqr-inspired application language. */
.main-header { padding: 18px max(20px, calc((100vw - 1120px) / 2)); background: var(--bg-main); border-bottom-color: rgba(255, 255, 255, 0.58); }
.header-actions { gap: 10px; }
.user-profile { border: 1px solid rgba(255, 255, 255, 0.42); border-radius: 0; background: transparent; }
.profile-dropdown { border-radius: 0; background: var(--bg-main); border-color: rgba(255,255,255,0.55); box-shadow: none; }
.profile-dropdown a { border-bottom: 1px solid rgba(255,255,255,0.18); }
.profile-dropdown a:last-child { border-bottom: 0; }
.profile-dropdown a:hover { background: rgba(255,255,255,0.08); }
.dashboard-container { max-width: 1120px; padding-top: 36px; padding-bottom: 48px; }
.widget-container { gap: 0; margin-top: 0; border-top: 1px solid rgba(255,255,255,0.55); }
.widget-container .widget-card { border: 0; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.4); background: transparent; padding: 28px 0; }
.widget-card h3 { font-size: 24px; }
.info-row { padding: 13px 0; border-bottom-color: rgba(255,255,255,0.24); }
.info-row:last-child { border-bottom: 0; }
.membership-card { margin-top: 32px; }
.request-page .widget-card,
.notifications-page .widget-card { border: 0; border-radius: 0; border-top: 1px solid rgba(255,255,255,0.65); border-bottom: 1px solid rgba(255,255,255,0.65); background: transparent; box-shadow: none; }
.request-page .widget-card h3,
.notifications-page .widget-card h3 { font-size: 28px; }
.request-form input,
.request-form select,
.request-form textarea { border: 0; border-bottom: 1px solid rgba(255,255,255,0.55); border-radius: 0; background: transparent; }
.request-form input:focus,
.request-form select:focus,
.request-form textarea:focus { outline: 0; border-bottom-color: var(--primary-color); }
.primary-button,
.secondary-button,
.document-request-button,
.booking-open-button { border-radius: 0; }
.notification-item { border-radius: 0; background: transparent; border-color: rgba(255,255,255,0.35); }

/* The alternate onboarding page uses these shared forms. */
.auth-wrapper { display: flex; min-height: calc(100vh - 82px); align-items: center; justify-content: center; padding: 30px 20px; }
.auth-card { width: min(100%, 520px); padding: 30px 0; border-top: 1px solid rgba(255,255,255,0.65); border-bottom: 1px solid rgba(255,255,255,0.65); }
.auth-card h2 { margin: 0 0 32px; font-size: 28px; }
.auth-card .form-group { margin-bottom: 22px; }
.auth-card input,
.auth-card select { width: 100%; box-sizing: border-box; padding: 11px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,0.55); background: transparent; color: #FFFFFF; font: inherit; }
.auth-card .btn-primary { width: 100%; margin-top: 12px; padding: 13px; border: 0; border-radius: 0; background: var(--primary-color); color: #FFFFFF; font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 600px) {
    .main-header { padding: 14px 16px; }
    .dashboard-container { padding: 26px 16px 40px; }
    .widget-container .widget-card { padding: 23px 0; }
    .widget-card h3 { font-size: 21px; }
    .request-page .widget-card h3,
    .notifications-page .widget-card h3,
    .auth-card h2 { font-size: 25px; }
}

/* Softer, tactile actions inspired by the Mustqr button treatment. */
.primary-button,
.admin-page .primary-button,
.document-request-button,
.booking-open-button,
.auth-card .btn-primary {
    border-radius: 14px;
    background: linear-gradient(135deg, #BF4A2A, #D95831);
    box-shadow: 0 9px 20px rgba(191, 74, 42, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.primary-button:hover,
.admin-page .primary-button:hover,
.document-request-button:hover,
.booking-open-button:hover,
.auth-card .btn-primary:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(191, 74, 42, 0.3);
}

.secondary-button,
.admin-page .secondary-button {
    border-radius: 14px;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.secondary-button:hover,
.admin-page .secondary-button:hover {
    transform: translateY(-1px);
    border-color: #FFFFFF;
    background: rgba(255, 255, 255, 0.13);
}

.text-button { border-radius: 10px; }
.admin-table .subscription-end-input {
    width: 132px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 0;
    padding: 7px 0;
    background: transparent;
    color: #FFFFFF;
    font: inherit;
}
.admin-table .subscription-end-input:focus { outline: 0; border-bottom-color: var(--primary-color); }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.delete-user { color: #FF8D7A; border: 1px solid rgba(255, 141, 122, 0.45); background: rgba(255, 141, 122, 0.08); padding: 8px 10px; font: inherit; font-size: 12px; }
.delete-user:hover { color: #FFFFFF; border-color: #FF8D7A; background: rgba(255, 141, 122, 0.18); }
.activity-item.is-reminder > i { margin-top: 3px; font-size: 13px; }

.admin-booking-add { margin: 14px 0; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.28); border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
.admin-booking-add label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.admin-booking-add select,
.admin-booking-add input { width: 100%; box-sizing: border-box; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 10px; padding: 9px 10px; background: var(--bg-main); color: #FFFFFF; font: inherit; }
.admin-booking-add p { margin: 7px 0 0; font-size: 11px; }
.admin-time-slot.is-available { width: 100%; color: #FFFFFF; font-family: inherit; text-align: right; cursor: pointer; }
.admin-time-slot.is-available:hover { border-color: var(--primary-color); background: rgba(191, 74, 42, 0.16); }
.admin-table .display-name-input { display: block; width: 100%; min-width: 130px; box-sizing: border-box; margin-top: 8px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.5); border-radius: 0; padding: 5px 0; background: transparent; color: #FFFFFF; font: inherit; }
.admin-table .display-name-input:focus { outline: 0; border-bottom-color: var(--primary-color); }
.role-owner { background: #32473B; color: #FFFFFF; }
.admin-team-add { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(150px, 0.7fr) auto; gap: 12px; align-items: end; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, 0.4); border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.admin-team-add label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; }
.admin-team-add select,
.admin-team-actions select { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.5); border-radius: 0; padding: 8px 2px; background: transparent; color: #FFFFFF; font: inherit; }
.admin-team-list { border-top: 1px solid rgba(255, 255, 255, 0.4); }
.admin-team-member { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
.admin-team-member strong,
.admin-team-member small { display: block; }
.admin-team-member strong small { display: inline; color: rgba(255,255,255,0.65); font-size: 11px; font-weight: 400; }
.admin-team-member > div:first-child > small,
.admin-team-member p { margin: 4px 0 0; color: rgba(255,255,255,0.7); font-size: 12px; }
.admin-team-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; max-width: 420px; }
.admin-team-actions select { width: 118px; }
.remove-admin-access { color: #FF8D7A; }

.admin-provision-form { display: grid; grid-template-columns: 1.1fr 1.2fr 0.8fr 0.85fr 1.25fr auto; gap: 12px; align-items: end; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, 0.4); border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.admin-provision-heading { grid-column: 1 / -1; display: grid; gap: 4px; }
.admin-provision-heading strong i { color: var(--primary-color); margin-inline-end: 5px; }
.admin-provision-heading small { color: rgba(255, 255, 255, 0.7); font-size: 11px; }
.admin-provision-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; }
.admin-provision-form input,
.admin-provision-form select { width: 100%; min-width: 0; box-sizing: border-box; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.5); border-radius: 0; padding: 8px 2px; background: transparent; color: #FFFFFF; font: inherit; }
.admin-provision-form input:focus,
.admin-provision-form select:focus { outline: 0; border-bottom-color: var(--primary-color); }

/* Keep native dropdown menus in the Mustqr palette instead of the browser's
   default white-and-blue menu. */
.admin-page select,
.request-form select,
.auth-card select {
    color-scheme: dark;
    background-color: var(--bg-main);
    color: #FFFFFF;
}

.admin-page select option,
.request-form select option,
.auth-card select option {
    background-color: var(--bg-main);
    color: #FFFFFF;
}

.admin-page select option:checked,
.request-form select option:checked,
.auth-card select option:checked {
    background-color: var(--primary-color);
    color: #FFFFFF;
}
.temporary-password-field { display: flex; gap: 7px; align-items: center; }
.temporary-password-field input { flex: 1; }
.temporary-password-field .secondary-button { flex: 0 0 auto; padding: 8px 10px; font-size: 11px; white-space: nowrap; }
.admin-provision-form > .primary-button { padding: 10px 13px; white-space: nowrap; }
.password-card { text-align: right; }
.password-card .request-help { margin: -12px 0 24px; line-height: 1.7; }
.setup-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; padding: 20px; background: var(--bg-main); }
.setup-wrapper { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 520px; }
.setup-wrapper .main-logo { display: block; width: 100%; max-width: 180px; height: auto; margin-bottom: 42px; }
.setup-card { width: 100%; box-sizing: border-box; padding: 28px 0; border-top: 1px solid rgba(255,255,255,0.65); border-bottom: 1px solid rgba(255,255,255,0.65); }
.setup-title { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 28px; color: #FFFFFF; font-size: 28px; text-align: center; }
.setup-title i { color: var(--primary-color); }
.password-card .request-form { display: grid; gap: 18px; }
.password-card .request-form label { display: grid; gap: 8px; color: #FFFFFF; font-size: 13px; }
.password-card .request-form input { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid rgba(255,255,255,0.55); padding: 12px 42px 12px 12px; background: transparent; color: #FFFFFF; font: inherit; }
.password-input-wrap { position: relative; display: block; width: 100%; }
.password-input-wrap input { padding-inline-end: 42px !important; }
.password-toggle { position: absolute; inset-inline-end: 0; top: 50%; display: grid; width: 34px; height: 34px; transform: translateY(-50%); place-items: center; border: 0; background: transparent; color: rgba(255,255,255,0.78); cursor: pointer; }
.password-toggle:hover { color: #FFFFFF; }

@media (max-width: 950px) {
  .admin-provision-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-provision-form > .primary-button { width: fit-content; }
}

@media (max-width: 560px) {
  .admin-provision-form { grid-template-columns: 1fr; }
  .admin-provision-form > .primary-button { width: 100%; }
  .admin-team-add { grid-template-columns: 1fr; }
  .admin-team-add .primary-button { width: 100%; }
  .admin-team-member { align-items: stretch; flex-direction: column; }
  .admin-team-actions { justify-content: flex-start; max-width: none; }
  .setup-body { align-items: flex-start; padding: 18px 20px 34px; }
  .setup-wrapper .main-logo { max-width: 132px; margin: 6px 0 22px; }
  .setup-card { padding: 22px 0; }
  .setup-title { margin-bottom: 22px; font-size: 24px; }
}

/* Account settings and support pages */
.header-back-link { color: #FFFFFF; text-decoration: none; font-size: 13px; }
.header-back-link:hover { color: var(--primary-color); }
.settings-page,
.contact-page { max-width: 760px; }
.settings-intro { padding-top: 18px; }
.settings-intro .eyebrow { margin: 0 0 6px; }
.settings-intro h1 { margin: 0; font-size: clamp(28px, 7vw, 38px); }
.settings-intro > p:last-child { margin: 10px 0 0; color: rgba(255, 255, 255, 0.76); line-height: 1.7; }
.settings-card,
.support-form-card { margin-top: 20px; }
.settings-card h3,
.support-form-card h3 { margin: 0; }
.settings-card h3 i,
.support-form-card h3 i { color: var(--primary-color); }
.settings-actions { display: grid; gap: 18px; }
.danger-button { color: #FF8D7A; }
.support-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 20px; }
.support-steps article { display: flex; align-items: flex-start; gap: 10px; padding: 4px 16px; border-inline-start: 1px solid rgba(255, 255, 255, 0.3); }
.support-steps article:first-child { border-inline-start: 0; }
.support-steps i { color: var(--primary-color); margin-top: 3px; }
.support-steps strong,
.support-steps span { display: block; }
.support-steps span { margin-top: 3px; color: rgba(255, 255, 255, 0.7); font-size: 12px; line-height: 1.45; }
.support-form-card .primary-button { width: fit-content; }
.admin-reply { padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.2); }

@media (max-width: 600px) {
    .main-header { align-items: center; }
    .header-back-link { font-size: 12px; }
    .support-steps { grid-template-columns: 1fr; gap: 12px; }
    .support-steps article { padding: 0; border: 0; }
}
