/* ==========================================================================
   Error Owner & Details Check System — design system
   Palette: blue / white / dark navy
   ========================================================================== */

:root {
  --blue-900: #0b1f4b;
  --blue-800: #10295e;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;

  --ink: #0f172a;
  --ink-2: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --green-700: #15803d;
  --green-100: #dcfce7;
  --amber-700: #b45309;
  --amber-100: #fef3c7;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --violet-700: #6d28d9;
  --violet-100: #ede9fe;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow: 0 4px 16px rgba(15, 23, 42, .07);
  --shadow-lg: 0 24px 60px rgba(11, 31, 75, .18);
  --ring: 0 0 0 3px rgba(37, 99, 235, .25);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--blue-800); }

h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

hr.divider { border: 0; border-top: 1px solid var(--slate-200); margin: 18px 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--blue-700); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 8px;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; color: #fff; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.container--narrow { width: min(960px, 100% - 40px); }

.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.muted { color: var(--slate-500); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }
.uppercase { text-transform: uppercase; letter-spacing: .04em; }
.link { color: var(--blue-700); font-weight: 600; }
.link:hover { text-decoration: underline; }
.req { color: var(--red-600); }

.eyebrow {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue-600); margin-bottom: 6px;
}
.eyebrow--light { color: #93c5fd; }

/* ------------------------------ buttons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .94rem; line-height: 1;
  padding: 11px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn.is-loading { opacity: .78; pointer-events: none; }

.btn-primary { background: var(--blue-700); color: #fff; box-shadow: 0 6px 16px rgba(29, 78, 216, .28); }
.btn-primary:hover { background: var(--blue-800); color: #fff; }
.btn-outline { background: var(--white); color: var(--slate-700); border-color: var(--slate-300); }
.btn-outline:hover { border-color: var(--blue-600); color: var(--blue-700); background: var(--blue-50); }
.btn-ghost { background: transparent; color: var(--slate-600); }
.btn-ghost:hover { background: var(--slate-100); color: var(--ink); }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-danger:hover { background: var(--red-700); color: #fff; }
.btn-lg { padding: 14px 22px; font-size: 1rem; }
.btn-sm { padding: 8px 13px; font-size: .86rem; }
.btn-block { width: 100%; }

.btn.is-loading::before {
  content: ""; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-xs); border: 1px solid var(--slate-200);
  background: var(--white); color: var(--slate-600); cursor: pointer;
  transition: all .15s ease;
}
.icon-btn:hover { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.icon-btn--sm { width: 30px; height: 30px; }
.icon-btn--danger:hover { background: var(--red-100); color: var(--red-700); border-color: #fecaca; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--slate-100); border: 1px solid var(--slate-200); color: var(--slate-700);
  font: inherit; font-size: .78rem; font-family: var(--mono); font-weight: 600;
  padding: 5px 10px; border-radius: 999px; cursor: pointer; transition: all .15s ease;
}
.chip:hover { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-700); }

/* ------------------------------- header --------------------------------- */
.skip-link, .site-header { position: relative; }
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(140deg, var(--blue-700), var(--blue-900)); color: #fff;
  box-shadow: 0 6px 16px rgba(29, 78, 216, .3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; letter-spacing: -.02em; }
.brand-text small { font-size: .7rem; color: var(--slate-500); letter-spacing: .04em; text-transform: uppercase; }
.brand--light .brand-text strong { color: #fff; }
.brand--light .brand-text small { color: rgba(255, 255, 255, .6); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 9px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: .92rem;
  color: var(--slate-600); transition: all .15s ease;
}
.nav-link:hover { background: var(--slate-100); color: var(--ink); }
.nav-link.is-active { background: var(--blue-50); color: var(--blue-700); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); padding: 8px; cursor: pointer; }

/* -------------------------------- hero ---------------------------------- */
.hero { position: relative; background: var(--blue-900); color: #e2e8f0; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(760px 380px at 12% 0%, rgba(59, 130, 246, .38), transparent 60%),
    radial-gradient(620px 420px at 92% 18%, rgba(14, 165, 233, .22), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 40%);
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px;
  align-items: center; padding: 74px 0 84px;
}
.hero-copy h1 { color: #fff; font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); margin-bottom: 16px; }
.hero-copy p { color: #cbd5e1; font-size: 1.04rem; max-width: 52ch; }
.hero-copy strong { color: #fff; }
.hero-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 9px; }
.hero-points li { position: relative; padding-left: 28px; color: #dbeafe; font-size: .95rem; }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(59, 130, 246, .25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat;
}

.search-card {
  background: var(--white); border-radius: 20px; padding: 28px; color: var(--ink-2);
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .5);
}
.search-card-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 20px; }
.search-card-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 12px; background: var(--blue-50); color: var(--blue-700);
}
.search-card-head h2 { font-size: 1.16rem; margin-bottom: 2px; }
.search-card-head p { font-size: .86rem; color: var(--slate-500); margin: 0; }

