/* =============================================
   كوفتشينو - Admin Dashboard Stylesheet
   100% Mobile-First | Luxury Coffee Theme | Zero Overflow
   ============================================= */

:root {
  --admin-primary: #3B2014;
  --admin-primary-light: #523022;
  --admin-secondary: #8B6914;
  --admin-gold: #D4A853;
  --admin-gold-light: #E8C97A;
  --admin-bg: #FAF7F2;
  --admin-sidebar-bg: #22120B;
  --admin-sidebar-hover: #321B11;
  --admin-card-bg: #FFFFFF;
  --admin-border: #EADBCE;
  --admin-text: #1F1510;
  --admin-text-secondary: #75665D;
  --admin-success: #2E7D32;
  --admin-warning: #EF6C00;
  --admin-danger: #C62828;
  --admin-info: #1565C0;
  --admin-sidebar-width: 260px;
  --admin-header-height: 54px;
  --admin-radius: 16px;
  --admin-shadow: 0 4px 16px rgba(34, 18, 11, 0.06);
  --admin-font: 'Cairo', sans-serif;
  --admin-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  font-family: var(--admin-font);
  background: var(--admin-bg);
  color: var(--admin-text);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font-family: inherit; font-size: inherit; -webkit-tap-highlight-color: transparent; }
input, textarea, select { font-family: inherit; font-size: inherit; }
.hidden { display: none !important; }

/* ---- Login Page (Ultra Luxury Coffee Theme) ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 25%, #2B160C 0%, #1A0D07 55%, #0F0704 100%);
  padding: 20px 16px;
  width: 100%;
  max-width: 100vw;
  position: relative;
  overflow: hidden;
}

.login-card {
  background: rgba(36, 19, 11, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 26px;
  padding: 34px 24px 28px;
  width: 100%;
  max-width: 410px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(212, 168, 83, 0.12);
  border: 1.5px solid rgba(212, 168, 83, 0.35);
  position: relative;
  z-index: 2;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-container {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 83, 0.4) 0%, transparent 70%);
  animation: logoPulse 3s ease-in-out infinite alternate;
}

@keyframes logoPulse {
  0% { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(1.1); opacity: 1; }
}

.login-logo-frame {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #E6BA7A 0%, #8B6914 50%, #D4A853 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(212, 168, 83, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #201008;
}

.login-logo-fallback {
  font-size: 36px;
}

.login-brand-title {
  font-size: 24px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 2px;
}

.login-brand-tagline {
  font-size: 11px;
  font-weight: 700;
  color: #D4A853;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.login-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 168, 83, 0.14);
  border: 1px solid rgba(212, 168, 83, 0.35);
  color: #E8C97A;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
}

.login-card .admin-form-label {
  color: #E6BA7A;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.login-card .admin-form-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(212, 168, 83, 0.3);
  color: #FAF7F2;
  font-size: 14.5px;
}

.login-card .admin-form-input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: #D4A853;
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.25);
}

.login-quick-hint {
  margin-top: 18px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(212, 168, 83, 0.3);
  border-radius: 12px;
  font-size: 12px;
  color: #C8B6A6;
  text-align: center;
}

.login-quick-hint code {
  color: #E6BA7A;
  font-weight: 800;
  background: rgba(212, 168, 83, 0.16);
  padding: 2px 6px;
  border-radius: 6px;
  margin: 0 2px;
}

.login-footer-nav {
  margin-top: 16px;
  text-align: center;
}

.login-back-link {
  font-size: 12.5px;
  font-weight: 700;
  color: #D4A853;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.login-back-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.login-error {
  margin-top: 14px;
  padding: 10px 14px;
  background: #FFEBEE;
  color: var(--admin-danger);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(198, 40, 40, 0.2);
}

/* ---- Form Elements ---- */
.admin-form-group {
  margin-bottom: 16px;
}

.admin-form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-primary);
  margin-bottom: 6px;
}

.admin-form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--admin-border);
  border-radius: 12px;
  font-size: 14px;
  background: #FFFFFF;
  color: var(--admin-text);
  transition: var(--admin-transition);
}

.admin-form-input:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(59, 32, 20, 0.12);
}

.form-cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .form-cols-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ---- Buttons ---- */
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  transition: var(--admin-transition);
  cursor: pointer;
  border: none;
}

