/* Admin Dashboard — Light theme with accents
   Accents: #4300ff, #0065f8, #00caff, #00ffde */
:root{
  --bg:#f6f8fc;
  --panel:#ffffff;
  --border:#e5eaf2;
  --text:#0f172a;
  --muted:#6b7280;
  --accent1:#4300ff;
  --accent2:#0065f8;
  --accent3:#00caff;
  --accent4:#00ffde;
}
body.admin{background:var(--bg);color:var(--text);margin:0;font:15px/1.6 system-ui,Segoe UI,Roboto,Arial}
a{color:var(--accent2);text-decoration:none}
a:hover{text-decoration:underline}

.admin-shell{display:grid;grid-template-columns:260px 1fr;min-height:100vh;gap:16px}
.sidebar{
  background:var(--panel);
  border-right:1px solid var(--border);
  padding:18px 14px;
  position:sticky; top:0; height:100vh;
  box-shadow:0 6px 24px rgba(0,0,0,.04);
}
.sb-brand{display:flex;align-items:center;gap:10px;margin-bottom:14px;font-weight:800}
.sb-brand .dot{width:26px;height:26px;border-radius:8px;
  background: linear-gradient(135deg, var(--accent2), var(--accent3));}
.sb-nav{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.sb-nav a{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:#fff;
}
.sb-nav a.active{
  border-color:transparent;
  background:linear-gradient(135deg, rgba(0,101,248,.10), rgba(0,202,255,.10));
  box-shadow:inset 0 0 0 2px rgba(0,202,255,.25);
}
.sb-foot{margin-top:auto;opacity:.8}

.main{padding:18px 18px 32px}
.topbar{
  display:flex;align-items:center;gap:12px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px 14px 14px;
  position:sticky; top:12px; z-index:5;
  box-shadow:0 6px 24px rgba(0,0,0,.04);
}
.topbar h1{font-size:18px;margin:0;margin-right:auto}
.search{flex:1}
.search input{width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--border)}

.page{margin-top:16px}
.grid{display:grid;gap:16px}
.grid-4{grid-template-columns:repeat(4,1fr)}
.grid-2{grid-template-columns:2fr 1fr}
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  box-shadow:0 6px 24px rgba(0,0,0,.04);
}

