:root {
  --navy: #002e5e;
  --navy-dark: #001c3b;
  --navy-light: #01417e;
  --orange: #f74916;
  --orange-hover: #e43300;
  --blue: #0093dd;
  --bg: #f3f6fb;
  --card: #ffffff;
  --border: #d9e3f0;
  --text: #002e5e;
  --muted: #627792;
  --radius: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* Login */
.login-screen {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 18px;
  padding: 40px 36px;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 24px 60px rgba(0, 20, 45, 0.35);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.login-brand img {
  height: 44px;
}

.login-badge {
  background: rgba(247, 73, 22, 0.12);
  color: var(--orange);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 99px;
}

.login-card h1 {
  font-size: 1.45rem;
  margin-bottom: 6px;
}

.login-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
}

.login-error {
  color: #dc2626;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.back-to-site-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.back-to-site-link:hover {
  color: var(--orange);
}

/* Layout */
.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--navy-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-top {
  margin-bottom: 28px;
}

.sidebar-logo {
  display: inline-block;
  background: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.sidebar-logo img {
  height: 38px;
}

.sidebar-subtitle {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.side-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 12px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: 0.2s;
}

.side-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.side-btn.active {
  background: var(--orange);
  color: #fff;
}

.badge-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 99px;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main */
.admin-main {
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: #fff;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-topbar h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.toast {
  background: #15803d;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-content {
  padding: 30px 32px;
  max-width: 1120px;
}

/* Cards & Forms */
.panel-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(0, 46, 94, 0.05);
}

.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.93rem;
  color: var(--text);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--orange);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s;
}

.btn-orange {
  background: var(--orange);
  color: #fff;
}

.btn-orange:hover {
  background: var(--orange-hover);
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}

.btn-navy:hover {
  background: var(--navy-light);
}

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-danger:hover {
  background: #fecaca;
}

.btn-outline-light {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.btn-full {
  width: 100%;
}

/* Items list */
.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  background: #fff;
}

.item-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.item-thumb {
  width: 72px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}

.item-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

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

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    height: auto;
    position: static;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
