/* ==========================================================
   WCI Lebanon Admin — UI1-inspired light theme
   Sidebar fixed · Topbar fixed · Only .content scrolls
   ========================================================== */
:root{
  --bg:#f3f5f8;
  --surface:#ffffff;
  --sidebar-bg:#ffffff;
  --text:#1a1d2e;
  --text-2:#3b3f54;
  --muted:#8a8fa3;
  --muted-2:#b3b7c5;
  --line:#eef0f5;
  --line-2:#e3e6ee;
  --accent:#2d8cf0;
  --accent-soft:rgba(45,140,240,.10);
  --accent-soft-2:rgba(45,140,240,.18);
  --dark:#1a1d2e;
  --green:#10b981;
  --green-soft:rgba(16,185,129,.10);
  --red:#ef4444;
  --red-soft:rgba(239,68,68,.10);
  --amber:#f59e0b;
  --amber-soft:rgba(245,158,11,.10);
  --purple:#8b5cf6;
  --purple-soft:rgba(139,92,246,.10);
  --radius:18px;
  --radius-lg:22px;
  --shadow-xs:0 1px 2px rgba(20,30,60,.04);
  --shadow:0 1px 2px rgba(20,30,60,.05), 0 4px 14px -8px rgba(20,30,60,.10);
  --shadow-lg:0 20px 60px -28px rgba(20,30,60,.22);
  --sidebar-w:248px;
  --topbar-h:72px;
}

/* ---------- BASE ---------- */
*{box-sizing:border-box}
html,body{
  margin:0;padding:0;height:100%;
  background:var(--bg);color:var(--text);
  font-family:'DM Sans','Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow:hidden;              /* CRITICAL — page itself never scrolls */
  -webkit-text-size-adjust:100%;text-size-adjust:100%;
  touch-action:pan-x pan-y;overscroll-behavior:none;
}
body{font-size:14px;line-height:1.55}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font-family:inherit;cursor:pointer}
i[data-lucide],[data-lucide] svg{display:inline-flex;width:1em;height:1em;flex-shrink:0;vertical-align:-.125em}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#dadde6;border-radius:99px;border:2px solid transparent;background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:#c0c4d0;background-clip:content-box;border:2px solid transparent}
::-webkit-scrollbar-track{background:transparent}

/* ---------- LAYOUT (locked scroll model) ---------- */
.app{
  display:grid;
  grid-template-columns:var(--sidebar-w) 1fr;
  height:100vh;
  width:100vw;
  overflow:hidden;
}

/* SIDEBAR — fixed, internally scrollable */
.sidebar{
  background:var(--sidebar-bg);
  border-right:1px solid var(--line);
  height:100vh;
  overflow-y:auto;
  display:flex;flex-direction:column;
  padding:18px 14px;
  z-index:30;
  position:relative;
}
.sidebar .brand{
  display:flex;align-items:center;gap:10px;
  padding:6px 8px 18px;margin-bottom:6px;
  border-bottom:1px solid var(--line);
}
.sidebar .brand img{width:34px;height:34px;object-fit:contain}
.sidebar .brand .nm{font-weight:700;font-size:15px;letter-spacing:-.01em;color:var(--text)}
.sidebar .brand .sub{font-size:11px;color:var(--muted);margin-top:1px}

.nav-section{
  margin:18px 10px 6px;
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.18em;
  color:var(--muted-2);
  font-weight:600;
}
.side-link, .side-toggle{
  display:flex;align-items:center;gap:12px;
  width:100%;
  padding:10px 12px;border-radius:12px;
  color:var(--text-2);font-size:13.5px;font-weight:500;
  background:transparent;border:0;text-align:left;
  transition:background .18s, color .18s;
  position:relative;
}
.side-link:hover, .side-toggle:hover{background:#f6f7fb;color:var(--text)}
.side-link .ico, .side-toggle .ico{
  width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;color:var(--muted);font-size:16px;
}
.side-link .badge{
  margin-left:auto;background:var(--accent);color:#fff;border-radius:99px;
  padding:2px 8px;font-size:10.5px;font-weight:600;
}
.side-link.active{
  background:var(--accent-soft);color:var(--accent);font-weight:600;
}
.side-link.active .ico{color:var(--accent)}
.side-link.active::before{
  content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);
  width:4px;height:22px;background:var(--accent);border-radius:0 4px 4px 0;
}