.stat{
  display:flex;flex-direction:column;gap:8px;min-height:120px;
  background:
    radial-gradient(600px 180px at 100% -10%, rgba(67,0,255,.10), transparent 60%),
    radial-gradient(600px 180px at -20% 110%, rgba(0,202,255,.10), transparent 60%);
}
.stat .kpi{font-size:28px;font-weight:800}
.stat .label{color:var(--muted)}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;border:1px solid var(--border);background:#fff}
.badge.ok{background:#ecfeff;border-color:#a5f3fc;color:#0e7490}
.badge.warn{background:#fff7ed;border-color:#fed7aa;color:#b45309}

.table{width:100%;border-collapse:separate;border-spacing:0 10px}
.table th,.table td{padding:10px 12px;background:#fff;border:1px solid var(--border)}
.table th{background:#f8fafc}

.linechart{height:220px}
.linechart svg{width:100%;height:200px;display:block}
.axis{stroke:#e5eaf2;stroke-width:1}
.path{fill:url(#gradArea);stroke:url(#gradLine);stroke-width:2}
.dot{fill:#fff;stroke:var(--accent2);stroke-width:1.5}

.btn{display:inline-block;padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:#fff;cursor:pointer}
.btn.brand{color:#fff;border:0;background:linear-gradient(135deg, var(--accent2), var(--accent3))}
.btn.soft{background:#fff}
.note{color:var(--muted);font-size:12px}
@media (max-width: 1100px){ .grid-4{grid-template-columns:1fr 1fr} }
@media (max-width: 700px){ .admin-shell{grid-template-columns:1fr} .sidebar{position:static;height:auto;border-right:0} .grid-4{grid-template-columns:1fr} .grid-2{grid-template-columns:1fr} }

/* Fallback (plain color) */
.topbar h1 strong {
  color: var(--text);
  font-weight: 800;
}

/* Gradient text when supported */
@supports ((-webkit-background-clip:text) or (background-clip:text)) {
  .topbar h1 strong{
    background: linear-gradient(135deg, var(--accent2), var(--accent3));
    background-clip: text;                 /* standard */
    -webkit-background-clip: text;         /* WebKit */
    -webkit-text-fill-color: transparent;  /* WebKit text fill */
    color: transparent;                    /* fallback to transparency */
    display: inline-block;                 /* ensures the gradient paints correctly */
  }
}


/* ---- Nice form controls ---- */
.niceform label{font-weight:600;color:var(--text);font-size:13px}
.input, select, textarea{
  width:100%;padding:12px 14px 14px;border-radius:14px;border:1px solid var(--border);
  background:#fff;color:var(--text);transition:.2s ease;outline:none;
  box-shadow:0 1px 0 rgba(0,0,0,.02), 0 1px 12px rgba(0,0,0,.02) inset;
}
.input::placeholder, textarea::placeholder{color:#9aa5b1}
.input:focus, select:focus, textarea:focus{
  border-color: rgba(0,101,248,.6);
  box-shadow:0 0 0 4px rgba(0,101,248,.12), 0 1px 0 rgba(0,0,0,.02) inset;
}
textarea.input{min-height:110px}

/* ---- Buttons ---- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 14px;border-radius:14px;border:1px solid var(--border);background:#fff;color:var(--text);
  cursor:pointer;transition:.2s ease;box-shadow:0 1px 0 rgba(0,0,0,.02);
}
.btn:hover{transform:translateY(-1px);box-shadow:0 4px 14px rgba(0,0,0,.06)}
.btn.brand{color:#fff;border:0;background:linear-gradient(135deg, var(--accent2), var(--accent3));box-shadow:0 6px 18px rgba(0,101,248,.25)}
.btn.brand:hover{filter:brightness(1.02)}
.btn.danger{border:0;background:linear-gradient(135deg,#ff6b6b,#f43f5e);color:#fff}

/* ---- Cards ---- */
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:18px;
  padding:18px;
  box-shadow:0 8px 30px rgba(30,60,90,.06);
  background-image: radial-gradient(400px 120px at 100% -10%, rgba(0,202,255,.06), transparent 60%);
}

/* ---- Table polish ---- */
.table{width:100%;border-collapse:separate;border-spacing:0 10px}
.table th,.table td{padding:12px 14px 14px;background:#fff;border:1px solid var(--border)}
.table th{background:#f8fafc;color:#111827;font-weight:700}
.table tr:hover td{background:#f9fbff}
.table tr td:first-child{border-top-left-radius:10px;border-bottom-left-radius:10px}
.table tr td:last-child{border-top-right-radius:10px;border-bottom-right-radius:10px}

/* ---- Pills / badges ---- */
.badge{
  padding:6px 10px;border-radius:999px;border:1px solid var(--border);
  background:#fff;display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:12px;
}
.badge.ok{background:linear-gradient(135deg,#ecfeff,#f0fdfa);border-color:#a5f3fc;color:#0e7490}
.badge.warn{background:linear-gradient(135deg,#fff7ed,#fef3c7);border-color:#fed7aa;color:#b45309}
.badge.danger{background:linear-gradient(135deg,#fee2e2,#ffe4e6);border-color:#fecaca;color:#991b1b}

/* ---- Layout niceties ---- */
.section-title{margin:0 0 12px 0}
.grid.split-2{grid-template-columns:1fr 1fr;gap:12px}
@media (max-width: 720px){ .grid.split-2{grid-template-columns:1fr} }

/* --- Toolbar & search --- */
.toolbar{display:flex;align-items:center;gap:12px;margin:-6px 0 12px 0}
.toolbar .grow{flex:1}
.searchbox{position:relative}
.searchbox input{width:100%;padding:12px 42px 12px 44px;border-radius:999px;border:1px solid var(--border);background:#fff;box-shadow:0 1px 0 rgba(0,0,0,.02)}
.searchbox .icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);opacity:.6}
.result-count{font-size:12px;color:var(--muted)}
.toolbar .btn{border-radius:999px}

/* --- Sticky table header + row styling --- */
.table-wrap{max-height:520px;overflow:auto;padding-right:2px}
.table thead th{position:sticky;top:0;z-index:1;border-bottom:1px solid var(--border)}
.table tr{transition:background .15s ease}
.table tr:hover td{background:#f6fbff}
.table.striped tbody tr:nth-child(odd) td{background:#fcfdff}

/* --- Section groups for forms --- */
.group{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
.group .gtitle{font-weight:800;font-size:13px;color:#0f172a;margin-bottom:4px}
.divider{height:1px;background:linear-gradient(90deg,transparent,rgba(0,0,0,.06),transparent);margin:8px 0}

/* --- Primary save area --- */
.actions{display:flex;justify-content:flex-end;margin-top:8px}
.btn.full{width:100%}

/* subtle background bloom for page areas */
.page{background:radial-gradient(500px 120px at 100% -10%, rgba(0,101,248,.04), transparent 60%);padding-bottom:8px}

/* nicer delete button */
.btn.danger{background:linear-gradient(135deg,#ff6b6b,#f43f5e);color:#fff;border:0;box-shadow:0 6px 18px rgba(244,63,94,.25)}
.btn.danger:hover{filter:brightness(1.03)}

/* header corners */
.card h3{margin:0 0 12px 0}
.card.round{border-radius:20px}

/* ---- Toolbar (title row with search and actions) ---- */
.toolbar{
  display:flex; align-items:center; gap:12px;
  margin:0 0 10px 0;
}
.toolbar .spacer{margin-left:auto}
.input-icon{position:relative; flex:1}
.input-icon input{
  padding-left:40px;
  border-radius:14px;
}
.input-icon svg{
  position:absolute; left:12px; top:50%; transform:translateY(-50%);
  width:18px; height:18px; opacity:.55;
}

/* ---- Sticky form column ---- */
.sticky-col{ position:sticky; top:84px; align-self:start; }

/* ---- Table scroll + sticky header ---- */
.table-wrap{ overflow:auto; max-height:60vh; }
.table thead th{ position:sticky; top:0; z-index:1; }
.table tr{ transition:background .15s ease }
.table tr:hover td{ background:#f5f9ff }
.table .btn{ white-space:nowrap }

/* ---- Fine tune card and inputs spacing ---- */
.card h3{ margin-top:0; margin-bottom:12px }
.niceform label{ display:block; margin-bottom:12px }
.niceform .input, .niceform select, .niceform textarea{ margin-top:6px }
.btn-row{ display:flex; gap:10px; }
.btn.block{ width:100% }

/* ===== Compact density ===== */
body.admin{font-size:14px}
.card.compact{padding:14px;border-radius:16px}
.table.compact th, .table.compact td{padding:8px 10px;font-size:13px}
.table.compact th{letter-spacing:.2px}
.btn.sm{padding:8px 10px;border-radius:10px;font-size:13px}
.input.sm{padding:9px 12px;border-radius:12px;font-size:13px}
.toolbar.compact{gap:8px;margin-bottom:8px}
.input-icon.compact input{padding-left:36px;height:36px}
.input-icon.compact svg{width:16px;height:16px;left:10px}

/* Number chip column */
.numchip{display:inline-flex;align-items:center;justify-content:center;
  width:26px;height:26px;border-radius:8px;font-weight:700;
  background:linear-gradient(135deg, rgba(0,101,248,.12), rgba(0,202,255,.12));
  color:#0f172a;border:1px solid var(--border);
}

/* Status chips */
.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;
  border:1px solid var(--border);font-weight:700;font-size:12px;background:#fff}
.chip.green{background:linear-gradient(135deg,#eafffb,#f0fff6);border-color:#b7f7e6;color:#0c8f76}
.chip.orange{background:linear-gradient(135deg,#fff8ee,#fff3d9);border-color:#ffd6a8;color:#b45309}
.chip.red{background:linear-gradient(135deg,#ffe9e9,#ffeef2);border-color:#ffc7cf;color:#b91c1c}

/* Option buttons */
.icon-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:10px;
  border:1px solid var(--border);background:#fff;cursor:pointer;font-size:12px}
.icon-btn.danger{border:0;background:linear-gradient(135deg,#ff6b6b,#f43f5e);color:#fff}
.icon-btn svg{width:14px;height:14px;opacity:.9}
*,*::before,*::after{box-sizing:border-box}

/* ---- Two-column layout helper ---- */
.grid.two-col{display:grid;gap:16px;grid-template-columns:minmax(340px,1fr) 2fr}
@media (max-width: 980px){ .grid.two-col{grid-template-columns:1fr} }
.grid.two-col > *{min-width:0}


/* Prevent inputs from overflowing card width */
.input, select, textarea{max-width:100%}
.card{overflow:hidden}
.table-wrap{border-radius:12px}

/* ---- Fancy line chart ---- */
.chart-card{position:relative; overflow:hidden}
.chart-card .subtitle{color:var(--muted); font-size:12px; margin-top:-6px; margin-bottom:8px}
.chart{height:240px}
.chart svg{width:100%;height:200px;display:block}
.chart .grid line{stroke:#e5eaf2;stroke-width:1}
.chart .area{fill:url(#gradArea2)}
.chart .line{stroke:url(#gradLine2);stroke-width:3;fill:none;filter: drop-shadow(0 1px 0 rgba(0,0,0,.05))}
.chart .dot{fill:#fff;stroke:#0065f8;stroke-width:2}
.chart .hit{fill:transparent;cursor:crosshair}
.chart-tip{position:absolute;background:#fff;border:1px solid var(--border);border-radius:10px;
  padding:6px 10px;font-size:12px;box-shadow:0 10px 30px rgba(0,0,0,.08);
  pointer-events:none;display:none;white-space:nowrap}
.chart-legend{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--muted);margin-top:6px}
.legend-dot{width:10px;height:10px;border-radius:50%;background:linear-gradient(135deg,#0065f8,#00caff)}

.page{display:grid;gap:24px}

.grid-4{grid-template-columns:repeat(4,1fr);gap:20px}
.grid-2{grid-template-columns:2fr 1fr;gap:20px}
.grid.two-col{gap:24px}
@media (max-width: 1100px){ .grid-4{grid-template-columns:1fr 1fr} }
@media (max-width: 700px){ .grid-4{grid-template-columns:1fr} .grid-2{grid-template-columns:1fr} }


/* ===== WOW Sidebar ===== */
.sidebar{
  position:sticky; top:0; height:100vh; padding:18px 12px;
  background: radial-gradient(120% 120% at 0% 0%, rgba(0,101,248,.12), transparent 60%),
              radial-gradient(120% 120% at 100% 100%, rgba(0,255,222,.12), transparent 60%),
              rgba(255,255,255,.85);
  backdrop-filter: blur(10px) saturate(120%);
  border-right:1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.6);
}

.sb-brand{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.sb-brand .left{display:flex;align-items:center;gap:10px}



.sb-brand .dot{
  width:28px;height:28px;border-radius:10px;
  background: url('../../assets/logos/bluesitely.png') center/cover no-repeat;
  box-shadow:0 0 0 2px rgba(255,255,255,.8), 0 6px 14px rgba(0,101,248,.25);
}

#sbToggle{
  border:0; background:#fff; border-radius:12px; width:36px; height:36px; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  box-shadow:0 6px 16px rgba(0,0,0,.08); transition:.2s ease;
}
#sbToggle:hover{transform:translateY(-2px)}
#sbToggle svg{width:18px;height:18px;opacity:.8}

/* Links */
.sb-nav{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.sb-nav a{
  --glow: rgba(0,202,255,.25);
  display:flex;align-items:center;gap:12px;
  padding:10px 12px;border-radius:14px;border:1px solid var(--border);background:#fff;
  transition: .2s ease; position:relative; overflow:hidden;
}
.sb-nav a .icon{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center}
.sb-nav a .label{white-space:nowrap}
.sb-nav a::after{
  content:""; position:absolute; inset:auto 0 0 0; height:2px;
  background: linear-gradient(90deg, var(--accent2), var(--accent3), var(--accent4));
  opacity:0; transition:.2s ease;
}
.sb-nav a:hover{box-shadow:0 8px 22px rgba(0,101,248,.08), inset 0 0 0 1px rgba(0,101,248,.15)}
.sb-nav a:hover::after{opacity:1}
.sb-nav a.active{
  border-color:transparent;
  background: linear-gradient(135deg, rgba(0,101,248,.12), rgba(0,202,255,.12));
  box-shadow: inset 0 0 0 2px rgba(0,202,255,.25), 0 10px 24px rgba(0,101,248,.10);
}

/* Collapsed mode */
body.sb-collapsed .admin-shell{grid-template-columns:86px 1fr}
body.sb-collapsed .sidebar{padding:18px 10px}
body.sb-collapsed .sb-nav a{justify-content:center}
body.sb-collapsed .sb-nav a .label{width:0;opacity:0;transform:translateX(-6px);pointer-events:none}
body.sb-collapsed .sb-foot{display:none}
.tooltip{
  position:fixed; z-index:50; padding:6px 10px; font-size:12px; border-radius:10px;
  background:#fff; border:1px solid var(--border); color:var(--text);
  box-shadow:0 14px 30px rgba(0,0,0,.12); pointer-events:none; display:none;
}

/* Hide tooltip on wide (not collapsed) */
@media (min-width: 1px){
  body:not(.sb-collapsed) .tooltip{display:none !important}
}












































