/* ============================================================
   portal.css  —  Auth · Client Dashboard · Admin Dashboard
   Builds on top of style.css variables.
   ============================================================ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED PRIMITIVES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.portal-body {
  margin: 0; padding: 0;
  background: var(--rich-black);
  min-height: 100vh;
  font-family: var(--font);
  color: var(--body-text);
}

/* Status badge — driven by CSS custom property --sc (color) */
.sbadge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 0.72rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  background: color-mix(in srgb, var(--sc) 15%, transparent);
  color: var(--sc);
  border: 1px solid color-mix(in srgb, var(--sc) 30%, transparent);
}

/* Alerts */
.portal-alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--r-sm);
  font-size: 0.86rem; margin-bottom: 20px;
}
.portal-alert--ok   { background: rgba(34,197,94,.1);   color:var(--clr-success-pale); border:1px solid rgba(34,197,94,.25); }
.portal-alert--warn { background: rgba(249,115,22,.1);  color:var(--clr-warning-pale); border:1px solid rgba(249,115,22,.25); }
.portal-alert--err  { background: rgba(239,68,68,.1);   color:var(--clr-error-pale); border:1px solid rgba(239,68,68,.25); }

/* Cards */
.pcard {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 20px;
}
.pcard__head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.pcard__head h2 {
  font-size: .92rem; font-weight: 600; color: var(--white);
  margin: 0; display: flex; align-items: center; gap: 8px;
}
.pcard__head h2 i { color: var(--blue); }
.pcard__body { padding: 20px; }

/* Tables */
.ptable-wrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.ptable-wrap::-webkit-scrollbar       { height: 4px; }
.ptable-wrap::-webkit-scrollbar-track { background: transparent; }
.ptable-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
.ptable-wrap::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.28); }
.ptable {
  width: 100%; border-collapse: collapse; font-size: .82rem;
}
.ptable th {
  padding: 9px 14px; text-align: left;
  font-size: .7rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.ptable td {
  padding: 11px 14px; color: var(--body-text);
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.ptable tbody tr:last-child td { border-bottom: none; }
.ptable tbody tr:hover td { background: rgba(255,255,255,.02); }
.eq-list-wrap { padding: 0; }
.eq-header-table { border-radius: 8px 8px 0 0; margin-bottom: 0; border-bottom: none; }
.eq-header-table thead th { border-bottom: 1px solid var(--border); }
.eq-cat-section { margin-bottom: 2px; }
.eq-cat-label {
  background: rgba(255,255,255,.04); color: var(--muted);
  font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.eq-cat-label i { margin-right: 6px; opacity: .6; }
.eq-cat-table { border-radius: 0; margin-top: 0; border-top: none; }
.eq-cat-section:last-child .eq-cat-table { border-radius: 0 0 8px 8px; }
.drag-handle { cursor: grab; width: 32px; text-align: center; }
.sortable-ghost td { background: rgba(1,149,255,.08) !important; opacity: .6; }

/* ── Physical Units section ── */
.units-section {
  margin-top: 24px; border-top: 1px solid var(--border); padding-top: 18px;
}
.units-section__head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.units-section__head h3 {
  font-size: .88rem; font-weight: 600; color: var(--white); margin: 0;
  display: flex; align-items: center; gap: 7px;
}
.units-count { font-size: .75rem; color: var(--muted); }
.units-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.units-empty { font-size: .8rem; color: var(--muted); text-align: center; padding: 12px 0; margin: 0; }
.unit-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 8px 12px;
}
.unit-row__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.unit-serial { font-size: .83rem; font-weight: 600; color: var(--white); }
.unit-notes  { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-row__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.unit-add-form { border-top: 1px solid var(--border); padding-top: 14px; }

/* ── Categories management ── */
.cat-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cat-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 8px 12px;
}
.cat-name { font-size: .85rem; font-weight: 600; color: var(--white); flex: 1; min-width: 0; }
.cat-name input.cat-edit-input {
  width: 100%; background: rgba(255,255,255,.06); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 9px 12px; font-size: .85rem; color: var(--white);
  outline: none; transition: border-color .2s;
}
.cat-name input.cat-edit-input:focus { border-color: var(--blue); }
.cat-eq-count { font-size: .75rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.cat-row__actions { display: flex; gap: 6px; flex-shrink: 0; }
.cat-add-form { border-top: 1px solid var(--border); padding-top: 14px; }
.unit-row__edit { display: flex; gap: 8px; flex: 1; min-width: 0; }
.unit-row__edit input {
  flex: 1; min-width: 0; background: var(--input-bg, rgba(255,255,255,.06));
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 5px 9px; font-size: .82rem; color: var(--white);
}
.unit-row__edit input:focus { outline: none; border-color: var(--blue); }
.ptable code {
  background: rgba(1,149,255,.1); border-radius: 4px;
  padding: 2px 7px; font-size: .79rem; color: var(--blue);
}
.td-name   { font-weight: 600; color: var(--white); }
.td-sub    { font-size: .75rem; color: var(--muted); }
.muted     { color: var(--muted); }

/* Empty state */
.pempty {
  text-align: center; padding: 48px 20px;
  color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.pempty i { font-size: 2rem; opacity: .2; }
.pempty p { font-size: .88rem; margin: 0; }

/* Stat cards */
.pstats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.pstat {
  background: var(--charcoal); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
}
.pstat__icon {
  width: 42px; height: 42px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.pstat__val   { font-size: 1.25rem; font-weight: 700; color: var(--white); line-height: 1.2; }
.pstat__label { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.pstat__sub   { font-size: .72rem; margin-top: 4px; }
.pstat__sub a { text-decoration: none; }
.sub--ok   { color: var(--clr-success); }
.sub--warn { color: var(--clr-warning); }
.sub--err  { color: var(--clr-error); }
.sub--info { color: var(--muted); }

/* Form fields */
.pfield { display: flex; flex-direction: column; margin-bottom: 16px; }
.pfield label {
  font-size: .79rem; font-weight: 600; color: var(--muted);
  margin-bottom: 6px; display: flex; align-items: center;
  justify-content: space-between; gap: 4px; flex-wrap: wrap;
}
.pfield input, .pfield select, .pfield textarea {
  background: rgba(255,255,255,.05); border: 1px solid var(--border-lt);
  border-radius: var(--r-sm); color: var(--white); padding: 10px 14px;
  font-size: .88rem; font-family: inherit; width: 100%; box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none;
}
.pfield input:focus, .pfield select:focus, .pfield textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim);
}
.pfield input.err { border-color: var(--clr-error); }
.pfield input.ok  { border-color: var(--clr-success); }
.pfield input[disabled] { opacity: .5; cursor: not-allowed; }
.pfield input[readonly] { opacity: .6; cursor: default; border-color: transparent; }
.pfield input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #1a1a1a inset !important; -webkit-text-fill-color:var(--white) !important; }
.field-hint  { font-size: .71rem; font-weight: 400; color: var(--muted); }
.field-err   { font-size: .74rem; color: var(--clr-error-lt); margin-top: 4px; }
.field-link  { font-size: .77rem; color: var(--blue); text-decoration: none; }
.field-link:hover { text-decoration: underline; }
.req { color: var(--clr-error); }

/* Two-col row */
.prow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 580px) { .prow { grid-template-columns: 1fr; } }

/* Password toggle */
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 0; top: 0; width: 42px; height: 100%;
  background: transparent; border: none; color: var(--muted); cursor: pointer;
  font-size: .9rem; display: flex; align-items: center; justify-content: center;
  transition: color .2s;
}
.pw-toggle:hover { color: var(--white); }

/* Select arrow */
.pfield select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 36px;
}

/* Buttons */
.btn-xs  { padding: 4px 10px; font-size: .75rem; border-radius: var(--r-sm); }
.btn-danger { background: rgba(239,68,68,.15); color:var(--clr-error); border:1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn-success { background: rgba(34,197,94,.15); color:var(--clr-success); border:1px solid rgba(34,197,94,.3); }
.btn-success:hover { background: rgba(34,197,94,.25); }
.btn-outline { background: transparent; border: 1px solid var(--border-lt); color: var(--body-text); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-warn  { background: rgba(234,179,8,.15); color: #eab308; border: 1px solid rgba(234,179,8,.3); }
.btn-warn:hover  { background: rgba(234,179,8,.28); }

/* Filter bar */
.pfilters {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.pfilter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pfilter-tab {
  padding: 5px 14px; border-radius: var(--r-pill); font-size: .8rem;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; text-decoration: none; transition: all .2s;
}
.pfilter-tab:hover  { background: rgba(255,255,255,.09); color: var(--white); }
.pfilter-tab.active { background: var(--blue-dim); border-color: var(--blue-border); color: var(--blue); }
.psearch {
  background: rgba(255,255,255,.05); border: 1px solid var(--border-lt);
  border-radius: var(--r-sm); color: var(--white); padding: 7px 12px;
  font-size: .84rem; font-family: inherit; min-width: 200px;
}
.psearch:focus { outline: none; border-color: var(--blue); }
.pselect {
  background: rgba(255,255,255,.05); border: 1px solid var(--border-lt);
  border-radius: var(--r-sm); color: var(--white); padding: 7px 12px;
  font-size: .84rem; font-family: inherit; cursor: pointer;
}
.result-count { font-size: .8rem; color: var(--muted); margin-left: auto; }

/* Action group */
.action-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Detail header */
.detail-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-bottom: 20px;
}
.detail-back {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted); text-decoration: none; font-size: .84rem;
  margin-bottom: 8px; transition: color .2s;
}
.detail-back:hover { color: var(--white); }
.detail-title { font-size: 1.6rem; font-weight: 700; color: var(--white); margin: 4px 0 2px; font-family: monospace; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; padding-top: 6px; }

/* Action bar */
.action-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
  padding: 14px 16px; background: var(--charcoal);
  border: 1px solid var(--border); border-radius: var(--r-md);
}

/* Detail grid */
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }

/* Info list */
.info-list { display: flex; flex-direction: column; }
.info-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 11px 20px; font-size: .84rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.info-row:last-child { border-bottom: none; }
.info-row > span:first-child { color: var(--muted); white-space: nowrap; }
.info-row strong, .info-row a { color: var(--white); font-weight: 500; word-break: break-all; }
.info-row a { color: var(--blue); text-decoration: none; }
.info-row a:hover { text-decoration: underline; }

/* Invoice rows */
.inv-rows { padding: 14px 20px; display: flex; flex-direction: column; gap: 9px; }
.inv-row { display: flex; justify-content: space-between; font-size: .84rem; color: var(--muted); }
.inv-row--total { font-size: .96rem; font-weight: 700; color: var(--white); padding-top: 9px; border-top: 1px solid var(--border); margin-top: 4px; }
.inv-row--dep   { color: var(--blue); font-weight: 600; }

/* Textarea */
.ptextarea {
  background: rgba(255,255,255,.05); border: 1px solid var(--border-lt);
  border-radius: var(--r-sm); color: var(--white); padding: 10px 14px;
  font-size: .88rem; font-family: inherit; width: 100%; box-sizing: border-box;
  resize: vertical; transition: border-color .2s;
}
.ptextarea:focus { outline: none; border-color: var(--blue); }

/* Doc link */
.doc-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--blue); text-decoration: none; padding: 4px 8px;
  background: var(--blue-dim); border-radius: var(--r-sm); transition: background .2s;
}
.doc-link:hover { background: rgba(1,149,255,.2); }