/* Dropdown groups */
.side-toggle .chev{
  margin-left:auto;color:var(--muted-2);width:16px;height:16px;
  transition:transform .25s ease;
}
.side-toggle.open .chev{transform:rotate(180deg)}
.side-toggle.active-parent{color:var(--text);font-weight:600}
.side-toggle.active-parent .ico{color:var(--accent)}
.side-children{
  max-height:0;overflow:hidden;
  transition:max-height .28s ease;
  margin-left:8px;padding-left:18px;
  border-left:1px solid var(--line-2);
  margin-top:2px;
}
.side-sublink{
  display:flex;align-items:center;gap:10px;
  padding:8px 12px;border-radius:10px;
  color:var(--muted);font-size:13px;font-weight:500;
  position:relative;
  transition:color .15s, background .15s;
}
.side-sublink::before{
  content:"";width:6px;height:6px;border-radius:50%;background:var(--muted-2);flex-shrink:0;
  transition:background .2s, transform .2s;
}
.side-sublink:hover{color:var(--text);background:#f6f7fb}
.side-sublink:hover::before{background:var(--accent)}
.side-sublink.active{color:var(--accent);font-weight:600;background:var(--accent-soft)}
.side-sublink.active::before{background:var(--accent);transform:scale(1.4)}

.sidebar .foot{
  margin-top:auto;padding:14px 8px 4px;
  border-top:1px solid var(--line);
  color:var(--muted);font-size:11.5px;
}

/* ---------- MAIN (flex column, topbar fixed, content scrolls) ---------- */
.main{
  display:flex;flex-direction:column;
  height:100vh;
  min-width:0;
  overflow:hidden;            /* important — child .content owns the scroll */
}

.topbar{
  flex-shrink:0;
  background:var(--surface);
  border-bottom:1px solid var(--line);
  height:var(--topbar-h);
  padding:0 26px;
  display:flex;align-items:center;gap:14px;
  z-index:20;
}
.topbar .search{
  flex:1;max-width:440px;
  display:flex;align-items:center;gap:10px;
  background:#f3f5f8;border:1px solid transparent;
  padding:10px 16px;border-radius:99px;
  transition:.18s;
}
.topbar .search:focus-within{background:#fff;border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.topbar .search i{color:var(--muted);width:16px;height:16px}
.topbar .search input{flex:1;border:0;outline:0;background:transparent;font:inherit;font-size:13.5px;color:var(--text)}
.topbar .actions{display:flex;align-items:center;gap:10px;margin-left:auto}

.btn-icon{
  width:40px;height:40px;border-radius:99px;
  background:#f3f5f8;border:1px solid transparent;
  display:grid;place-items:center;color:var(--text-2);position:relative;
  transition:.15s;
}
.btn-icon i{width:18px;height:18px}
.btn-icon:hover{background:var(--accent-soft);color:var(--accent)}
.btn-icon .dot{
  position:absolute;top:9px;right:9px;
  width:8px;height:8px;border-radius:50%;background:var(--red);
  box-shadow:0 0 0 2px #fff;
}

.user-chip{
  display:flex;align-items:center;gap:10px;
  background:transparent;
  border-radius:99px;padding:4px 14px 4px 4px;cursor:pointer;
  transition:background .15s;
}
.user-chip:hover{background:#f3f5f8}
.user-chip .av{
  width:36px;height:36px;border-radius:50%;
  background:linear-gradient(135deg,#2d8cf0,#5b6df0);
  color:#fff;display:grid;place-items:center;font-weight:600;font-size:13.5px;
  position:relative;
}
.user-chip .av::after{
  content:"";position:absolute;bottom:0;right:0;
  width:10px;height:10px;background:var(--green);border-radius:50%;border:2px solid #fff;
}
.user-chip .nm{font-size:13.5px;font-weight:600;color:var(--text);line-height:1.1}
.user-chip .st{font-size:11px;color:var(--green);font-weight:500;display:flex;align-items:center;gap:4px}
.user-chip .st::before{content:"";width:5px;height:5px;background:var(--green);border-radius:50%}

.menu-toggle{
  display:none;width:40px;height:40px;border-radius:12px;
  background:#f3f5f8;border:1px solid transparent;
  align-items:center;justify-content:center;color:var(--text);
}

/* CONTENT (the only scrollable region) */
.content{
  flex:1;
  overflow-y:auto;
  overflow-x:hidden;            /* never let pages bleed sideways */
  padding:26px 28px 60px;
  min-width:0;
  width:100%;
}
.content > *{min-width:0;max-width:100%}
.card,.tbl-wrap{min-width:0;max-width:100%}

/* Any table inside a card-body becomes horizontally scrollable on small screens */
.card-body{max-width:100%}
.card-body > .tbl,
.card-body > table.tbl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
.card-body > .tbl > thead,.card-body > .tbl > tbody{display:table;width:100%;min-width:560px;table-layout:auto}
.tbl-wrap{overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}

/* ---------- PAGE HEAD ---------- */
.page-head{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:18px;flex-wrap:wrap;margin-bottom:24px;
}
.page-head h1{margin:0 0 4px;font-size:24px;font-weight:700;letter-spacing:-.02em;color:var(--text)}
.page-head .sub{color:var(--muted);font-size:13.5px}
.page-head .actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* ---------- BUTTONS ---------- */
.btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 18px;border-radius:99px;
  font-size:13.5px;font-weight:500;border:1px solid transparent;cursor:pointer;
  transition:.15s;
  text-decoration:none;
  white-space:nowrap;
}
.btn i{width:15px;height:15px}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:#1f7ce0;box-shadow:0 8px 18px -8px rgba(45,140,240,.55)}
.btn-dark{background:var(--text);color:#fff}
.btn-dark:hover{background:#000}
.btn-outline{background:transparent;color:var(--text);border-color:var(--line-2)}
.btn-outline:hover{background:var(--accent);color:#fff;border-color:var(--accent)}
.btn-soft{background:#f3f5f8;color:var(--text);border:1px solid transparent}
.btn-soft:hover{background:#e9ecf4}
.btn-danger{background:var(--red);color:#fff}
.btn-danger:hover{background:#dc2626}
.btn-success{background:var(--green);color:#fff}
.btn-success:hover{background:#0ea271}
.btn-sm{padding:7px 12px;font-size:12.5px}
.btn-lg{padding:13px 22px;font-size:14.5px}
.btn-ghost{background:transparent;color:var(--text-2)}
.btn-ghost:hover{background:#f3f5f8;color:var(--text)}

/* ---------- CARDS ---------- */
.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-xs);
}
.card-pad{padding:22px}
.card-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:18px 22px;border-bottom:1px solid var(--line);
}
.card-head h3{margin:0;font-size:15px;font-weight:600;color:var(--text)}
.card-body{padding:22px}
.card-foot{padding:14px 22px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:13px}

/* ---------- STATS ---------- */
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.stat{
  padding:20px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow-xs);position:relative;overflow:hidden;
  transition:transform .2s, box-shadow .2s;
}
.stat:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.stat .ico{
  width:44px;height:44px;border-radius:14px;
  display:grid;place-items:center;font-size:18px;margin-bottom:14px;
}
.stat .ico i{width:20px;height:20px}
.stat .ico.blue{background:var(--accent-soft);color:var(--accent)}
.stat .ico.green{background:var(--green-soft);color:var(--green)}
.stat .ico.amber{background:var(--amber-soft);color:var(--amber)}
.stat .ico.purple{background:var(--purple-soft);color:var(--purple)}
.stat .ico.red{background:var(--red-soft);color:var(--red)}
.stat .lbl{font-size:12.5px;color:var(--muted);font-weight:500;text-transform:uppercase;letter-spacing:.04em}
.stat .val{font-size:26px;font-weight:700;letter-spacing:-.02em;margin-top:6px;color:var(--text)}
.stat .delta{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;margin-top:10px;font-weight:600}
.stat .delta i{width:13px;height:13px}
.stat .delta.up{color:var(--green)}
.stat .delta.down{color:var(--red)}

/* ---------- GRIDS ---------- */
.row-2{display:grid;grid-template-columns:1.55fr 1fr;gap:18px}
.row-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.row-4{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}

/* ---------- TABLES ---------- */
.tbl-wrap{
  overflow:auto;border:1px solid var(--line);
  border-radius:var(--radius);background:var(--surface);
  box-shadow:var(--shadow-xs);
}
.tbl{width:100%;border-collapse:collapse;min-width:640px}
.tbl thead th{
  position:sticky;top:0;background:#fafbfd;
  text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.07em;
  color:var(--muted);font-weight:600;padding:13px 18px;
  border-bottom:1px solid var(--line);white-space:nowrap;
}
.tbl tbody td{padding:14px 18px;border-bottom:1px solid var(--line);font-size:13.5px;vertical-align:middle;color:var(--text-2)}
.tbl tbody tr:last-child td{border-bottom:0}
.tbl tbody tr{transition:background .15s}
.tbl tbody tr:hover{background:#f9fafd}
.tbl strong{color:var(--text)}

/* ---------- PILLS ---------- */
.pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:4px 10px;border-radius:99px;
  font-size:11px;font-weight:600;
  background:rgba(0,0,0,.05);color:var(--text-2);
}
.pill .dot{width:6px;height:6px;border-radius:50%;background:currentColor}
.pill.green {background:var(--green-soft); color:#047857}
.pill.red   {background:var(--red-soft);   color:#b91c1c}
.pill.amber {background:var(--amber-soft); color:#b45309}
.pill.blue  {background:var(--accent-soft);color:var(--accent)}
.pill.purple{background:var(--purple-soft);color:#6d28d9}

/* ---------- FORMS ---------- */
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.form-grid.three{grid-template-columns:repeat(3,1fr)}
.form-grid.four {grid-template-columns:repeat(4,1fr)}
.form-row{display:flex;flex-direction:column;gap:6px}
.form-row label{font-size:12px;font-weight:500;color:var(--text-2)}
.input,.select,textarea.input{
  width:100%;padding:11px 14px;border-radius:12px;
  background:#fff;border:1px solid var(--line-2);
  color:var(--text);font:inherit;font-size:13.5px;outline:none;
  transition:.15s;
  box-sizing:border-box;
  min-height:44px;              /* uniform height: text/date/time/select all match */
  line-height:1.3;
  -webkit-appearance:none;appearance:none;
  display:block;
}
.select{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8fa3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat:no-repeat;background-position:right 14px center;background-size:14px;
  padding-right:38px;
}
input[type="date"].input,input[type="time"].input,input[type="datetime-local"].input{
  -webkit-appearance:none;appearance:none;
  min-height:44px;
}
input[type="date"].input::-webkit-calendar-picker-indicator,
input[type="time"].input::-webkit-calendar-picker-indicator{opacity:.55;cursor:pointer}
input[type="color"].input{padding:4px;height:44px}
.input:focus,.select:focus,textarea.input:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 4px var(--accent-soft);
}
.input::placeholder{color:var(--muted-2)}
textarea.input{resize:vertical;min-height:110px}
.hint{font-size:12px;color:var(--muted)}

/* ---------- ALERTS ---------- */
.alert{padding:12px 16px;border-radius:14px;font-size:13.5px;border:1px solid var(--line);margin-bottom:14px;display:flex;align-items:center;gap:10px}
.alert.success{background:var(--green-soft);border-color:#a7f3d0;color:#065f46}
.alert.error  {background:var(--red-soft);  border-color:#fecaca;color:#7f1d1d}
.alert.info   {background:var(--accent-soft);border-color:#bfdbfe;color:#1d4ed8}
.alert.warn   {background:var(--amber-soft);border-color:#fde68a;color:#92400e}

/* ---------- LOGIN ---------- */
.login-wrap{
  height:100vh;width:100vw;display:grid;place-items:center;padding:24px;
  background:
    radial-gradient(900px 600px at 90% 0%, rgba(45,140,240,.10), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(139,92,246,.08), transparent 60%),
    var(--bg);
}
.login-card{
  width:100%;max-width:420px;background:#fff;border:1px solid var(--line);
  border-radius:24px;padding:36px;box-shadow:var(--shadow-lg);
}
.login-card .logo{display:flex;align-items:center;gap:10px;margin-bottom:22px}
.login-card .logo img{width:36px;height:36px}
.login-card h1{font-size:22px;margin:0 0 6px;letter-spacing:-.01em}
.login-card .muted{color:var(--muted);font-size:13px;margin-bottom:22px}

/* ---------- PAGINATION ---------- */
.pager{display:flex;align-items:center;gap:6px;justify-content:center;margin-top:18px}
.pager a,.pager span{padding:7px 12px;border-radius:10px;border:1px solid var(--line-2);background:#fff;font-size:13px;color:var(--text)}
.pager .cur{background:var(--accent);color:#fff;border-color:var(--accent)}

/* ---------- LOADER ---------- */
#loader{position:fixed;inset:0;z-index:9999;background:#fff;display:flex;align-items:center;justify-content:center;transition:opacity .5s, visibility .5s}
#loader.hide{opacity:0;visibility:hidden}
#loader .wrap{width:96px;height:96px;display:grid;place-items:center;position:relative}
#loader img{width:48px;height:48px;object-fit:contain}
#loader .ring{position:absolute;inset:0;border-radius:50%;border:1px solid var(--line-2)}
#loader .ring::before{content:"";position:absolute;inset:-1px;border-radius:50%;border:2px solid transparent;border-top-color:var(--accent);border-right-color:var(--accent-soft-2);animation:spin 1.1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- TABS ---------- */
.tabs{
  display:flex;gap:4px;background:#f3f5f8;
  border-radius:99px;padding:4px;width:max-content;
  overflow:auto;max-width:100%;
}
.tabs button,.tabs a{
  border:0;background:transparent;padding:8px 18px;border-radius:99px;
  font-size:13px;font-weight:500;color:var(--muted);cursor:pointer;white-space:nowrap;
  transition:.15s;text-decoration:none;
}
.tabs button:hover, .tabs a:hover{color:var(--text)}
.tabs button.active, .tabs a.active{background:#fff;color:var(--text);box-shadow:var(--shadow-xs)}

/* ---------- MODAL ---------- */
.modal-back{
  position:fixed;inset:0;background:rgba(20,30,60,.45);backdrop-filter:blur(4px);
  display:none;align-items:center;justify-content:center;z-index:80;padding:20px;
}
.modal-back.open{display:flex}
.modal{
  width:100%;max-width:600px;background:#fff;border-radius:22px;
  border:1px solid var(--line);box-shadow:var(--shadow-lg);
  overflow:hidden;max-height:92vh;display:flex;flex-direction:column;
  animation:modalIn .25s ease;
}
@keyframes modalIn{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}
.modal .h{padding:20px 24px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}
.modal .h h3{margin:0;font-size:16px;font-weight:600}
.modal .b{padding:24px;overflow:auto}
.modal .f{padding:14px 24px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}

/* ---------- DROPDOWN PANEL (topbar user menu) ---------- */
.dropdown-panel{
  position:absolute;background:#fff;border:1px solid var(--line);
  border-radius:14px;padding:6px;min-width:220px;
  box-shadow:var(--shadow-lg);display:none;z-index:50;
}
.dropdown-panel.open{display:block}
.dropdown-panel a{
  display:flex;align-items:center;gap:10px;padding:10px 12px;
  border-radius:10px;font-size:13.5px;color:var(--text);
}
.dropdown-panel a:hover{background:#f3f5f8}
.dropdown-panel a i{width:15px;height:15px;color:var(--muted)}
.dropdown-panel hr{border:0;border-top:1px solid var(--line);margin:4px 0}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px){
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .row-2{grid-template-columns:1fr}
  .row-3{grid-template-columns:1fr 1fr}
  .form-grid.four{grid-template-columns:1fr 1fr}
  .form-grid.three{grid-template-columns:1fr 1fr}
}
@media (max-width: 880px){
  :root{--sidebar-w:0px}
  .app{grid-template-columns:1fr}
  .sidebar{
    position:fixed;left:-280px;top:0;width:260px;height:100vh;
    transition:left .3s ease;box-shadow:var(--shadow-lg);
  }
  .sidebar.open{left:0}
  .menu-toggle{display:inline-flex}
  .content{padding:16px 14px 80px}
  .topbar{padding:0 14px;gap:8px}
  .topbar .actions{gap:6px}
  .btn-icon{width:38px;height:38px}
  .stat-grid{grid-template-columns:1fr 1fr;gap:12px}
  .form-grid,.form-grid.three,.form-grid.four{grid-template-columns:1fr}
  .row-3{grid-template-columns:1fr}
  .row-4{grid-template-columns:1fr 1fr}
  .user-chip .nm-wrap, .user-chip .nm{display:none}
  .user-chip{padding:0;background:transparent}
  .card-head,.card-body,.card-foot,.card-pad{padding:14px}
  .card-head{flex-wrap:wrap;gap:8px}
  .modal{max-width:calc(100vw - 24px);border-radius:18px}
  .modal .h,.modal .b,.modal .f{padding:14px 16px}
  .page-head{align-items:stretch;flex-direction:column;gap:12px;margin-bottom:16px}
  .page-head .actions{width:100%;justify-content:flex-start}
  .page-head .actions .btn{flex:1 1 auto}
  .page-head h1{font-size:20px}
  .tabs{width:100%;justify-content:flex-start}
  .tbl{min-width:560px}            /* table still scrolls inside .tbl-wrap */
  .tbl thead th, .tbl tbody td{padding:11px 12px;font-size:12.5px}
  .stat{padding:16px}
  .stat .val{font-size:22px}
}
@media (max-width: 520px){
  .stat-grid{grid-template-columns:1fr}
  .row-4{grid-template-columns:1fr}
  .topbar .search{display:none}
  .topbar{height:60px}
  :root{--topbar-h:60px}
}

/* Hero card */
.hero-card{
  background:linear-gradient(135deg,#1a1d2e 0%, #2d3450 100%);
  color:#fff;border-radius:var(--radius-lg);
  padding:28px;position:relative;overflow:hidden;
}
.hero-card h2{font-size:24px;font-weight:700;letter-spacing:-.02em;margin:0 0 8px}
.hero-card p{color:rgba(255,255,255,.7);font-size:13.5px;margin:0 0 18px}
.hero-card .actions{display:flex;gap:10px;flex-wrap:wrap}

/* Empty state */
.empty{padding:40px 20px;text-align:center;color:var(--muted)}
.empty i{width:32px;height:32px;color:var(--muted-2);margin-bottom:10px}

/* Avatar circle utility */
.av-circle{
  width:34px;height:34px;border-radius:50%;
  background:linear-gradient(135deg,#2d8cf0,#5b6df0);
  color:#fff;display:grid;place-items:center;font-weight:600;font-size:12px;flex-shrink:0;
}

/* ---------- AUDIO PLAYER (global, fixed bottom) ---------- */
.wci-audio{
  position:fixed;left:50%;bottom:14px;transform:translateX(-50%) translateY(140%);
  width:min(720px, calc(100vw - 28px));
  background:#1a1d2e;color:#fff;
  border-radius:18px;box-shadow:0 24px 60px -16px rgba(20,30,60,.45),0 4px 14px -4px rgba(20,30,60,.2);
  padding:10px 14px;display:flex;align-items:center;gap:12px;
  z-index:90;transition:transform .35s cubic-bezier(.2,.8,.2,1);
  border:1px solid rgba(255,255,255,.06);
}
.wci-audio.show{transform:translateX(-50%) translateY(0)}
.wci-audio .ap-art{
  width:42px;height:42px;border-radius:12px;flex-shrink:0;
  background:linear-gradient(135deg,#2d8cf0,#8b5cf6);
  display:grid;place-items:center;color:#fff;
}
.wci-audio .ap-art i{width:20px;height:20px}
.wci-audio .ap-info{min-width:0;flex:1}
.wci-audio .ap-title{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#fff}
.wci-audio .ap-sub{font-size:11px;color:rgba(255,255,255,.55);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wci-audio .ap-ctrls{display:flex;align-items:center;gap:6px}
.wci-audio .ap-btn{
  width:36px;height:36px;border-radius:50%;
  background:rgba(255,255,255,.06);border:0;color:#fff;
  display:grid;place-items:center;cursor:pointer;transition:.15s;
}
.wci-audio .ap-btn:hover{background:rgba(255,255,255,.14)}
.wci-audio .ap-btn.play{background:var(--accent);width:42px;height:42px}
.wci-audio .ap-btn.play:hover{background:#1f7ce0}
.wci-audio .ap-btn i{width:16px;height:16px}
.wci-audio .ap-bar{
  flex:1;display:flex;align-items:center;gap:8px;min-width:120px;
  font-size:11px;color:rgba(255,255,255,.55);
}
.wci-audio .ap-bar .ap-track{
  flex:1;height:4px;border-radius:99px;background:rgba(255,255,255,.12);
  position:relative;cursor:pointer;
}
.wci-audio .ap-bar .ap-fill{
  position:absolute;inset:0 auto 0 0;width:0;background:var(--accent);border-radius:99px;
}
.wci-audio .ap-close{
  width:30px;height:30px;border-radius:50%;background:transparent;border:0;color:rgba(255,255,255,.55);
  display:grid;place-items:center;cursor:pointer;
}
.wci-audio .ap-close:hover{color:#fff;background:rgba(255,255,255,.08)}

/* Floating "show audio player" toggle button when player is open */
.wci-audio-toggle{
  position:fixed;right:18px;bottom:18px;z-index:85;
  width:48px;height:48px;border-radius:50%;
  background:var(--accent);color:#fff;border:0;
  display:none;place-items:center;cursor:pointer;
  box-shadow:0 12px 30px -8px rgba(45,140,240,.55);
}
.wci-audio-toggle.show{display:grid}
.wci-audio-toggle i{width:20px;height:20px}

@media (max-width:520px){
  .wci-audio{padding:8px 10px;gap:8px;border-radius:14px}
  .wci-audio .ap-art{width:36px;height:36px}
  .wci-audio .ap-bar{display:none}        /* keep player compact on tiny screens */
  .wci-audio .ap-btn{width:32px;height:32px}
  .wci-audio .ap-btn.play{width:38px;height:38px}
}

/* Sermon list (dashboard widget) */
.sermon-row{
  display:flex;align-items:center;gap:12px;
  padding:10px 12px;border-radius:12px;cursor:pointer;
  transition:background .15s;
}
.sermon-row:hover{background:#f6f7fb}
.sermon-row .play-ico{
  width:36px;height:36px;border-radius:50%;
  background:var(--accent-soft);color:var(--accent);
  display:grid;place-items:center;flex-shrink:0;
}
.sermon-row.playing .play-ico{background:var(--accent);color:#fff}
.sermon-row .info{min-width:0;flex:1}
.sermon-row .info .t{font-size:13.5px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sermon-row .info .s{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
