/* picdrop — ink-blue palette from the design canvas */
:root {
  --ink-950: #0B1426; --ink-900: #111D36; --ink-850: #16244A; --ink-line: #2A3D66;
  --text-d: #EEF2FA; --muted-d: #A3B1CC; --soft-d: #C9D3E6;
  --sky: #7FA6EE; --sky-hover: #A9C3F5; --sand: #E8C27A;
  --bg: #F3F6FB; --card: #FFFFFF; --line: #DCE3F0; --line-2: #C5D0E3;
  --ink: #14284F; --body: #3A4A66; --muted: #56637D; --link: #2A4A8A; --tint: #E4EBF7;
  --warn-bg: #FFF4E5; --warn-line: #F0D3A6; --warn: #9A5B00; --warn-ink: #5C3600;
  --ok: #1F5A30; --danger: #B3261E;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; }
a { color: var(--link); }
h1, h2, h3 { margin: 0; line-height: 1.3; }
button, input, select { font-family: inherit; font-size: 15px; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: var(--radius); border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600;
  cursor: pointer; text-decoration: none; }
.btn:hover { background: #1C3566; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--tint); }
.btn.danger { background: transparent; color: var(--danger); border-color: #E8B4B0; }
.btn.small { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field select { height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.field input:focus, .field select:focus { outline: 2px solid var(--sky); outline-offset: 1px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.error { color: var(--danger); font-size: 14px; min-height: 1.4em; }

/* photographer layout */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 240px; max-width: 280px; padding: 28px 20px; background: var(--card); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; text-decoration: none; color: var(--ink); }
.brand .mark { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); display: grid; place-items: center; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a, .nav button { display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 10px; color: var(--body);
  text-decoration: none; background: none; border: none; cursor: pointer; text-align: right; }
.nav a.active { background: var(--tint); color: var(--ink); font-weight: 600; }
.meter { margin-top: auto; padding: 16px; border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.meter .bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter .bar span { display: block; height: 100%; background: var(--ink); }
.main { flex: 999 1 560px; min-width: 0; padding: 32px clamp(16px, 4vw, 48px); display: flex; flex-direction: column; gap: 24px; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.alert { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 14px;
  background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.alert strong { display: block; }
.table-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
th { text-align: right; color: var(--muted); font-weight: 500; font-size: 13px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
td { padding: 16px 20px; border-bottom: 1px solid #E8EDF6; }
.chip { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--tint); color: var(--body); }
.chip.ready { background: #E8EEF9; color: #234A8A; }
.chip.opened { background: #EAF3EC; color: var(--ok); }
.chip.picked { background: #FFF1DC; color: #7A4A00; }
.chip.paid { background: var(--ink); color: #fff; }
.chip.expired { background: #F3E3E2; color: #8A1F18; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* choice pills, radios, switches */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line-2); background: #fff; color: var(--body); cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.option { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.option:has(input:checked) { border-color: var(--ink); background: #EAF0FA; }
.option input { width: 18px; height: 18px; accent-color: var(--ink); }
.option small { display: block; color: var(--muted); font-size: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: var(--line-2); transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 12px; background: #fff; transition: right .15s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { right: 25px; }
.switch input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; direction: ltr; }
.stepper button { width: 44px; height: 44px; border: none; background: none; font-size: 20px; cursor: pointer; color: var(--ink); }
.stepper output { min-width: 24px; text-align: center; font-weight: 600; }

/* upload + thumbs */
.drop { border: 2px dashed var(--line-2); border-radius: 14px; padding: 32px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.drop.over { border-color: var(--sky); background: #EAF0FA; }
.progress { height: 6px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--tint); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .tag { position: absolute; top: 6px; right: 6px; background: rgba(11,20,38,.75); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.thumb .liked { position: absolute; bottom: 6px; left: 6px; color: var(--sand); }
.thumb .del { position: absolute; top: 4px; left: 4px; width: 32px; height: 32px; border-radius: 16px; border: none; background: rgba(11,20,38,.7); color: #fff; cursor: pointer; }
.pin-box { padding: 16px; border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.pin { font-size: 28px; font-weight: 700; letter-spacing: 6px; direction: ltr; }
.share { background: var(--ink); color: var(--text-d); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.share .btn { background: var(--sky); border-color: var(--sky); color: var(--ink-950); }
.share .btn.ghost { background: transparent; color: var(--text-d); border-color: #3A4A66; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > .wide { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.cols > .narrow { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* auth page */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--ink-950); }
.auth .card { width: min(420px, 100%); }
.tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 12px; }
.tabs button { flex: 1; height: 42px; border: none; border-radius: 9px; background: none; cursor: pointer; color: var(--body); }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20,40,79,.12); }

/* client gallery (dark) */
.g { min-height: 100vh; background: var(--ink-950); color: var(--text-d); }
.g a { color: var(--sky); }
.g-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 20px 140px; display: flex; flex-direction: column; gap: 20px; }
.g-lock { max-width: 420px; margin: 0 auto; padding: 56px 24px 32px; min-height: 100vh; display: flex; flex-direction: column; gap: 28px; }
.g-muted { color: var(--muted-d); font-size: 15px; }
.g-studio { display: flex; align-items: center; gap: 12px; }
.g-avatar { width: 44px; height: 44px; border-radius: 22px; background: var(--ink-850); border: 1px solid var(--ink-line); display: grid; place-items: center; color: var(--sky); font-weight: 600; }
.g-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--ink-850); display: grid; place-items: center; }
.pin-inputs { display: flex; gap: 8px; justify-content: space-between; direction: ltr; }
.pin-inputs input { width: 100%; max-width: 54px; height: 58px; border-radius: 12px; border: 1px solid var(--ink-line); background: var(--ink-900);
  color: var(--text-d); font-size: 24px; font-weight: 600; text-align: center; }
.pin-inputs input:focus { outline: none; border-color: var(--sky); }
.g-btn { display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: 14px; border: none; background: var(--sky);
  color: var(--ink-950); font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; }
.g-btn:hover { background: var(--sky-hover); }
.g-btn.outline { background: transparent; border: 1px solid var(--sky); color: var(--sky); width: auto; padding: 0 18px; min-height: 48px; font-size: 14px; }
.g-note { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: var(--ink-900); font-size: 14px; color: var(--soft-d); }
.g-error { color: #FFB4AB; min-height: 1.4em; font-size: 14px; }
.g-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.g-tab { min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--ink-line); background: transparent; color: var(--soft-d); cursor: pointer; white-space: nowrap; }
.g-tab[aria-pressed="true"] { background: var(--text-d); border-color: var(--text-d); color: var(--ink-950); font-weight: 600; }
.g-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: #12224A; border: 1px solid #2E4A85; color: #D6E0F5; font-size: 14px; }
.g-grid { columns: 2 180px; column-gap: 8px; }
.g-item { position: relative; break-inside: avoid; margin-bottom: 8px; border-radius: 10px; overflow: hidden; background: var(--ink-900); }
.g-item img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.g-wm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; overflow: hidden; }
.g-wm span { transform: rotate(-24deg); font-size: clamp(16px, 4vw, 28px); font-weight: 700; letter-spacing: 3px; color: rgba(238,242,250,.42);
  text-shadow: 0 1px 3px rgba(0,0,0,.35); white-space: nowrap; }
.g-actions { position: absolute; bottom: 8px; left: 8px; display: flex; gap: 6px; }
.g-round { width: 44px; height: 44px; border-radius: 22px; border: none; background: rgba(11,20,38,.65); display: grid; place-items: center; cursor: pointer; color: var(--text-d); text-decoration: none; }
.g-bar { position: fixed; bottom: 0; left: 0; right: 0; padding: 16px 20px 24px; background: var(--ink-950); border-top: 1px solid #1E2E52; }
.g-bar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
