/* site.css — hiddenalbums.com design system (editorial: cream-on-ink, Playfair serif) */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@400;500;600&display=swap');

/* ── TOKENS ── */
:root {
  --bg:            #0c0c0b;
  --bg2:           #131210;
  --bg3:           #1f1e1a;
  --surface:       rgba(233,228,215,0.06);
  --surface-hover: rgba(233,228,215,0.09);
  --border:        rgba(233,228,215,0.18);
  --border-md:     rgba(233,228,215,0.38);
  --text:          #e9e4d7;
  --text-2:        #9e9b93;
  --text-3:        #6b6860;
  --accent:        #e9e4d7;
  --accent-hover:  #ffffff;
  --accent-dim:    rgba(233,228,215,0.12);
  --accent-rgb:    233,228,215;
  --danger:        #c98a82;
  --success:       #9bb39a;
  --warning:       #cbb583;
  --font-display:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --radius-sm:     3px;
  --radius:        4px;
  --radius-lg:     6px;
  --radius-pill:   100px;
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
  --transition:    0.25s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 38%, var(--bg2) 0%, var(--bg) 62%);
}

/* ── TYPOGRAPHY ── */
.display { font-family: var(--font-display); }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
h2 { font-size: clamp(1.3rem, 4vw, 1.9rem); }
h3 { font-size: 1.1rem; }
a  { color: var(--text); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text-2); }
p  { line-height: 1.75; color: var(--text-2); }
.eyebrow { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.22em; color: var(--text-2); }
.thesis  { font-family: var(--font-display); font-style: italic; font-weight: 400; line-height: 1.7; }
.rule    { width: 34px; height: 1px; background: var(--border-md); margin: 36px auto; opacity: 0.7; }

/* ── LAYOUT ── */
.container      { max-width: 560px;  margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 13px 28px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text-2);
  text-decoration: none; transition: border-color var(--transition), color var(--transition), background-color var(--transition);
  white-space: nowrap; user-select: none;
}
.btn:hover { color: var(--text); border-color: var(--border-md); }
.btn-primary { color: var(--text); border-color: var(--border-md); }
.btn-primary:hover { background: rgba(233,228,215,0.06); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-md); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(201,138,130,0.35); }
.btn-danger:hover { background: rgba(201,138,130,0.1); }
.btn-sm { padding: 8px 16px; font-size: 0.65rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── FORM ELEMENTS ── */
label { display: block; font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-2); margin-bottom: 8px; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=url], input[type=number], input[type=color], textarea, select {
  width: 100%; background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-body);
  font-size: 0.9rem; padding: 12px 14px; transition: border-color var(--transition);
  outline: none; -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus,
