:root {
    --navy:        #1f2a4d;
    --navy-soft:   #2c3a63;
    --ink:         #1a1f33;
    --parent:      #1f2a4d;   /* dark navy chair (Parents) */
    --parent-edge: #141c38;
    --guest:       #cdddf0;   /* light blue chair (Guest) */
    --guest-edge:  #7da4cf;
    --blocked:     #e7e9ee;   /* reserved / not bookable */
    --blocked-edge:#c4c9d6;
    --taken:       #b9c0cf;   /* already booked by someone */
    --mine:        #4caf7d;   /* the current student's pair */
    --mine-edge:   #2f7d56;
    --sel:         #f4b740;   /* in-progress selection */
    --sel-edge:    #c98a16;
    --paper:       #ffffff;
    --bg:          #f3f5f9;
    --line:        #d9dee8;
    --muted:       #6b7280;
    --danger:      #c0392b;
    --shadow:      0 1px 2px rgba(31,42,77,.06), 0 8px 30px rgba(31,42,77,.08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background:
        radial-gradient(1200px 500px at 50% -10%, #fbfcfe 0%, var(--bg) 60%);
    color: var(--ink);
    font-family: 'Manrope', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ----------------------------- Top bar ----------------------------- */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(8px);
    position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark {
    font-family: 'Fraunces', serif;
    font-size: 30px; font-weight: 600; letter-spacing: .5px;
    color: var(--navy);
}
.brand-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; letter-spacing: .3px; }
.topnav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.topnav .who { color: var(--muted); }
.topnav .who b { color: var(--ink); }
.lang-toggle {
    border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px;
    text-decoration: none; color: var(--navy); font-weight: 600; font-size: 13px;
    background: #fff; transition: background .15s;
}
.lang-toggle:hover { background: #eef2f9; }

/* ----------------------------- Buttons ----------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid var(--navy); background: var(--navy); color: #fff;
    padding: 10px 18px; border-radius: 10px; font: inherit; font-weight: 600;
    cursor: pointer; text-decoration: none; text-align: center;
    transition: transform .08s ease, background .15s ease, opacity .15s;
}
.btn:hover { background: var(--navy-soft); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: #eef2f9; }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.btn--danger:hover { filter: brightness(.94); }
.btn--sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }

/* ----------------------------- Page ----------------------------- */
.page { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }

/* ----------------------------- Auth cards ----------------------------- */
.auth-wrap { min-height: 62vh; display: grid; place-items: center; }
.card {
    background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: var(--shadow); padding: 36px;
}
.auth-card { width: 100%; max-width: 420px; text-align: center; }
.auth-card h1 { font-family: 'Fraunces', serif; font-weight: 600; color: var(--navy); margin: 6px 0 4px; font-size: 26px; }
.auth-card p.lead { color: var(--muted); margin: 0 0 24px; font-size: 14.5px; }
.field { text-align: left; margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.input {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
    font: inherit; background: #fbfcfe; transition: border .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--guest-edge); box-shadow: 0 0 0 3px rgba(125,164,207,.25); }
.error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.full { width: 100%; justify-content: center; }
.tiny-link { display: inline-block; margin-top: 18px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.tiny-link:hover { color: var(--navy); text-decoration: underline; }

/* ----------------------------- Alerts ----------------------------- */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.alert--ok { background: #e6f6ee; color: #1d6b45; border: 1px solid #b6e3ca; }
.alert--err { background: #fdeceb; color: #8c2a20; border: 1px solid #f3c4bf; }

/* ----------------------------- Seating stage ----------------------------- */
.hall-head { text-align: center; margin-bottom: 8px; }
.hall-head h1 { font-family: 'Fraunces', serif; font-weight: 600; color: var(--navy); font-size: 24px; margin: 0; }
.hall-head .shift { color: var(--muted); font-size: 13px; }

.hall {
    background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: var(--shadow); padding: 26px 22px 30px; overflow-x: auto;
}
.stage {
    border: 1.5px solid var(--navy); border-radius: 4px; height: 86px;
    display: grid; place-items: center; position: relative;
    color: var(--navy); font-weight: 600; letter-spacing: 2px;
    margin: 4px 30px 30px;
    background: repeating-linear-gradient(45deg, #fafbfe, #fafbfe 10px, #f4f7fc 10px, #f4f7fc 20px);
}
.stage .podium {
    position: absolute; left: 18px; bottom: -2px; transform: rotate(-18deg);
    border: 1.4px solid var(--navy); border-radius: 3px; padding: 4px 8px;
    font-size: 10px; letter-spacing: 1px; background: #fff;
}

.seatmap { display: block; width: fit-content; min-width: 760px; margin: 0 auto; }
.row { display: flex; align-items: center; gap: 26px; justify-content: center; margin: 4px 0; }
.row.gap { margin-top: 26px; }
.row-label { width: 22px; text-align: center; color: var(--muted); font-weight: 700; font-size: 13px; }
.section { display: flex; gap: 5px; }
.aisle { width: 34px; }

.seat {
    width: 24px; height: 22px; border-radius: 4px 4px 6px 6px;
    border: 1.4px solid var(--guest-edge); background: var(--guest);
    font-size: 9.5px; color: var(--navy); display: grid; place-items: center;
    cursor: pointer; user-select: none; transition: transform .08s, box-shadow .12s, background .12s;
    position: relative;
}
.seat:hover:not(.is-disabled) { transform: translateY(-2px); box-shadow: 0 3px 8px rgba(31,42,77,.18); }
.seat.parent { background: var(--parent); border-color: var(--parent-edge); color: #cfd8ee; }
.seat.is-blocked { background: var(--blocked); border-color: var(--blocked-edge); color: #aeb4c1; cursor: not-allowed; }
.seat.is-taken { background: var(--taken); border-color: #99a1b2; color: #5d6573; cursor: not-allowed; }
.seat.is-selected { background: var(--sel); border-color: var(--sel-edge); color: #4a3403; transform: translateY(-2px); }
.seat.is-mine { background: var(--mine); border-color: var(--mine-edge); color: #fff; }
.seat.is-disabled { cursor: not-allowed; }

/* labels above sections (the "screen" markers in the original plan) */
.screens { display: flex; justify-content: center; gap: 26px; width: fit-content; margin: 16px auto 10px; }
.screen-side { width: 401px; display: flex; justify-content: center; gap: 16px; }  /* matches one seat section (14 seats) */
.screen-aisle { width: 34px; }   /* matches the seat-row aisle */
.screen-pad { width: 22px; }     /* matches the row-label column */
.screen-group { display: flex; gap: 16px; }
.screen {
    width: 53px; text-align: center; font-size: 9px; color: var(--muted);
    border: 1px solid var(--line); border-radius: 4px; padding: 3px 0; background: #f7f9fc;
}
.screen::before {
    content: ""; display: block; height: 8px; margin: 0 8px 3px;
    background: var(--guest); border: 1px solid var(--guest-edge); border-radius: 2px;
}

/* selection bar */
.actionbar {
    position: sticky; bottom: 0; margin-top: 22px;
    background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
    border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
    padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.actionbar .status { font-size: 14px; color: var(--ink); }
.actionbar .status b { color: var(--navy); }
.actionbar .right { display: flex; gap: 10px; }

/* ----------------------------- Admin ----------------------------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.admin-head h1 { font-family: 'Fraunces', serif; color: var(--navy); margin: 0; font-size: 24px; font-weight: 600; }
.toolbar { display: flex; gap: 10px; align-items: center; }
.search-input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; min-width: 220px; }

.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.table th { background: #f6f8fc; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.table tr:last-child td { border-bottom: none; }
.table td:last-child, .table th:last-child { width: 1%; white-space: nowrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge--kg { background: #e6eefb; color: #2a4d8f; }
.badge--toddler { background: #fdf0e3; color: #9a5b16; }
.seat-tag { font-family: 'Manrope'; font-weight: 700; color: var(--navy); }
.dim { color: var(--muted); }
.row-actions { display: flex; gap: 8px; }
.pagination { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; text-decoration: none; color: var(--navy); background: #fff; }
.pagination .active span { background: var(--navy); color: #fff; border-color: var(--navy); }
.form-grid { display: grid; gap: 16px; max-width: 480px; }
.select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fbfcfe; }

/* ----------------------------- Footer / legend ----------------------------- */
.footer {
    display: flex; gap: 22px; justify-content: center; flex-wrap: wrap;
    padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px;
    background: rgba(255,255,255,.6);
}
.legend { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 16px; height: 14px; border-radius: 3px; display: inline-block; border: 1.4px solid; }
.swatch--parent { background: var(--parent); border-color: var(--parent-edge); }
.swatch--guest { background: var(--guest); border-color: var(--guest-edge); }
.swatch--blocked { background: var(--blocked); border-color: var(--blocked-edge); }
.swatch--taken { background: var(--taken); border-color: #99a1b2; }
.swatch--mine { background: var(--mine); border-color: var(--mine-edge); }

@media (max-width: 640px) {
    .page { padding: 16px 10px 50px; }
    .topbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px 12px;
        align-items: center;
    }
    /* Brand on its own line, nav wraps onto the next */
    .brand { flex: 1 1 auto; }
    .topnav {
        flex: 1 1 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px 10px;
        font-size: 13px;
    }
    .topnav .who { flex: 1 1 100%; }
    .who-meta {
        display: block;
        margin-inline-start: 0;
        padding-inline-start: 0;
        border-inline-start: 0;
        margin-top: 2px;
    }
    .brand-sub { font-size: 11px; }

    /* seating action bar stacks; buttons go full-width and even */
    .actionbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
    .actionbar .status { text-align: center; }
    .actionbar .right { width: 100%; }
    .actionbar .right .btn { flex: 1 1 0; }

    .hall { padding: 16px 12px 20px; }
    .hall-head h1 { font-size: 20px; }
}

/* ============================ Arabic / RTL ============================ */
body.rtl {
    font-family: 'Tajawal', 'Manrope', system-ui, sans-serif;
}
/* Arabic text in headings uses the Arabic face; the "Reborn" wordmark stays Latin. */
body.rtl .brand-sub,
body.rtl .hall-head h1,
body.rtl .hall-head .shift,
body.rtl .auth-card h1,
body.rtl .auth-card p.lead,
body.rtl .admin-head h1 {
    font-family: 'Tajawal', sans-serif;
}
body.rtl .field label,
body.rtl .table th,
body.rtl .table td { text-align: right; }

body.rtl .input,
body.rtl .select,
body.rtl .search-input { text-align: right; }

/* Civil ID / numeric inputs read better left-aligned even in RTL */
body.rtl #civil_id,
body.rtl #email { text-align: left; direction: ltr; }

/*
 * The seat map represents the PHYSICAL hall, so it must keep the same
 * orientation in both languages: left section (15-28) stays on the left,
 * right section (1-14) stays on the right, exactly like the printed plan.
 */
body.rtl .seatmap,
body.rtl .stage,
body.rtl .screens { direction: ltr; }

body.rtl .actionbar { direction: rtl; }

/* ============================ Admin shell / sidebar ============================ */
.admin-shell { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar {
    width: 248px; flex: 0 0 248px; background: var(--navy); color: #dfe5f2;
    display: flex; flex-direction: column; padding: 22px 16px;
}
.sidebar-brand { padding: 6px 10px 18px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 14px; text-align: center; }
.sidebar-brand .brand-logo { display: block; }
.sidebar-brand .brand-logo img { margin: 0 auto; }
.sidebar-brand .brand-mark { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 600; color: #fff; display: block; }
.sidebar-brand .brand-sub { font-size: 11.5px; color: #aab4d4; margin-top: 10px; display: block; }
body.rtl .sidebar-brand .brand-sub { font-family: 'Tajawal', sans-serif; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-nav a {
    display: block; padding: 11px 14px; border-radius: 9px; text-decoration: none;
    color: #cdd5ea; font-weight: 600; font-size: 14.5px; transition: background .15s, color .15s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: #fff; color: var(--navy); }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.12); margin: 10px 6px; }

.sidebar-foot { border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; }
.sidebar-user { font-size: 13px; color: #aab4d4; padding: 0 8px 10px; }
body.rtl .sidebar-user { font-family: 'Tajawal', sans-serif; }
.sidebar-actions { display: flex; align-items: center; gap: 10px; padding: 0 4px; flex-wrap: wrap; }
.sidebar .btn--ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.sidebar .btn--ghost:hover { background: rgba(255,255,255,.1); }
.sidebar .lang-toggle { color: #fff; border-color: rgba(255,255,255,.3); background: transparent; }
.sidebar .lang-toggle:hover { background: rgba(255,255,255,.1); }

.content { flex: 1; padding: 30px 34px 50px; max-width: none; min-width: 0; }
.content .admin-head { margin-top: 4px; }
.back-link { display: inline-block; margin-bottom: 16px; font-size: 13.5px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--navy); text-decoration: underline; }
.count-pill { display:inline-block; min-width: 22px; text-align:center; padding: 2px 9px; border-radius: 999px; background:#eef2f9; color: var(--navy); font-size: 12px; font-weight: 700; }

/* Mobile top bar + hamburger (hidden on desktop) */
.admin-mobilebar { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 760px) {
    .admin-mobilebar {
        display: flex; align-items: center; gap: 14px;
        position: sticky; top: 0; z-index: 50;
        background: var(--navy); padding: 12px 16px;
    }
    .admin-mobilebar-logo { display: inline-block; line-height: 0; }
    .admin-mobilebar-logo img { height: 24px; width: auto; display: block; }

    .hamburger {
        width: 40px; height: 40px; border: 0; background: transparent;
        display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
        padding: 8px; cursor: pointer; border-radius: 8px;
    }
    .hamburger span { display: block; height: 2.5px; width: 100%; background: #fff; border-radius: 2px; }

    .admin-shell { flex-direction: column; }

    /* Sidebar becomes an off-canvas drawer */
    .sidebar {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
        width: 270px; max-width: 84vw; flex: none; padding: 20px 16px;
        transform: translateX(-100%); transition: transform .25s ease;
        overflow-y: auto;
    }
    .sidebar.open { transform: translateX(0); }
    body.rtl .sidebar { left: auto; right: 0; transform: translateX(100%); }
    body.rtl .sidebar.open { transform: translateX(0); }

    /* keep the vertical nav layout inside the drawer */
    .sidebar-nav { flex-direction: column; flex-wrap: nowrap; }

    .sidebar-overlay {
        display: block; position: fixed; inset: 0; z-index: 55;
        background: rgba(15, 20, 40, .5);
    }
    .sidebar-overlay[hidden] { display: none; }
    body.nav-open { overflow: hidden; }

    .content { padding: 20px 16px 40px; }
}

/* sortable table headers */
.table th .sort-link {
    color: var(--muted); text-decoration: none; font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.table th .sort-link:hover { color: var(--navy); }
.table th .sort-link.is-sorted { color: var(--navy); }

/* shift tabs (seating plan overview) */
.tabs { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs .tab {
    padding: 10px 18px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs .tab:hover { color: var(--navy); }
.tabs .tab.active { color: var(--navy); border-bottom-color: var(--navy); }
.tab-summary { margin-inline-start: auto; color: var(--muted); font-size: 13px; }

/* two-column form (e.g. the student form) */
.form-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; max-width: 880px; }
.form-grid--wide .span-2 { grid-column: 1 / -1; }
@media (max-width: 680px) { .form-grid--wide { grid-template-columns: 1fr; } }

.hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* dashboard */
.section-title { font-size: 16px; color: var(--navy); margin: 26px 0 12px; font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card {
    display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 16px 18px; text-decoration: none; transition: border-color .15s, transform .15s;
}
.stat-card:hover { border-color: var(--navy); transform: translateY(-2px); }
.stat-card .num { font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-card .lbl { margin-top: 6px; color: var(--muted); font-size: 13px; }

.shift-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.shift-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.shift-card h3 { margin: 0 0 10px; font-size: 16px; color: var(--navy); }
.progress { height: 9px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--navy); border-radius: 99px; }
.progress-label { margin: 8px 0 12px; font-size: 13px; color: var(--muted); }
.mini-stats { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; }
.mini-stats b { color: var(--navy); }

/* seating: mode switch + booking panel */
.seating-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.segmented .seg { padding: 8px 16px; background: #fff; border: 0; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.segmented .seg.active { background: var(--navy); color: #fff; }
.mode-hint { color: var(--muted); font-size: 13px; }
.book-panel { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.book-actions { display: flex; align-items: center; gap: 14px; }
.picked-seats { font-size: 13.5px; color: var(--navy); font-weight: 600; }
.book-msg { color: #b42318; font-size: 13px; flex-basis: 100%; }
.seat.is-picked { outline: 3px solid #2563eb; outline-offset: 1px; }

/* dashboard reservations filter */
.res-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.res-filter .search-input { max-width: 240px; }
.res-filter .select { max-width: 200px; }

/* per-column filter row (students table) */
.filter-row th { padding-top: 6px; padding-bottom: 10px; }
.filter-input {
    width: 100%; min-width: 90px; padding: 6px 8px; font: inherit; font-size: 13px;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.filter-input:focus { outline: none; border-color: var(--navy); }
.filter-actions { white-space: nowrap; }
.filter-actions .btn { margin-inline-end: 4px; }

/* signed-in student meta (branch · class) in the header */
.who-meta { display: inline-block; margin-inline-start: 8px; padding-inline-start: 8px; border-inline-start: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* brand logo image (replaces the text wordmark) */
.brand-logo { display: inline-block; line-height: 0; }
.brand-logo img { height: 26px; width: auto; display: block; }
.sidebar-brand .brand-logo img { height: 30px; }
@media (max-width: 640px) { .brand-logo img { height: 22px; } }

/* reservation confirmation modal */
.modal[hidden] { display: none !important; }
body.modal-open { overflow: hidden; }
.modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20, 26, 51, .55); backdrop-filter: blur(3px);
    padding: 20px;
}
.modal-card {
    background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(20,26,51,.3);
    width: 100%; max-width: 420px; padding: 28px 26px; text-align: center;
    animation: modalPop .18s ease-out;
}
@keyframes modalPop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-check {
    width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
    background: #e7f6ec; color: #1f9254; font-size: 30px; font-weight: 700;
    display: grid; place-items: center;
}
.modal-card h2 { font-family: 'Fraunces', serif; color: var(--navy); font-size: 22px; margin: 0 0 18px; }
.modal-details { margin: 0 0 22px; text-align: start; }
.modal-details > div {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.modal-details > div:last-child { border-bottom: 0; }
.modal-details dt { color: var(--muted); font-size: 13.5px; margin: 0; }
.modal-details dd { margin: 0; color: var(--navy); font-weight: 600; text-align: end; }
.modal-details .md-seats { font-size: 17px; letter-spacing: .5px; }
.btn.full { width: 100%; justify-content: center; }
body.rtl .modal-details { text-align: right; }

/* Laravel pagination (used on reservations list) */
nav[role="navigation"] { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
nav[role="navigation"] .hidden { display: none; }
nav[role="navigation"] span[aria-current], nav[role="navigation"] a {
    display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
    padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none;
    color: var(--navy); background: #fff; font-size: 13.5px;
}
nav[role="navigation"] span[aria-current] > span { background: var(--navy); color: #fff; border-radius: 6px; padding: 4px 10px; }
nav[role="navigation"] a:hover { background: #eef2f9; }
nav[role="navigation"] p { color: var(--muted); font-size: 13px; margin: 0 8px; }

/* roles & permissions */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.perm-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff;
    font-weight: 600; color: var(--navy); font-size: 14px;
}
.perm-item:hover { background: #f6f8fc; }
.perm-item input { width: 17px; height: 17px; accent-color: var(--navy); }

/* roles permission matrix */
.perm-table th.perm-col, .perm-table td.perm-col { text-align: center; width: 84px; }
.perm-table td.perm-col input { width: 17px; height: 17px; accent-color: var(--navy); cursor: pointer; }
.perm-table tbody td { padding: 10px 12px; }

/* admin top bar + profile menu */
.admin-topbar { display: flex; align-items: center; justify-content: flex-end; margin: -6px 0 18px; }
.admin-topbar-spacer { flex: 1; }
.profile-menu { position: relative; }
.profile-trigger {
    display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 12px 6px 6px; font: inherit; color: var(--ink);
}
.profile-trigger:hover { background: #f6f8fc; }
.profile-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none;
}
.profile-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: start; }
.profile-name { font-weight: 600; font-size: 14px; color: var(--navy); }
.profile-role { font-size: 11.5px; color: var(--muted); }
.profile-caret { color: var(--muted); font-size: 11px; }
.profile-dropdown {
    position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 40;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow); min-width: 220px; overflow: hidden; padding: 6px;
}
.profile-dropdown[hidden] { display: none; }
.profile-dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.profile-dropdown a, .profile-dropdown button {
    display: block; width: 100%; text-align: start; padding: 10px 12px; border-radius: 8px;
    background: transparent; border: 0; font: inherit; color: var(--ink); text-decoration: none; cursor: pointer;
}
.profile-dropdown a:hover, .profile-dropdown button:hover { background: #f1f4fa; }
body.rtl .profile-meta, body.rtl .profile-dropdown a, body.rtl .profile-dropdown button { text-align: right; }
@media (max-width: 760px) { .profile-role { display: none; } .profile-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* import steps */
.import-steps { margin: 6px 0 12px; padding-inline-start: 20px; line-height: 1.9; color: var(--ink); }
