:root {
  --ink: #07164a;
  --blue: #0b63ce;
  --mint: #0f8a58;
  --amber: #a76500;
  --red: #b91c1c;
  --slate: #607089;
  --line: #d9e4f3;
  --bg: #f4f8fc;
  --panel: #ffffff;
  --soft: #eef5ff;
  --shadow: 0 14px 34px rgba(6, 27, 84, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-shell {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
}
.auth-brand, .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}
.auth-brand span, .brand span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
}
.auth-card, .panel, .stats-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.auth-card { padding: 24px; }
.auth-card h1, .page-header h1 {
  margin: 0;
  line-height: 1.05;
}
.auth-card p { color: var(--slate); font-weight: 700; }
.auth-link { margin-bottom: 0; }
.auth-link a, .panel-head a { color: var(--blue); font-weight: 900; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px;
  background: #07164a;
  color: #fff;
}
.brand span { background: #fff; color: var(--blue); }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a {
  border-radius: 8px;
  padding: 12px 14px;
  color: #dbeafe;
  font-weight: 800;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.16);
  padding-top: 16px;
}
.sidebar-footer small { color: #bfdbfe; font-weight: 800; }
.sidebar-footer a { font-weight: 900; }
.main { min-width: 0; padding: 28px; }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.actions, .form-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
}
.button.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

.alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}
.alert.success { border-color: #b8efd2; background: #dcfce7; color: var(--mint); }
.alert.danger { border-color: #fecaca; background: #fee2e2; color: var(--red); }
.alert.warning { border-color: #fde68a; background: #fef3c7; color: var(--amber); }

.panel { padding: 18px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 14px; font-size: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats-grid article { padding: 18px; }
.stats-grid span { color: var(--slate); font-size: 13px; font-weight: 800; }
.stats-grid strong { display: block; margin-top: 8px; font-size: 30px; }

.form-stack, .form-grid { display: grid; gap: 14px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.one-col { grid-template-columns: minmax(0, 1fr); max-width: 620px; }
.full { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: var(--slate); font-size: 13px; font-weight: 900; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
  outline: none;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 99, 206, 0.12); }
small, .muted { color: var(--slate); font-weight: 700; }

.details {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}
.details dt { color: var(--slate); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.details dd { margin: 0; font-weight: 800; }
.message-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
  color: var(--ink);
  font-weight: 750;
}

.offer-list { display: grid; gap: 10px; }
.offer-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.offer-row:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.offer-thumb {
  display: grid;
  width: 76px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--blue);
  font-weight: 900;
}
.offer-thumb img, .current-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.offer-main strong { display: block; font-weight: 900; }
.offer-main small { display: block; margin-top: 4px; }
.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.badge.success { background: #dcfce7; color: var(--mint); }
.badge.warning { background: #fef3c7; color: var(--amber); }
.badge.danger { background: #fee2e2; color: var(--red); }
.badge.info { background: #dbeafe; color: var(--blue); }

.current-image {
  display: grid;
  align-content: start;
  gap: 7px;
  color: var(--slate);
  font-size: 13px;
  font-weight: 900;
}
.current-image img {
  width: 160px;
  height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
  }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 18px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .offer-row { grid-template-columns: 64px minmax(0, 1fr); }
  .offer-row .badge { grid-column: 2; justify-self: start; }
  .details { grid-template-columns: 1fr; }
}