input[type=date]:focus, input[type=number]:focus, input[type=url]:focus,
textarea:focus, select:focus { border-color: var(--border-md); background: rgba(233,228,215,0.02); }
input[type=color] { padding: 6px; height: 42px; cursor: pointer; }
textarea { resize: vertical; min-height: 90px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239e9b93' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-group { margin-bottom: 20px; }
.form-hint { font-size: 0.75rem; color: var(--text-3); margin-top: 6px; line-height: 1.5; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 6px; display: none; }
.form-error.show { display: block; }

/* ── TOGGLE ── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider { position: absolute; inset: 0; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-pill); cursor: pointer; transition: background var(--transition); }
.toggle-slider::before { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-3); transition: transform var(--transition), background var(--transition); }
.toggle input:checked ~ .toggle-slider { background: var(--accent-dim); }
.toggle input:checked ~ .toggle-slider::before { transform: translateX(18px); background: var(--text); }

/* ── CARD ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.card-sm { padding: 16px; border-radius: var(--radius); }

/* ── ALERT / TOAST ── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 16px; display: none; }
.alert.show { display: block; }
.alert-error   { background: rgba(201,138,130,0.08); border: 1px solid rgba(201,138,130,0.3); color: var(--danger); }
.alert-success { background: rgba(155,179,154,0.08); border: 1px solid rgba(155,179,154,0.25); color: var(--success); }
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--bg3); border: 1px solid var(--border-md); color: var(--text);
  font-size: 0.8rem; letter-spacing: 0.04em; padding: 11px 22px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow); transition: transform 0.3s ease; z-index: 9999;
  white-space: nowrap; max-width: 90vw; text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.toast-error, #toast.error { border-color: rgba(201,138,130,0.4); color: var(--danger); }

/* ── DIVIDER / BADGE ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.badge { display: inline-block; font-size: 0.62rem; font-weight: 500; letter-spacing: 0.14em; padding: 4px 10px; border-radius: var(--radius-pill); text-transform: uppercase; border: 1px solid var(--border); }
.badge-accent { background: var(--accent-dim); color: var(--text); }
.badge-muted  { background: transparent; color: var(--text-3); }
.badge-success{ background: rgba(155,179,154,0.1); color: var(--success); }

/* ════════════════════════════════════════
   DASHBOARD CHROME — universal header,
   nav, avatar, more-menu, notif-bell,
   notification panel. All pages with
   <link href="/css/site.css"> +
   <script src="/js/nav.js"> get these
   for free.
   ════════════════════════════════════════ */

/* Header */
.dash-header {
  height: 52px; background: var(--bg); border-bottom: 1px solid var(--border);
  padding: 0 20px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.dash-header-left  { display: flex; align-items: center; gap: 12px; }
.dash-header-right { display: flex; align-items: center; gap: 4px; }

/* Logo */
.dash-logo {
  font-family: var(--font-display) !important; font-weight: 400 !important;
  font-size: 1rem !important; letter-spacing: -0.015em !important;
  color: var(--text) !important; text-decoration: none !important;
}
.dash-logo .tld { color: var(--text-2); }
.tld { color: var(--text-2); }

/* Avatar */
.dash-av {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--bg3); overflow: hidden; display: flex; align-items: center;
  justify-content: center; font-size: 0.8rem; font-weight: 700; color: var(--text-3); flex: 0 0 auto;
}
.dash-av img { width: 100%; height: 100%; object-fit: cover; }

/* Nav links */
.dash-nav-link { font-size: 0.82rem; font-weight: 600; color: var(--text-3); text-decoration: none; padding: 5px 9px; border-radius: 7px; white-space: nowrap; transition: color 0.15s, background 0.15s; }
.dash-nav-link:hover { color: var(--text); background: var(--bg3); }
.dash-nav-link.active { color: var(--text); }
@media (max-width: 600px) { .dash-nav-link { display: none; } }

/* More menu */
.more-wrap { position: relative; }
.more-btn { font-size: 0.82rem; font-weight: 600; color: var(--text-3); background: none; border: none; cursor: pointer; padding: 5px 9px; border-radius: 7px; display: flex; align-items: center; gap: 3px; font-family: inherit; transition: color 0.15s, background 0.15s; white-space: nowrap; }
.more-btn:hover { color: var(--text); background: var(--bg3); }
.more-btn svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; transition: transform 0.15s; }
.more-wrap.open .more-btn svg { transform: rotate(180deg); }
.more-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 200px; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); z-index: 300; display: none; overflow: hidden; padding: 6px; }
.more-wrap.open .more-dropdown { display: block; }
.more-dd-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 9px; font-size: 0.84rem; font-weight: 500; color: var(--text-2); text-decoration: none; cursor: pointer; background: none; border: none; width: 100%; text-align: left; font-family: inherit; transition: background 0.12s, color 0.12s; }
.more-dd-item:hover { background: var(--bg3); color: var(--text); }
.more-dd-item svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; flex: 0 0 auto; opacity: 0.7; }
.more-dd-sep { height: 1px; background: var(--border); margin: 5px 0; }
.mobile-only { display: none; }
@media (max-width: 600px) { .mobile-only { display: flex; } }

