/* =========================================================
   COCOANUT DASHBOARD · shared look (the Cocoanut identity: the logo's green #002928 and gold; Laborya fonts)
   Phone first. Shared classes for the editor pages: .d-top (top bar), .d-wrap, .d-card, .d-btn (.ghost .gold .danger .sm),
   .d-input / .d-label, .d-row, .d-chip, .d-switch, .d-toast, .d-modal, .d-empty, .d-tabs.
   ========================================================= */
:root {
  --ink: #002928; --ink-2: #0B3B39; --gilt: #D4A445; --gold-1: #F5E8B1; --gold-2: #E0B048; --gold-3: #B57A22;
  --gold: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 48%, var(--gold-3) 100%);
  --page: #F4F1EA; --card: #fff; --mist: #E6DECF; --muted: #6E716B; --text: #13201F; --bad: #B3261E; --ok: #1E7A4C;
  --display: "Cormorant Garamond", Georgia, serif; --ui: "Jost", "Segoe UI", Arial, sans-serif;
  --r: 18px; --gutter: 16px; --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font-family: var(--ui); font-size: 15px; line-height: 1.5; min-height: 100vh; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; line-height: 1.1; color: var(--ink); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gilt); outline-offset: 2px; }

/* top bar: back to the two dashboards, the title, View site */
.d-top { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; }
.d-top-in { max-width: 1100px; margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 12px; min-height: 62px; }
.d-back { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px solid rgba(224,176,72,.45); color: var(--gold-1); font-size: 13.5px; font-weight: 500; flex: none; }
.d-back svg, .d-view svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.d-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.d-title img { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.d-title > div { min-width: 0; }
.d-title b { display: block; font-family: var(--display); font-size: 21px; font-weight: 600; line-height: 1.1; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-title small { display: block; font-size: 12px; color: rgba(255,255,255,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-view { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 13.5px; font-weight: 600; flex: none; }
@media (max-width: 520px) { .d-back span { display: none; } .d-back { padding: 0 10px; } .d-view { padding: 0 12px; font-size: 0; gap: 0; } .d-view svg { width: 19px; height: 19px; } }

.d-wrap { max-width: 1100px; margin: 0 auto; padding: 18px var(--gutter) 110px; }
.d-card { background: var(--card); border: 1px solid var(--mist); border-radius: var(--r); padding: 16px; }
.d-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 500; transition: transform .1s, background .2s, opacity .2s; }
.d-btn:active { transform: scale(.97); }
.d-btn:disabled { opacity: .45; cursor: not-allowed; }
.d-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.d-btn.ghost { background: #fff; color: var(--ink); border-color: var(--mist); }
.d-btn.gold { background: var(--gold); color: var(--ink); border: 0; font-weight: 600; }
.d-btn.danger { background: var(--bad); border-color: var(--bad); }
.d-btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.d-label { display: grid; gap: 5px; font-size: 13px; font-weight: 500; color: var(--muted); }
.d-input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--mist); border-radius: 12px; background: #fff; color: var(--text); font-size: 15px; }
textarea.d-input { min-height: 72px; resize: vertical; }
.d-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,41,40,.08); }
.d-input[dir="rtl"] { font-family: "Tajawal", var(--ui); }
.d-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #EEF3F2; color: var(--ink); }
.d-chip.gold { background: #FBF1D9; color: #7A5413; }
.d-chip.bad { background: #FBE7E5; color: var(--bad); }
.d-chip.ok { background: #E3F3EA; color: var(--ok); }
/* an on/off switch: <label class="d-switch"><input type="checkbox"><span></span> Shown</label> */
.d-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; user-select: none; }
.d-switch input { position: absolute; opacity: 0; pointer-events: none; }
.d-switch span { width: 42px; height: 24px; border-radius: 999px; background: #CFC8BA; position: relative; transition: background .2s; flex: none; }
.d-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.d-switch input:checked + span { background: var(--ink); }
.d-switch input:checked + span::after { transform: translateX(18px); }
.d-switch input:focus-visible + span { outline: 2px solid var(--gilt); outline-offset: 2px; }
.d-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: #fff; border: 1px solid var(--mist); overflow-x: auto; scrollbar-width: none; }
.d-tabs button { flex: none; min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 500; white-space: nowrap; }
.d-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.d-empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.d-toast { position: fixed; z-index: 90; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px; box-shadow: 0 12px 30px rgba(0,41,40,.28); transition: opacity .25s, transform .3s var(--ease); max-width: calc(100vw - 32px); }
.d-toast.show { opacity: 1; transform: translate(-50%, 0); }
.d-toast.bad { background: var(--bad); }
.d-modal { position: fixed; inset: 0; z-index: 95; background: rgba(0,20,19,.5); display: grid; place-items: center; padding: 16px; }
.d-modal-box { width: min(420px, 100%); background: #fff; border-radius: 20px; padding: 20px; display: grid; gap: 16px; }
.d-modal-box p { margin: 0; font-size: 16px; }
.d-modal-box .d-row { justify-content: flex-end; }

/* the first screen: choose a dashboard */
.pick { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 26px; padding: 30px var(--gutter) 50px;
  background: radial-gradient(120% 60% at 50% 0%, #0B3B39 0%, var(--ink) 60%); color: #fff; text-align: center; }
.pick-logo { width: min(260px, 70vw); height: auto; }
.pick h1 { color: #fff; font-size: 34px; }
.pick p { margin: 0; color: rgba(255,255,255,.7); }
.pick-cards { width: min(760px, 100%); display: grid; gap: 14px; }
.pick-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; text-align: start; padding: 20px; border-radius: 22px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(224,176,72,.35); color: #fff; transition: transform .25s var(--ease), background .25s, border-color .25s; }
.pick-card:hover, .pick-card:focus-visible { transform: translateY(-3px); background: rgba(255,255,255,.1); border-color: var(--gilt); }
.pick-ic { width: 58px; height: 58px; border-radius: 16px; background: var(--gold); color: var(--ink); display: grid; place-items: center; }
.pick-ic svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pick-card b { display: block; font-family: var(--display); font-size: 25px; font-weight: 600; line-height: 1.1; }
.pick-card small { display: block; font-size: 13.5px; color: rgba(255,255,255,.7); margin-top: 3px; }
.pick-card .ar { font-family: "Tajawal", sans-serif; font-size: 14px; color: var(--gold-1); margin-top: 2px; }
.pick-go { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); display: grid; place-items: center; }
.pick-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pick-foot { font-size: 12px; color: rgba(255,255,255,.55); }
@media (min-width: 720px) { .pick-cards { grid-template-columns: 1fr 1fr; } .pick-card { grid-template-columns: 1fr; justify-items: start; padding: 26px; } .pick-go { justify-self: end; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