.sample-hints {
  margin-top: 16px; padding-top: 15px; border-top: 1px dashed var(--slate-200);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .8rem; color: var(--slate-500);
}

/* ------------------------------- sections -------------------------------- */
.section { padding: 62px 0; }
.section--tint { background: var(--slate-50); border-block: 1px solid var(--slate-200); }
.section-head { max-width: 640px; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-bottom: 8px; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 24px 22px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-100); }
.feature-num {
  display: inline-block; font-family: var(--mono); font-weight: 700; font-size: .8rem;
  color: var(--blue-600); background: var(--blue-50); padding: 4px 9px; border-radius: 7px; margin-bottom: 14px;
}
.feature-card h3 { margin-bottom: 7px; }
.feature-card p { font-size: .9rem; color: var(--slate-600); margin: 0; }

.status-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.legend-item { background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 18px; }
.legend-item p { margin: 10px 0 0; font-size: .87rem; color: var(--slate-600); }

.page-band { background: linear-gradient(180deg, var(--blue-900), var(--blue-800)); color: #cbd5e1; padding: 40px 0; }
.page-band h1 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); margin-bottom: 6px; }
.breadcrumbs { display: flex; gap: 8px; font-size: .8rem; margin-bottom: 12px; color: var(--slate-400); }
.breadcrumbs a { color: #93c5fd; }
.breadcrumbs a:hover { text-decoration: underline; }

/* -------------------------------- cards ---------------------------------- */
.card {
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 22px;
}
.card:last-child { margin-bottom: 0; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--slate-200); background: var(--slate-50);
}
.card-head h2 { font-size: 1rem; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--slate-200); background: var(--slate-50); }
.card--accent { border-color: var(--blue-100); }
.card--accent .card-head { background: var(--blue-50); }
.card--sticky { position: sticky; top: 90px; }
.code-chip {
  background: var(--blue-900); color: #bfdbfe; padding: 4px 10px; border-radius: 7px;
  font-weight: 700; font-size: .8rem; letter-spacing: .04em;
}
.code-chip--lg { font-size: .95rem; padding: 6px 13px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2--wide { align-items: start; }
.stack-col { display: flex; flex-direction: column; gap: 22px; }
.stack-col > .card { margin-bottom: 0; }

.record-title { font-size: 1.22rem; margin-bottom: 10px; }
.record-desc { color: var(--slate-600); font-size: .95rem; }
.solution-text { color: var(--slate-700); background: var(--slate-50); border-left: 3px solid var(--blue-600); padding: 12px 14px; border-radius: 0 8px 8px 0; }
.notes-text { color: var(--slate-600); font-size: .92rem; background: var(--amber-100); border-radius: 8px; padding: 11px 13px; }

.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 22px; margin: 18px 0 0; }
.meta-grid--inline { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.meta-grid > div { min-width: 0; }
.meta-grid dt { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--slate-500); font-weight: 700; }
.meta-grid dd { margin: 3px 0 0; font-weight: 600; color: var(--ink); font-size: .94rem; overflow-wrap: anywhere; }