/* Notification bell */
.notif-bell { position: relative; background: none; border: none; color: var(--text-3) !important; cursor: pointer; padding: 6px; border-radius: 8px; display: inline-flex; align-items: center; transition: color 0.15s, background 0.15s; }
.notif-bell:hover { color: var(--text) !important; background: var(--bg3); }
.notif-bell svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.notif-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #f43f5e; color: #fff; font-size: 0.62rem; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* Notification panel */
.notif-panel { position: absolute; top: 44px; right: 0; width: 320px; max-width: 90vw; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); z-index: 300; display: none; overflow: hidden; }
.notif-panel.open { display: block; }
.notif-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 0.85rem; font-weight: 700; }
.notif-markall { background: none; border: none; color: var(--text-2); font-size: 0.76rem; font-weight: 600; cursor: pointer; }
.notif-markall:hover { color: var(--text); }
.notif-panel-list { max-height: 360px; overflow-y: auto; }
.notif-panel-empty { padding: 28px 16px; text-align: center; color: var(--text-3); font-size: 0.85rem; }
.notif-row { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.notif-row:last-child { border-bottom: none; }
.notif-row .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex: 0 0 auto; }
.notif-row .dot.read { background: transparent; }
.notif-row .txt { font-size: 0.83rem; color: var(--text); line-height: 1.4; }
.notif-row .when { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }
.notif-panel-foot { display: block; padding: 11px 14px; text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--text-2); text-decoration: none; border-top: 1px solid var(--border); }
a.dash-logo:hover { color: var(--text) !important; }
a.dash-nav-link:hover { color: var(--text); background: var(--bg3); }
a.more-dd-item:hover { background: var(--bg3); color: var(--text); }
a.notif-panel-foot:hover { background: var(--bg3); color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 480px) { .container, .container-wide { padding: 0 16px; } }

/* ── COMPACT SETTINGS ROWS (used on Public + Private dashboards) ── */
.priv-settings { margin-top: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: visible; }
.priv-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); position: relative; z-index: 1; }
.priv-row:last-child { border-bottom: none; }
/* a row with a tooltip showing must paint above the rows below it */
.priv-row:hover, .priv-row:focus-within { z-index: 600; }
.priv-row-label { font-size: 0.86rem; font-weight: 500; color: var(--text); display: inline-flex; align-items: center; }
.priv-row .info-icon, .priv-row .vip-info-icon { margin-left: 7px; }
/* tooltip opens to the RIGHT of the icon, vertically centered; high z so nothing covers it */
.priv-row .info-tooltip, .priv-row .vip-info-tooltip { top: 50%; bottom: auto; left: calc(100% + 12px); right: auto; transform: translateY(-50%); width: 230px; z-index: 700; }
.priv-row .info-tooltip::before, .priv-row .vip-info-tooltip::before { top: 50%; left: -5px; right: auto; transform: translateY(-50%) rotate(45deg); border: none; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); }
/* last row: open tooltip so its lower edge sits at the icon center — grows upward,
   never hanging below the settings group */
.priv-row:last-child .info-tooltip, .priv-row:last-child .vip-info-tooltip { top: auto; bottom: calc(50% - 14px); transform: none; }
.priv-row:last-child .info-tooltip::before, .priv-row:last-child .vip-info-tooltip::before { top: auto; bottom: 8px; transform: rotate(45deg); }

/* info (i) icon + hover tooltip */
.info-icon, .vip-info-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--bg3); border: 1px solid var(--border); color: var(--text-3); font-size: 0.7rem; font-weight: 700; cursor: pointer; vertical-align: middle; flex: 0 0 auto; line-height: 1; user-select: none; }
.info-icon:hover, .vip-info-icon:hover { border-color: var(--text-2); color: var(--text-2); }
.info-tooltip, .vip-info-tooltip { display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 260px; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; font-size: 0.79rem; color: var(--text-2); line-height: 1.55; z-index: 200; box-shadow: var(--shadow); pointer-events: none; text-transform: none; letter-spacing: 0; font-weight: 400; }
.info-tooltip strong, .vip-info-tooltip strong { color: var(--text); }
.info-tooltip::before, .vip-info-tooltip::before { content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%); width: 8px; height: 8px; background: var(--bg2); border-left: 1px solid var(--border); border-top: 1px solid var(--border); rotate: 45deg; }
.info-icon:hover .info-tooltip, .info-icon:focus .info-tooltip,
.vip-info-icon:hover .vip-info-tooltip, .vip-info-icon:focus .vip-info-tooltip { display: block; }
