/* ============================================================
   FindElectro Admin Console — shared styles
   Dark sidebar · Light content surface · Mobile bottom nav
   ============================================================ */

:root {
  --ad-bg: #F2F5F8;
  --ad-surface: #FFFFFF;
  --ad-surface-2: #F7F9FC;
  --ad-text: #0F1B2D;
  --ad-text-muted: #5B6B80;
  --ad-border: #E4EAF1;
  --ad-side-bg: #0B1424;
  --ad-side-2:  #142337;
  --ad-side-text: #C6D3E4;
  --ad-side-text-muted: #6F829B;
  --ad-side-hover: rgba(0,199,191,.12);
  --ad-primary: #00C7BF;
  --ad-primary-hover: #00A8A0;
  --ad-accent: #2EE6E0;
  --ad-warn:   #FFB020;
  --ad-danger: #FF5163;
  --ad-good:   #00C76F;
  --ad-purple: #7A4DFF;
  --ad-shadow-sm: 0 1px 2px rgba(15,27,45,.04), 0 1px 3px rgba(15,27,45,.06);
  --ad-shadow-md: 0 4px 16px rgba(15,27,45,.08);
  --ad-radius: 14px;
  --ad-side-w: 72px;
  --ad-side-w-expanded: 260px;
  --ad-topbar-h: 64px;
  --ad-bottom-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.ad-app {
  background: var(--ad-bg);
  color: var(--ad-text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* =========================================================
   LAYOUT
   ========================================================= */
.ad-shell {
  display: grid;
  grid-template-columns: var(--ad-side-w) 1fr;
  min-height: 100vh;
  transition: grid-template-columns .25s ease;
}
.ad-shell.is-pinned { grid-template-columns: var(--ad-side-w-expanded) 1fr; }

.ad-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.ad-side {
  background: linear-gradient(180deg, var(--ad-side-bg) 0%, var(--ad-side-2) 100%);
  color: var(--ad-side-text);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  width: var(--ad-side-w);
  transition: width .25s cubic-bezier(.22,.61,.36,1);
  z-index: 50;
  overflow: hidden;
}
.ad-side:hover,
.ad-shell.is-pinned .ad-side {
  width: var(--ad-side-w-expanded);
}
.ad-side:hover + .ad-main {
  /* nothing — sidebar floats on hover */
}

.ad-side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  height: var(--ad-topbar-h);
  border-bottom: 1px solid rgba(255,255,255,.05);
  white-space: nowrap;
  overflow: hidden;
}
.ad-side-brand img {
  height: 30px;
  width: 180px;
  max-width: 180px;
  flex: 0 0 180px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 12px rgba(46,230,224,.35));
  transition: width .25s, flex-basis .25s;
}
/* When sidebar is collapsed, show only icon portion of the logo */
.ad-shell:not(.is-pinned) .ad-side:not(:hover) .ad-side-brand img {
  width: 36px;
  flex-basis: 36px;
  object-fit: cover;
  object-position: left center;
}
.ad-side-brand span {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s .05s ease, transform .25s ease;
}
.ad-side:hover .ad-side-brand span,
.ad-shell.is-pinned .ad-side-brand span { opacity: 1; transform: translateX(0); }

.ad-side-role {
  padding: 14px 16px 10px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ad-side-text-muted);
  white-space: nowrap;
}

.ad-nav { list-style: none; padding: 0; margin: 0; flex: 1; overflow-y: auto; overflow-x: hidden; }
.ad-nav::-webkit-scrollbar { width: 4px; }
.ad-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 99px; }

.ad-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 46px;
  padding: 0 18px;
  margin: 2px 10px;
  border-radius: 10px;
  color: var(--ad-side-text);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ad-nav-item i {
  font-size: 1.2rem;
  flex: 0 0 1.2rem;
  text-align: center;
  color: var(--ad-side-text-muted);
  transition: color .15s;
}
.ad-nav-item span {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .18s .04s ease, transform .25s ease;
}
.ad-side:hover .ad-nav-item span,
.ad-shell.is-pinned .ad-nav-item span { opacity: 1; transform: translateX(0); }

.ad-nav-item:hover {
  background: var(--ad-side-hover);
  color: #FFFFFF;
}
.ad-nav-item:hover i { color: var(--ad-accent); }