.admin-btn-primary {
  background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-light) 100%);
  color: #FAF7F2;
  box-shadow: 0 4px 14px rgba(59, 32, 20, 0.28);
}
.admin-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(59, 32, 20, 0.38);
}
.admin-btn-primary:active { transform: translateY(0); }

.admin-btn-full { width: 100%; }

/* ---- Dashboard Layout ---- */
.admin-dashboard {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ---- Desktop Sidebar (Hidden on Mobile) ---- */
.admin-sidebar {
  width: var(--admin-sidebar-width);
  background: var(--admin-sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  border-left: 1px solid rgba(212, 168, 83, 0.12);
}

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  width: 38px;
  height: auto;
  object-fit: contain;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 800;
  color: #FAF7F2;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  color: rgba(255,255,255,0.65);
  font-size: 14.5px;
  font-weight: 600;
  transition: var(--admin-transition);
  margin-bottom: 6px;
}
.sidebar-item:hover { background: var(--admin-sidebar-hover); color: #fff; }
.sidebar-item.active { background: rgba(212, 168, 83, 0.2); color: var(--admin-gold); }
.sidebar-item.active svg { stroke: var(--admin-gold); stroke-width: 2.2px; }
.sidebar-item.logout { color: rgba(229,57,53,0.85); margin-top: auto; }
.sidebar-item.logout:hover { background: rgba(229,57,53,0.15); color: #FF5252; }

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---- Mobile Top Bar ---- */
.admin-mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--admin-header-height, 54px);
  background: #FFFFFF;
  box-shadow: 0 2px 10px rgba(34, 18, 11, 0.05);
  z-index: 100;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1.2px solid var(--admin-border);
}

.admin-mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.admin-brand-logo-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 1.5px;
  background: #FFFFFF;
  border: 1.5px solid #D4A853;
  box-shadow: 0 2px 6px rgba(212, 168, 83, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.admin-topbar-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.admin-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.admin-topbar-title {
  display: flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--admin-primary);
  line-height: 1.2;
  white-space: nowrap;
}

.admin-topbar-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--admin-gold);
  line-height: 1.2;
  margin-top: 1px;
  white-space: nowrap;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.admin-topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.16), rgba(212, 168, 83, 0.08));
  color: #7A5711;
  padding: 0 11px;
  height: 32px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  border: 1.2px solid rgba(212, 168, 83, 0.45);
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(212, 168, 83, 0.12);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-topbar-btn:active {
  transform: scale(0.96);
  background: rgba(212, 168, 83, 0.25);
}

.admin-topbar-btn svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.admin-topbar-logout {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFF5F5;
  color: #DC2626;
  border: 1.2px solid #FED7D7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(220, 38, 38, 0.08);
  flex-shrink: 0;
}

.admin-topbar-logout:active {
  transform: scale(0.94);
  background: #FEE2E2;
}

.admin-topbar-logout svg {
  width: 15px;
  height: 15px;
}

/* ---- Mobile Bottom Navigation Bar ---- */
.admin-mobile-bottomnav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  background: #FFFFFF;
  border-top: 1.2px solid var(--admin-border);
  z-index: 100;
  box-shadow: 0 -3px 16px rgba(34, 18, 11, 0.07);
  padding: 3px 6px env(safe-area-inset-bottom, 0px);
  justify-content: space-around;
  align-items: center;
}

.admin-bnav-item {
  flex: 1;
  max-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #7C6656;
  font-size: 10.5px;
  font-weight: 600;
  transition: var(--admin-transition);
}

.admin-bnav-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--admin-transition);
}

.admin-bnav-icon svg {
  width: 20px;
  height: 20px;
}

.admin-bnav-item.active {
  color: var(--admin-primary);
  font-weight: 800;
}

.admin-bnav-item.active .admin-bnav-icon {
  background: var(--admin-primary);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(59, 32, 20, 0.25);
}

.admin-bnav-item.active .admin-bnav-icon svg {
  stroke: #FFFFFF;
  stroke-width: 2.2px;
}

/* ---- Main Content Area ---- */
.admin-main {
  flex: 1;
  margin-right: var(--admin-sidebar-width);
  padding: 28px 32px;
  min-height: 100vh;
  width: calc(100% - var(--admin-sidebar-width));
  overflow-x: hidden;
}

