/* =========================
   Atlas UI - Design Tokens
   ========================= */
:root{
  /* Brand */
  --brand: #0b6b5a;
  --brand-600: #075a4b;
  --brand-100: #d7f0ea;

  /* Base */
  --bg: #f5f2ee;
  --surface: #ffffff;
  --surface-2: #fbfaf8;
  --ink: #1f2937;
  --muted: #6b7280;
  --border: #e7e2da;

  --shadow: 0 10px 30px rgba(17,24,39,.08);
  --shadow-sm: 0 6px 18px rgba(17,24,39,.06);

  --radius: 18px;
  --radius-sm: 14px;

  --focus: rgba(11,107,90,.18);

  --sidebar-w: 280px;
  --topbar-h: 64px;
}

/* ===== Base ===== */
html, body { height: 100%; }
body{
  background: radial-gradient(1200px 600px at 40% 0%, #f8f1e8 0%, var(--bg) 55%, #f6f4f1 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

a{ color: inherit; }
small, .text-muted{ color: var(--muted) !important; }

.hr-soft{
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(17,24,39,.12), transparent);
  margin: 16px 0;
}

/* ===== Layout ===== */
.app{
  min-height: 100vh;
  display: flex;
}

.sidebar{
  width: var(--sidebar-w);
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: #fffaf2;
  backdrop-filter: blur(10px);
}

.content{
  flex: 1;
  padding: 18px;
}

.topbar{
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.62);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Mobile: sidebar becomes offcanvas */
@media (max-width: 991.98px){
  .app{ display: block; }
  .sidebar{ display: none; }
  .content{ padding: 14px; }
}

/* ===== Brand / Nav ===== */
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 14px;
}

.brand-mark{
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 10px 25px rgba(11,107,90,.25);
  font-weight: 700;
}
.brand-title{ font-weight: 800; line-height: 1.1; }
.brand-sub{ color: var(--muted); font-size: .9rem; }

.nav-pill{
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.nav-pill:hover{
  background: rgba(11,107,90,.08);
}
.nav-pill.active{
  background: rgba(11,107,90,.12);
  color: var(--brand-600);
}
.nav-icon{
  width: 34px; height: 34px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.75);
  border: 1px solid var(--border);
}
.nav-icon .ph-duotone {
    font-size: 23px;
}
.sidebar-footer{
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--border);
}

/* ===== Cards ===== */
.card-soft{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.card-flat{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.section-title{
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0;
}
.section-sub{
  color: var(--muted);
  margin-top: 4px;
}

/* Stats */
.stat{
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.62);
}
.stat .label{
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
}
.stat .value{
  font-weight: 900;
  font-size: 2rem;
  line-height: 1.1;
}
.stat .hint{
  margin-top: 6px;
  font-weight: 700;
  color: var(--muted);
}
.stat .hint.positive{ color: #0f8a54; }
.stat .hint.warn{ color: #b45309; }
.stat .hint.danger{ color: #b42318; }

/* ===== Buttons ===== */
.btn{
  border-radius: 999px;
  font-weight: 700;
}
.btn-brand{
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-brand:hover{
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}
.btn-ghost{
  background: rgba(255,255,255,.7);
  border: 1px solid var(--border);
}
.btn-ghost:hover{
  background: rgba(11,107,90,.08);
  border-color: rgba(11,107,90,.25);
}

/* ===== Form Controls ===== */
.form-control, .form-select{
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.85);
  padding: 10px 12px;
}
.form-control:focus, .form-select:focus{
  border-color: rgba(11,107,90,.45);
  box-shadow: 0 0 0 .25rem var(--focus);
}

.input-icon{
  position: relative;
}
.input-icon .bi{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.input-icon .form-control{
  padding-left: 38px;
}

/* ===== Badges ===== */
.badge-soft{
  border-radius: 999px;
  padding: .45rem .65rem;
  font-weight: 800;
  border: 1px solid transparent;
}
.badge-green{
  background: rgba(16,185,129,.12);
  color: #067647;
  border-color: rgba(16,185,129,.18);
}
.badge-gray{
  background: rgba(107,114,128,.10);
  color: #374151;
  border-color: rgba(107,114,128,.18);
}
.badge-amber{
  background: rgba(245,158,11,.12);
  color: #92400e;
  border-color: rgba(245,158,11,.18);
}
.badge-red{
  background: rgba(239,68,68,.12);
  color: #991b1b;
  border-color: rgba(239,68,68,.18);
}

/* ===== Table ===== */
.table-wrap{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.7);
}
.table{
  margin-bottom: 0;
}
.table thead th{
  font-size: .85rem;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: .03em;
  border-bottom: 1px solid var(--border);
}
.table tbody td{
  vertical-align: middle;
  border-color: rgba(231,226,218,.75);
}
.table tbody tr:hover{
  background: rgba(11,107,90,.06);
}

/* Responsive horizontal scroll for table on small devices */
.table-responsive{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Utility ===== */
.kbd-dot{
  width: 8px; height: 8px;
  border-radius: 999px;
  display: inline-block;
  background: var(--brand);
}
/* HTML: <div class="loader"></div> */
.loader_vwe {
  width: 15px;
  aspect-ratio: 1;
  border-radius: 50%;
  animation: l5 1s infinite linear alternate;
  left: 50%;
  position: relative;
}
@keyframes l5 {
    0%  {box-shadow: 20px 0 #000, -20px 0 #0002;background: #000 }
    33% {box-shadow: 20px 0 #000, -20px 0 #0002;background: #0002}
    66% {box-shadow: 20px 0 #0002,-20px 0 #000; background: #0002}
    100%{box-shadow: 20px 0 #0002,-20px 0 #000; background: #000 }
}