:root {
  --burgundy: #7c1f2c;
  --burgundy-dark: #531421;
  --cream: #fbf4e6;
  --gold: #c5974a;
  --coffee: #241610;
  --muted: #6f625c;
  --white: #fffaf2;
  --line: rgba(86, 50, 35, 0.16);
  --danger: #b42318;
  --success: #237a45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--coffee);
  background: #f6ead7;
  font-family: "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

input,
textarea,
select,
button {
  font: inherit;
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(rgba(36, 22, 16, 0.72), rgba(36, 22, 16, 0.76)),
    url("../images/manisa-kebabi-hero.jpg") center / cover;
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 250, 242, 0.28);
  border-radius: 8px;
  color: var(--cream);
  background: rgba(36, 22, 16, 0.9);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.login-card span {
  color: var(--gold);
  font-weight: 800;
}

.login-card h1 {
  margin: 8px 0 24px;
  line-height: 1.15;
}

.login-card label,
.form-grid label {
  display: grid;
  gap: 8px;
  color: var(--coffee);
  font-weight: 800;
}

.login-card label {
  margin-bottom: 15px;
  color: var(--cream);
}

.login-card input,
.form-grid input,
.form-grid textarea,
.form-grid select,
.inline-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--coffee);
  background: var(--white);
}

.form-grid textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-body {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  color: var(--cream);
  background: var(--coffee);
}

.admin-brand {
  display: block;
  margin-bottom: 26px;
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}

.admin-sidebar nav {
  display: grid;
  gap: 7px;
}

.admin-sidebar nav a,
.admin-site-link {
  padding: 11px 12px;
  border-radius: 6px;
  color: var(--cream);
  font-weight: 700;
}

.admin-sidebar nav a.is-active,
.admin-sidebar nav a:hover,
.admin-site-link:hover {
  background: var(--burgundy);
}

.admin-site-link {
  display: block;
  margin-top: 28px;
  border: 1px solid rgba(251, 244, 230, 0.2);
}

.admin-shell {
  min-width: 0;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 30px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.admin-top span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-top h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.15;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user a {
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--cream);
  background: var(--burgundy);
  font-weight: 800;
}

.admin-content {
  display: grid;
  gap: 22px;
  padding: 28px 30px 42px;
}

.admin-card,
.stat-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 42px rgba(36, 22, 16, 0.1);
}

.admin-card h2 {
  margin: 0 0 18px;
}

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

.stat-card span {
  color: var(--muted);
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--burgundy);
  font-size: 34px;
}

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

.quick-grid a {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--burgundy);
  background: #fff;
  font-weight: 900;
}

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

.form-full {
  grid-column: 1 / -1;
}

.check {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
}

.check input {
  width: 18px;
  min-height: 18px;
}

.admin-btn,
.actions button,
.tag-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 6px;
  color: var(--cream);
  background: var(--burgundy);
  cursor: pointer;
  font-weight: 900;
}

.admin-btn:hover,
.actions button:hover,
.tag-list button:hover {
  background: var(--burgundy-dark);
}

.admin-btn--light {
  color: var(--coffee);
  background: var(--cream);
  border: 1px solid var(--line);
}

.notice {
  margin: 18px 30px 0;
  padding: 12px 14px;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
}

.login-card .notice {
  margin: 0 0 16px;
}

.notice--success {
  background: var(--success);
}

.notice--danger {
  background: var(--danger);
}

.admin-tabs,
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tabs a {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  font-weight: 800;
}

.admin-tabs a.is-active {
  color: var(--cream);
  background: var(--burgundy);
}

.image-preview {
  width: 180px;
  max-height: 120px;
  margin-bottom: 10px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actions a {
  color: var(--burgundy);
  font-weight: 900;
}

.actions form {
  margin: 0;
}

.actions button,
.tag-list button {
  min-height: 34px;
  padding: 7px 10px;
  background: var(--danger);
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 110px auto;
  gap: 10px;
  margin-bottom: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tag-list span {
  font-weight: 900;
}

@media (max-width: 980px) {
  .admin-body {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid,
  .quick-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-top {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .admin-content {
    padding: 18px;
  }

  .notice {
    margin: 14px 18px 0;
  }

  .actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