/* -------------------------------- badges --------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .03em;
  border: 1px solid transparent; white-space: nowrap; text-transform: uppercase;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--pending { background: var(--amber-100); color: var(--amber-700); border-color: #fde68a; }
.badge--progress { background: var(--blue-100); color: var(--blue-700); border-color: #bfdbfe; }
.badge--fixed { background: var(--violet-100); color: var(--violet-700); border-color: #ddd6fe; }
.badge--verified { background: var(--green-100); color: var(--green-700); border-color: #bbf7d0; }
.badge--muted { background: var(--slate-100); color: var(--slate-600); border-color: var(--slate-200); }
.badge--info { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.badge--low { background: var(--slate-100); color: var(--slate-600); border-color: var(--slate-200); }
.badge--medium { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.badge--high { background: var(--amber-100); color: var(--amber-700); border-color: #fde68a; }
.badge--critical { background: var(--red-100); color: var(--red-700); border-color: #fecaca; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

/* --------------------------------- result -------------------------------- */
.result-banner {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--radius);
  margin-bottom: 22px; border: 1px solid;
}
.result-banner--found { background: linear-gradient(135deg, #ecfdf5, #eff6ff); border-color: #bbf7d0; }
.result-banner--missing { background: linear-gradient(135deg, #fef2f2, #fffbeb); border-color: #fecaca; }
.result-banner .badge { margin-left: auto; }
.result-check {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--green-700); color: #fff;
}
.result-check--warn { background: var(--red-600); }
.result-title { font-weight: 800; letter-spacing: .04em; color: var(--ink); margin: 0 0 2px; font-size: 1.02rem; }
.result-sub { margin: 0; font-size: .88rem; color: var(--slate-600); }

.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.lead { font-size: 1.05rem; color: var(--slate-700); }
.checked-values { display: flex; gap: 34px; flex-wrap: wrap; background: var(--slate-50); border: 1px dashed var(--slate-300); border-radius: 10px; padding: 16px 20px; margin: 18px 0; }
.hint-list { margin: 0 0 6px; padding-left: 20px; color: var(--slate-600); font-size: .92rem; }
.hint-list li { margin-bottom: 6px; }
.steps { margin: 0; padding-left: 20px; color: var(--slate-600); }
.steps li { margin-bottom: 10px; }
.code-404 { font-size: 4rem; font-weight: 800; color: var(--blue-100); margin: 0; line-height: 1; letter-spacing: -.04em; }
.dev-details { margin: 16px 0; font-size: .86rem; }
.dev-details pre { overflow: auto; background: var(--ink); color: #e2e8f0; padding: 14px; border-radius: 8px; }

/* -------------------------------- gallery -------------------------------- */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery-item {
  position: relative; display: block; padding: 0; border: 1px solid var(--slate-200);
  border-radius: 10px; overflow: hidden; background: var(--slate-100); cursor: zoom-in;
  aspect-ratio: 16 / 10; transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .28s ease; }
.gallery-item:hover { border-color: var(--blue-500); box-shadow: var(--shadow); transform: translateY(-2px); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-zoom {
  position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 8px; background: rgba(15, 23, 42, .78); color: #fff;
  opacity: 0; transition: opacity .16s ease;
}
.gallery-item:hover .gallery-zoom { opacity: 1; }
.gallery-item--manage { cursor: default; }
.gallery-item--manage .remove-check {
  position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: 6px;
  background: rgba(15, 23, 42, .86); color: #fff; padding: 7px 9px; font-size: .76rem; font-weight: 600;
}
.gallery-empty {
  display: flex; align-items: center; gap: 10px; justify-content: center; text-align: center;
  background: var(--slate-50); border: 1px dashed var(--slate-300); border-radius: 10px;
  padding: 34px 18px; color: var(--slate-500); font-size: .9rem;
}

/* ------------------------------- owner card ------------------------------ */
.owner-card {
  display: flex; gap: 20px; padding: 22px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--slate-50), var(--blue-50));
  border: 1px solid var(--blue-100);
}
.owner-card--restricted { align-items: center; background: var(--slate-50); border-style: dashed; border-color: var(--slate-300); }
.owner-lock {
  display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 50%;
  background: var(--white); color: var(--slate-500); border: 1px solid var(--slate-200);
}
.owner-photo { position: relative; flex: none; align-self: flex-start; width: 96px; }
.owner-photo img, .owner-fallback {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--white); box-shadow: var(--shadow);
}
.owner-photo--lg img, .owner-fallback--lg { width: 112px; height: 112px; font-size: 2rem; }
.owner-fallback {
  display: grid; place-items: center; background: linear-gradient(140deg, var(--blue-700), var(--blue-900));
  color: #fff; font-weight: 700; font-size: 1.7rem;
}
.owner-status-dot {
  position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid var(--white);
}
.owner-status-dot.is-ok { background: var(--green-700); }
.owner-status-dot.is-wait { background: #f59e0b; }
.owner-body { min-width: 0; }
.owner-name { font-size: 1.2rem; margin-bottom: 10px; }
.owner-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 18px; margin: 0; }
.owner-meta dt { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--slate-500); font-weight: 700; }
.owner-meta dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); font-size: .9rem; overflow-wrap: anywhere; }
.owner-bio { margin: 13px 0 0; font-size: .88rem; color: var(--slate-600); }
.owner-dates { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 0; font-size: .84rem; color: var(--slate-600); }

