/* Photobooth design system — light, white, modern. */

:root {
  --page: #f6f7fb;
  --surface: #ffffff;
  --surface-muted: #fafbfd;
  --border: #e8eaf1;
  --border-strong: #d7dae5;

  --text: #101322;
  --text-2: #5b6076;
  --text-3: #8b90a5;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --accent-ring: rgba(79, 70, 229, 0.18);

  --success: #0f9f6e;
  --success-soft: #e9f9f2;
  --danger: #dc2657;
  --danger-soft: #fff0f4;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(16, 19, 34, 0.05), 0 2px 8px rgba(16, 19, 34, 0.04);
  --shadow-2: 0 12px 32px rgba(16, 19, 34, 0.08), 0 2px 6px rgba(16, 19, 34, 0.04);
  --shadow-3: 0 40px 90px rgba(16, 19, 34, 0.22);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A soft light wash so the white surfaces have something to sit on. */
.page-wash {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(79, 70, 229, 0.10), transparent 62%),
    radial-gradient(760px 420px at 92% 4%, rgba(14, 165, 233, 0.09), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--page) 46%);
}

h1, h2, h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }

p { margin: 0; }

a { color: var(--accent); text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 2px;
}

.muted { color: var(--text-2); }
.tiny { font-size: 0.82rem; }

/* ---------- Surfaces ---------- */

.card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(140deg, #6366f1, #4f46e5 55%, #3f38c9);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
}

.brand-mark svg { width: 24px; height: 24px; }
.brand-title { font-size: 1.35rem; }
.brand-sub { color: var(--text-3); font-size: 0.9rem; }

/* ---------- Forms ---------- */

.field { display: block; margin-top: 22px; }

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
}

.input, .select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.98rem;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  appearance: none;
}

.select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6076' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
  cursor: pointer;
}

.input::placeholder { color: var(--text-3); }

.input:hover, .select:hover { border-color: var(--border-strong); }

.input:focus, .select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

/* Segmented control */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.segmented button {
  height: 38px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.segmented button:hover { color: var(--text); }

.segmented button.is-active {
  color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 20px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.22);
}

.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.btn-block { width: 100%; }

.btn-secondary {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
}

.btn-secondary:hover:not(:disabled) { background: var(--surface-muted); }

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
}

/* ---------- Feedback ---------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 14px;
  font-size: 0.9rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-error { color: #a3123f; background: var(--danger-soft); border-color: #ffd7e2; }
.alert-success { color: #0a7351; background: var(--success-soft); border-color: #c8efdf; }
.alert-info { color: #3f38c9; background: var(--accent-soft); border-color: #dcdffc; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(79, 70, 229, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Photobooth: setup ---------- */

.setup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 20px;
}

.setup-card { width: 100%; max-width: 468px; }

.hint-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.hint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-2);
}

.hint svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* ---------- Photobooth: live view ---------- */

body.is-live {
  overflow: hidden;
  background: #05060a;
  touch-action: manipulation;
}