/* Checkbox */
.pcheck {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .82rem; color: var(--muted); cursor: pointer; line-height: 1.45; margin-bottom: 10px;
}
.pcheck input[type=checkbox] { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; accent-color: var(--blue); }
.pcheck a { color: var(--blue); text-decoration: none; }

/* Wizard steps */
.wizard-step-label {
  display: flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 16px;
}
.wizard-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: var(--white); font-size: .72rem; flex-shrink: 0;
}

/* Nav section labels (admin sidebar) */
.nav-section {
  font-size: .64rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.28);
  padding: 20px 18px 5px;
  pointer-events: none; user-select: none;
}
.nav-section:first-child { padding-top: 8px; }

/* ── Page tabs (vtabs) ───────────────────────────────────────── */
.vtabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto; flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.vtabs::-webkit-scrollbar { display: none; }
.vtab {
  padding: 9px 18px; font-size: .85rem; font-weight: 600;
  color: var(--muted); background: transparent; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; display: flex; align-items: center; gap: 7px;
  transition: color .15s, border-color .15s;
  flex-shrink: 0; white-space: nowrap;
}
.vtab:hover { color: var(--white); }
.vtab.active { color: var(--blue); border-bottom-color: var(--blue); }
.vtab .vtab-badge {
  background: var(--blue); color: var(--white); border-radius: var(--r-sm);
  font-size: .68rem; font-weight: 700; padding: 1px 6px; min-width: 18px;
  text-align: center;
}
.vtab-panel { display: none; }
.vtab-panel.active { display: block; }

/* Album card grid */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}
.album-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s, transform .15s;
}
.album-card:hover { border-color: var(--blue-border); transform: translateY(-2px); }
.album-card__cover {
  display: block; position: relative; aspect-ratio: 16/9;
  background: var(--dark); overflow: hidden; text-decoration: none;
}
.album-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.album-card:hover .album-card__cover img { transform: scale(1.04); }
.album-card__nocover {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: rgba(255,255,255,.18); font-size: 2.4rem;
}
.album-card__badges-top {
  position: absolute; top: 8px; left: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.album-card__badges-top .sbadge {
  font-size: .67rem !important;
}
.album-card__lock {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center;
  color: var(--clr-warning); font-size: .7rem;
}
.album-card__body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.album-card__title {
  font-weight: 600; font-size: .9rem; color: var(--white);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.album-card__meta { font-size: .74rem; color: var(--muted); line-height: 1.5; flex: 1; }
.album-card__actions { display: flex; flex-wrap: nowrap; gap: 4px; margin-top: 4px; }

/* Album card icon action buttons */
.acbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-sm); border: none;
  cursor: pointer; font-size: .82rem; text-decoration: none;
  transition: background .15s, transform .1s;
  flex-shrink: 0;
}
.acbtn:hover { transform: translateY(-1px); }
.acbtn--primary { background: rgba(1,149,255,.15); color: var(--blue); }
.acbtn--primary:hover { background: rgba(1,149,255,.3); }
.acbtn--ok  { background: rgba(34,197,94,.15); color: var(--clr-success); }
.acbtn--ok:hover { background: rgba(34,197,94,.3); }
.acbtn--warn { background: rgba(234,179,8,.15); color: #eab308; }
.acbtn--warn:hover { background: rgba(234,179,8,.3); }
.acbtn--blue { background: rgba(99,102,241,.15); color: #818cf8; }
.acbtn--blue:hover { background: rgba(99,102,241,.3); }
.acbtn--muted { background: rgba(255,255,255,.07); color: var(--muted); }
.acbtn--muted:hover { background: rgba(255,255,255,.14); color: var(--white); }
.acbtn--danger { background: rgba(239,68,68,.12); color: var(--clr-error-lt); }
.acbtn--danger:hover { background: rgba(239,68,68,.28); }

/* ── Album creation wizard ────────────────────────────────────── */
.awiz-card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.awiz-card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.awiz-card__title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1rem; color: var(--white);
}
.awiz-card__title i { color: var(--blue); font-size: .95rem; }

.awiz-body {
  display: grid;
  grid-template-columns: 360px 1fr;
}
@media (max-width: 900px) { .awiz-body { grid-template-columns: 1fr; } }

/* Left panel — form details */
.awiz-details {
  padding: 28px 28px 0;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 520px;
}
.awiz-title-input { font-size: 1rem !important; }
.awiz-section-label {
  font-size: .63rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.25);
  padding: 18px 0 10px; margin-top: 2px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.awiz-checks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.awiz-submit { margin-top: auto; padding: 24px 0 28px; }
.awiz-submit-btn {
  width: 100%; justify-content: center;
  padding-top: 13px; padding-bottom: 13px;
  font-size: .95rem;
}

/* Right panel — upload stage */
.awiz-media {
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  background: rgba(255,255,255,.01);
}
.awiz-drop {
  flex: 1;
  min-height: 300px;
  border: 2px dashed rgba(255,255,255,.12);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; text-align: center; cursor: pointer;
  transition: border-color .25s, background .25s;
  background: rgba(255,255,255,.025);
  overflow: hidden;
}
.awiz-drop:hover, .awiz-drop.drag {
  border-color: var(--blue);
  background: var(--blue-dim);
}
.awiz-drop:hover .awiz-drop__inner i,
.awiz-drop.drag  .awiz-drop__inner i { color: var(--blue-lt); transform: translateY(-4px); }
.awiz-drop__inner {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  pointer-events: none; padding: 40px 24px;
}
.awiz-drop__inner i {
  font-size: 3.2rem; color: var(--blue);
  transition: transform .3s, color .25s; margin-bottom: 4px;
}
.awiz-drop__inner strong {
  font-size: 1.05rem; font-weight: 700; color: var(--white);
}
.awiz-drop__inner span {
  font-size: .86rem; color: var(--muted);
}
.awiz-drop__inner em {
  font-style: normal; font-size: .76rem;
  color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-pill); padding: 3px 12px; margin-top: 4px;
}
.awiz-drop__count {
  position: absolute; bottom: 14px;
  font-size: .82rem; font-weight: 700; color: var(--blue);
  background: var(--blue-dim); border: 1px solid var(--blue-border);
  border-radius: var(--r-pill); padding: 3px 14px;
  opacity: 0; transition: opacity .2s;
}
.awiz-drop__count:not(:empty) { opacity: 1; }

