@import url('https://fonts.googleapis.com/css2?family=Delius&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
  --bg-deep: #0d3f7a;
  --bg-mid: #1458a8;
  --bg-light: #2a78cf;
  --paper: #fffdf6;
  --ink: #14213d;
  --line: #d7dce8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.08) 0 8px, transparent 9px) 0 0/38px 38px,
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.06) 0 7px, transparent 8px) 0 0/45px 45px,
    linear-gradient(165deg, var(--bg-deep), var(--bg-mid) 45%, var(--bg-light));
  min-height: 100vh;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 36px;

  &.admin {
    max-width: 1920px;
  }
}

.hero {
  background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.22);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  backdrop-filter: blur(2px);
}

.hero-banner {
  width: 100%;
  height: auto;
  display: block;
}

.hero-fallback {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 6vw, 58px);
  letter-spacing: 1px;
  line-height: 0.95;
  text-transform: uppercase;
  padding: 18px;
}

.hero-dates {
  color: #e8f2ff;
  margin: 10px 2px 0;
  font-weight: 700;
  letter-spacing: .4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: min(520px, calc(100vw - 24px));
  width: max-content;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
  font-weight: 700;
  animation: toastIn .3s ease-out;
}

.toast-success {
  background: #e8f8ea;
  color: #145a1f;
  border-color: #cdeed1;
}

.toast.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(14px);
  transition: opacity .35s ease, transform .35s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.card {
  background: var(--paper);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  border: 2px solid #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,.2);
}

.form-block {
  background: #fefefe;
  border: 2px dashed #c7d6ef;
  border-radius: 12px;
  padding: 12px;
  margin: 10px 0 14px;
}

.form-block h3 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: #0f3f7a;
}

.split-block {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  align-items: start;
}

.block-main { min-width: 0; }

.block-visual {
  background: #f1f7ff;
  border: 1px solid #c8dbf6;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.block-visual img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
}

.photo-info p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.45;
  color: #1d3557;
}

.privacy-note {
  margin: 8px 0 14px;
  background: #f1f7ff;
  border: 2px solid #c8dbf6;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7);
}

.privacy-note h4 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #0f3f7a;
}

.privacy-note ul {
  margin: 0;
  padding-left: 18px;
}

.privacy-note li {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.4;
  color: #1d3557;
}

input, select, button {
  width: 100%;
  padding: 11px 12px;
  margin-top: 6px;
  border-radius: 10px;
  border: 2px solid #d0d7e6;
  background: #fff;
  font-size: 15px;
}

input:focus, select:focus {
  outline: none;
  border-color: #2b7bd6;
  box-shadow: 0 0 0 3px rgba(43,123,214,.18);
}

button {
  border: none;
  color: #08305f;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
  cursor: pointer;
  background: linear-gradient(180deg, #ffe082, #ffca28);
  box-shadow: 0 4px 0 #ddaa10, 0 8px 12px rgba(0,0,0,.18);
  transition: transform .08s ease, box-shadow .08s ease;
}

button:hover { transform: translateY(-1px); }
button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #ddaa10, 0 5px 8px rgba(0,0,0,.16);
}

.inline {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f7f9ff;
  border: 1px dashed #c9d5ee;
  padding: 8px 10px;
  border-radius: 10px;
}

.inline input { width: auto; margin: 0; }
.hidden { display: none; }

.status-chip {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: #e3f2fd;
  color: #0d47a1;
}
.status-chip.warn { background: #ffebee; color: #b71c1c; }

a { color: #0d47a1; font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px; vertical-align: top; }

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inline-form { margin: 0; }

.mini-btn {
  width: auto;
  min-width: 92px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: 0 3px 0 #ddaa10, 0 5px 8px rgba(0,0,0,.16);
}

.mini-btn.danger {
  background: linear-gradient(180deg, #ffcdd2, #ef9a9a);
  color: #5d0b12;
  box-shadow: 0 3px 0 #d77982, 0 5px 8px rgba(0,0,0,.16);
}

.sort-btn {
  all: unset;
  cursor: pointer;
  font-weight: 700;
  color: #0d47a1;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}
.sort-btn::after {
  content: '↕';
  opacity: .45;
  font-size: 12px;
  display: block;
  margin-top: 2px;
}
.sort-btn[data-dir="asc"]::after { content: '↑'; opacity: 1; }
.sort-btn[data-dir="desc"]::after { content: '↓'; opacity: 1; }

@media (max-width: 860px) {
  .split-block { grid-template-columns: 1fr; }
  .block-visual { order: -1; }
}

/* Admin page cleanup */
.admin-hero {
  margin-bottom: 14px;
}

.admin-title {
  padding: 4px 2px 0;
  font-size: clamp(26px, 4.4vw, 40px);
  text-transform: none;
  line-height: 1.05;
}

.admin-login-card {
  max-width: 460px;
}

.admin-login-error {
  color: #b71c1c;
  font-weight: 700;
  margin: 0 0 10px;
}

.admin-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-toolbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-stat {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf4ff;
  border: 1px solid #c6d8f2;
  color: #17426f;
  font-size: 12px;
  font-weight: 700;
}

.admin-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #d7dce8;
  border-radius: 10px;
  background: #ffffff;
}

.admin-table-wrap table {
  min-width: 1200px;
}

.admin-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f8ff;
}

.admin-actions {
  min-width: 80px;
}

.mini-btn {
  min-width: 80px;
}

.mini-btn-secondary {
  background: linear-gradient(180deg, #d7ecff, #b8dcff);
  color: #0f3f7a;
  box-shadow: 0 3px 0 #8fbbe6, 0 5px 8px rgba(0,0,0,.16);
}

.mini-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: linear-gradient(180deg, #e8f5e9, #c8e6c9);
  color: #1b5e20;
  box-shadow: 0 3px 0 #8fcb92, 0 5px 8px rgba(0,0,0,.16);
}

.sort-btn::after {
  content: ' <->';
  opacity: .45;
  font-size: 12px;
}

.sort-btn[data-dir="asc"]::after {
  content: ' ^';
  opacity: 1;
}

.sort-btn[data-dir="desc"]::after {
  content: ' v';
  opacity: 1;
}

.row-action-dropdown {
  position: relative;
  width: 100%;
}

.row-action-dropdown summary {
  list-style: none;
}

.row-action-dropdown summary::-webkit-details-marker {
  display: none;
}

.row-action-trigger {
  margin-top: 0;
}

.row-action-trigger::after {
  content: ' v';
  font-size: 11px;
}

.row-action-dropdown[open] .row-action-trigger::after {
  content: ' ^';
}

.row-action-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 170px;
  max-width: min(240px, calc(100vw - 12px));
  padding: 6px;
  border-radius: 10px;
  border: 1px solid #c8d8ee;
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(0,0,0,.16);
  z-index: 2500;
}

.row-action-item {
  display: block;
  width: 100%;
  margin-top: 0;
  border: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  color: #14375d;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
}

.row-action-item:hover {
  background: #edf4ff;
  transform: none;
}

.row-action-item:active {
  transform: none;
  box-shadow: none;
}

.row-action-item-danger {
  color: #9b1c1c;
}

.row-action-item-danger:hover {
  background: #fdeced;
}