.ad-nav-item.active {
  background: linear-gradient(90deg, rgba(0,199,191,.18) 0%, rgba(0,199,191,.04) 100%);
  color: #FFFFFF;
  font-weight: 600;
}
.ad-nav-item.active i { color: var(--ad-accent); }
.ad-nav-item.active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--ad-accent);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px rgba(46,230,224,.7);
}

/* Floating label tooltip when collapsed (mouse not over sidebar) */
.ad-shell:not(.is-pinned) .ad-side:not(:hover) .ad-nav-item:hover::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: #142337;
  color: #FFFFFF;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  z-index: 60;
}

/* Sidebar nav badges */
.ad-nav-badge {
  position: absolute;
  right: 14px;
  background: var(--ad-danger);
  color: #FFFFFF;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}
.ad-side:not(:hover) .ad-shell:not(.is-pinned) .ad-nav-badge {
  right: 50%;
  top: 6px;
  transform: translateX(50%);
}

.ad-side-foot {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  overflow: hidden;
}
.ad-side-foot img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 38px;
  border: 2px solid rgba(46,230,224,.4);
}
.ad-side-foot-text {
  opacity: 0;
  transition: opacity .18s .04s ease;
  flex: 1; min-width: 0;
}
.ad-side:hover .ad-side-foot-text,
.ad-shell.is-pinned .ad-side-foot-text { opacity: 1; }
.ad-side-foot-text strong {
  display: block;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.88rem;
  overflow: hidden; text-overflow: ellipsis;
}
.ad-side-foot-text span {
  display: block;
  color: var(--ad-side-text-muted);
  font-size: 0.75rem;
}
.ad-side-pin {
  background: transparent;
  border: 1px solid rgba(255,255,255,.1);
  color: var(--ad-side-text-muted);
  width: 32px; height: 32px;
  border-radius: 8px;
  display: none; align-items: center; justify-content: center;
  flex: 0 0 32px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.ad-side:hover .ad-side-pin,
.ad-shell.is-pinned .ad-side-pin { display: inline-flex; }
.ad-side-pin:hover { color: var(--ad-accent); border-color: var(--ad-accent); }
.ad-shell.is-pinned .ad-side-pin { color: var(--ad-accent); border-color: var(--ad-accent); }

/* =========================================================
   TOP BAR
   ========================================================= */
.ad-topbar {
  height: var(--ad-topbar-h);
  background: var(--ad-surface);
  border-bottom: 1px solid var(--ad-border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.ad-burger {
  display: none;
  background: var(--ad-surface-2);
  border: 1px solid var(--ad-border);
  color: var(--ad-text);
  width: 38px; height: 38px;
  border-radius: 10px;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.ad-topbar-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  margin: 0;
}
.ad-topbar-crumb {
  color: var(--ad-text-muted);
  font-size: 0.82rem;
  margin: 0;
}
.ad-search {
  flex: 1;
  max-width: 480px;
  margin-left: 12px;
  position: relative;
}
.ad-search input {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 42px;
  border-radius: 10px;
  border: 1px solid var(--ad-border);
  background: var(--ad-surface-2);
  font-size: 0.92rem;
  color: var(--ad-text);
  outline: none;
  transition: border-color .15s, background .15s;
}
.ad-search input:focus { border-color: var(--ad-primary); background: var(--ad-surface); }
.ad-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ad-text-muted);
  font-size: 1.05rem;
}
.ad-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ad-icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--ad-surface-2);
  border: 1px solid var(--ad-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ad-text);
  cursor: pointer;
  position: relative;
  transition: background .15s, color .15s, border-color .15s;
}
.ad-icon-btn:hover { background: #ECF1F7; color: var(--ad-primary); border-color: var(--ad-primary); }
.ad-icon-btn .ad-dot {
  position: absolute;
  top: 9px; right: 10px;
  width: 8px; height: 8px;
  background: var(--ad-danger);
  border-radius: 50%;
  border: 2px solid var(--ad-surface);
}
.ad-topbar-avatar {
  display: flex; align-items: center; gap: 10px;
  padding-left: 8px;
  border-left: 1px solid var(--ad-border);
  margin-left: 4px;
}
.ad-topbar-avatar img {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--ad-border);
}
.ad-topbar-avatar div { line-height: 1.2; }
.ad-topbar-avatar strong { font-size: 0.85rem; font-weight: 700; display: block; }
.ad-topbar-avatar span { font-size: 0.74rem; color: var(--ad-text-muted); }