/* Thumbnail grid */
.awiz-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}
.gw-thumb { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--dark); }
.gw-thumb img,
.gw-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.gw-thumb:hover img,
.gw-thumb:hover video { transform: scale(1.06); }
.gw-thumb__play {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.gw-thumb__play i {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: var(--white);
}
.gw-thumb__rm {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,.75); border: none; border-radius: 50%;
  color: var(--white); font-size: .6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.gw-thumb:hover .gw-thumb__rm { opacity: 1; }

/* Progress bar */
.awiz-progress {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--muted);
}
.awiz-progress__bar {
  height: 4px; background: rgba(255,255,255,.07); border-radius: var(--r-pill); overflow: hidden;
}
.awiz-progress__fill {
  height: 100%; background: var(--blue); border-radius: var(--r-pill); width: 0;
  transition: width .35s ease;
}

/* File drop */
.file-drop {
  border: 2px dashed rgba(255,255,255,.14); border-radius: var(--r-sm); padding: 20px;
  text-align: center; cursor: pointer; color: var(--muted); font-size: .84rem;
  transition: border-color .2s, background .2s; position: relative;
}
.file-drop:hover, .file-drop.drag { border-color: var(--blue); background: var(--blue-dim); color: var(--white); }
.file-drop i { font-size: 1.4rem; display: block; margin-bottom: 8px; }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fp-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: .78rem; color: var(--muted);
}
.fp-item i { color: var(--blue); }
.fp-item span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-item button { background: none; border: none; color: var(--muted); cursor: pointer; transition: color .2s; }
.fp-item button:hover { color: var(--clr-error); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .pstats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Table → stacked cards (≤640px) ── */
@media (max-width: 640px) {
  .ptable thead { display: none; }
  .ptable,
  .ptable tbody,
  .ptable tr,
  .ptable td { display: block; width: 100%; box-sizing: border-box; }
  .ptable tr {
    border: 1px solid var(--border); border-radius: var(--r-sm);
    margin-bottom: 10px; padding: 0; overflow: hidden;
    background: var(--charcoal);
  }
  .ptable tbody tr:last-child td { border-bottom: 1px solid rgba(255,255,255,.04); }
  .ptable td {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 14px; text-align: right;
    border-bottom: 1px solid rgba(255,255,255,.04);
  }
  .ptable td:last-child { border-bottom: none; }
  .ptable td[data-label]::before {
    content: attr(data-label);
    flex-shrink: 0; margin-right: auto; padding-right: 12px;
    font-size: .69rem; font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: .06em; text-align: left;
  }
  .ptable td[data-label=""]         { justify-content: center; }
  .ptable td[data-label=""]::before { display: none; }
  .ptable td > div > .td-name,
  .ptable td > div > .td-sub        { text-align: right; }
  .pfilter-tabs                    { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .pfilter-tabs::-webkit-scrollbar { display: none; }
  .pfilter-tab                     { flex-shrink: 0; }
}

@media (max-width: 480px) {
  .pstats          { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pstat           { padding: 12px 14px; gap: 10px; }
  .pstat__icon     { width: 36px; height: 36px; font-size: .88rem; }
  .pstat__val      { font-size: 1.1rem; }
  .pcard__head     { padding: 12px 14px; }
  .pcard__body     { padding: 14px; }
  .psearch         { min-width: 0; width: 100%; }
  .info-row        { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; }
  .info-row strong, .info-row a { word-break: break-word; }
  .pfield          { margin-bottom: 14px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AUTH PAGES (login, register, forgot, reset)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.auth-body {
  display: flex; flex-direction: column; align-items: center;
  background-image: radial-gradient(ellipse 90vw 60vh at 50% 25%, rgba(1,149,255,.08) 0%, transparent 70%);
}

.auth-page {
  width: 100%; flex: 1;
  display: flex; justify-content: center; align-items: flex-start;
  padding: max(48px, 8vh) 20px 60px;
}

/* Card */
.auth-card {
  width: 100%; max-width: 460px;
  background: var(--charcoal); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 32px 40px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(1,149,255,.18);
}
.auth-card--wide { max-width: 760px; }

/* Brand mark at top of every auth card */
.auth-card-brand {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-bottom: 22px; margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.auth-card-brand a { display: block; line-height: 0; transition: transform .2s ease; }
.auth-card-brand a:hover { transform: scale(1.07); }
.auth-card-brand__logo { height: 52px; width: auto; }
.auth-card-brand__name {
  font-size: .68rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--muted); user-select: none;
}

/* Typography */
.auth-title { font-size: 1.2rem; font-weight: 700; color: var(--white); margin: 0 0 4px; }
.auth-sub   { color: var(--muted); font-size: .84rem; margin: 0 0 22px; line-height: 1.5; }

/* Grouped form sections (register) */
.auth-section {
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-left: 3px solid var(--blue); border-radius: var(--r-sm); padding: 16px 18px; margin-bottom: 16px;
}
.auth-section h3 {
  font-size: .85rem; font-weight: 600; color: var(--white); margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.auth-section h3 i { color: var(--blue); }
.auth-section .opt { font-size: .71rem; font-weight: 400; color: var(--muted); margin-left: auto; }
.auth-section .req { color: var(--clr-error); font-weight: 600; }

.auth-switch { text-align: center; font-size: .84rem; color: var(--muted); margin-top: 18px; }
.auth-switch a { color: var(--blue); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-footer { text-align: center; font-size: .74rem; color: rgba(255,255,255,.25); padding: 16px 20px 24px; }
.auth-footer a { color: rgba(255,255,255,.35); text-decoration: underline; }

/* Form extras */
.pcheck.err { color: var(--clr-error-pale); }
.prow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .prow { grid-template-columns: 1fr; } }
.field-err { font-size: .74rem; color: var(--clr-error-lt); margin-top: 4px; display: block; }
.pfield select { padding-right: 36px; }
code { background: rgba(1,149,255,.1); border-radius: 4px; padding: 2px 7px; font-size: .82rem; color: var(--blue); font-family: monospace; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card, .auth-card--wide { padding: 24px 16px; }
  .auth-card-brand__logo { height: 44px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DASHBOARD SHELL (client & admin share this layout)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.dash-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.dash-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--charcoal); border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
  display: flex; flex-direction: column;
}
.dash-sidebar__brand {
  padding: 20px 18px 14px; border-bottom: 1px solid var(--border);
}
.dash-sidebar__brand img   { height: 32px; width: auto; display: block; margin-bottom: 4px; }
.dash-sidebar__brand span  { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.dash-nav { padding: 10px 10px 0; flex: 1; }
.dash-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 500;
  transition: background .2s, color .2s; margin-bottom: 2px; position: relative;
}
.dash-nav a i { width: 16px; text-align: center; font-size: .88rem; flex-shrink: 0; }
.dash-nav a:hover  { background: rgba(255,255,255,.05); color: var(--white); }
.dash-nav a.active { background: var(--blue-dim); color: var(--blue); }
.nbadge {
  display: inline-block; background: var(--blue); color: var(--white); border-radius: var(--r-pill);
  font-size: .65rem; font-weight: 700; padding: 1px 6px; min-width: 18px; text-align: center;
}
.dash-nav .nbadge { margin-left: auto; }

.dash-sidebar__foot {
  padding: 12px 10px; border-top: 1px solid var(--border); margin-top: auto;
}
.dash-sidebar__user {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 4px;
}
.dash-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--blue);
  color: var(--white); font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  overflow: hidden;
}
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── Client profile / About You card ──────────────────────────── */
.profile-card { margin-top: 20px; }
.profile-card .pcard__head { border-bottom: 1px solid var(--border); }
.profile-card__sub {
  font-size: .82rem; color: var(--muted); margin: 5px 0 0; font-weight: 400;
}

.profile-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 36px;
  padding: 28px 24px;
  align-items: start;
}

/* ── Avatar ── */
.profile-avatar-col {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.profile-avatar-ring {
  position: relative; width: 110px; height: 110px; border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 0 3px var(--charcoal), 0 0 0 5px rgba(1,149,255,.45), 0 6px 24px rgba(0,0,0,.5);
  transition: box-shadow .2s;
}
.profile-avatar-ring:hover {
  box-shadow: 0 0 0 3px var(--charcoal), 0 0 0 5px rgba(1,149,255,.75), 0 8px 28px rgba(0,0,0,.55);
}
.profile-avatar-img {
  width: 110px; height: 110px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; font-weight: 800; color: var(--white); letter-spacing: -.02em;
}
.profile-avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s; cursor: pointer;
  color: var(--white); font-size: 1.3rem;
}
.profile-avatar-ring:hover .profile-avatar-overlay { opacity: 1; }
.profile-avatar-hint {
  font-size: .7rem; color: var(--muted); text-align: center; line-height: 1.55;
}

/* ── Bio ── */
.profile-bio-col { display: flex; flex-direction: column; }
.profile-bio-textarea { min-height: 130px; resize: vertical; }
.profile-bio-meta {
  display: flex; justify-content: flex-end;
  margin-top: 5px;
}
.profile-bio-count { font-size: .72rem; color: var(--muted); }

@media (max-width: 600px) {
  .profile-layout {
    grid-template-columns: 1fr; gap: 20px; padding: 20px 16px;
  }
  .profile-avatar-col { flex-direction: row; align-items: center; gap: 18px; }
  .profile-avatar-ring, .profile-avatar-img { width: 80px; height: 80px; }
  .profile-avatar-img { font-size: 1.9rem; }
  .profile-avatar-hint { text-align: left; }
}
.dash-uname { font-size: .82rem; color: var(--white); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-urole { font-size: .7rem; color: var(--muted); }
.dash-logout {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  color: var(--muted); font-size: .82rem; text-decoration: none; border-radius: var(--r-sm);
  transition: color .2s, background .2s;
}
.dash-logout:hover { color: var(--clr-error); background: rgba(239,68,68,.08); }
.dash-view-site {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  color: var(--muted); font-size: .82rem; text-decoration: none; border-radius: var(--r-sm);
  transition: color .2s, background .2s; margin-bottom: 4px;
}
.dash-view-site:hover { color: var(--blue); background: rgba(1,149,255,.08); }

/* ── Topbar (mobile) ── */
.dash-topbar {
  display: none; position: sticky; top: 0; z-index: 200;
  background: var(--charcoal); border-bottom: 1px solid var(--border);
  padding: 12px 16px; align-items: center; justify-content: space-between;
}
.dash-topbar__title { font-weight: 600; font-size: .92rem; color: var(--white); }
.dash-hamburger {
  background: transparent; border: none; color: var(--white); font-size: 1.1rem; cursor: pointer; padding: 4px 8px;
}

/* Admin topbar right (desktop) */
.dash-topbar-desktop {
  display: none; /* shown in admin only via .admin-body override */
}

/* ── Content column (wraps topbar + main for client shell) ── */
.dash-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ── Main ── */
.dash-main { flex: 1; min-width: 0; padding: 32px 28px 60px; }
.dash-main__title { font-size: 1.5rem; font-weight: 700; color: var(--white); margin: 0 0 4px; }
.dash-main__sub   { color: var(--muted); font-size: .86rem; margin: 0 0 24px; }

/* ── Notification list ── */
.notif-list { display: flex; flex-direction: column; }
.notif-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.04);
  position: relative; transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item--unread { background: rgba(1,149,255,.04); }
.notif-item--unread::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 55%; background: var(--blue); border-radius: 0 3px 3px 0;
}
.notif-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; background: rgba(255,255,255,.06); color: var(--muted);
}
.notif-icon--confirmed    { background: rgba(59,130,246,.15);  color: var(--clr-info); }
.notif-icon--active       { background: rgba(34,197,94,.15);   color: var(--clr-success); }
.notif-icon--returned     { background: rgba(156,163,175,.15); color: #9ca3af; }
.notif-icon--cancelled    { background: rgba(239,68,68,.15);   color: var(--clr-error); }
.notif-icon--deposit_paid { background: rgba(245,158,11,.15);  color: var(--clr-warning); }
.notif-icon--paid         { background: rgba(34,197,94,.15);   color: var(--clr-success); }
.notif-body   { flex: 1; min-width: 0; }
.notif-title  { font-size: .86rem; font-weight: 600; color: var(--white); margin-bottom: 2px; }
.notif-text   { font-size: .80rem; color: var(--muted); line-height: 1.4; margin-bottom: 4px; }
.notif-time   { font-size: .71rem; color: rgba(255,255,255,.25); }
.notif-link   {
  color: var(--muted); text-decoration: none; font-size: .8rem;
  padding: 4px 6px; display: flex; align-items: center; align-self: center;
  transition: color .2s;
}
.notif-link:hover { color: var(--white); }

/* Mobile topbar notification bell */
.dash-topbar__notif {
  position: relative; color: var(--white); font-size: 1rem;
  text-decoration: none; display: flex; align-items: center; padding: 4px 2px;
}
.dash-notif-dot {
  position: absolute; top: -3px; right: -6px;
  background: var(--clr-error); color: var(--white); font-size: .6rem; font-weight: 700;
  border-radius: var(--r-pill); padding: 1px 4px; min-width: 16px; text-align: center;
  line-height: 1.4; pointer-events: none;
}

/* ── Mobile overlay ── */
.dash-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 199;
}
.dash-overlay.show { display: block; }

/* ── Responsive ──────────────────────────────────────────────── */
/* ── Sidebar collapses on tablet / mobile ── */
@media (max-width: 860px) {
  .dash-sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; z-index: 300;
    transform: translateX(-100%); transition: transform .3s var(--ease);
  }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-topbar { display: flex; }
  .dash-main   { padding: 20px 16px 40px; }
}