/* ---- Mobile-First Dashboard Cards ---- */
.dash-welcome-card {
  background: linear-gradient(135deg, #24130A 0%, #351C10 50%, #1E0F07 100%);
  border-radius: 18px;
  padding: 16px 14px;
  color: #FFFFFF;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(34, 18, 11, 0.22);
  border: 1px solid rgba(212, 168, 83, 0.22);
}

.dash-welcome-text h2 {
  font-size: 17px;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 4px;
  line-height: 1.3;
}

.dash-welcome-text p {
  font-size: 11.5px;
  color: #D6C29E;
  margin-bottom: 14px;
  line-height: 1.45;
}

.dash-actions-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.dash-actions-row .btn-primary-action,
.dash-actions-row .btn-gold-action {
  flex: 1 1 0;
  min-width: 0;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #E6BA7A 0%, #D4A853 100%);
  color: #24130A;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 3px 10px rgba(212, 168, 83, 0.25);
  transition: var(--admin-transition);
  border: none;
  white-space: nowrap;
  padding: 0 4px;
}

.dash-actions-row .btn-primary-action:hover,
.dash-actions-row .btn-gold-action:hover {
  background: linear-gradient(135deg, #ECC589 0%, #DCB260 100%);
  transform: translateY(-1px);
}

.dash-actions-row .btn-primary-action:active,
.dash-actions-row .btn-gold-action:active {
  transform: translateY(0);
}

.dash-actions-row .btn-primary-action svg,
.dash-actions-row .btn-gold-action svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  stroke-width: 2.6px;
}

.btn-primary-action {
  background: linear-gradient(135deg, #E6BA7A 0%, #D4A853 100%);
  color: #24130A;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(212, 168, 83, 0.28);
  transition: var(--admin-transition);
  border: none;
  cursor: pointer;
}
.btn-primary-action:hover { background: #EDC68B; }

.btn-gold-action {
  background: #3B2014;
  color: #FAF7F2;
  border: 1.5px solid rgba(212, 168, 83, 0.4);
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--admin-transition);
  cursor: pointer;
}
.btn-gold-action:hover { background: #523022; }

/* ---- Stats Grid ---- */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.dash-stat-box {
  background: var(--admin-card-bg);
  border-radius: 14px;
  padding: 12px 10px;
  border: 1.2px solid var(--admin-border);
  box-shadow: 0 2px 8px rgba(34, 18, 11, 0.04);
  cursor: pointer;
  transition: var(--admin-transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 98px;
  overflow: hidden;
}

.dash-stat-box:active { transform: scale(0.97); }

.dash-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 4px;
}

.dash-stat-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-text-secondary);
  white-space: nowrap;
}

.dash-stat-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.dash-stat-icon-wrap.brown { background: rgba(59, 32, 20, 0.07); }
.dash-stat-icon-wrap.gold { background: rgba(212, 168, 83, 0.16); }

.dash-stat-num {
  font-size: 24px;
  font-weight: 900;
  color: var(--admin-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.dash-stat-badge {
  font-size: 10px;
  font-weight: 600;
  color: #8C7868;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* ---- Section Cards & Item Lists ---- */
.dash-section-card {
  background: var(--admin-card-bg);
  border-radius: var(--admin-radius);
  border: 1.5px solid var(--admin-border);
  box-shadow: var(--admin-shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--admin-border);
  background: #FAF8F5;
}

.dash-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--admin-primary);
}

.dash-link-btn {
  font-size: 12.5px;
  font-weight: 700;
  color: #8B6914;
}

.dash-items-list {
  padding: 6px 12px;
}

.dash-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #F0EAE1;
}
.dash-item-row:last-child { border-bottom: none; }

.dash-item-thumb-box {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: #EFE8DF;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}

.dash-item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.dash-item-info {
  flex: 1;
  min-width: 0;
}

.dash-item-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--admin-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-item-sub {
  font-size: 11.5px;
  color: var(--admin-text-secondary);
  display: block;
}

.dash-item-price {
  font-size: 13px;
  font-weight: 800;
  color: #8B6914;
}

.dash-item-end {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-action {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAF7F2;
  color: var(--admin-primary);
  border: 1px solid var(--admin-border);
  transition: var(--admin-transition);
}
.btn-icon-action:hover { background: var(--admin-primary); color: #fff; }

/* ---- Page Header & Action Bar ---- */
.page-top-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.page-heading {
  font-size: 20px;
  font-weight: 900;
  color: var(--admin-primary);
}

.page-subheading {
  font-size: 12px;
  color: var(--admin-text-secondary);
}

.page-top-action-bar .btn-primary-action {
  flex: none;
  padding: 0 16px;
  height: 40px;
}

/* ---- Mobile Search & Category Filter ---- */
.mobile-search-filter-card {
  background: var(--admin-card-bg);
  border-radius: var(--admin-radius);
  border: 1.5px solid var(--admin-border);
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: var(--admin-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-search-input-box {
  display: flex;
  align-items: center;
  background: #FAF8F5;
  border: 1.5px solid var(--admin-border);
  border-radius: 12px;
  padding: 0 12px;
  height: 42px;
}

.mobile-search-input-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 0 8px;
  font-size: 13.5px;
  color: var(--admin-text);
}

.clear-btn {
  background: none;
  border: none;
  font-size: 14px;
  color: #8C7868;
}

.mobile-category-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mobile-category-chips::-webkit-scrollbar { display: none; }

.chip-item {
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 700;
  background: #FAF8F5;
  color: #7C6656;
  border: 1px solid var(--admin-border);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--admin-transition);
}
.chip-item.active {
  background: var(--admin-primary);
  color: #FFFFFF;
  border-color: var(--admin-primary);
}

/* ---- Mobile Cards Container ---- */
.admin-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-manage-card {
  background: var(--admin-card-bg);
  border-radius: var(--admin-radius);
  border: 1.5px solid var(--admin-border);
  box-shadow: var(--admin-shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--admin-transition);
}

.card-main-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.card-photo-box {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  overflow: hidden;
  background: #EFE8DF;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.06);
}

.card-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-text-details {
  flex: 1;
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.card-item-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--admin-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-badges-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-item-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.card-cat-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #F0EAE1;
  color: #4A281C;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

.card-item-price-gold {
  color: #8B6914;
  font-size: 13.5px;
  font-weight: 800;
}

.card-item-desc {
  font-size: 12px;
  color: var(--admin-text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-item-meta {
  font-size: 11px;
  color: #8C7868;
  margin-top: 4px;
}

.card-bottom-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid #F0EAE1;
  padding-top: 10px;
}

.card-btn-edit {
  flex: 1;
  height: 38px;
  background: rgba(21, 101, 192, 0.08);
  color: var(--admin-info);
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.card-btn-toggle {
  padding: 0 14px;
  height: 38px;
  background: #FAF7F2;
  color: #4A281C;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.card-btn-delete {
  padding: 0 14px;
  height: 38px;
  background: rgba(198, 40, 40, 0.08);
  color: var(--admin-danger);
  border: 1px solid rgba(198, 40, 40, 0.2);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ---- Status Pills ---- */
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.status-pill.active { background: #E8F5E9; color: var(--admin-success); }
.status-pill.hidden { background: #FFEBEE; color: var(--admin-danger); }
.status-pill.featured { background: rgba(212, 168, 83, 0.2); color: #8B6914; }

/* ---- Toggle Switch ---- */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #D5CDC5;
  border-radius: 24px;
  transition: var(--admin-transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  right: 3px;
  transition: var(--admin-transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--admin-success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(-20px); }

/* ---- Modal (Centered Popup on Mobile & Tablet) ---- */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.admin-modal-content {
  background: #FFFFFF;
  border-radius: 22px;
  width: 100%;
  max-width: 480px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  overflow: hidden;
  border: 1px solid var(--admin-border);
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--admin-border);
  background: #FAF8F5;
}

.admin-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--admin-primary);
}

.admin-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EDE6DC;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-primary);
  font-size: 15px;
}

.admin-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-modal-footer {
  padding: 14px 20px;
  border-top: 1.5px solid var(--admin-border);
  background: #FAF8F5;
}

/* ---- Image Upload Area ---- */
.admin-upload-area {
  border: 2px dashed #D4C7BA;
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  background: #FAF7F2;
}

.admin-upload-preview {
  width: 100%;
  max-width: 160px;
  height: 110px;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  margin: 0 auto 8px;
  display: block;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.upload-icon-placeholder {
  font-size: 34px;
  margin-bottom: 6px;
}

.admin-upload-text {
  font-size: 12.5px;
  color: var(--admin-text-secondary);
}

.admin-upload-text strong {
  color: var(--admin-primary);
}

/* ---- Feature Box (Variants & Gallery) ---- */
.admin-feature-card {
  background: #FFFDF9;
  border: 1.5px solid rgba(212, 168, 83, 0.45);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(34, 18, 11, 0.04);
}

.admin-feature-header {
  margin-bottom: 12px;
}

.admin-feature-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.admin-feature-badge {
  background: linear-gradient(135deg, #E6BA7A 0%, #D4A853 100%);
  color: #24130A;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
}

.admin-feature-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--admin-primary);
}

.admin-feature-desc {
  font-size: 11.5px;
  color: var(--admin-text-secondary);
  line-height: 1.4;
}

.admin-variants-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-variant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1.2px solid var(--admin-border);
  border-radius: 12px;
  padding: 8px 10px;
  transition: var(--admin-transition);
}

.admin-variant-row:focus-within {
  border-color: var(--admin-gold);
  box-shadow: 0 0 0 2px rgba(212, 168, 83, 0.2);
}

.variant-photo-picker {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #FAF7F2;
  border: 1.2px dashed #D4A853;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.variant-img-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.variant-img-placeholder {
  font-size: 16px;
  opacity: 0.7;
}

.variant-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(36, 19, 11, 0.65);
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.variant-photo-picker:hover .variant-photo-overlay {
  opacity: 1;
}

.variant-inputs-wrap {
  flex: 1;
  display: flex;
  gap: 6px;
  min-width: 0;
}

.variant-input-name {
  flex: 1.4;
  height: 38px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}

.variant-price-group {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.variant-input-price {
  width: 100%;
  height: 38px;
  padding: 6px 26px 6px 8px;
  font-size: 12.5px;
  border-radius: 8px;
}

.variant-price-hint {
  position: absolute;
  left: 8px;
  font-size: 10.5px;
  color: var(--admin-text-secondary);
  font-weight: 700;
  pointer-events: none;
}

.variant-del-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFF5F5;
  color: #DC2626;
  border: 1px solid #FED7D7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.variant-del-btn:hover {
  background: #FEE2E2;
  transform: scale(1.08);
}

.admin-add-subitem-btn {
  width: 100%;
  height: 38px;
  border: 1.5px dashed rgba(212, 168, 83, 0.7);
  background: rgba(212, 168, 83, 0.08);
  color: #7A5711;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--admin-transition);
}

.admin-add-subitem-btn:hover {
  background: rgba(212, 168, 83, 0.18);
  border-color: #D4A853;
}

.admin-empty-subitems {
  padding: 14px;
  text-align: center;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
  border: 1px dashed var(--admin-border);
  font-size: 12px;
  color: #8C7868;
  line-height: 1.5;
}

/* ---- Gallery Images ---- */
.admin-gallery-container {
  margin-bottom: 10px;
}

.gallery-thumbs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-thumb-item {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  border: 1.2px solid var(--admin-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.gallery-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb-del {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.85);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.gallery-thumb-del:hover {
  transform: scale(1.15);
}

.status-pill.variant-badge {
  background: #FFF8E1;
  color: #8B6914;
  border: 1px solid rgba(212, 168, 83, 0.4);
}

.status-pill.gallery-badge {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid rgba(46, 125, 50, 0.3);
}

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  pointer-events: auto;
  max-width: 340px;
  text-align: center;
}
.toast.success { background: #2E7D32; color: #fff; }
.toast.error { background: #C62828; color: #fff; }
.toast.info { background: var(--admin-primary); color: #fff; }

.toast.fade-out { opacity: 0; transform: translateY(-15px); transition: all 0.3s ease; }

/* ---- Loading & Empty ---- */
.admin-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--admin-border);
  border-top-color: var(--admin-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.admin-empty-card {
  background: var(--admin-card-bg);
  border-radius: var(--admin-radius);
  border: 1.5px solid var(--admin-border);
  padding: 40px 20px;
  text-align: center;
}
.empty-icon { font-size: 38px; margin-bottom: 8px; opacity: 0.7; }
.admin-empty-card h3 { font-size: 16px; font-weight: 800; color: var(--admin-primary); margin-bottom: 4px; }
.admin-empty-card p { font-size: 12.5px; color: var(--admin-text-secondary); }

.admin-empty-mini {
  text-align: center;
  padding: 24px 10px;
  font-size: 13px;
  color: var(--admin-text-secondary);
}

.admin-error-box {
  background: #FFEBEE;
  border: 1px solid rgba(198, 40, 40, 0.2);
  border-radius: var(--admin-radius);
  padding: 24px 16px;
  text-align: center;
  color: var(--admin-danger);
}
.admin-error-box h3 { margin-bottom: 6px; }
.admin-error-box p { font-size: 13px; margin-bottom: 14px; }

/* ---- Offers & Ads Management ---- */
.admin-offers-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-offer-card {
  background: var(--admin-card-bg);
  border-radius: var(--admin-radius);
  border: 1.5px solid var(--admin-border);
  box-shadow: var(--admin-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--admin-transition);
}

.admin-offer-card:hover {
  border-color: rgba(212, 168, 83, 0.4);
}

.admin-offer-card-top {
  display: flex;
  gap: 12px;
  padding: 12px;
}

.admin-offer-thumb-box {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  background: #27140B;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.admin-offer-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-offer-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.admin-offer-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--admin-primary);
  margin-bottom: 3px;
  line-height: 1.3;
}

.admin-offer-desc {
  font-size: 11.5px;
  color: var(--admin-text-secondary);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-offer-pricing {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-discount {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid rgba(198, 40, 40, 0.25);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.badge-regular {
  background: #FFF8E1;
  color: #8B6914;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}

.admin-offer-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(247, 243, 238, 0.6);
  border-top: 1px solid var(--admin-border);
}

.admin-offer-status-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-primary);
}

.admin-offer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Discount toggle box inside modal */
.discount-toggle-card {
  background: #FFFDF9;
  border: 1.5px solid rgba(220, 205, 185, 0.6);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.discount-toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.discount-toggle-label {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.discount-fields-container {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(220, 205, 185, 0.7);
  animation: fadeIn 0.2s ease;
}

/* =============================================
   RESPONSIVE BREAKPOINTS
   ============================================= */

@media (max-width: 768px) {
  /* Hide desktop sidebar completely on mobile to prevent any horizontal overflow */
  .admin-sidebar {
    display: none !important;
  }

  /* Show mobile topbar and bottom navigation */
  .admin-mobile-topbar {
    display: flex;
  }

  .admin-mobile-bottomnav {
    display: flex;
  }

  /* Content fills full width of the phone screen */
  .admin-main {
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 14px 12px calc(92px + env(safe-area-inset-bottom, 16px)) !important;
    padding-top: calc(var(--admin-header-height) + 12px) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 370px) {
  .dash-actions-row {
    gap: 6px;
  }
  .dash-actions-row .btn-primary-action,
  .dash-actions-row .btn-gold-action {
    font-size: 11px;
    padding: 0 2px;
    gap: 3px;
    height: 36px;
  }
  .dash-actions-row .btn-primary-action svg,
  .dash-actions-row .btn-gold-action svg {
    width: 13px;
    height: 13px;
  }
  .dash-stats-grid {
    gap: 6px;
  }
  .dash-stat-box {
    padding: 10px 6px;
    min-height: 92px;
  }
  .dash-stat-title {
    font-size: 11px;
  }
  .dash-stat-icon-wrap {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  .dash-stat-num {
    font-size: 21px;
  }
  .dash-stat-badge {
    font-size: 9px;
  }
  .admin-topbar-btn {
    padding: 0 9px;
    font-size: 11px;
    gap: 4px;
  }
  .admin-topbar-title {
    font-size: 13.5px;
  }
}

@media (min-width: 769px) {
  /* On desktop/tablet, constrain content neatly */
  .admin-main {
    max-width: 900px;
    margin-left: auto;
  }
}