.viewer {
  position: fixed;
  inset: 0;
  background: #05060a;
  cursor: pointer;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.viewer video,
.viewer .frozen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frozen { animation: pop-in 0.35s ease; }

@keyframes pop-in {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

.viewer-chrome {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  pointer-events: none;
}

.viewer-top, .viewer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.viewer-bottom { justify-content: center; }

.glass {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 550;
  color: #fff;
  background: rgba(10, 12, 20, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.glass svg { width: 17px; height: 17px; flex: none; }
.glass-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.22); }

.viewer-hint { animation: breathe 3.4s ease-in-out infinite; }

@keyframes breathe {
  0%, 100% { opacity: 0.72; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.status-pill.is-success { background: rgba(15, 159, 110, 0.9); border-color: rgba(255, 255, 255, 0.28); }
.status-pill.is-error { background: rgba(220, 38, 87, 0.9); border-color: rgba(255, 255, 255, 0.28); }

/* Countdown */
.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(5, 6, 10, 0.45), transparent 72%);
}

.countdown-tick {
  position: relative;
  display: grid;
  place-items: center;
  width: 232px;
  height: 232px;
  animation: tick-in 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.countdown-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.countdown-ring circle {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.countdown-ring .track { stroke: rgba(255, 255, 255, 0.22); }

.countdown-ring .progress {
  stroke: #fff;
  stroke-dasharray: 691;
  animation: sweep 1s linear forwards;
}

.countdown-number {
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

@keyframes tick-in {
  0% { opacity: 0; transform: scale(0.72); }
  18% { opacity: 1; transform: scale(1.04); }
  30% { transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes sweep {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 691; }
}

.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  pointer-events: none;
  animation: flash 0.45s ease-out forwards;
}

@keyframes flash {
  from { opacity: 0.92; }
  to { opacity: 0; }
}

/* ---------- Kiosk ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.topbar .select { height: 44px; min-width: 230px; }

.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  white-space: nowrap;
  padding: 7px 13px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
}

.kiosk-main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 18px;
}

.tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: tile-in 0.35s ease both;
}

.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.tile:hover img { transform: scale(1.045); }

.tile-meta {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 26px 12px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(6, 8, 16, 0.68), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tile:hover .tile-meta, .tile:focus-visible .tile-meta { opacity: 1; }

@keyframes tile-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 76px 24px;
  text-align: center;
  color: var(--text-2);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 18px;
}

.empty-icon svg { width: 27px; height: 27px; }
.empty h2 { margin-bottom: 2px; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 11, 20, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade-in 0.2s ease;
}

.lightbox-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.95fr);
  width: min(1060px, 100%);
  max-height: min(88vh, 760px);
  background: var(--surface);
  border-radius: 26px;
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: panel-in 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox-progress {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.lightbox-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transform-origin: left center;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lightbox-stage {
  position: relative;
  display: grid;
  place-items: center;
  background: #0b0d15;
  min-height: 320px;
}

.lightbox-stage img { width: 100%; height: 100%; max-height: min(88vh, 760px); object-fit: contain; display: block; }

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: rgba(10, 12, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.15s ease;
}

.nav-btn:hover { background: rgba(10, 12, 20, 0.78); }
.nav-btn svg { width: 20px; height: 20px; }
.nav-prev { left: 14px; }
.nav-next { right: 14px; }

.lightbox-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: color 0.15s ease, background 0.15s ease;
}

.close-btn:hover { color: var(--text); background: var(--surface-muted); }
.close-btn svg { width: 18px; height: 18px; }

.qr-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 20px;
  text-align: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.qr-card img { width: 168px; height: 168px; border-radius: 10px; background: #fff; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.mail-form { display: grid; gap: 10px; }

@media (max-width: 880px) {
  .lightbox { padding: 0; }

  .lightbox-panel {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }

  .lightbox-side { border-left: 0; border-top: 1px solid var(--border); }
  .lightbox-stage img { max-height: 46dvh; }
  .qr-card { display: none; }
}

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; padding: 12px 16px; }
  .topbar-controls { width: 100%; margin-left: 0; }
  .topbar .select { flex: 1; min-width: 0; }
  .kiosk-main { padding: 20px 16px 56px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .card { padding: 24px; }
  .countdown-tick { width: 190px; height: 190px; }
  .countdown-number { font-size: 6.2rem; }
  .admin-toolbar-inner { padding: 8px 16px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Lock button ---------- */

.lock-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lock-btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  color: var(--text);
}

.lock-btn--locked {
  background: var(--danger-soft);
  border-color: rgba(220, 38, 87, 0.25);
  color: var(--danger);
}

.lock-btn--locked:hover:not(:disabled) {
  background: #fce0e8;
  color: var(--danger);
}

.lock-event-label {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* ---------- Modals (lock setup & unlock) ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 19, 34, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.18s ease;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  padding: 32px;
  animation: slideUp 0.22s ease;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.pin-display-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.pin-label {
  font-size: 0.85rem;
  color: var(--text-2);
}

.pin-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- Admin toolbar (kiosk locked mode) ---------- */

.admin-toolbar {
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
}

.admin-toolbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 24px;
}

.admin-toolbar-spacer { flex: 1; }

.btn-danger {
  color: #fff;
  background: var(--danger);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(220, 38, 87, 0.22);
}

.btn-danger:hover:not(:disabled) { background: #c41f4e; }

.btn-icon-sm {
  height: 36px;
  padding: 0 12px;
  font-size: 0.88rem;
  border-radius: 10px;
  gap: 6px;
}

.btn-text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.btn-text-link:hover:not(:disabled) { color: var(--accent-hover); }
.btn-text-link:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-text-danger { color: var(--danger); }
.btn-text-danger:hover:not(:disabled) { color: #c41f4e; }

/* ---------- Tile: selection & checkbox ---------- */

.tile-wrapper {
  position: relative;
}

.tile--selected {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tile--selected img { opacity: 0.88; }

.tile-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  pointer-events: none;
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

.tile-checkbox svg { width: 22px; height: 22px; }

.tile-open-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: rgba(10, 12, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  backdrop-filter: blur(6px);
}

.tile-wrapper:hover .tile-open-btn { opacity: 1; }
.tile-open-btn:hover { background: rgba(10, 12, 20, 0.78); }

/* ---------- Share access list ---------- */

.share-access-list {
  display: grid;
  gap: 6px;
}

.share-access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* ---------- Mail template modal / Quill editor ---------- */

#quill-editor .ql-editor {
  min-height: 160px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
}

#quill-editor .ql-toolbar {
  border-radius: 6px 6px 0 0;
  border-color: var(--border);
  background: var(--surface-muted);
}

#quill-editor .ql-container {
  border-radius: 0 0 6px 6px;
  border-color: var(--border);
}