@media (max-width: 480px) {
  .dash-main__title { font-size: 1.2rem; }
  .dash-main__sub   { margin-bottom: 18px; }
  .notif-item       { padding: 12px 14px; gap: 10px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ADMIN-SPECIFIC OVERRIDES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.admin-body .dash-sidebar { width: 220px; }

/* Admin desktop topbar */
.admin-topbar {
  height: 52px; background: var(--charcoal); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; position: sticky; top: 0; z-index: 100;
  gap: 14px;
}
.admin-topbar__ham {
  display: none; background: transparent; border: none; color: var(--white); font-size: 1.1rem; cursor: pointer;
}
.admin-topbar h1 { font-size: .96rem; font-weight: 600; color: var(--white); margin: 0; }
.admin-topbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.admin-topbar__pill {
  display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25); color: var(--clr-success);
  font-size: .75rem; font-weight: 600; text-decoration: none;
}
.admin-topbar__ext { color: var(--muted); font-size: .9rem; text-decoration: none; transition: color .2s; }
.admin-topbar__ext:hover { color: var(--white); }

/* Admin layout wraps sidebar + (topbar + main) */
.admin-body .dash-layout { height: 100vh; }   /* constrain to viewport — body never scrolls */
.admin-wrap  { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.admin-right { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.admin-main  { flex: 1; min-height: 0; padding: 24px 28px 60px; overflow-y: auto; }

/* Sticky-panel pattern: form/panel stays put while only the list scrolls.
   Add class="admin-split" on a grid-2 wrapper, and class="admin-split__sticky"
   on the column that should not scroll. */
.admin-split { align-items: start; }
.admin-split__sticky {
  position: sticky;
  top: 0;
  max-height: calc(100vh - 52px); /* 52px = admin topbar height */
  overflow-y: auto;
  scrollbar-width: thin;
}
@media (max-width: 1000px) {
  .admin-split__sticky {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

/* Revenue chart */
.chart-wrap {
  padding: 20px; height: 200px;
  display: flex; align-items: flex-end; gap: 8px;
}
.chart-bar-group { display: flex; flex-direction: column; align-items: center; flex: 1; gap: 5px; }
.chart-bar {
  width: 100%; background: var(--blue); border-radius: 4px 4px 0 0;
  min-height: 4px; transition: opacity .2s;
}
.chart-bar:hover { opacity: .8; }
.chart-label { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.chart-val   { font-size: .68rem; color: var(--blue); }

/* On-hire list */
.on-hire-list { display: flex; flex-direction: column; }
.on-hire-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 20px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.on-hire-item:last-child { border-bottom: none; }
.on-hire-img {
  width: 40px; height: 40px; object-fit: cover; border-radius: var(--r-sm); flex-shrink: 0;
  background: var(--dark); display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.on-hire-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); }
.on-hire-info strong { font-size: .84rem; color: var(--white); display: block; }
.on-hire-info span   { font-size: .74rem; color: var(--muted); }

/* Grid 2 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .admin-topbar__ham { display: block; }
  .admin-main        { padding: 20px 16px 40px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GALLERY VIEWER (public-facing)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.gallery-topbar {
  padding: 20px 28px; background: var(--charcoal); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.gallery-topbar__brand img { height: 34px; }
.gallery-topbar__info h1   { font-size: 1.1rem; font-weight: 700; color: var(--white); margin: 0 0 2px; }
.gallery-topbar__info p    { font-size: .8rem; color: var(--muted); margin: 0; }

.gallery-grid {
  --gallery-cols: 4;
  position: relative;
  padding: 20px 24px;
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-grid.is-revealed { opacity: 1; }

@keyframes gallery-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.gallery-item {
  position: relative; border-radius: var(--r-sm); overflow: hidden;
  background: var(--dark); cursor: pointer;
  transition: transform .18s;
  display: block;
}
.gallery-item:hover { transform: scale(1.025); }
.gallery-item::before {
  content: '';
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 20%, rgba(255,255,255,.055) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: gallery-shimmer 1.6s ease-in-out infinite;
  transition: opacity .35s ease;
}
.gallery-item.is-loaded::before { opacity: 0; }
.gallery-item img {
  width: 100%; height: auto; display: block;
  opacity: 0; transition: opacity .4s ease;
}
.gallery-item.is-loaded img { opacity: 1; }
.gallery-item__overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; padding: 10px 12px;
  opacity: 0; transition: opacity .2s;
}
.gallery-item:hover .gallery-item__overlay { opacity: 1; }
.gallery-item__caption { font-size: .78rem; color: var(--white); }
.gallery-item__actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 6px;
}
.gallery-item__btn {
  background: rgba(0,0,0,.6); border: none; color: var(--white); border-radius: var(--r-sm);
  padding: 5px 8px; font-size: .78rem; cursor: pointer; transition: background .2s;
  display: flex; align-items: center; gap: 4px;
}
.gallery-item__btn:hover { background: rgba(1,149,255,.7); }

/* Like button states */
.gallery-item__btn[data-like] .fa-heart { color: rgba(255,255,255,.85); }
.gallery-item__btn[data-like] .like-count { display: none; }
.gallery-item__btn[data-like].liked .fa-heart { color: var(--clr-error); }
.gallery-item__btn[data-like].liked .like-count,
.gallery-item__btn[data-like].has-likes .like-count { display: inline; }
.gallery-item__btn[data-like].has-likes:not(.liked) .fa-heart { color: rgba(255,255,255,.6); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.95); z-index: 1000;
  display: none; align-items: center; justify-content: center; overflow: hidden;
}
.lightbox.open { display: flex; }
.lightbox__img { max-width: 92vw; max-height: 88vh; max-height: 88svh; touch-action: none; }

/* Double-tap like burst */
.like-burst {
  position: absolute; top: 50%; left: 50%; pointer-events: none; z-index: 5;
  color: var(--clr-error); font-size: 4rem;
  animation: likeBurst .75s ease-out forwards;
}
@keyframes likeBurst {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(0); }
  45%  { opacity: 1; transform: translate(-50%,-50%) scale(1.35); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.1); }
}
.lightbox__close {
  position: absolute; top: 20px; right: 24px; background: transparent; border: none;
  color: var(--white); font-size: 1.5rem; cursor: pointer; opacity: .7; transition: opacity .2s;
}
.lightbox__close:hover { opacity: 1; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1);
  border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; padding: 12px 16px;
  border-radius: var(--r-sm); transition: background .2s;
}
.lightbox__nav:hover { background: rgba(1,149,255,.4); }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }
.lightbox__footer {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; align-items: center;
  background: rgba(0,0,0,.5); border-radius: var(--r-pill); padding: 6px 14px;
  backdrop-filter: blur(6px);
}
.lightbox__caption {
  color: var(--white); font-size: .82rem; max-width: 300px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lightbox__counter {
  color: rgba(255,255,255,.6); font-size: .78rem; white-space: nowrap;
}

/* Lightbox comment panel */
.lb-comment-panel {
  position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%);
  width: min(400px, 92vw); background: rgba(15,15,15,.96);
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-md);
  padding: 14px 16px; backdrop-filter: blur(14px); z-index: 10;
  display: flex; flex-direction: column; gap: 10px;
}
.lb-comment-field {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-sm); color: var(--white); padding: 8px 11px; font-size: .84rem;
  font-family: inherit; outline: none; transition: border-color .2s;
}
.lb-comment-field:focus { border-color: var(--blue); }
.lb-comment-field[readonly] { opacity: .6; cursor: default; border-color: transparent; }
.lb-comment-field::placeholder { color: rgba(255,255,255,.35); }
.lb-comment-textarea { resize: none; }
.lb-comment-actions { display: flex; justify-content: flex-end; gap: 8px; }
.lb-comment-cancel {
  background: transparent; border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.55); font-size: .8rem;
}
.lb-comment-cancel:hover { border-color: rgba(255,255,255,.4); color: var(--white); }

