:root {
  --ink: #f4f4f2;
  --muted: #a7a7a2;
  --muted-2: #6f6f6a;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.34);
  --soft: #0a0a0b;
  --paper: #111113;
  --brand: #e9d700;
  --brand-dark: #cfc000;
  --blue: #1a74d0;
  --green: #37c98d;
  --danger: #ff9b9b;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 18%, rgba(26, 116, 208, 0.22), transparent 34%),
    radial-gradient(circle at 84% 74%, rgba(233, 215, 0, 0.13), transparent 31%),
    radial-gradient(circle at 75% 42%, rgba(55, 201, 141, 0.08), transparent 30%),
    var(--soft);
  letter-spacing: 0;
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 10, 11, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: white;
  padding: 18px clamp(18px, 4vw, 34px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-inner {
  width: min(100%, 1200px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.ring::before { content: ""; width: 42px; height: 42px; border: 12px solid var(--brand); border-radius: 50%; display: block; }
.brand strong { display: block; font-size: 15px; line-height: 1.15; font-weight: 500; letter-spacing: 0.03em; }
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

nav { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; gap: 8px; }
nav a {
  min-height: 44px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
nav a:hover { color: var(--brand); }

main {
  width: min(100%, 1200px);
  margin: 0 auto;
  min-width: 0;
  padding: 54px clamp(18px, 4vw, 34px) 54px;
  position: relative;
  z-index: 1;
}

.hero {
  margin-bottom: 36px;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 6.3vw, 84px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: 0;
  max-width: 1050px;
}

.hero p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 900px;
  line-height: 1.65;
  font-size: clamp(17px, 2vw, 22px);
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.entry-card {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(17, 17, 19, 0.72);
  color: var(--ink);
  display: grid;
  align-content: space-between;
  box-shadow: var(--shadow);
}

.entry-card span {
  color: var(--brand);
  font-size: 12px;
  letter-spacing: .12em;
}

.entry-card strong {
  display: block;
  margin-top: 12px;
  font-size: 20px;
  font-weight: 500;
}

.entry-card small {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 10px;
}

.entry-card:hover,
.entry-card.active {
  border-color: rgba(233, 215, 0, 0.72);
  background: rgba(233, 215, 0, 0.08);
  color: var(--ink);
}

.entry-card.admin { border-color: rgba(255,255,255,.2); }

.card {
  background: rgba(17, 17, 19, 0.76);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
  backdrop-filter: blur(12px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #c3c3be;
  letter-spacing: .08em;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid #55555a;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 12px 0;
  outline: none;
}

select {
  background: #111113;
  color: var(--ink);
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 8px 8px 0 0;
  color-scheme: dark;
}

select option { background: #111113; color: #f4f4f2; }
textarea { min-height: 92px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }

fieldset {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 9px;
  background: rgba(255,255,255,.025);
}

legend { padding: 0 8px; color: var(--brand); font-weight: 750; }
fieldset label, .check { letter-spacing: 0; text-transform: none; font-weight: 500; }
fieldset input[type="checkbox"], .check input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; padding: 0; }

fieldset label {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
}

.wide { grid-column: 1 / -1; }

.summary, .document {
  grid-column: 1 / -1;
  border: 1px solid rgba(233, 215, 0, 0.4);
  border-radius: 14px;
  padding: 16px;
  background: rgba(233, 215, 0, 0.06);
  color: #ded8a5;
  line-height: 1.55;
}

.document h2, .upload-box h2 { margin: 0 0 8px; font-size: 15px; font-weight: 550; color: var(--ink); }
.document p, .upload-box p { margin: 0 0 12px; color: #ded8a5; font-size: 13px; line-height: 1.55; }

input[type="file"] {
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 14px;
  min-height: 54px;
  background: rgba(0, 0, 0, 0.14);
}

.check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  line-height: 1.45;
}

button, .primary {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #0a0a0b;
  padding: 9px 13px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

button:hover, .primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.notice {
  border-left: 4px solid var(--brand);
  padding: 12px 14px;
  background: rgba(233, 215, 0, 0.08);
  color: #efe7a0;
  font-size: 13px;
  line-height: 1.45;
  border-radius: 0 7px 7px 0;
  margin-bottom: 18px;
}

.notice.ok { border-color: var(--green); background: rgba(55, 201, 141, 0.13); color: var(--green); }
.notice.error { border-color: var(--danger); background: rgba(255, 155, 155, 0.13); color: var(--danger); }

.login { max-width: 420px; display: grid; gap: 16px; padding: 20px; }
.dashboard-head { align-items: center; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stats .card { padding: 15px; min-height: 112px; display: grid; align-content: space-between; }
.stats small { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.stats strong { display: block; font-size: 34px; line-height: 1; font-weight: 300; color: var(--ink); }
.stats p { color: var(--brand); line-height: 1.4; margin: 8px 0 0; font-size: 12px; }

.upload-box {
  margin-top: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(170px, .75fr) minmax(170px, .75fr) minmax(170px, .75fr) auto;
  gap: 14px;
  align-items: end;
}

.table { display: grid; gap: 12px; padding: 16px; }

.ticket {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
  align-items: start;
  background: rgba(255,255,255,.025);
}

.ticket h2 { margin: 0; font-size: 15px; font-weight: 600; }
.ticket p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.ticket form { display: grid; gap: 10px; }

@media (max-width: 980px) {
  .top { position: static; padding: 18px; }
  .top-inner { display: grid; }
  nav { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row; width: 100%; }
  nav a { justify-content: center; letter-spacing: .06em; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload-box { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  main { padding: 18px; }
  .hero { display: grid; }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-grid, .form-grid, .ticket, .stats { grid-template-columns: 1fr; }
}
