:root {
  --navy: #12385f;
  --navy2: #0a2742;
  --teal: #0f7c78;
  --amber: #d99b2b;
  --bg: #f4f7fa;
  --card: #ffffff;
  --text: #17212b;
  --muted: #657484;
  --line: #dce4eb;
  --ok: #14804a;
  --danger: #c73838;
  --shadow: 0 12px 36px rgba(18, 56, 95, 0.1);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

header {
  background: linear-gradient(145deg, var(--navy2), var(--navy));
  color: #fff;
}

.nav {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 20px;
  font-weight: 800;
}

.brand-logo,
.brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin: 0;
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), #2db6a8);
  display: grid;
  place-items: center;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 18px;
}

.navlinks a {
  text-decoration: none;
}

.hero {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 64px 24px 76px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: #8fddd5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0;
  font-size: clamp(38px, 5vw, 52px);
  line-height: 1.05;
}

.hero p {
  color: #d7e5ef;
  font-size: 18px;
  line-height: 1.65;
}

.hero-card {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.main {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.admin-layout > aside,
.admin-layout > section,
.admin-layout > main,
.admin-layout > div {
  min-width: 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 22px;
}

.section-title h1,
.section-title h2,
.section-title h3 {
  margin: 0;
}

.section-title h2 {
  font-size: 32px;
}

.muted {
  color: var(--muted);
}

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

.span4 { grid-column: span 4; }
.span5 { grid-column: span 5; }
.span6 { grid-column: span 6; }
.span7 { grid-column: span 7; }
.span8 { grid-column: span 8; }
.span12 { grid-column: span 12; }

.card,
.app-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.card + .card,
.app-card + .app-card {
  margin-top: 18px;
}

.card h2,
.card h3,
.app-card h2,
.app-card h3 {
  margin-top: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  margin-bottom: 16px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label,
label {
  display: block;
  color: #354453;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9d4de;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.35;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 124, 120, 0.14);
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button,
.button,
.actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

button:hover:not(:disabled),
.button:hover,
.actions a:hover {
  filter: brightness(0.96);
  box-shadow: 0 6px 16px rgba(15, 124, 120, 0.2);
  transform: translateY(-1px);
}

button.secondary,
.button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
}

button.danger,
.button.danger {
  background: var(--danger);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.notice {
  margin: 0 0 22px;
  padding: 13px 15px;
  border: 1px solid #b9ddd8;
  border-left: 4px solid var(--teal);
  border-radius: 10px;
  background: #edf8f7;
  color: #174f4d;
  overflow-wrap: anywhere;
}

.notice:empty {
  display: none;
}

.notice.danger,
.notice.error {
  border-color: #efc0c0;
  border-left-color: var(--danger);
  background: #fff2f2;
  color: #852828;
}

.notice.good,
.notice.success {
  border-color: #bce3cd;
  border-left-color: var(--ok);
  background: #effaf4;
  color: #17643c;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e9eef3;
  color: #445565;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.badge.good,
.badge.success {
  background: #dff4e8;
  color: var(--ok);
}

.badge.danger,
.badge.error {
  background: #fde5e5;
  color: var(--danger);
}

.badge.warning {
  background: #fff2d8;
  color: #8a5b00;
}

.stagebar,
.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.stage,
.step {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #e9eef3;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}

.stage.good,
.stage.active,
.step.good,
.step.active {
  background: #dff4e8;
  color: var(--ok);
  font-weight: 800;
}

.stage.danger,
.step.danger {
  background: #fde5e5;
  color: var(--danger);
}

.hero .step {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.hero .step b {
  display: block;
  margin-bottom: 4px;
  color: #8fddd5;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f7f9fb;
  color: #405162;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.hidden,
[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .hero,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    padding-top: 44px;
    padding-bottom: 50px;
  }

  .span4,
  .span5,
  .span6,
  .span7,
  .span8 {
    grid-column: span 12;
  }

  .stagebar,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    padding: 15px 16px;
  }

  .brand {
    font-size: 16px;
  }

  .brand-logo,
  .brand img {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .navlinks {
    gap: 10px;
    font-size: 13px;
  }

  .hero,
  .main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .main {
    padding-top: 24px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .section-title h2 {
    font-size: 26px;
  }

  .card,
  .app-card {
    padding: 18px;
  }

  .grid {
    gap: 14px;
  }

  .stagebar,
  .steps {
    grid-template-columns: 1fr;
  }

  button,
  .button,
  .actions a {
    width: 100%;
  }
}