/* Bottom activity section */
.gallery-activity {
  max-width: 700px; margin: 0 auto; padding: 0 24px 60px; display: flex; flex-direction: column; gap: 36px;
}
.gallery-activity__section { display: flex; flex-direction: column; }
.gallery-activity__title {
  color: var(--white); font-size: .95rem; font-weight: 600; margin: 0 0 14px;
  display: flex; align-items: center; gap: 7px;
}

/* Activity cards */
.activity-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--charcoal); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 14px;
}
.activity-card__thumb {
  flex: 0 0 56px; width: 56px; height: 56px;
  border-radius: var(--r-sm); overflow: hidden; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.activity-card__thumb:hover { transform: scale(1.05); box-shadow: 0 0 0 2px var(--blue); }
.activity-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.activity-card__thumb--album,
.activity-card__thumb--video {
  display: flex; align-items: center;
  justify-content: center; cursor: default;
}
.activity-card__thumb--video.js-open-video { cursor: pointer; }
.activity-card__thumb--album { background: rgba(167,139,250,.12); }
.activity-card__thumb--album .fa-images { font-size: 1.3rem; color: #a78bfa; }
.activity-card__thumb--video { background: rgba(249,115,22,.1); }
.activity-card__thumb--video .fa-film   { font-size: 1.2rem; color: #f97316; }
.activity-card__thumb--join { background: rgba(34,197,94,.1); display: flex; align-items: center; justify-content: center; cursor: default; }
.activity-card__thumb--join .fa-user-check { font-size: 1.2rem; color: var(--clr-success); }
.activity-card__content { flex: 1; min-width: 0; }
.activity-card__header {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; margin-bottom: 3px;
}
.activity-card__actor { color: var(--white); font-size: .87rem; }
.activity-card__time  { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.activity-card__action { margin: 0; font-size: .82rem; color: var(--body-text); }
.activity-card__action i { font-size: .78rem; }
.activity-card__body {
  margin: 5px 0 0; font-size: .82rem; color: var(--body-text);
  line-height: 1.5; word-break: break-word;
}
.activity-owner-actions {
  display: flex; gap: 6px; margin-top: 8px;
}
.activity-save-actions {
  display: flex; gap: 6px; margin-top: 6px;
}

/* Gallery topbar actions */
.gallery-topbar__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Gallery gate (passcode / email) */
.gallery-gate {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100svh; padding: 40px 20px;
  background-image: radial-gradient(ellipse 90vw 70vh at 50% 40%, rgba(1,149,255,.07) 0%, transparent 68%);
}
.gallery-gate__card {
  background: var(--charcoal); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 32px 40px 40px; max-width: 440px; width: 100%; text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(1,149,255,.18);
}
.gallery-gate__brand {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-bottom: 26px; padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.gallery-gate__brand a { display: block; line-height: 0; transition: transform .2s ease; }
.gallery-gate__brand a:hover { transform: scale(1.07); }
.gallery-gate__brand__logo { height: 46px; width: auto; }
.gallery-gate__brand__name {
  font-size: .63rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); user-select: none;
}
.gallery-gate__card h2 { color: var(--white); margin: 0 0 8px; font-size: 1.2rem; }
.gallery-gate__cover {
  width: 100%; border-radius: var(--r-md); margin-bottom: 20px;
  max-height: 200px; object-fit: cover; object-position: center top;
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
}
.gallery-gate__icon { font-size: 2rem; color: var(--blue); margin-bottom: 12px; }
.gallery-gate__desc { color: var(--muted); font-size: .88rem; margin: 0 0 20px; }

/* Gallery selection bar */
.gallery-select-bar {
  position: sticky; top: 0; z-index: 100;
  background: var(--dark); border-bottom: 1px solid var(--border);
  padding: 10px 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.gallery-select-bar span { font-size: .88rem; color: var(--muted); white-space: nowrap; }
.gallery-select-bar__btns {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; flex-wrap: wrap; justify-content: flex-end;
}

/* Selection checkbox overlay */
.gallery-item__select {
  position: absolute; top: 8px; left: 8px;
}
.gallery-item__select input[type="checkbox"] {
  width: 20px; height: 20px; cursor: pointer; accent-color: var(--blue);
}
.gallery-item.selected { outline: 3px solid var(--blue); outline-offset: -3px; }

/* Admin gallery grid */
.gallery-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; padding: 16px 20px;
}
.admin-photo-item { background: var(--dark); border-radius: var(--r-sm); overflow: hidden; }
.admin-photo-thumb { position: relative; aspect-ratio: 4/3; }
.admin-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-photo-drag-handle {
  position: absolute; top: 6px; left: 6px;
  background: rgba(0,0,0,.6); color: var(--white); border-radius: 5px;
  padding: 4px 6px; font-size: .75rem; cursor: grab; opacity: .7; transition: opacity .2s;
}
.admin-photo-drag-handle:hover { opacity: 1; }
.admin-photo-item.drag-over { outline: 2px dashed var(--blue); }
.admin-photo-actions { padding: 8px; }
.admin-caption-input {
  flex: 1; font-size: .75rem; padding: 4px 8px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--white);
}

/* Action bar */
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

/* ── Album detail page ───────────────────────────────────────── */
.alb-back { margin-bottom: 18px; }
.alb-back a {
  color: var(--muted); text-decoration: none; font-size: .83rem;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s;
}
.alb-back a:hover { color: var(--white); }

.alb-header {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--charcoal); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 20px; margin-bottom: 24px;
}
.alb-header__cover {
  width: 160px; min-width: 160px; aspect-ratio: 4/3;
  border-radius: var(--r-sm); overflow: hidden; background: var(--dark);
  flex-shrink: 0;
}
.alb-header__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.alb-header__nocover {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 2rem; color: rgba(255,255,255,.15);
}
.alb-header__info { flex: 1; min-width: 0; }
.alb-header__badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.alb-header__title {
  font-size: 1.35rem; font-weight: 700; color: var(--white);
  margin: 0 0 6px; line-height: 1.3;
}
.alb-header__meta {
  font-size: .83rem; color: var(--muted); margin: 0 0 14px; line-height: 1.6;
}
.alb-meta-dot { margin: 0 3px; opacity: .4; }
.alb-header__desc { color: rgba(255,255,255,.45); }
.alb-header__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Upload zone (in Media tab) */
.alb-upload-zone {
  display: flex; align-items: center; gap: 16px;
  border: 2px dashed var(--border); border-radius: var(--r-md);
  padding: 18px 24px; cursor: pointer; transition: border-color .2s, background .2s;
  background: transparent; margin-bottom: 12px;
}
.alb-upload-zone:hover, .alb-upload-zone.drag {
  border-color: var(--blue); background: rgba(1,149,255,.04);
}
.alb-upload-zone__inner {
  display: flex; align-items: center; gap: 14px; flex: 1;
}
.alb-upload-zone__inner i { font-size: 1.6rem; color: var(--muted); }
.alb-upload-zone__inner strong { display: block; color: var(--white); font-size: .9rem; margin-bottom: 2px; }
.alb-upload-zone__inner span { font-size: .8rem; color: var(--muted); }
.alb-upload-zone__inner em {
  font-style: normal; font-size: .72rem; color: rgba(255,255,255,.25);
  margin-left: auto;
}
.gw-thumb-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px; margin-bottom: 8px;
}
.alb-upload-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.alb-progress { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 180px; }
.alb-progress__track {
  flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden;
}
.alb-progress__fill { height: 100%; background: var(--blue); transition: width .2s; width: 0; }

/* Photo hint */
.alb-photo-hint {
  font-size: .75rem; color: rgba(255,255,255,.25);
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}

/* New admin photo grid */
.alb-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.alb-photo-item {
  border-radius: var(--r-sm); overflow: hidden;
  background: var(--dark);
}
.alb-photo-thumb {
  position: relative; aspect-ratio: 4/3; overflow: hidden;
}
.alb-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.alb-cover-badge {
  position: absolute; bottom: 7px; left: 7px;
  background: rgba(0,0,0,.6); color: var(--white); border-radius: 5px;
  font-size: .68rem; padding: 2px 7px; font-weight: 600;
}
.alb-likes-badge {
  position: absolute; top: 7px; right: 7px;
  background: rgba(0,0,0,.55); color: var(--clr-error-pale);
  border-radius: 5px; font-size: .7rem; padding: 3px 7px;
}
.alb-photo-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.7);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 10px 12px 10px 10px; gap: 8px;
  opacity: 0; transition: opacity .2s;
}
.alb-photo-item:hover .alb-photo-overlay { opacity: 1; }
.alb-caption-row {
  display: flex; gap: 5px; align-items: center;
}
.alb-caption-input {
  flex: 1; min-width: 0; font-size: .76rem; padding: 5px 9px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-sm); color: var(--white); outline: none;
  transition: border-color .2s;
}
.alb-caption-input:focus { border-color: var(--blue); }
.alb-caption-input::placeholder { color: rgba(255,255,255,.35); }
.alb-caption-save {
  background: rgba(1,149,255,.2); border: none; color: var(--blue);
  border-radius: var(--r-sm); padding: 5px 9px; cursor: pointer; font-size: .78rem;
  transition: background .15s; flex-shrink: 0;
}
.alb-caption-save:hover { background: rgba(1,149,255,.4); }
.alb-photo-actions { display: flex; gap: 6px; }
.alb-photo-actions form { flex: 1; display: flex; }
.alb-photo-actions .btn { flex: 1; justify-content: center; font-size: .73rem; padding: 4px 8px; }

