:root {
    --bg: #0c1124;
    --bg-alt: #121a33;
    --surface: #18203c;
    --text: #e9ecf6;
    --muted: #97a3c8;
    --accent: #6366f1;
    --accent2: #4f8ff7;
    --radius: 16px;
    --shadow: 0 10px 40px rgba(0, 0, 0, .35);
}

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

body {
    font-family: 'Poppins', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body.rtl { font-family: 'Tajawal', 'Poppins', sans-serif; }

a { color: inherit; text-decoration: none; }
.container { width: min(1140px, 92%); margin: 0 auto; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Header / nav */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(12, 17, 36, .82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; }
.brand-mark { font-size: 1.5rem; }
.brand-accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a:hover { color: var(--accent); }
.nav-cta {
    background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
    padding: 8px 16px; border-radius: 999px; font-weight: 600;
}
.nav-cta:hover { color: #fff; transform: translateY(-1px); }
.lang-switch { display: inline-flex; gap: 4px; background: var(--surface); border-radius: 999px; padding: 4px; }
.lang-switch button {
    border: 0; background: transparent; color: var(--muted);
    padding: 4px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .85rem;
}
.lang-switch button.active { background: var(--accent); color: #fff; }

/* Hero */
.hero { padding: 80px 0 60px; background:
    radial-gradient(1200px 400px at 80% -10%, rgba(79, 143, 247, .25), transparent),
    radial-gradient(900px 400px at 0% 10%, rgba(99, 102, 241, .18), transparent); }
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; color: var(--accent); font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; font-size: .78rem; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; margin-bottom: 18px; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px;
    border-radius: 999px; font-weight: 600; cursor: pointer; border: 0; font: inherit; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .2); color: var(--text); }

.hero-art { position: relative; height: 280px; }
.hero-card { position: absolute; width: 120px; height: 120px; border-radius: 24px;
    display: grid; place-items: center; font-size: 3rem; background: var(--surface); box-shadow: var(--shadow); }
.hero-card.c1 { top: 0; inset-inline-start: 10%; transform: rotate(-8deg); }
.hero-card.c2 { top: 70px; inset-inline-end: 8%; transform: rotate(6deg);
    background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.hero-card.c3 { bottom: 0; inset-inline-start: 38%; transform: rotate(3deg); }

/* Sections */
.section { padding: 70px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 1.8rem; margin-bottom: 32px; text-align: center; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 28px;
    border: 1px solid rgba(255, 255, 255, .05); }
.card-icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden;
    background: var(--surface); box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 240px; object-fit: cover; display: block; }
.gallery-item figcaption { padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.gallery-item figcaption span { color: var(--muted); font-size: .9rem; }

.gallery-item.secure .download-pill {
    position: absolute; inset-inline-end: 10px; bottom: 10px;
    background: rgba(12, 17, 36, .85); color: #fff; padding: 8px 14px; border-radius: 999px;
    font-size: .85rem; opacity: 0; transition: opacity .2s; }
.gallery-item.secure:hover .download-pill { opacity: 1; }

/* Delivery page */
.delivery-head { display: flex; justify-content: space-between; align-items: flex-end;
    gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }

/* Notice (expired) */
.notice { padding: 60px 0; max-width: 560px; }
.notice-icon { font-size: 3.5rem; margin-bottom: 16px; }
.notice h1 { margin-bottom: 14px; }
.notice .btn { margin-top: 24px; }

/* Booking page */
.booking-section { padding: 56px 0 70px; }
.booking-layout {
    display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 44px;
    align-items: start; max-width: 1040px;
}
.booking-aside { position: sticky; top: 96px; min-width: 0; }
.booking-aside h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.1; margin: 12px 0 14px; }
.booking-aside > p.muted { margin-bottom: 30px; max-width: 38ch; }

/* "What happens next" steps */
.booking-steps { list-style: none; display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.booking-steps li { display: flex; gap: 14px; align-items: flex-start; }
.booking-steps .step-num {
    flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 700; font-size: .95rem; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: var(--shadow);
}
.booking-steps strong { display: block; }
.booking-steps small { display: block; }
.wa-cta {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 600;
    padding: 11px 18px; border-radius: 999px; color: var(--text);
    border: 1px solid rgba(255, 255, 255, .16); background: var(--surface); transition: border-color .15s, transform .15s;
}
.wa-cta:hover { border-color: var(--accent); transform: translateY(-1px); }

/* Form card */
.booking-card {
    background: var(--surface); border: 1px solid rgba(255, 255, 255, .07);
    border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
    min-width: 0;  /* allow the card to shrink inside the grid track (no overflow) */
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field.span-1 { grid-column: span 1; }
.form-field.span-2 { grid-column: 1 / -1; }
.form-field label { font-weight: 600; font-size: .82rem; letter-spacing: .02em;
    text-transform: uppercase; color: var(--muted); }
.form-field .req { color: var(--accent); }
.field-input {
    width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
    background: var(--bg-alt); border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px; color-scheme: dark;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.field-input:hover { border-color: rgba(255, 255, 255, .24); }
.field-input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .22);
}
.field-input::placeholder { color: var(--muted); }
textarea.field-input { resize: vertical; min-height: 110px; }

/* Native <select> styled to match the dark theme */
select.field-input {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-inline-end: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2397a3c8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
body.rtl select.field-input { background-position: left 14px center; }

.field-hint { font-size: .8rem; }
.form-field.has-error .field-input { border-color: var(--accent); }
.field-error { color: var(--accent); font-size: .82rem; }

.btn-block { width: 100%; justify-content: center; margin-top: 22px; }
.form-foot { text-align: center; font-size: .82rem; margin-top: 12px; }

/* Flash messages */
.flash { padding: 12px 18px; border-radius: 12px; margin-top: 16px; background: var(--surface); }
.flash.success { border-inline-start: 4px solid #3ad29f; }
.flash.error, .flash.warning { border-inline-start: 4px solid var(--accent); }

/* Footer */
.site-footer { background: var(--bg-alt); padding: 50px 0 24px; margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, .06); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { margin-bottom: 10px; }
.ig-link { color: var(--accent); font-weight: 600; }
.wa-link { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 600; }
.copyright { padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: .85rem; }

/* ============================================================
   Staff dashboard (/manage)
   ============================================================ */
body.dash { background: var(--bg); }
.dash-topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(12, 17, 36, .9); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.dash-topbar-inner { display: flex; align-items: center; gap: 22px; padding: 14px 0; }
.brand-tag {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--accent2); border: 1px solid rgba(79, 143, 247, .5);
    padding: 2px 7px; border-radius: 999px; vertical-align: middle;
}
.dash-nav { display: flex; gap: 6px; }
.dash-nav a {
    padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--muted);
}
.dash-nav a:hover { color: var(--text); }
.dash-nav a.active { background: var(--surface); color: var(--text); }
.dash-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 16px; }
.dash-link { color: var(--accent); font-weight: 600; font-size: .9rem; }
.dash-link:hover { text-decoration: underline; }
.dash-logout button {
    border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: var(--muted);
    padding: 7px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .88rem;
}
.dash-logout button:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.dash-messages { margin-top: 16px; }
.dash-main { padding: 32px 0 70px; }
.dash-head { margin-bottom: 26px; }
.dash-head h1 { font-size: 1.7rem; margin-bottom: 4px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
    background: var(--surface); border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px;
}
a.stat-card:hover { border-color: rgba(255, 255, 255, .2); transform: translateY(-2px); transition: transform .15s, border-color .15s; }
.stat-card.stat-alert { border-color: rgba(255, 175, 64, .55); background: linear-gradient(180deg, rgba(255, 175, 64, .08), var(--surface)); }
.stat-num { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--muted); font-size: .9rem; }

/* Panels */
.dash-panel {
    background: var(--surface); border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius); padding: 24px; margin-bottom: 22px;
}
.dash-panel h2 { font-size: 1.15rem; margin-bottom: 16px; }
.dash-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-panel-head h2 { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dash-table th {
    text-align: start; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--muted); font-weight: 600; padding: 0 12px 10px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.dash-table td { padding: 14px 12px; border-bottom: 1px solid rgba(255, 255, 255, .05); vertical-align: middle; }
.dash-table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.dash-table a { color: var(--text); font-weight: 600; }
.dash-table a:hover { color: var(--accent); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.row-actions form { margin: 0; }

/* Status badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.badge-pending { background: rgba(255, 175, 64, .18); color: #ffc06a; }
.badge-approved { background: rgba(58, 210, 159, .18); color: #4fe0b4; }
.badge-rejected { background: rgba(99, 102, 241, .16); color: #ff7ba2; }

/* Small buttons */
.btn-sm { border: 0; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600;
    padding: 7px 14px; border-radius: 999px; color: #fff; transition: transform .12s, opacity .12s; white-space: nowrap; }
.btn-sm:hover { transform: translateY(-1px); }
.btn-approve { background: #2bb98a; }
.btn-reject { background: transparent; color: var(--muted); border: 1px solid rgba(255, 255, 255, .18); }
.btn-reject:hover { color: #ff7ba2; border-color: rgba(99, 102, 241, .5); }
.btn-save { background: var(--accent2); margin-top: 10px; }

.empty { color: var(--muted); padding: 24px; text-align: center; background: var(--surface);
    border-radius: var(--radius); border: 1px dashed rgba(255, 255, 255, .1); }

/* Tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.tab { padding: 8px 16px; border-radius: 999px; background: var(--surface); color: var(--muted);
    font-weight: 600; font-size: .9rem; border: 1px solid rgba(255, 255, 255, .06); }
.tab:hover { color: var(--text); }
.tab.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border-color: transparent; }
.tab-badge { background: rgba(0, 0, 0, .25); padding: 0 7px; border-radius: 999px; font-size: .78rem; margin-inline-start: 4px; }

/* Booking detail */
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.detail-list { display: grid; grid-template-columns: 130px 1fr; gap: 12px 16px; }
.detail-list dt { color: var(--muted); font-size: .85rem; }
.detail-list dd { word-break: break-word; }
.action-buttons { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.notes-form { display: flex; flex-direction: column; gap: 8px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); }
.notes-form label { font-weight: 600; font-size: .82rem; text-transform: uppercase; color: var(--muted); letter-spacing: .02em; }
.notes-form .btn-save { align-self: flex-start; }

/* Staff login page */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background:
        radial-gradient(900px 400px at 80% -10%, rgba(79, 143, 247, .22), transparent),
        radial-gradient(700px 360px at 0% 10%, rgba(99, 102, 241, .16), transparent); }
.login-card { width: min(420px, 100%); background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .07); border-radius: var(--radius);
    padding: 36px 32px; box-shadow: var(--shadow); }
.login-brand { margin-bottom: 22px; }
.login-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.login-card > p.muted { margin-bottom: 22px; }
.login-card .dash-form { display: flex; flex-direction: column; gap: 16px; }
.login-card .btn-block { margin-top: 6px; }
.login-back { display: inline-block; margin-top: 20px; font-size: .9rem; }
.login-back:hover { color: var(--text); }

/* Delivery & post status badges */
.badge-prepared { background: rgba(154, 163, 189, .18); color: #c2c9dd; }
.badge-active { background: rgba(58, 210, 159, .18); color: #4fe0b4; }
.badge-expired { background: rgba(154, 163, 189, .14); color: var(--muted); }
.badge-revoked { background: rgba(99, 102, 241, .16); color: #ff7ba2; }
.badge-draft { background: rgba(154, 163, 189, .18); color: #c2c9dd; }
.badge-published { background: rgba(58, 210, 159, .18); color: #4fe0b4; }

/* Header row with an action button on the right */
.dash-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-head-row .btn { flex: 0 0 auto; }

/* Quick actions on the overview */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }

/* Forms */
.form-panel { background: var(--surface); border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius); padding: 28px; max-width: 760px; }
.dash-form .form-grid { margin-bottom: 4px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 22px; }
.form-actions .btn-reject { border: 1px solid rgba(99, 102, 241, .5); }
input[type="file"].field-input { padding: 9px 12px; cursor: pointer; }
input[type="file"].field-input::file-selector-button {
    background: var(--accent2); color: #fff; border: 0; border-radius: 8px;
    padding: 6px 12px; margin-inline-end: 12px; cursor: pointer; font: inherit; font-size: .85rem;
}
.check-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; text-transform: none;
    letter-spacing: normal; font-weight: 500; color: var(--text); }
.check-label input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.check-label.standalone { margin: 8px 0 4px; font-size: .92rem; }
.form-field.is-check { gap: 0; }

/* Current image on post edit */
.current-image { margin-bottom: 20px; }
.current-image img { max-height: 200px; border-radius: 10px; display: block; margin-bottom: 6px; }

/* Photo grid (delivery detail) */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 20px; }
.photo-tile { position: relative; border-radius: 10px; overflow: hidden; background: var(--bg-alt); }
.photo-tile img { width: 100%; height: 110px; object-fit: cover; display: block; }
.photo-tile form { margin: 0; }
.photo-del { position: absolute; top: 6px; inset-inline-end: 6px; width: 26px; height: 26px; border: 0;
    border-radius: 50%; background: rgba(12, 17, 36, .8); color: #fff; cursor: pointer; font-size: .8rem; line-height: 1; }
.photo-del:hover { background: var(--accent); }
.add-photos { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.add-photos .field-input { flex: 1 1 240px; }

/* Secure link panel */
.copy-field { margin-bottom: 8px; font-size: .85rem; }
.send-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); }
.send-block h3 { font-size: 1rem; margin-bottom: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { transform: none; }

/* Row thumbnail (posts list) */
.row-thumb { height: 40px; width: 56px; object-fit: cover; border-radius: 6px; display: block; }
.dash-link.danger, .row-actions a.danger { color: #ff7ba2; }

/* Delete confirmation */
.confirm-panel { max-width: 520px; }
.confirm-thumb { max-height: 160px; border-radius: 10px; margin-bottom: 16px; display: block; }

@media (max-width: 760px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
    .dash-topbar-inner { flex-wrap: wrap; gap: 10px 16px; }
    .dash-nav { order: 3; width: 100%; }
    .dash-actions { gap: 12px; }
    .dash-link { font-size: .85rem; }
}

@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .cards { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 14px; }
    .nav-links a { display: none; }
    /* Keep the booking call-to-action reachable on mobile. */
    .nav-links a.nav-cta { display: inline-block; padding: 6px 14px; }
    /* Booking page stacks: intro above the form card. */
    .booking-layout { grid-template-columns: 1fr; gap: 28px; }
    .booking-aside { position: static; }
    .booking-card { padding: 22px; }
    /* Tighter vertical rhythm on smaller screens. */
    .hero { padding: 52px 0 40px; }
    .section { padding: 52px 0; }
}

@media (max-width: 600px) {
    /* On phones, paired fields (email/phone, date/time) go full width. */
    .form-grid { grid-template-columns: 1fr; }
    .form-field.span-1 { grid-column: 1 / -1; }

    /* Compact header so brand + booking CTA + language switch fit one row. */
    .nav { padding: 12px 0; gap: 10px; }
    .brand { font-size: 1.02rem; gap: 7px; }
    .brand-mark { font-size: 1.25rem; }
    .brand-accent { display: none; }          /* show "JustClickPics" only — saves width */
    .nav-links { gap: 8px; }
    .nav-links a.nav-cta { padding: 7px 12px; font-size: .85rem; }
    .lang-switch button { padding: 4px 9px; font-size: .8rem; }

    /* Hero: stack the call-to-action buttons full width for easy tapping. */
    .hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
    .hero p { font-size: 1rem; }
    .hero-cta { gap: 10px; }
    .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
    .section-title { font-size: 1.5rem; margin-bottom: 24px; }
}

@media (max-width: 400px) {
    /* On the narrowest phones, drop the header booking pill (the hero and
       footer still expose it) so nothing overflows the viewport. */
    .nav-links a.nav-cta { display: none; }
}
