/* ==============================
   Admin Layout Shell
   From: views/layout/admin_layout.php
   ============================== */
:root {
  --sidebar-width: 260px;
  --sidebar-bg: #0f172a;
  --sidebar-hover: rgba(255,255,255,0.06);
  --sidebar-active: rgba(237,137,36,0.15);
  --accent: #ed8924;
  --accent-dark: #d97706;
  --topbar-height: 60px;
}
* { box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #f1f5f9;
  font-size: 0.9rem;
  color: #1e293b;
  overflow-x: hidden;
}
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #94a3b8;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}
.sidebar-brand {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 64px;
}
.sidebar-brand .brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(237,137,36,0.3);
}
.sidebar-brand .brand-icon img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.sidebar-brand .brand-text { display: flex; flex-direction: column; }
.sidebar-brand .brand-text strong { color: #fff; font-size: 1rem; line-height: 1.2; }
.sidebar-brand .brand-text small { color: #64748b; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }
.nav-section { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: #64748b; padding: 0.75rem 0.5rem 0.35rem; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.75rem; border-radius: 8px; text-decoration: none; color: #94a3b8; transition: all 0.15s; margin-bottom: 1px; font-size: 0.88rem; }
.nav-item:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.nav-item.active { background: var(--sidebar-active); color: var(--accent); }
.nav-item i { width: 20px; text-align: center; font-size: 1rem; }
.main-wrap { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 900;
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-left .breadcrumb { margin: 0; background: none; padding: 0; font-size: 0.9rem; }
.topbar-left .breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.topbar-right .user-name { font-size: 0.85rem; font-weight: 500; color: #475569; }
.topbar-right .btn-logout { width: 36px; height: 36px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; display: flex; align-items: center; justify-content: center; color: #64748b; text-decoration: none; transition: all 0.15s; }
.topbar-right .btn-logout:hover { border-color: #fca5a5; color: #dc2626; background: #fef2f2; }
.content-area { padding: 1.5rem; flex: 1; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.35rem; font-weight: 700; color: #0f172a; margin: 0; }
.page-header p { font-size: 0.85rem; color: #64748b; margin: 0.2rem 0 0; }
.card { border: none; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-bottom: 1.25rem; }
.card-header { background: #fff; border-bottom: 1px solid #f1f5f9; padding: 1rem 1.25rem; font-weight: 600; }
.card-body { padding: 1.25rem; }
.stat-card {
  border-radius: 12px; padding: 1.25rem; color: #fff;
  position: relative; overflow: hidden;
}
.stat-card .stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; backdrop-filter: blur(4px); }
.stat-card .stat-value { font-size: 1.65rem; font-weight: 700; }
.stat-card .stat-label { font-size: 0.82rem; opacity: 0.8; margin-top: 0.3rem; }
.stat-card .stat-trend { font-size: 0.75rem; opacity: 0.7; margin-top: 0.3rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; font-weight: 600; background: #f8fafc; border-bottom-width: 2px !important; }
.table td { vertical-align: middle; padding: 0.65rem 0.75rem; }
.table tbody tr:hover { background: #f8fafc; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline-accent { color: var(--accent); border-color: var(--accent); }
.btn-outline-accent:hover { background: var(--accent); color: #fff; }
.form-control, .form-select { border-radius: 8px; border-color: #e2e8f0; font-size: 0.88rem; padding: 0.5rem 0.75rem; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(237,137,36,0.12); }
.modal-content { border-radius: 16px; border: none; }
.modal-header { border-bottom: 1px solid #f1f5f9; padding: 1.25rem 1.5rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid #f1f5f9; padding: 1rem 1.5rem; }
.alert { border-radius: 10px; }
.table-responsive { border-radius: 12px; }
input[type="search"] { border-radius: 8px !important; }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ==============================
   Login Page
   From: views/layout/login_layout.php
   ============================== */
body.login-page {
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 2rem;
  position: relative;
  margin: 0;
  overflow-x: hidden;
}
body.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 40%, rgba(237,137,36,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(59,130,246,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  position: relative;
  z-index: 1;
}
.login-logo {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #ed8924, #d97706);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(237,137,36,0.35);
}
.login-logo img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.login-title { font-size: 1.5rem; font-weight: 700; color: #1e293b; margin: 0 0 0.25rem; text-align: center; }
.login-subtitle { font-size: 0.88rem; color: #64748b; margin: 0 0 2rem; text-align: center; }
body.login-page .form-label { font-size: 0.8rem; font-weight: 600; color: #475569; margin-bottom: 0.35rem; }
body.login-page .form-control { border-radius: 10px; border: 1.5px solid #e2e8f0; padding: 0.7rem 2.85rem; font-size: 0.9rem; background: #f8fafc; transition: all 0.2s; }
body.login-page .form-control:focus { border-color: #ed8924; background: #fff; box-shadow: 0 0 0 3px rgba(237,137,36,0.1); }
.input-group-custom { position: relative; }
.input-group-custom .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 0.95rem; z-index: 10; }
.input-group-custom .form-control { padding-left: 2.4rem; }
.btn-login { width: 100%; padding: 0.8rem; border: none; border-radius: 10px; background: linear-gradient(135deg, #ed8924, #d97706); color: #fff; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s; margin-top: 0.5rem; }
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(237,137,36,0.4); }
.login-footer-text { position: fixed; left: 0; right: 0; bottom: 1rem; text-align: center; color: #94a3b8; font-size: 0.78rem; z-index: 1; }
@media (max-width: 480px) { body.login-page { padding: 1rem; } .login-card { padding: 2rem 1.25rem; } }
@media (max-height: 640px) { body.login-page { align-items: flex-start; padding-top: 1rem; padding-bottom: 3rem; } .login-footer-text { position: static; margin-top: 1rem; } }

/* ==============================
   Shops List
   From: views/shops_list.php
   ============================== */
.shop-name-cell { min-width: 220px; }
.shop-metric { display:inline-flex; align-items:center; gap:.3rem; padding:.18rem .45rem; border-radius:999px; background:#f8fafc; border:1px solid #e2e8f0; font-size:.75rem; margin:.1rem .1rem .1rem 0; }
.shop-actions .btn { width: 32px; height: 32px; display:inline-flex; align-items:center; justify-content:center; }
.rating-stars { color:#f59e0b; white-space:nowrap; }

/* ==============================
   Shop Detail
   From: views/shop_detail.php
   ============================== */
.detail-hero { background: linear-gradient(135deg,#0f172a,#312e81); color:#fff; border-radius:14px; padding:1.25rem; margin-bottom:1rem; }
.detail-stat { border-radius:12px; padding:1rem; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.06); min-height:92px; }
.detail-stat .value { font-size:1.35rem; font-weight:800; color:#0f172a; }
.detail-stat .label { color:#64748b; font-size:.78rem; }
.info-row { display:flex; justify-content:space-between; gap:1rem; padding:.5rem 0; border-bottom:1px solid #f1f5f9; font-size:.86rem; }
.info-row:last-child { border-bottom:0; }
.mini-bar { height:90px; display:flex; align-items:end; gap:.45rem; }
.mini-bar span { flex:1; min-width:18px; background:var(--accent); border-radius:6px 6px 0 0; position:relative; }
.mini-bar small { display:block; text-align:center; color:#64748b; font-size:.68rem; margin-top:.25rem; }
.hour-pill { display:flex; justify-content:space-between; gap:1rem; padding:.45rem .65rem; border:1px solid #e2e8f0; border-radius:8px; margin-bottom:.4rem; font-size:.82rem; }
.service-row { display:flex; justify-content:space-between; gap:1rem; border-bottom:1px solid #f1f5f9; padding:.65rem 0; }
.service-row:last-child { border-bottom:0; }
.qr-box img { max-width:150px; border-radius:10px; border:1px solid #e2e8f0; background:#fff; padding:.5rem; }

/* ==============================
   Beauty Tips Editor
   From: views/beauty_tips.php
   ============================== */
.beauty-tip-modal .modal-dialog { max-width: 920px; }
.beauty-tip-modal .modal-content { overflow: hidden; }
.beauty-tip-modal .modal-header { background: linear-gradient(135deg, #fff1f2, #ffffff); border-bottom: 1px solid #fecdd3; }
.tip-editor-shell { display: grid; grid-template-columns: minmax(0, 1.3fr) 300px; gap: 1rem; }
.tip-editor-tabs .nav-link { border-radius: 8px; color: #64748b; font-weight: 600; font-size: .86rem; }
.tip-editor-tabs .nav-link.active { background: var(--accent); color: #fff; }
.tip-editor-panel { border: 1px solid #e2e8f0; border-radius: 12px; padding: 1rem; background: #fff; }
.tip-preview-card { border-radius: 14px; min-height: 280px; padding: 1.1rem; color: #fff; background: linear-gradient(135deg, #be185d, #7c3aed); background-size: cover; background-position: center; position: sticky; top: 80px; overflow: hidden; display: flex; align-items: end; box-shadow: inset 0 -100px 120px rgba(15,23,42,.48); }
.tip-preview-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,.02), rgba(15,23,42,.68)); }
.tip-preview-content { position: relative; z-index: 1; max-width: 94%; }
.tip-preview-icon { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; margin-bottom: .75rem; font-size: 1.25rem; }
.tip-preview-title { font-size: 1.35rem; font-weight: 800; line-height: 1.12; margin-bottom: .45rem; }
.tip-preview-desc { font-size: .86rem; opacity: .92; margin: 0; }
.editor-help { color: #64748b; font-size: .76rem; margin-top: .3rem; }
@media (max-width: 992px) { .tip-editor-shell { grid-template-columns: 1fr; } .tip-preview-card { position: relative; top: 0; } }

/* ==============================
   Discover Items Editor
   From: views/discover_items.php
   ============================== */
.discover-item-modal .modal-dialog { max-width: 980px; }
.discover-item-modal .modal-content { overflow: hidden; }
.discover-item-modal .modal-header { background: linear-gradient(135deg, #ecfeff, #ffffff); border-bottom: 1px solid #bae6fd; }
.discover-editor-shell { display: grid; grid-template-columns: minmax(0, 1.35fr) 320px; gap: 1rem; }
.discover-editor-tabs .nav-link { border-radius: 8px; color: #64748b; font-weight: 600; font-size: .86rem; }
.discover-editor-tabs .nav-link.active { background: var(--accent); color: #fff; }
.discover-editor-panel { border: 1px solid #e2e8f0; border-radius: 12px; padding: 1rem; background: #fff; }
.discover-preview-card { border-radius: 14px; min-height: 300px; padding: 1.1rem; color: #fff; background: #0f766e; background-size: cover; background-position: center; position: sticky; top: 80px; overflow: hidden; display: flex; align-items: end; box-shadow: inset 0 -100px 120px rgba(15,23,42,.5); }
.discover-preview-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,.03), rgba(15,23,42,.72)); }
.discover-preview-content { position: relative; z-index: 1; max-width: 92%; }
.discover-preview-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; margin-bottom: .75rem; overflow: hidden; }
.discover-preview-icon img { width: 100%; height: 100%; object-fit: cover; }
.discover-preview-title { font-size: 1.4rem; font-weight: 800; line-height: 1.12; margin-bottom: .45rem; }
.discover-preview-desc { font-size: .86rem; opacity: .92; margin: 0; }
@media (max-width: 992px) { .discover-editor-shell { grid-template-columns: 1fr; } .discover-preview-card { position: relative; top: 0; } }

/* ==============================
   Homepage Sections Editor
   From: views/homepage_sections.php
   ============================== */
.homepage-section-modal .modal-dialog { max-width: 980px; }
.homepage-section-modal .modal-content { overflow: hidden; }
.homepage-section-modal .modal-header {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border-bottom: 1px solid #fed7aa;
}
.section-editor-shell { display: grid; grid-template-columns: minmax(0, 1.4fr) 300px; gap: 1rem; }
.section-editor-tabs .nav-link { border-radius: 8px; color: #64748b; font-weight: 600; font-size: .86rem; }
.section-editor-tabs .nav-link.active { background: var(--accent); color: #fff; }
.section-editor-panel { border: 1px solid #e2e8f0; border-radius: 12px; padding: 1rem; background: #fff; }
.section-preview-card { border-radius: 12px; min-height: 250px; padding: 1rem; color: #fff; background: #5a189a; background-size: cover; background-position: center; position: sticky; top: 80px; overflow: hidden; display: flex; flex-direction: column; justify-content: end; }
.section-preview-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,.08), rgba(15,23,42,.7)); }
.section-preview-content { position: relative; z-index: 1; }
.section-preview-badge { display: inline-flex; padding: .25rem .55rem; border-radius: 999px; background: rgba(255,255,255,.18); font-size: .72rem; font-weight: 700; margin-bottom: .5rem; }
.section-preview-title { font-size: 1.25rem; font-weight: 800; line-height: 1.15; margin-bottom: .4rem; }
.section-preview-desc { font-size: .83rem; opacity: .9; margin: 0; }
@media (max-width: 992px) { .section-editor-shell { grid-template-columns: 1fr; } .section-preview-card { position: relative; top: 0; } }

/* ==============================
   Women Banners Editor
   From: views/women_banners.php
   ============================== */
.women-banner-modal .modal-dialog { max-width: 980px; }
.women-banner-modal .modal-content { overflow: hidden; }
.women-banner-modal .modal-header { background: linear-gradient(135deg, #faf5ff, #ffffff); border-bottom: 1px solid #e9d5ff; }
.banner-editor-shell { display: grid; grid-template-columns: minmax(0, 1.35fr) 320px; gap: 1rem; }
.banner-editor-tabs .nav-link { border-radius: 8px; color: #64748b; font-weight: 600; font-size: .86rem; }
.banner-editor-tabs .nav-link.active { background: var(--accent); color: #fff; }
.banner-editor-panel { border: 1px solid #e2e8f0; border-radius: 12px; padding: 1rem; background: #fff; }
.banner-preview-card { border-radius: 14px; min-height: 300px; padding: 1.1rem; color: #fff; background: #5a189a; background-size: cover; background-position: center; position: sticky; top: 80px; overflow: hidden; display: flex; align-items: end; box-shadow: inset 0 -90px 120px rgba(15,23,42,.45); }
.banner-preview-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,.04), rgba(15,23,42,.7)); }
.banner-preview-content { position: relative; z-index: 1; max-width: 92%; }
.banner-preview-kicker { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .6rem; border-radius: 999px; background: rgba(255,255,255,.18); font-size: .72rem; font-weight: 700; margin-bottom: .6rem; }
.banner-preview-title { font-size: 1.45rem; font-weight: 800; line-height: 1.12; margin-bottom: .45rem; }
.banner-preview-desc { font-size: .86rem; opacity: .92; margin: 0; }
@media (max-width: 992px) { .banner-editor-shell { grid-template-columns: 1fr; } .banner-preview-card { position: relative; top: 0; } }