/* ── Admin: video section divider ── */
.alb-media-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.35);
  display: flex; align-items: center; gap: 8px;
  margin: 8px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Admin: video thumbnail in photo grid ── */
.alb-video-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.alb-video-play-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.alb-video-play-icon i {
  width: 38px; height: 38px;
  background: rgba(0,0,0,.6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: var(--white);
}

/* ── Panorama overlay ── */
#panoramaBox {
  position: fixed; inset: 0; z-index: 1001; background: var(--black); display: none;
}
#panoramaViewer { position: absolute; inset: 0; }

/* ── Panorama badge on grid thumbnail ── */
.gallery-item__pano-badge {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,.6); color: var(--white);
  border-radius: 5px; padding: 3px 8px; font-size: .7rem; font-weight: 600;
  pointer-events: none; display: flex; align-items: center; gap: 5px;
}

/* ── Viewer: Videos section ── */
.gallery-videos-section { padding: 0 24px 40px; }
.gallery-videos-section__header {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.4);
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px; padding-top: 8px;
}
.gallery-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gallery-video-card {
  background: var(--charcoal); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
}
.gallery-video-card__player {
  width: 100%; display: block; aspect-ratio: 16/9; background: var(--black);
}
.gallery-video-card__footer {
  padding: 8px 12px; display: flex; align-items: center; gap: 8px;
  border-top: 1px solid var(--border); min-height: 40px;
}
.gallery-video-card__caption {
  flex: 1; font-size: .82rem; color: var(--muted); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gallery-video-card__actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
.gallery-video-card__comment-panel {
  border-top: 1px solid var(--border); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}

/* ── Video comment items ── */
.vid-comment-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.vid-comment-item {
  background: rgba(255,255,255,.04); border-radius: var(--r-sm); padding: 8px 12px;
}
.vid-comment-item__header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.vid-comment-item__author { font-size: .82rem; font-weight: 600; color: var(--white); }
.vid-comment-item__time   { font-size: .72rem; color: var(--muted); }
.vid-comment-item__body   { font-size: .82rem; color: rgba(255,255,255,.75); line-height: 1.5; }

/* Settings tab */
.alb-settings-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}