/* =========================================================
   PAGE WRAPPER
   ========================================================= */
.ad-content {
  padding: 24px;
  padding-bottom: 80px;
  flex: 1;
  min-width: 0;
}
.ad-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.ad-page-head h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.ad-page-head p { color: var(--ad-text-muted); margin: 0; font-size: 0.95rem; }
.ad-page-head .ad-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* =========================================================
   BUTTONS
   ========================================================= */
.ad-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.ad-btn:active { transform: translateY(1px); }
.ad-btn-primary {
  background: var(--ad-primary);
  color: #FFFFFF;
}
.ad-btn-primary:hover { background: var(--ad-primary-hover); }
.ad-btn-ghost {
  background: var(--ad-surface);
  color: var(--ad-text);
  border-color: var(--ad-border);
}
.ad-btn-ghost:hover { border-color: var(--ad-primary); color: var(--ad-primary); }
.ad-btn-soft {
  background: rgba(0,199,191,.1);
  color: var(--ad-primary);
}
.ad-btn-soft:hover { background: rgba(0,199,191,.18); }

/* =========================================================
   KPI WIDGETS (swipeable on mobile)
   ========================================================= */
.ad-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
@media (max-width: 1199.98px) { .ad-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px)  {
  .ad-kpis {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 4px 6px;
    margin: 0 -24px 22px;
    padding-left: 24px;
    padding-right: 24px;
    -webkit-overflow-scrolling: touch;
  }
  .ad-kpis::-webkit-scrollbar { display: none; }
  .ad-kpi {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }
}
.ad-kpi {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.ad-kpi:hover { transform: translateY(-2px); box-shadow: var(--ad-shadow-md); }
.ad-kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.ad-kpi-head span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ad-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ad-kpi-ico {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: rgba(0,199,191,.12);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ad-primary);
  font-size: 1.05rem;
}
.ad-kpi-ico.purple { background: rgba(122,77,255,.12); color: var(--ad-purple); }
.ad-kpi-ico.warn   { background: rgba(255,176,32,.14); color: var(--ad-warn); }
.ad-kpi-ico.good   { background: rgba(0,199,111,.14); color: var(--ad-good); }
.ad-kpi-ico.danger { background: rgba(255,81,99,.14); color: var(--ad-danger); }
.ad-kpi-val {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.ad-kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
}
.ad-kpi-trend.up   { background: rgba(0,199,111,.12); color: var(--ad-good); }
.ad-kpi-trend.down { background: rgba(255,81,99,.12); color: var(--ad-danger); }
.ad-kpi-trend.flat { background: rgba(91,107,128,.12); color: var(--ad-text-muted); }
.ad-kpi-foot {
  font-size: 0.78rem;
  color: var(--ad-text-muted);
  margin-top: 6px;
}
.ad-kpi-spark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 90px;
  height: 34px;
  opacity: 0.5;
  pointer-events: none;
}

/* =========================================================
   DASHBOARD GRID (charts + tables)
   ========================================================= */
.ad-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
@media (max-width: 991.98px) { .ad-grid { grid-template-columns: 1fr; } }

.ad-card {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.ad-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.ad-card-head h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
}
.ad-card-head p { color: var(--ad-text-muted); font-size: 0.85rem; margin: 0; }
.ad-card-head .ad-card-actions { display: flex; gap: 8px; }
.ad-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ad-surface-2);
  border: 1px solid var(--ad-border);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ad-text-muted);
  cursor: pointer;
}
.ad-pill.active { background: var(--ad-primary); color: #FFFFFF; border-color: var(--ad-primary); }

/* Simple bar/line chart in pure CSS using grid */
.ad-chart {
  position: relative;
  height: 280px;
  padding: 12px 0 22px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 14px;
  border-bottom: 1px dashed var(--ad-border);
}
.ad-chart-bar {
  background: linear-gradient(180deg, var(--ad-primary) 0%, var(--ad-accent) 100%);
  border-radius: 8px 8px 0 0;
  position: relative;
  min-height: 4px;
  transition: filter .15s;
  cursor: pointer;
}
.ad-chart-bar:hover { filter: brightness(1.15); }
.ad-chart-bar.dim { background: linear-gradient(180deg, #E4EAF1 0%, #F2F5F8 100%); }
.ad-chart-bar .ad-chart-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ad-text);
  color: #FFFFFF;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.74rem;
  white-space: nowrap;
}
.ad-chart-bar:hover .ad-chart-tip { display: block; }
.ad-chart-xlabels {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  padding-top: 8px;
  color: var(--ad-text-muted);
  font-size: 0.72rem;
  text-align: center;
  font-weight: 600;
}

/* Donut/progress in CSS */
.ad-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--ad-border);
  gap: 12px;
}
.ad-progress-row:last-child { border: none; }
.ad-progress-row > span { font-size: 0.88rem; font-weight: 600; }
.ad-progress-row .ad-progress-track {
  flex: 1;
  height: 8px;
  background: var(--ad-surface-2);
  border-radius: 99px;
  overflow: hidden;
}
.ad-progress-row .ad-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ad-primary), var(--ad-accent));
  border-radius: 99px;
}
.ad-progress-row .ad-progress-val {
  width: 56px;
  text-align: right;
  font-size: 0.82rem;
  color: var(--ad-text-muted);
  font-weight: 600;
}

