html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background:
    radial-gradient(1200px 500px at 0% -10%, #f2efe8 0%, rgba(242, 239, 232, 0) 55%),
    linear-gradient(180deg, #f7f5f1 0%, #fafafa 100%);
  color: #1f2328;
}

.admin-top-nav {
  gap: 0.1rem;
  min-width: 0;
}

.admin-top-nav .nav-link {
  white-space: nowrap;
}

.admin-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 1rem;
  width: min(100% - 24px, 1480px);
  margin: 0 auto;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  border: 1px solid #e0d8c9;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(57, 44, 24, 0.08);
  padding: 0.85rem;
  transition: width 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.admin-sidebar-section + .admin-sidebar-section {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee7dc;
}

.admin-sidebar-title {
  margin-bottom: 0.35rem;
  color: #7d5a2c;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-sidebar a {
  display: block;
  padding: 0.42rem 0.5rem;
  border-radius: 9px;
  color: #293241;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
}

.admin-sidebar a:hover {
  background: #f4ecde;
  color: #3d2a11;
}

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

body.admin-sidebar-collapsed .admin-shell {
  grid-template-columns: 0 minmax(0, 1fr);
}

body.admin-sidebar-collapsed .admin-sidebar {
  width: 0;
  padding-inline: 0;
  border-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-12px);
}

.admin-sidebar-toggle {
  white-space: nowrap;
}

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

  .admin-sidebar {
    position: fixed;
    z-index: 1040;
    top: 64px;
    left: 12px;
    width: min(286px, calc(100vw - 24px));
    max-height: calc(100vh - 86px);
  }

  body.admin-sidebar-collapsed .admin-shell {
    grid-template-columns: 1fr;
  }
}

.dashboard-wrap {
  padding-top: 4px;
}

.hero-panel {
  background: linear-gradient(120deg, #f9f2e4 0%, #f1e5ce 45%, #e9dbc2 100%);
  border: 1px solid #d9c9ab;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 8px 20px rgba(80, 60, 30, 0.08);
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #7d5a2c;
}

.hero-meta {
  min-width: 260px;
}

.status-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.65rem;
}

.status-online {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.status-offline {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.stat-card {
  border-radius: 14px;
  border: 1px solid #e6dfd2;
  box-shadow: 0 4px 16px rgba(64, 49, 24, 0.06);
}

.stat-title {
  color: #6a5a42;
  font-size: 0.9rem;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 0.25rem;
}

.stat-sub {
  color: #7d7467;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.recent-card,
.action-card {
  border-radius: 14px;
  border: 1px solid #e7e2d7;
  box-shadow: 0 4px 16px rgba(64, 49, 24, 0.05);
}

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.recent-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #f0ece2;
  background: #fcfbf8;
  border-radius: 10px;
  padding: 0.55rem 0.6rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}

.action-grid .btn {
  text-align: left;
}

.admin-login-wrap {
  min-height: calc(100vh - 190px);
  display: grid;
  align-items: center;
}

.admin-login-shell {
  display: grid;
  grid-template-columns: 1.2fr minmax(320px, 440px);
  gap: 1.2rem;
  align-items: stretch;
}

.admin-login-brand {
  border-radius: 16px;
  border: 1px solid #dcc9a9;
  background:
    radial-gradient(600px 180px at 10% 0%, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 65%),
    linear-gradient(135deg, #f2e3c7 0%, #ecd9b8 50%, #e2cca7 100%);
  box-shadow: 0 12px 30px rgba(73, 51, 18, 0.12);
  padding: 1.25rem 1.35rem;
}

.admin-login-kicker {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.76rem;
  font-weight: 700;
  color: #6e4b1f;
}

.admin-login-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  margin-bottom: 0.7rem;
  color: #3d2a11;
}

.admin-login-copy {
  color: #604728;
  max-width: 45ch;
}

.admin-login-card {
  border-radius: 16px;
  border: 1px solid #e4ddce;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(57, 44, 24, 0.11);
}

.admin-login-form .form-control {
  border-radius: 10px;
  border-color: #d9cfbb;
}

.admin-login-form .form-control:focus {
  border-color: #b79662;
  box-shadow: 0 0 0 0.2rem rgba(183, 150, 98, 0.22);
}

@media (max-width: 991.98px) {
  .admin-login-shell {
    grid-template-columns: 1fr;
  }

  .admin-login-wrap {
    min-height: auto;
    padding-top: 0.7rem;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