/* Share tab */
.alb-share-wrap {
  display: flex; gap: 24px; align-items: flex-start;
}
.alb-share-preview {
  width: 200px; min-width: 200px; border-radius: var(--r-md); overflow: hidden;
  background: var(--dark); flex-shrink: 0;
}
.alb-share-preview img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.alb-share-noimg {
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: rgba(255,255,255,.15);
}
.alb-share-preview__title {
  padding: 10px 12px; font-size: .82rem; font-weight: 600;
  color: var(--white); border-top: 1px solid var(--border);
}
.alb-share-body { flex: 1; }
.alb-share-label { font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.35); margin: 0 0 10px; }
.alb-share-link-row { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.alb-share-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.alb-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: .77rem;
  padding: 4px 10px; border-radius: var(--r-pill); font-weight: 500;
}
.alb-chip--ok   { background: rgba(34,197,94,.12);  color: var(--clr-success-lt); }
.alb-chip--warn { background: rgba(245,158,11,.12); color: var(--clr-warning-lt); }
.alb-chip--blue { background: rgba(1,149,255,.12);  color: #60a5fa; }
.alb-chip--muted{ background: rgba(255,255,255,.06);color: var(--muted); }
.alb-stat-pill {
  background: rgba(255,255,255,.06); border-radius: var(--r-sm);
  padding: 8px 14px; font-size: .83rem; color: var(--muted);
}
.alb-stat-pill strong { color: var(--white); }
.alb-stat-pill--link { color: var(--blue); cursor: pointer; text-decoration: none; }
.alb-stat-pill--link:hover { background: rgba(1,149,255,.12); }

/* ── Category tag on admin album cards ───────────────────────── */
.album-card__cat { font-size: .72rem; color: var(--blue); }
.album-card__cat i { margin-right: 3px; }

/* ── Admin categories management panel ───────────────────────── */
.galcat-panel {
  background: var(--dark); border: 1px solid var(--border);
  border-radius: var(--r-md); margin-bottom: 20px; overflow: hidden;
}
.galcat-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; cursor: pointer; user-select: none;
  font-size: .85rem; font-weight: 600; color: var(--white);
  transition: background .15s;
}
.galcat-panel__head:hover { background: rgba(255,255,255,.03); }
.galcat-panel__head i.fa-tags { color: var(--blue); margin-right: 7px; }
.galcat-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--blue-dim); border: 1px solid var(--blue-border);
  border-radius: var(--r-sm); font-size: .7rem; color: var(--blue); margin-left: 8px;
}
.galcat-chevron {
  font-size: .7rem; color: var(--muted);
  transition: transform .2s;
}
.galcat-panel.is-open .galcat-chevron { transform: rotate(180deg); }
.galcat-panel__body {
  padding: 0 16px 16px; display: none;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.galcat-panel.is-open .galcat-panel__body { display: block; }
.galcat-list {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.galcat-item {
  display: flex; align-items: center; gap: 6px;
  background: var(--charcoal); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 5px 8px 5px 10px;
  cursor: default; transition: border-color .15s, opacity .15s;
}
.galcat-item.is-dragging { opacity: .35; border-color: var(--blue-border); }
.galcat-item:not(.is-dragging):hover { border-color: var(--border-lt); }
.galcat-grip {
  color: var(--muted); font-size: .72rem; cursor: grab; flex-shrink: 0;
}
.galcat-grip:active { cursor: grabbing; }
.galcat-item__name { font-size: .82rem; color: var(--white); }
.galcat-item .acbtn { width: 26px; height: 26px; font-size: .7rem; }
.galcat-empty { font-size: .85rem; color: var(--muted); margin: 0 0 12px; }
.galcat-add-form {
  display: flex; gap: 8px; align-items: center;
}
.galcat-add-input {
  flex: 1; padding: 8px 12px;
  background: var(--charcoal); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--white); font-size: .85rem; outline: none;
  transition: border-color .2s;
}
.galcat-add-input:focus { border-color: var(--blue-border); }
.galcat-add-input::placeholder { color: var(--muted); }

/* ── Responsive ──────────────────────────────────────────────── */
/* ── Album header stacks on mobile ── */
@media (max-width: 620px) {
  .alb-header { flex-direction: column; gap: 14px; }
  .alb-header__cover { width: 100%; min-width: 0; aspect-ratio: 16/9; }
  .alb-header__actions { gap: 6px; }
  .alb-header__actions .btn { flex: 1; justify-content: center; }
}

@media (max-width: 768px) {
  .gallery-grid { --gallery-cols: 3; }
  .gallery-select-bar       { padding: 10px 16px; gap: 8px; }
  .gallery-select-bar__btns { margin-left: 0; width: 100%; justify-content: flex-start; }
}

@media (max-width: 480px) {
  .gallery-grid           { --gallery-cols: 2; padding: 12px; }
  .gallery-videos-grid    { grid-template-columns: repeat(2, 1fr); }
  .gallery-videos-section { padding: 0 12px 32px; }
  .gallery-topbar         { padding: 14px 16px; gap: 8px; }
  .gallery-gate__card     { padding: 24px 22px 28px; }
  .gallery-select-bar__btns { gap: 6px; }
  .gallery-select-bar__btns .btn { font-size: 0.72rem; padding: 6px 10px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GALLERY LISTING PAGE  (gallery/index.php)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Hero ────────────────────────────────────────────────────── */
.gallery-hero {
  background: var(--charcoal);
  background-image:
    radial-gradient(ellipse 120vw 80vh at 68% 50%, rgba(1,149,255,.16) 0%, transparent 65%),
    radial-gradient(ellipse 55vw 45vh at 2% 95%, rgba(1,149,255,.07) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.gallery-hero__inner {
  max-width: var(--w); margin: 0 auto;
  padding: calc(var(--nav-h) + var(--section-py)) var(--px) var(--section-py);
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px;
}
.gallery-hero__text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 18px;
}
.gallery-hero__title {
  font-size: clamp(2.8rem, 6.5vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 0.95;
  color: var(--white);
  margin: 0;
}
.gallery-hero__sub {
  font-size: 1rem; line-height: 1.7;
  color: var(--muted); margin: 0; max-width: 420px;
}
.gallery-hero__stats {
  display: flex; flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  width: fit-content;
}
.gallery-hero__stats span {
  font-size: .8rem; color: var(--muted);
  padding: 8px 20px 8px 0;
  margin-right: 20px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.gallery-hero__stats span:last-child { border-right: none; margin-right: 0; }
.gallery-hero__stats strong { color: var(--white); font-weight: 700; margin-right: 5px; }

/* ── Photo fan ───────────────────────────────────────────────── */
.gallery-hero__fan {
  position: relative;
  width: 300px; height: 215px;
  flex-shrink: 0;
}
.gallery-hero__fan-img {
  position: absolute;
  width: 185px; height: 130px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1.5px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 64px rgba(0,0,0,.65);
  top: 50%; left: 50%;
}
.gallery-hero__fan-img:nth-child(1) {
  transform: translate(-50%,-50%) rotate(-1.5deg);
  z-index: 3;
}
.gallery-hero__fan-img:nth-child(2) {
  transform: translate(calc(-50% - 46px), calc(-50% + 18px)) rotate(-14deg);
  z-index: 2; filter: brightness(.72);
}
.gallery-hero__fan-img:nth-child(3) {
  transform: translate(calc(-50% + 46px), calc(-50% + 14px)) rotate(11deg);
  z-index: 1; filter: brightness(.58);
}

/* ── Listing wrap ────────────────────────────────────────────── */
.gallery-listing-wrap {
  background: var(--charcoal);
  background-image: radial-gradient(ellipse 90vw 40vh at 50% 0%, rgba(1,149,255,.06) 0%, transparent 70%);
  padding-bottom: var(--section-py);
  min-height: 55vh;
}
.gallery-listing-inner {
  max-width: var(--w); margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) var(--px) 0;
}

/* ── Album grid ──────────────────────────────────────────────── */
.gallery-listing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Album card — thumbnail + info below ─────────────────────── */
.gallery-album-card {
  display: flex; flex-direction: column;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--dark); text-decoration: none;
  border: 1px solid var(--border);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.gallery-album-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 56px rgba(0,0,0,.65);
  border-color: var(--blue-border);
}
.gallery-album-card__thumb {
  position: relative;
  aspect-ratio: 16/9; overflow: hidden;
  background: #0b1929;
  flex-shrink: 0;
}
.gallery-album-card__thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block;
  transition: transform .5s ease;
}
.gallery-album-card:hover .gallery-album-card__thumb img { transform: scale(1.06); }
.gallery-album-card__no-cover {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--blue);
  background: linear-gradient(145deg, #0b1929 0%, #0d2038 55%, #111827 100%);
}
.gallery-album-card__lock {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(0,0,0,.62); backdrop-filter: blur(8px);
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: .71rem; color: rgba(255,255,255,.8);
  display: flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255,255,255,.11);
}
.gallery-album-card__body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 5px;
  flex: 1;
}
.gallery-album-card__title {
  font-size: 1rem; font-weight: 700; color: var(--white);
  margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
}
.gallery-album-card:hover .gallery-album-card__title { color: var(--blue-lt); }
.gallery-album-card__desc {
  font-size: .78rem; color: var(--muted);
  margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gallery-album-card__meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: .75rem; color: rgba(255,255,255,.5);
  margin-top: 2px;
}
.gallery-album-card__meta i { color: var(--blue-lt); margin-right: 3px; }

/* ── Card entrance animation ─────────────────────────────────── */
@keyframes cardFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
#galGrid .gallery-album-card {
  animation: cardFadeUp .45s ease both;
}
#galGrid .gallery-album-card:nth-child(1)  { animation-delay:   0ms; }
#galGrid .gallery-album-card:nth-child(2)  { animation-delay:  55ms; }
#galGrid .gallery-album-card:nth-child(3)  { animation-delay: 110ms; }
#galGrid .gallery-album-card:nth-child(4)  { animation-delay: 165ms; }
#galGrid .gallery-album-card:nth-child(5)  { animation-delay: 220ms; }
#galGrid .gallery-album-card:nth-child(6)  { animation-delay: 275ms; }
#galGrid .gallery-album-card:nth-child(7)  { animation-delay: 330ms; }
#galGrid .gallery-album-card:nth-child(8)  { animation-delay: 385ms; }
#galGrid .gallery-album-card:nth-child(9)  { animation-delay: 440ms; }