/* =========================================================
   TABLES
   ========================================================= */
.ad-table-wrap {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: var(--ad-radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.ad-table-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--ad-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ad-table-head h3 { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.02rem; margin: 0; }
.ad-table-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.ad-table { width: 100%; border-collapse: collapse; }
.ad-table thead th {
  text-align: left;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ad-text-muted);
  padding: 12px 22px;
  background: var(--ad-surface-2);
  border-bottom: 1px solid var(--ad-border);
  white-space: nowrap;
}
.ad-table tbody td {
  padding: 14px 22px;
  border-bottom: 1px solid var(--ad-border);
  font-size: 0.9rem;
  vertical-align: middle;
}
.ad-table tbody tr:last-child td { border-bottom: none; }
.ad-table tbody tr:hover { background: var(--ad-surface-2); }
.ad-tbl-thumb {
  display: flex; align-items: center; gap: 12px;
}
.ad-tbl-thumb img {
  width: 56px; height: 40px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--ad-border);
}
.ad-tbl-thumb strong { display: block; font-weight: 700; font-size: 0.9rem; }
.ad-tbl-thumb span { display: block; color: var(--ad-text-muted); font-size: 0.78rem; }
.ad-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.ad-status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.ad-status.live    { background: rgba(0,199,111,.12); color: var(--ad-good); }
.ad-status.pending { background: rgba(255,176,32,.15); color: var(--ad-warn); }
.ad-status.review  { background: rgba(122,77,255,.14); color: var(--ad-purple); }
.ad-status.draft   { background: rgba(91,107,128,.14); color: var(--ad-text-muted); }
.ad-status.sold    { background: rgba(0,199,191,.14); color: var(--ad-primary); }
.ad-status.rejected{ background: rgba(255,81,99,.14); color: var(--ad-danger); }

.ad-row-actions { display: flex; gap: 4px; }
.ad-row-action {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--ad-border);
  background: var(--ad-surface);
  color: var(--ad-text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.ad-row-action:hover { color: var(--ad-primary); border-color: var(--ad-primary); background: rgba(0,199,191,.06); }
.ad-row-action.danger:hover { color: var(--ad-danger); border-color: var(--ad-danger); background: rgba(255,81,99,.08); }

/* =========================================================
   APPROVAL QUEUE + Kanban + Feed
   ========================================================= */
.ad-feed-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ad-border);
}
.ad-feed-item:last-child { border: none; }
.ad-feed-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(0,199,191,.1);
  color: var(--ad-primary);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 36px;
}
.ad-feed-ico.warn { background: rgba(255,176,32,.14); color: var(--ad-warn); }
.ad-feed-ico.good { background: rgba(0,199,111,.14); color: var(--ad-good); }
.ad-feed-ico.purple{ background: rgba(122,77,255,.14); color: var(--ad-purple); }
.ad-feed-text { flex: 1; min-width: 0; }
.ad-feed-text strong { font-weight: 700; font-size: 0.9rem; }
.ad-feed-text p { color: var(--ad-text-muted); font-size: 0.82rem; margin: 2px 0 0; }
.ad-feed-time { font-size: 0.74rem; color: var(--ad-text-muted); white-space: nowrap; }