.owner-hero { display: flex; gap: 24px; padding: 24px; align-items: flex-start; }
.owner-hero-body { min-width: 0; }

/* --------------------------------- forms --------------------------------- */
.form { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid--single { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-group--full { grid-column: 1 / -1; }
.form-group label { font-size: .82rem; font-weight: 700; color: var(--slate-700); letter-spacing: .01em; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="tel"], input[type="number"], input[type="date"], select, textarea {
  font: inherit; font-size: .94rem; width: 100%; padding: 11px 13px; color: var(--ink);
  background: var(--white); border: 1px solid var(--slate-300); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' 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 11px center; background-size: 15px; padding-right: 34px; }
input[disabled], select[disabled] { background: var(--slate-100); color: var(--slate-500); }
.input-sm { padding: 8px 11px !important; font-size: .88rem !important; }

.input-icon { position: relative; display: flex; align-items: center; }
.input-icon svg { position: absolute; left: 12px; color: var(--slate-400); pointer-events: none; }
.input-icon input { padding-left: 38px; }

.help { font-size: .78rem; color: var(--slate-500); margin: 0; }
.field-error { font-size: .8rem; color: var(--red-600); font-weight: 600; margin: 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red-600); background: #fff5f5; }
.file-input { padding: 9px !important; background: var(--slate-50); border-style: dashed !important; font-size: .88rem !important; }
.photo-preview { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.photo-preview img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; border: 2px solid var(--slate-200); }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.form-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.form-col > .card { margin-bottom: 0; }
.form-col--side { position: sticky; top: 88px; }

.switch-list { display: flex; flex-direction: column; gap: 11px; }
.switch { display: flex; align-items: center; gap: 11px; cursor: pointer; font-size: .9rem; color: var(--slate-700); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span {
  position: relative; flex: none; width: 40px; height: 22px; border-radius: 999px;
  background: var(--slate-300); transition: background .18s ease;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .18s ease; box-shadow: var(--shadow-sm);
}
.switch input:checked + span { background: var(--blue-700); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }
.switch em { font-style: normal; }

.stack-actions { display: flex; flex-direction: column; gap: 10px; }

#sidebar-open { display: none; }

/* ------------------------------- page actions ---------------------------- */
.page-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.page-actions-main { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-form { display: inline; }

/* ------------------------------ filter bar ------------------------------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius);
  padding: 14px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.filter-bar select, .filter-bar input[type="date"] { width: auto; min-width: 140px; padding: 9px 12px; font-size: .88rem; }
.filter-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 220px; }
.filter-search svg { position: absolute; left: 12px; color: var(--slate-400); }
.filter-search input { padding-left: 36px; }
.filter-dates { display: flex; align-items: center; gap: 7px; font-size: .84rem; }
.filter-actions { display: flex; gap: 8px; margin-left: auto; }

/* -------------------------------- tables --------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table thead th {
  text-align: left; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--slate-500); font-weight: 700; padding: 12px 16px; background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200); white-space: nowrap;
}
.table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--slate-200); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table--hover tbody tr { transition: background .13s ease; }
.table--hover tbody tr:hover { background: var(--blue-50); }
.cell-max { max-width: 340px; }
.table .mono.link { white-space: nowrap; }
.cell-title { display: block; font-weight: 600; color: var(--ink); }
.cell-sub { display: block; font-size: .78rem; color: var(--slate-500); }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }
.th-actions { text-align: right; }

.person { display: flex; align-items: center; gap: 11px; color: var(--ink); min-width: 190px; }
.person:hover { color: var(--blue-700); }
.person img, .person-fallback { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.person-fallback {
  display: grid; place-items: center; background: var(--blue-100); color: var(--blue-700);
  font-size: .78rem; font-weight: 700;
}
.person span { display: flex; flex-direction: column; line-height: 1.3; }
.person small { color: var(--slate-500); font-size: .78rem; }

/* ------------------------------ pagination -------------------------------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pagination-info { font-size: .86rem; color: var(--slate-600); }
.pagination-pages { display: flex; gap: 5px; }
.page-btn {
  min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 8px;
  border: 1px solid var(--slate-200); border-radius: 7px; background: var(--white);
  color: var(--slate-600); font-size: .85rem; font-weight: 600;
}
.page-btn:hover { border-color: var(--blue-500); color: var(--blue-700); background: var(--blue-50); }
.page-btn.is-current { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.page-ellipsis { padding: 0 4px; color: var(--slate-400); }

/* ------------------------------ empty state ------------------------------ */
.empty-state { text-align: center; padding: 54px 24px; }
.empty-icon {
  display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 16px;
  border-radius: 50%; background: var(--slate-100); color: var(--slate-400);
}
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { margin-bottom: 16px; }

/* --------------------------------- toast --------------------------------- */
.toast-stack {
  position: fixed; top: 84px; right: 20px; z-index: 120; display: flex; flex-direction: column;
  gap: 10px; width: min(370px, calc(100vw - 40px));
}
.toast {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: 11px;
  background: var(--white); border: 1px solid var(--slate-200); box-shadow: var(--shadow-lg);
  animation: toastIn .28s cubic-bezier(.2, .8, .3, 1);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.toast.is-leaving { opacity: 0; transform: translateX(24px); transition: all .25s ease; }
.toast-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; color: #fff; }
.toast-text { margin: 0; font-size: .88rem; color: var(--slate-700); flex: 1; }
.toast-close { background: none; border: 0; color: var(--slate-400); font-size: 1.2rem; cursor: pointer; line-height: 1; padding: 0; }
.toast--success .toast-icon { background: var(--green-700); }
.toast--error .toast-icon { background: var(--red-600); }
.toast--info .toast-icon { background: var(--blue-600); }
.toast--success { border-left: 4px solid var(--green-700); }
.toast--error { border-left: 4px solid var(--red-600); }
.toast--info { border-left: 4px solid var(--blue-600); }

/* ------------------------------- lightbox -------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 15, 33, .92); padding: 32px; animation: fadeIn .2s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-figure { margin: 0; max-width: min(1100px, 92vw); text-align: center; }
.lightbox-figure img { max-width: 100%; max-height: 78vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox-figure figcaption { color: #cbd5e1; font-size: .88rem; margin-top: 14px; }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; font-size: 2.3rem; line-height: 1; color: #fff;
  background: none; border: 0; cursor: pointer; opacity: .8;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff;
  font-size: 1.8rem; cursor: pointer; display: grid; place-items: center;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, .24); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* --------------------------------- footer -------------------------------- */
.site-footer { background: var(--blue-900); color: #94a3b8; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; padding: 46px 0 30px; }
.footer-title { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .9rem; }
.footer-links a { color: #cbd5e1; }
.footer-links a:hover { color: #fff; }
.site-footer .muted { color: #94a3b8; font-size: .9rem; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 0 26px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .82rem;
}

/* ================================ ADMIN ================================== */
.admin-body { background: var(--slate-100); }
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 254px; z-index: 90;
  background: linear-gradient(180deg, var(--blue-900), #081733);
  color: #cbd5e1; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .07);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; }
.sidebar-close { display: none; background: none; border: 0; color: #fff; font-size: 1.7rem; cursor: pointer; line-height: 1; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 12px 20px; }
.side-label {
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #64748b;
  margin: 18px 10px 7px; font-weight: 700;
}
.side-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin-bottom: 3px;
  border-radius: 9px; color: #cbd5e1; font-size: .9rem; font-weight: 600;
  transition: background .14s ease, color .14s ease;
}
.side-link svg { flex: none; opacity: .8; }
.side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-link.is-active { background: var(--blue-700); color: #fff; box-shadow: 0 6px 16px rgba(29, 78, 216, .4); }
.side-link.is-active svg { opacity: 1; }
.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.btn-logout {
  width: 100%; background: rgba(255, 255, 255, .06); color: #e2e8f0;
  border-color: rgba(255, 255, 255, .12);
}
.btn-logout:hover { background: rgba(220, 38, 38, .18); color: #fecaca; border-color: rgba(220, 38, 38, .4); }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(8, 15, 33, .55); z-index: 85; }
.sidebar-backdrop[hidden] { display: none; }

.admin-main { flex: 1; margin-left: 254px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 70; display: flex; align-items: center; gap: 16px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200); padding: 13px 26px;
}
.topbar-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.topbar-title h1 { font-size: 1.15rem; }
.topbar-sub { font-size: .78rem; color: var(--slate-500); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.avatar-chip {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(140deg, var(--blue-700), var(--blue-900)); color: #fff; font-weight: 700;
}
.admin-content { padding: 26px; }

/* -------------------------------- stats ---------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(194px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
  display: flex; align-items: center; gap: 14px; padding: 17px; background: var(--white);
  border: 1px solid var(--slate-200); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; color: inherit;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-100); color: inherit; }
.stat-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; flex: none; }
.stat-icon--blue { background: var(--blue-100); color: var(--blue-700); }
.stat-icon--amber { background: var(--amber-100); color: var(--amber-700); }
.stat-icon--sky { background: #e0f2fe; color: #0369a1; }
.stat-icon--violet { background: var(--violet-100); color: var(--violet-700); }
.stat-icon--green { background: var(--green-100); color: var(--green-700); }
.stat-icon--indigo { background: #e0e7ff; color: #4338ca; }
.stat-icon--rose { background: var(--red-100); color: var(--red-700); }
.stat-card div { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: .74rem; color: var(--slate-500); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.stat-value { font-size: 1.62rem; font-weight: 800; color: var(--ink); line-height: 1.15; letter-spacing: -.03em; }

/* -------------------------------- charts --------------------------------- */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 22px; margin-bottom: 22px; }
.chart-grid > .card { margin-bottom: 0; }
.chart-grid--two { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.chart { min-height: 236px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 14px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--slate-600); }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-hbar { display: flex; flex-direction: column; gap: 11px; }
.chart-hbar .row { display: grid; grid-template-columns: minmax(90px, 130px) 1fr auto; gap: 10px; align-items: center; font-size: .8rem; }
.chart-hbar .row .lbl { color: var(--slate-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-hbar .track { background: var(--slate-100); border-radius: 999px; height: 10px; overflow: hidden; }
.chart-hbar .fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue-600), var(--blue-500)); }
.chart-hbar .val { font-weight: 700; color: var(--ink); font-family: var(--mono); }

.detail-head { padding: 0; }
.detail-head-main { padding: 22px 24px; }
.detail-head-main h1 { font-size: 1.5rem; margin: 11px 0 3px; }

.quick-grid { display: flex; flex-direction: column; gap: 14px; }
.quick-form { display: flex; flex-direction: column; gap: 7px; }
.quick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-row select { flex: 1 1 160px; min-width: 140px; }
.quick-row input[type="date"] { flex: 0 1 158px; }

.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.rank-list--cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; row-gap: 16px; }
@media (max-width: 900px) { .rank-list--cols { grid-template-columns: 1fr; } }
.card-block { margin-bottom: 22px; }
.rank-list li { display: grid; grid-template-columns: 26px minmax(120px, 1fr) minmax(60px, 1.2fr) 34px; gap: 12px; align-items: center; }
.rank-num {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: var(--blue-50); color: var(--blue-700); font-size: .76rem; font-weight: 800;
}
.rank-name { display: flex; flex-direction: column; font-weight: 600; font-size: .9rem; color: var(--ink); line-height: 1.25; }
.rank-name small { font-weight: 500; color: var(--slate-500); font-size: .74rem; font-family: var(--mono); }
.rank-bar { background: var(--slate-100); border-radius: 999px; height: 8px; overflow: hidden; }
.rank-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-700), var(--blue-500)); border-radius: 999px; }
.rank-count { font-weight: 800; font-family: var(--mono); text-align: right; color: var(--ink); }

.inline-upload { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.inline-upload .file-input { flex: 1 1 220px; }

/* -------------------------------- guest ---------------------------------- */
.guest-body {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; padding: 40px 20px;
  background:
    radial-gradient(700px 420px at 15% 10%, rgba(37, 99, 235, .28), transparent 60%),
    linear-gradient(160deg, var(--blue-900), #061029 60%, #0a1b3d);
}
.guest-brand { align-self: center; }
.guest-card {
  width: min(430px, 100%); background: var(--white); border-radius: 18px; padding: 30px;
  box-shadow: var(--shadow-lg);
}
.guest-head { text-align: center; margin-bottom: 22px; }
.guest-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 13px;
  border-radius: 15px; background: var(--blue-50); color: var(--blue-700);
}
.guest-head h1 { font-size: 1.32rem; margin-bottom: 6px; }
.guest-head p { font-size: .87rem; margin: 0; }
.guest-card .form-group { margin-bottom: 16px; }
.guest-foot { text-align: center; margin-top: 20px; font-size: .87rem; }
.guest-foot a { color: var(--slate-500); }
.guest-foot a:hover { color: var(--blue-700); }

/* ------------------------------ responsive ------------------------------- */
@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .status-legend { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-layout { grid-template-columns: 1fr; }
  .form-col--side { position: static; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding: 52px 0 60px; }
  .grid-2 { grid-template-columns: 1fr; }
  .gallery, .gallery--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  #sidebar-open { display: inline-flex; }
  .sidebar { transform: translateX(-100%); transition: transform .24s ease; }
  .sidebar.is-open { transform: none; }
  .sidebar-close { display: block; }
  .admin-main { margin-left: 0; }
  .topbar { padding: 12px 16px; }
  .admin-content { padding: 18px 16px; }

  .owner-card { flex-direction: column; }
  .owner-hero { flex-direction: column; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 4px; padding: 12px 20px 18px; background: var(--white);
    border-bottom: 1px solid var(--slate-200); box-shadow: var(--shadow); display: none;
  }
  .nav.is-open { display: flex; }

  .form-grid { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
  .checked-values { gap: 18px; }
  .result-banner { flex-wrap: wrap; }
  .result-banner .badge { margin-left: 0; }
  .filter-actions { margin-left: 0; width: 100%; }
  .filter-actions .btn { flex: 1; }
  .filter-bar select, .filter-bar input[type="date"] { flex: 1 1 140px; }
  .pagination { flex-direction: column; align-items: flex-start; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .topbar-title h1 { font-size: 1rem; }
  .quick-row input[type="date"] { flex: 1 1 100%; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .container, .container--narrow { width: min(100% - 28px, 1180px); }
  .feature-grid, .status-legend { grid-template-columns: 1fr; }
  .gallery, .gallery--4 { grid-template-columns: 1fr; }
  .search-card { padding: 22px 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .card-body { padding: 16px; }
  .card-head { padding: 14px 16px; }
  .lightbox { padding: 16px; }
  .lightbox-nav { width: 40px; height: 40px; }
  .topbar-actions .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .site-footer, .toast-stack, .page-actions, .result-actions { display: none !important; }
  .card { box-shadow: none; break-inside: avoid; }
}