/* ── Filter bar ──────────────────────────────────────────────── */
.gal-filterbar {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 12px; margin-bottom: 28px;
}
.gal-search {
  position: relative; flex: 1; min-width: 200px; max-width: 340px;
}
.gal-search i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: .85rem; pointer-events: none;
}
.gal-search input {
  width: 100%; padding: 10px 14px 10px 38px;
  background: var(--dark); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--white); font-size: .88rem;
  outline: none; transition: border-color .2s;
}
.gal-search input::placeholder { color: var(--muted); }
.gal-search input:focus { border-color: var(--blue-border); }
.gal-cats {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.gal-cat {
  padding: 7px 16px; border-radius: var(--r-pill); font-size: .8rem; font-weight: 600;
  background: var(--dark); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.gal-cat:hover { border-color: var(--blue-border); color: var(--white); }
.gal-cat.active {
  background: var(--blue-dim); border-color: var(--blue-border);
  color: var(--blue);
}

/* ── No-results state ────────────────────────────────────────── */
.gal-noresults {
  text-align: center; padding: 80px 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.gal-noresults i { font-size: 2.8rem; color: var(--muted); opacity: .3; }
.gal-noresults p { font-size: 1rem; font-weight: 600; color: var(--white); margin: 0; }
.gal-noresults span { font-size: .85rem; color: var(--muted); }

/* ── Empty state ─────────────────────────────────────────────── */
.gallery-empty {
  text-align: center; padding: 110px 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.gallery-empty i { font-size: 3.8rem; color: var(--muted); opacity: .35; }
.gallery-empty p { font-size: 1.1rem; font-weight: 600; color: var(--white); margin: 0; }
.gallery-empty span { font-size: .88rem; color: var(--muted); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1050px) {
  .gallery-hero__fan { display: none; }
  .gallery-listing__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .gallery-listing__grid { grid-template-columns: 1fr; gap: 14px; }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MY ACCOUNT — two-column layout + edit/view toggle + crop modal
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.account-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 820px) {
  .account-layout { grid-template-columns: 1fr; }
}

/* Override top margin — it sits in a grid now */
.profile-card { margin-top: 0 !important; }

/* ── Avatar + name block ── */
.profile-avatar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.profile-uname {
  font-size: .98rem; font-weight: 700; color: var(--white);
  text-align: center;
}
.profile-urole {
  font-size: .76rem; color: var(--muted); text-align: center; margin-top: 2px;
}

/* ── About view mode ── */
.about-view { padding: 20px 24px; }
.about-bio-text {
  font-size: .88rem; color: var(--text); line-height: 1.7;
  margin: 0 0 16px; white-space: pre-wrap; word-break: break-word;
}
.about-bio-empty {
  font-size: .84rem; color: var(--muted); font-style: italic;
  margin: 0 0 16px;
}

/* ── About edit mode ── */
.about-edit { padding: 20px 24px; }
.about-edit-actions {
  display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap;
}

/* ── Crop photo modal ── */
.crop-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.78); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.crop-modal-overlay.open { display: flex; }
.crop-modal {
  background: var(--charcoal); border: 1px solid var(--border);
  border-radius: var(--r-md); width: 100%; max-width: 500px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 28px 80px rgba(0,0,0,.75);
}
.crop-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  font-size: .9rem; font-weight: 600; color: var(--white);
}
.crop-modal__head button {
  background: none; border: none; color: var(--muted); font-size: 1.15rem;
  cursor: pointer; padding: 4px 6px; line-height: 1; border-radius: var(--r-sm);
  transition: color .18s, background .18s;
}
.crop-modal__head button:hover { color: var(--white); background: rgba(255,255,255,.08); }
.crop-modal__body {
  background: var(--charcoal); max-height: 420px; overflow: auto;
  display: flex; align-items: center; justify-content: center;
}
.crop-modal__body img { max-width: 100%; display: block; }
.crop-modal__foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}