.ad-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.ad-kanban-col {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 12px;
  padding: 14px;
  min-height: 320px;
}
.ad-kanban-col h4 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ad-kanban-col h4 .ad-pill { font-size: 0.7rem; padding: 2px 9px; }
.ad-kanban-card {
  background: var(--ad-surface-2);
  border: 1px solid var(--ad-border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: grab;
  transition: border-color .15s, transform .12s;
}
.ad-kanban-card:hover { border-color: var(--ad-primary); transform: translateY(-1px); }
.ad-kanban-card strong { display: block; font-size: 0.92rem; font-weight: 700; margin-bottom: 4px; }
.ad-kanban-card p { font-size: 0.8rem; color: var(--ad-text-muted); margin: 0 0 8px; }
.ad-kanban-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.72rem;
  color: var(--ad-text-muted);
}
.ad-kanban-meta .ad-status { font-size: 0.68rem; padding: 2px 8px; }

/* =========================================================
   APPROVAL CARDS (grid)
   ========================================================= */
.ad-appr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.ad-appr-card {
  background: var(--ad-surface);
  border: 1px solid var(--ad-border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.ad-appr-card:hover { box-shadow: var(--ad-shadow-md); transform: translateY(-2px); }
.ad-appr-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.ad-appr-img img { width: 100%; height: 100%; object-fit: cover; }
.ad-appr-img .ad-status {
  position: absolute;
  top: 12px; left: 12px;
}
.ad-appr-body { padding: 14px 16px; }
.ad-appr-body h4 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 0.98rem;
  margin: 0 0 4px;
}
.ad-appr-body p {
  color: var(--ad-text-muted);
  font-size: 0.82rem;
  margin: 0 0 12px;
}
.ad-appr-row {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 8px;
}
.ad-appr-row .ad-btn { flex: 1; justify-content: center; padding: 8px 12px; font-size: 0.82rem; }

/* =========================================================
   MOBILE BOTTOM NAV + FAB
   ========================================================= */
.ad-bottom {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--ad-bottom-h);
  background: var(--ad-surface);
  border-top: 1px solid var(--ad-border);
  z-index: 40;
  padding: 0 12px;
  box-shadow: 0 -4px 18px rgba(15,27,45,.08);
}
.ad-bottom-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 100%;
  align-items: stretch;
}
.ad-bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ad-text-muted);
  font-size: 0.66rem;
  font-weight: 600;
  position: relative;
}
.ad-bottom-link i { font-size: 1.35rem; }
.ad-bottom-link.active { color: var(--ad-primary); }
.ad-bottom-link.active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  background: var(--ad-primary);
  border-radius: 0 0 4px 4px;
}
.ad-fab {
  display: none;
  position: fixed;
  bottom: calc(var(--ad-bottom-h) + 18px);
  right: 20px;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--ad-primary), var(--ad-accent));
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  box-shadow: 0 8px 22px rgba(0,199,191,.45);
  cursor: pointer;
  z-index: 41;
}
.ad-fab:hover { transform: scale(1.05); }

/* Backdrop for mobile drawer */
.ad-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,20,36,.6);
  z-index: 49;
}
body.ad-drawer-open .ad-backdrop { display: block; }
body.ad-drawer-open .ad-side {
  transform: translateX(0);
  width: var(--ad-side-w-expanded);
}
body.ad-drawer-open .ad-side .ad-side-brand span,
body.ad-drawer-open .ad-side .ad-nav-item span,
body.ad-drawer-open .ad-side .ad-side-foot-text { opacity: 1; }

/* =========================================================
   PLACEHOLDER "COMING SOON" PAGES
   ========================================================= */
.ad-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: var(--ad-surface);
  border: 1px dashed var(--ad-border);
  border-radius: var(--ad-radius);
}
.ad-soon-ico {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0,199,191,.15), rgba(46,230,224,.05));
  color: var(--ad-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin-bottom: 18px;
}
.ad-soon h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  margin: 0 0 6px;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}
.ad-soon p { color: var(--ad-text-muted); max-width: 420px; margin: 0 0 18px; }
.ad-soon-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 520px;
}
.ad-soon-tag {
  background: var(--ad-surface-2);
  border: 1px solid var(--ad-border);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: var(--ad-text-muted);
  font-weight: 600;
}

/* =========================================================
   LOGIN
   ========================================================= */
