/* =============================================
   AMAZAV TRANS — Admin Panel Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --navy:       #0B1E3D;
  --navy-light: #1A3260;
  --teal:       #00B894;
  --teal-dark:  #00957A;
  --teal-light: #E6FAF6;
  --orange:     #F97316;
  --white:      #FFFFFF;
  --bg:         #F1F5F9;
  --sidebar-w:  240px;
  --topbar-h:   60px;
  --border:     #E2E8F0;
  --text:       #1E293B;
  --muted:      #64748B;
  --danger:     #EF4444;
  --danger-bg:  #FEF2F2;
  --success:    #10B981;
  --radius:     10px;
  --shadow:     0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);
  --trans:      all .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  background-image: radial-gradient(ellipse 60% 60% at 70% 50%, rgba(0,184,148,.15) 0%, transparent 60%);
  padding: 20px;
}
.login-box {
  background: var(--white);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
}
.login-logo h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
}
.login-logo h2 span { color: var(--teal); }
.login-logo p { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.login-error {
  background: var(--danger-bg);
  border: 1px solid #FECACA;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: .87rem;
  margin-bottom: 18px;
}

/* =============================================
   ADMIN LAYOUT
   ============================================= */
.admin-layout { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  overflow-y: auto;
  transition: transform .25s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.sidebar-brand-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--white);
}
.sidebar-brand-name span { color: var(--teal); }

.sidebar-nav { flex: 1; padding: 12px 10px; }
.nav-section-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 14px 10px 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  font-weight: 500;
  transition: var(--trans);
  margin-bottom: 2px;
}
.sidebar-link:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
}
.sidebar-link.active {
  background: rgba(0,184,148,.18);
  color: var(--teal);
  font-weight: 600;
}
.sidebar-link .icon { font-size: 1rem; width: 20px; text-align: center; }

.sidebar-bottom {
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.7);
  font-size: .82rem;
}
.user-avatar {
  width: 32px; height: 32px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

/* ---- Main content ---- */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Top bar ---- */
.admin-topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.topbar-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--trans);
  text-decoration: none;
}
.topbar-btn-outline {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
}
.topbar-btn-outline:hover { border-color: var(--navy); color: var(--navy); }

/* ---- Content area ---- */
.admin-content {
  flex: 1;
  padding: 28px 28px 40px;
}

/* =============================================
   DASHBOARD STATS
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-icon.teal  { background: var(--teal-light); }
.stat-icon.navy  { background: rgba(11,30,61,.08); }
.stat-icon.orange{ background: #FFF7ED; }
.stat-icon.green { background: #F0FDF4; }
.stat-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.stat-label { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}
.card-body { padding: 22px; }

/* =============================================
   TABLES
   ============================================= */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--bg);
  padding: 11px 14px;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #F8FAFC; }

.td-img {
  width: 52px; height: 38px;
  object-fit: cover;
  border-radius: 6px;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: .74rem;
  font-weight: 700;
}
.badge-teal   { background: var(--teal-light); color: var(--teal-dark); }
.badge-navy   { background: rgba(11,30,61,.08); color: var(--navy-light); }
.badge-orange { background: #FFF7ED; color: #EA580C; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: .85rem;
  border: none;
  cursor: pointer;
  transition: var(--trans);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary   { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }
.btn-secondary { background: var(--navy); color: var(--white); }
.btn-secondary:hover { background: var(--navy-light); color: var(--white); }
.btn-danger    { background: var(--danger-bg); color: var(--danger); border: 1px solid #FECACA; }
.btn-danger:hover { background: var(--danger); color: var(--white); }
.btn-outline   { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-sm        { padding: 6px 12px; font-size: .78rem; }
.btn-full      { width: 100%; justify-content: center; }
.btn-orange    { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: #EA6C0A; color: var(--white); }

/* =============================================
   FORMS
   ============================================= */
.form-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.form-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.form-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .92rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .req { color: var(--orange); }
.form-hint { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: var(--trans);
}
.form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,184,148,.1); }
.form-control::placeholder { color: #CBD5E1; }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.input-with-preview { display: flex; gap: 10px; align-items: center; }
.input-preview-img {
  width: 56px; height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* =============================================
   ALERTS
   ============================================= */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .88rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.alert-error   { background: var(--danger-bg); border: 1px solid #FECACA; color: var(--danger); }
.alert-info    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }

/* =============================================
   INLINE ADD/EDIT ROW (Services, Cities)
   ============================================= */
.inline-form {
  background: #F8FAFC;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}
.inline-form-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

/* =============================================
   IMAGE UPLOAD ZONE
   ============================================= */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--trans);
  background: var(--bg);
}
.upload-zone:hover { border-color: var(--teal); background: var(--teal-light); }
.upload-zone-icon { font-size: 2rem; margin-bottom: 8px; }
.upload-zone p { font-size: .85rem; color: var(--muted); }
.upload-zone input { display: none; }

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--teal); }
.breadcrumb a:hover { text-decoration: underline; }

/* =============================================
   PAGE TITLE ROW
   ============================================= */
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
}
.page-sub { font-size: .87rem; color: var(--muted); margin-top: 3px; }

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--navy);
  margin-bottom: 4px;
  border-radius: 2px;
  transition: var(--trans);
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .menu-toggle { display: block; }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 199;
  }
  .sidebar-overlay.show { display: block; }
  .admin-content { padding: 16px; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* =============================================
   MISC
   ============================================= */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 10px; }
.empty-state h4 { font-size: 1rem; color: var(--navy); margin-bottom: 6px; }

.separator { height: 1px; background: var(--border); margin: 20px 0; }

.color-teal { color: var(--teal); }
.color-danger { color: var(--danger); }
.color-muted { color: var(--muted); }
.text-right { text-align: right; }
.flex-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.pkg-thumb {
  width: 44px; height: 32px;
  object-fit: cover;
  border-radius: 5px;
}

/* Confirm delete overlay */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.confirm-overlay.show { display: flex; }
.confirm-box {
  background: var(--white);
  border-radius: 14px;
  padding: 30px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.confirm-box h3 { font-size: 1.1rem; margin-bottom: 8px; }
.confirm-box p { font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.confirm-box .flex-gap { justify-content: center; }
