:root {
  --admin-blue: #0143ad;
  --admin-dark: #071f3e;
  --admin-green: #6e9d02;
  --admin-bg: #f3f6fa;
  --admin-border: #e3e7ed;
  --admin-muted: #748094;
}
* { box-sizing: border-box; }
body { color: #1d2b3e; font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
a, a:hover { text-decoration: none; }
.btn-primary { border-color: var(--admin-blue); background: var(--admin-blue); }
.btn-primary:hover { border-color: #062f6d; background: #062f6d; }
.btn-success { border-color: var(--admin-green); background: var(--admin-green); }
.admin-body { min-height: 100vh; background: var(--admin-bg); }
.admin-topbar {
  position: fixed;
  z-index: 1050;
  top: 0;
  right: 0;
  left: 0;
  height: 74px;
  padding: 0 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--admin-dark);
}
.admin-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; }
.admin-brand:hover { color: #fff; }
.admin-brand img { width: 78px; height: 55px; padding: 3px; object-fit: contain; border-radius: 5px; background: #fff; }
.admin-brand span { font-size: 17px; }
.admin-user { display: flex; align-items: center; gap: 15px; color: #fff; }
.admin-user form { margin: 0; }
.admin-layout { display: flex; padding-top: 74px; }
.admin-sidebar {
  position: fixed;
  top: 74px;
  bottom: 0;
  left: 0;
  width: 235px;
  padding: 24px 14px;
  border-right: 1px solid var(--admin-border);
  background: #fff;
}
.admin-sidebar a {
  margin-bottom: 7px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  color: #536075;
  font-weight: 700;
}
.admin-sidebar a i { width: 22px; font-size: 18px; }
.admin-sidebar a:hover, .admin-sidebar a.active { color: #fff; background: linear-gradient(135deg, var(--admin-blue), #2476e8); }
.admin-content { width: calc(100% - 235px); min-height: calc(100vh - 74px); margin-left: 235px; padding: 32px; }
.admin-page-heading { margin-bottom: 25px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-page-heading small { color: var(--admin-green); font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.admin-page-heading h1 { margin: 3px 0 0; font-size: 28px; font-weight: 800; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-card, .stat-card, .workflow-card {
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 5px 22px rgba(18,43,74,.05);
}
.stat-card { min-height: 112px; padding: 20px; display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 52px; height: 52px; flex: 0 0 52px; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 23px; }
.stat-icon.blue { color: #1768c4; background: #e5f1ff; }
.stat-icon.green { color: #5d8500; background: #eef7d8; }
.stat-icon.orange { color: #c87312; background: #fff0dc; }
.stat-icon.purple { color: #764bc4; background: #eee7fc; }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { color: var(--admin-muted); }
.stat-card strong { margin-top: 4px; font-size: 24px; }
.admin-card-header { min-height: 65px; padding: 15px 19px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--admin-border); }
.admin-card-header h2, .form-title { margin: 0; font-size: 18px; font-weight: 800; }
.admin-table th { padding: 13px 15px; border: 0; color: var(--admin-muted); background: #f8f9fb; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.admin-table td { padding: 14px 15px; border-top: 1px solid #eef0f3; vertical-align: middle; }
.entity-cell { min-width: 240px; display: flex; align-items: center; gap: 13px; }
.entity-cell img { width: 62px; height: 62px; padding: 4px; object-fit: contain; border-radius: 7px; background: #f5f7fa; }
.entity-cell strong, .entity-cell small { display: block; }
.entity-cell small { margin-top: 4px; color: var(--admin-muted); }
.status-badge { padding: 5px 9px; display: inline-block; border-radius: 20px; font-size: 10px; font-weight: 800; text-transform: capitalize; }
.status-active, .status-delivered { color: #176b3e; background: #def5e8; }
.status-inactive, .status-cancelled { color: #ad2b39; background: #ffe2e5; }
.status-pending { color: #a96409; background: #fff0d5; }
.status-confirmed { color: #1768aa; background: #e2f1ff; }
.status-shipped { color: #6748b8; background: #eee8ff; }
.admin-search { display: flex; gap: 6px; }
.admin-search .form-control { width: 270px; }
.form-control { min-height: 44px; border-color: #d9dee5; border-radius: 6px; }
textarea.form-control { min-height: auto; }
.form-section { padding: 23px; }
.form-title { margin-bottom: 20px; padding-bottom: 13px; border-bottom: 1px solid var(--admin-border); }
.image-preview { height: 285px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 2px dashed #d4dae2; border-radius: 9px; color: #929baa; background: #fafbfc; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-preview i { font-size: 45px; }
.site-media-card { height: calc(100% - 1.5rem); }
.site-image-preview {
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #d4dae2;
  border-radius: 9px;
  background: #f4f7fa;
}
.site-image-preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
.site-image-preview-hero { aspect-ratio: 1920 / 725; }
.site-image-preview-mobile { max-height: 310px; aspect-ratio: 768 / 900; }
.site-image-preview-about { aspect-ratio: 4 / 3; }
.custom-file-label { overflow: hidden; white-space: nowrap; }
.workflow-card { height: 100%; padding: 22px; display: block; color: inherit; }
.workflow-card:hover { color: inherit; border-color: #bad078; transform: translateY(-3px); }
.workflow-number { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: var(--admin-blue); font-weight: 800; }
.workflow-card h3 { margin: 17px 0 7px; font-size: 18px; font-weight: 800; }
.workflow-card p { margin: 0; color: var(--admin-muted); line-height: 1.5; }
.low-stock-list a { padding: 14px 18px; display: flex; justify-content: space-between; color: inherit; border-bottom: 1px solid var(--admin-border); }
.low-stock-list strong, .low-stock-list small { display: block; }
.low-stock-list small { margin-top: 3px; color: var(--admin-muted); }
.order-item { padding: 15px 18px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--admin-border); }
.order-item img { width: 58px; height: 58px; object-fit: contain; border-radius: 6px; background: #f6f7f9; }
.order-item .grow { flex: 1; }
.order-item strong, .order-item small { display: block; }
.order-item small { color: var(--admin-muted); }
.order-totals { max-width: 390px; padding: 20px; margin-left: auto; }
.order-totals div { padding: 7px 0; display: flex; justify-content: space-between; }
.order-totals .total { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--admin-border); font-size: 18px; }
.admin-login-body { min-height: 100vh; padding: 25px; display: flex; align-items: center; justify-content: center; background: linear-gradient(rgba(3,24,51,.88),rgba(3,24,51,.88)), url('/assets/images/banners/banner1.png') center/cover; }
.admin-login-card { width: 100%; max-width: 430px; padding: 36px; border-radius: 14px; background: #fff; box-shadow: 0 25px 70px rgba(0,0,0,.28); }
.login-logo { text-align: center; }
.login-logo img { width: 180px; height: 105px; object-fit: contain; }
.admin-login-card h1 { margin: 20px 0 8px; text-align: center; font-size: 27px; font-weight: 800; }
.admin-login-card > p { margin-bottom: 24px; color: var(--admin-muted); text-align: center; }
.password-field { position: relative; }
.password-field input { padding-right: 45px; }
.password-field button { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; background: transparent; }
.back-store { margin-top: 20px; display: block; color: var(--admin-muted); text-align: center; }

@media (max-width: 991.98px) {
  .admin-sidebar { width: 75px; padding: 20px 8px; }
  .admin-sidebar a { justify-content: center; }
  .admin-sidebar a span { display: none; }
  .admin-sidebar a i { width: auto; }
  .admin-content { width: calc(100% - 75px); margin-left: 75px; padding: 22px; }
}
@media (max-width: 575.98px) {
  .admin-topbar { height: 64px; padding: 0 11px; }
  .admin-brand img { width: 58px; height: 45px; }
  .admin-brand span, .admin-user > span, .admin-user > a { display: none; }
  .admin-layout { padding-top: 64px; }
  .admin-sidebar { z-index: 1030; top: auto; right: 0; bottom: 0; width: 100%; height: 64px; padding: 6px; overflow-x: auto; border-top: 1px solid var(--admin-border); }
  .admin-sidebar nav { display: flex; min-width: 320px; justify-content: space-around; }
  .admin-sidebar a { width: 58px; margin: 0; }
  .admin-content { width: 100%; margin: 0; padding: 16px 12px 82px; }
  .admin-page-heading { align-items: flex-start; }
  .admin-page-heading h1 { font-size: 23px; }
  .admin-actions .btn span { display: none; }
  .admin-search { flex-wrap: wrap; }
  .admin-search .form-control { width: 170px; }
  .admin-login-card { padding: 28px 22px; }
}
.shipping-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shipping-details-grid > div {
  border: 1px solid #e3e9ef;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.shipping-details-grid small,
.shipping-details-grid strong {
  display: block;
}

.shipping-details-grid small {
  color: #6c7888;
  margin-bottom: 4px;
}

.courier-rate-list {
  border: 1px solid #e3e9ef;
  border-radius: 10px;
  overflow: hidden;
}

.courier-rate-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e3e9ef;
}

.courier-rate-list > div:last-child {
  border-bottom: 0;
}

.shipping-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 767px) {
  .shipping-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