.ad-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--ad-bg);
}
@media (max-width: 991.98px) { .ad-login { grid-template-columns: 1fr; } }
.ad-login-art {
  position: relative;
  background:
    radial-gradient(at 20% 20%, rgba(46,230,224,.18) 0, transparent 50%),
    radial-gradient(at 80% 80%, rgba(122,77,255,.22) 0, transparent 50%),
    linear-gradient(135deg, #0B1424 0%, #142337 100%);
  color: #FFFFFF;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
@media (max-width: 991.98px) { .ad-login-art { display: none; } }
.ad-login-art::before {
  content: "";
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,230,224,.25), transparent 65%);
  top: 30%; left: -120px;
  filter: blur(40px);
}
.ad-login-art img.fe-logo { height: 36px; }
.ad-login-pitch h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.1;
}
.ad-login-pitch p { font-size: 1.05rem; opacity: .82; max-width: 460px; }
.ad-login-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}
.ad-login-stat strong {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--ad-accent);
  display: block;
}
.ad-login-stat span { font-size: 0.82rem; opacity: .7; }

.ad-login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.ad-login-card {
  width: 100%;
  max-width: 420px;
}
.ad-login-card .fe-logo-mob {
  display: none;
  height: 32px;
  margin-bottom: 18px;
  filter: brightness(0);
}
@media (max-width: 991.98px) { .ad-login-card .fe-logo-mob { display: block; } }
.ad-login-card h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.ad-login-card p.lead { color: var(--ad-text-muted); margin: 0 0 26px; }

.ad-role-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--ad-surface-2);
  border: 1px solid var(--ad-border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.ad-role-tab {
  padding: 9px 6px;
  border-radius: 9px;
  background: transparent;
  border: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--ad-text-muted);
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.ad-role-tab i { font-size: 1.1rem; }
.ad-role-tab.active {
  background: var(--ad-surface);
  color: var(--ad-primary);
  box-shadow: 0 1px 3px rgba(15,27,45,.08);
}

.ad-field { margin-bottom: 14px; }
.ad-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ad-text-muted);
  margin-bottom: 6px;
}
.ad-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--ad-border);
  background: var(--ad-surface);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.ad-field input:focus { border-color: var(--ad-primary); }
.ad-login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 18px;
}
.ad-login-row a { color: var(--ad-primary); font-weight: 600; }
.ad-login-card .ad-btn-primary {
  width: 100%;
  justify-content: center;
  height: 46px;
  font-size: 0.95rem;
}
.ad-login-sso {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ad-text-muted);
  margin: 18px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ad-login-sso::before, .ad-login-sso::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--ad-border);
}
.ad-sso-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ad-sso { padding: 10px; }

.ad-login-foot {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ad-text-muted);
  margin-top: 18px;
}
.ad-login-foot a { color: var(--ad-primary); font-weight: 600; }

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */
@media (max-width: 991.98px) {
  .ad-shell { grid-template-columns: 1fr; }
  .ad-side {
    position: fixed;
    top: 0; left: 0;
    width: var(--ad-side-w-expanded);
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .ad-side .ad-side-brand span,
  .ad-side .ad-nav-item span,
  .ad-side .ad-side-foot-text { opacity: 1 !important; transform: none !important; }
  .ad-side .ad-side-pin { display: none !important; }
  .ad-burger { display: inline-flex; }
  .ad-search { display: none; }
  .ad-topbar-avatar div { display: none; }
  .ad-bottom { display: block; }
  .ad-fab { display: inline-flex; }
  .ad-content { padding-bottom: calc(var(--ad-bottom-h) + 24px); }
  .ad-topbar-right .ad-icon-btn:not(.keep) { display: none; }
}
@media (max-width: 575.98px) {
  .ad-content { padding: 18px; padding-bottom: calc(var(--ad-bottom-h) + 18px); }
  .ad-card { padding: 18px; }
  .ad-table thead { display: none; }
  .ad-table, .ad-table tbody, .ad-table tr, .ad-table td { display: block; width: 100%; }
  .ad-table tbody tr {
    border: 1px solid var(--ad-border);
    border-radius: 10px;
    padding: 8px 4px;
    margin-bottom: 10px;
    background: var(--ad-surface);
  }
  .ad-table tbody td {
    padding: 8px 14px;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .ad-table tbody td::before {
    content: attr(data-lbl);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ad-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
}
