:root {
  --ink: #102033;
  --body: #536174;
  --muted: #738196;
  --line: #dfe7f0;
  --soft: #f6f9fc;
  --primary: #343b86;
  --accent: #9f1f24;
  --white: #ffffff;
  --shadow: 0 16px 38px rgba(16, 32, 51, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--soft);
  line-height: 1.55;
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}
.admin-sidebar {
  background: #10182b;
  color: #d9e2ee;
  padding: 24px;
}
.admin-brand {
  display: grid;
  place-items: center;
  min-height: 98px;
  background: var(--white);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 28px;
}
.admin-brand img {
  width: 180px;
  height: 76px;
  object-fit: contain;
}
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar a:not(.admin-brand) {
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 600;
  color: #d9e2ee;
}
.admin-sidebar a:not(.admin-brand):hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.admin-main {
  padding: 30px;
  min-width: 0;
}
.admin-topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: center;
  padding: 24px;
  margin-bottom: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.05);
}
.admin-hero span {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.admin-hero h2 {
  max-width: 760px;
  font-size: 28px;
}
.admin-hero p {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--body);
}
.admin-hero img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.admin-topbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
h1, h2 { margin: 0; line-height: 1.15; }
h1 { font-size: 34px; }
h2 { font-size: 22px; }
.top-action,
.button,
button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: var(--white);
  padding: 11px 17px;
  font-weight: 700;
  cursor: pointer;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.metric-grid div,
.panel,
.login-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.05);
}
.metric-grid div {
  position: relative;
  overflow: hidden;
  padding: 24px;
}
.metric-grid div::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.metric-grid span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.metric-grid strong {
  display: block;
  font-size: 40px;
  line-height: 1.1;
  margin-top: 8px;
}
.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.panel {
  padding: 24px;
  overflow: auto;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.panel-head a {
  color: var(--primary);
  font-weight: 700;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
th, td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}
td { color: var(--body); }
.thumb {
  width: 64px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--soft);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.actions a {
  color: var(--primary);
  font-weight: 700;
}
.actions .danger { color: var(--accent); }
.admin-form {
  display: grid;
  gap: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}
input, select, textarea {
  width: 100%;
  border: 1px solid #cfd8e5;
  border-radius: 6px;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
}
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(52, 59, 134, 0.14);
  border-color: var(--primary);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input { width: auto; }
.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.form-actions a {
  color: var(--muted);
  font-weight: 700;
}
.alert {
  background: #fff3f3;
  color: var(--accent);
  border: 1px solid #ffd4d4;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(140deg, #f6f9fc, #ffffff);
}
.login-card {
  width: min(430px, 100%);
  padding: 32px;
  box-shadow: var(--shadow);
}
.login-card img {
  width: 210px;
  height: 112px;
  object-fit: contain;
  margin: 0 auto 18px;
}
.login-card h1 {
  text-align: center;
  margin-bottom: 22px;
}
.login-card p {
  color: var(--muted);
  font-size: 14px;
}
.login-card button { width: 100%; }

@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-sidebar nav { grid-template-columns: repeat(2, 1fr); }
  .metric-grid,
  .admin-hero,
  .panel-grid,
  .form-grid { grid-template-columns: 1fr; }
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .admin-main,
  .admin-sidebar { padding: 18px; }
  .admin-sidebar nav { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
  .panel { padding: 18px; }
  .form-actions { align-items: stretch; flex-direction: column; }
}

/* Softer admin typography for a cleaner professional dashboard. */
.admin-sidebar a:not(.admin-brand),
.admin-topbar span,
.top-action,
.button,
button,
.metric-grid span,
th,
.actions a,
label,
.form-actions a,
.admin-hero span {
  font-weight: 600;
}

.metric-grid strong,
h1,
h2 {
  font-weight: 600;
}
