:root{
  --bg:#f3f7f6;
  --card:#ffffff;
  --line:#e7ecea;
  --text:#14231e;
  --muted:#6b7c76;
  --primary:#146a53;
  --primary-2:#0f5945;
  --accent:#dff3ec;
  --danger:#c53d3d;
  --warning:#d99022;
  --shadow:0 10px 30px rgba(16,31,25,.06);
  --radius:22px;
}
*{box-sizing:border-box}
body{margin:0;background:linear-gradient(180deg,#eef5f3 0%,#f7faf9 100%);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}
a{text-decoration:none}
.app-shell{display:flex;min-height:100vh}
.sidebar{width:280px;background:#fff;border-right:1px solid var(--line);padding:24px 18px;display:flex;flex-direction:column;gap:24px;position:sticky;top:0;height:100vh}
.brand-box{display:flex;align-items:center;gap:14px;padding:10px}
.brand-mark{width:52px;height:52px;border-radius:16px;background:linear-gradient(135deg,var(--primary),#1f8a6c);display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.4rem;box-shadow:0 12px 24px rgba(20,106,83,.25)}
.brand-title{font-weight:800;font-size:1.1rem}
.brand-subtitle{color:var(--muted);font-size:.9rem}
.side-nav{gap:6px}
.side-nav .nav-link{border-radius:16px;padding:12px 14px;color:#254137;font-weight:600;display:flex;align-items:center;gap:10px}
.side-nav .nav-link:hover,.side-nav .nav-link.active{background:linear-gradient(90deg,#e7f5f0,#f3fbf8);color:var(--primary)}
.sidebar-card{background:linear-gradient(180deg,#f6fbf9,#edf7f3);border:1px solid #e0efea;border-radius:20px;padding:16px}
.status-dot{width:10px;height:10px;border-radius:50%;display:inline-block;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.12)}
.main-wrap{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{display:flex;align-items:center;gap:18px;padding:22px 28px 10px 28px}
.eyebrow{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.page-heading{font-size:1.55rem;font-weight:800;margin:2px 0 0}
.topbar-actions{display:flex;align-items:center;gap:10px}
.icon-btn{width:42px;height:42px;border-radius:14px;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;background:#fff;color:var(--text)}
.icon-btn:hover{background:#f8fbfa}
.user-pill{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);padding:8px 12px;border-radius:18px}
.user-avatar,.avatar{width:42px;height:42px;border-radius:14px;background:var(--accent);display:flex;align-items:center;justify-content:center;color:var(--primary);font-weight:800}
.content-area{padding:10px 28px 28px}
.card{border:1px solid rgba(231,236,234,.85);border-radius:var(--radius);box-shadow:var(--shadow);background:var(--card)}
.card-body{padding:1.35rem}
.soft-card{background:linear-gradient(180deg,#ffffff,#fbfefd)}
.hero-card{background:linear-gradient(135deg,#125742,#1e8264 58%,#38a887);color:#fff;overflow:hidden;position:relative}
.hero-card::after{content:"";position:absolute;right:-50px;top:-50px;width:180px;height:180px;background:rgba(255,255,255,.08);border-radius:50%}
.hero-card .muted-white{color:rgba(255,255,255,.78)}
.metric-card{position:relative;overflow:hidden}
.metric-label{color:var(--muted);font-weight:600;font-size:.92rem}
.metric-value{font-size:2rem;font-weight:800;line-height:1.1;margin-top:8px}
.metric-icon{position:absolute;right:18px;top:18px;width:48px;height:48px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:var(--accent);color:var(--primary);font-size:1.15rem}
.metric-foot{margin-top:10px;color:var(--muted);font-size:.87rem}
.section-title{font-weight:800;font-size:1.05rem;margin:0}
.section-subtitle{color:var(--muted);font-size:.9rem;margin-top:4px}
.table{margin-bottom:0}
.table thead th{background:#f5faf8;border-bottom:1px solid var(--line);color:#5b6d67;font-weight:700;white-space:nowrap}
.table>:not(caption)>*>*{padding:.9rem .85rem;border-color:#edf1ef;vertical-align:middle}
.table tbody tr:hover{background:#fbfefd}
.form-control,.form-select,.btn{border-radius:14px}
.form-control,.form-select{border-color:#dfe7e4;padding:.8rem .95rem}
.form-control:focus,.form-select:focus{border-color:#99cdbd;box-shadow:0 0 0 .2rem rgba(20,106,83,.12)}
label{font-weight:700;font-size:.92rem;margin-bottom:.45rem;color:#2b4038}
.btn-success,.bg-success{background-color:var(--primary)!important;border-color:var(--primary)!important}
.btn-success:hover{background-color:var(--primary-2)!important;border-color:var(--primary-2)!important}
.btn-outline-success{border-color:#b9d8ce;color:var(--primary)}
.btn-outline-success:hover{background:var(--primary);border-color:var(--primary);color:#fff}
.badge{border-radius:999px;padding:.5rem .72rem;font-weight:700}
.alert-modern{border:none;border-radius:18px;box-shadow:var(--shadow)}
.private{background:#fff7f7;border:1px solid #f2d7d7;border-left:4px solid #d15252;padding:14px;border-radius:16px}
.photo-thumb{width:100%;height:170px;object-fit:cover;border-radius:16px;border:1px solid #e9eeec}
.kpi-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.info-list{display:grid;gap:10px}
.info-item{display:flex;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px dashed #e6ece9}
.info-item:last-child{border-bottom:0;padding-bottom:0}
.timeline-item{position:relative;padding-left:22px;margin-bottom:16px}
.timeline-item::before{content:"";position:absolute;left:0;top:7px;width:10px;height:10px;border-radius:50%;background:var(--primary)}
.timeline-item::after{content:"";position:absolute;left:4px;top:20px;bottom:-14px;width:2px;background:#dbe8e2}
.timeline-item:last-child::after{display:none}
.soft-pink{background:#fff0f5;color:#be4b73}
.soft-blue{background:#edf6ff;color:#276fbf}
.soft-slate{background:#eef3f2;color:#5b6d67}
.empty-state{padding:36px;text-align:center;color:var(--muted)}
.chart-wrap{height:320px}
.mini-chart-wrap{height:260px}
.top-list-item{display:flex;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid #eef2f0}
.top-list-item:last-child{border-bottom:none;padding-bottom:0}
.quick-action{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:18px;background:#fff;color:inherit}
.quick-action:hover{background:#f8fbfa}
.quick-action i{width:42px;height:42px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:var(--accent);color:var(--primary)}
.login-wrap{min-height:100vh;background:radial-gradient(circle at top left,#1f8a6c 0,#0f4637 45%,#0a3328 100%)}
.login-card{border:none;border-radius:28px;box-shadow:0 28px 55px rgba(0,0,0,.18)}
.login-side{background:linear-gradient(145deg,#125742,#1e8264);color:#fff;border-radius:28px 0 0 28px;padding:44px}
.login-side .badge-soft{display:inline-flex;background:rgba(255,255,255,.14);padding:8px 12px;border-radius:999px}
.login-form{padding:44px}
@media (max-width:991.98px){
  .sidebar{display:none}
  .content-area,.topbar{padding-left:18px;padding-right:18px}
  .kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:767.98px){
  .topbar{flex-wrap:wrap}
  .topbar-actions{width:100%;justify-content:flex-end}
  .kpi-strip{grid-template-columns:1fr}
  .chart-wrap,.mini-chart-wrap{height:240px}
}

.mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;background:rgba(255,255,255,.95);backdrop-filter:blur(10px);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);z-index:1100}
.mobile-bottom-nav a{padding:10px 6px 8px;text-align:center;color:var(--muted);font-size:.78rem;font-weight:700;display:flex;flex-direction:column;align-items:center;gap:4px}
.mobile-bottom-nav a i{font-size:1.1rem}
.mobile-bottom-nav a.active{color:var(--primary)}
@media (max-width:991.98px){ body{padding-bottom:72px;} }
.theme-dark{
  --bg:#0f1513;
  --card:#131d19;
  --line:#24302b;
  --text:#edf6f2;
  --muted:#95aaa2;
  --primary:#38a887;
  --primary-2:#228467;
  --accent:#17352c;
  --shadow:0 10px 30px rgba(0,0,0,.22);
  background:linear-gradient(180deg,#0f1513 0%,#141d1a 100%);
}
.theme-dark body,.theme-dark{color:var(--text)}
.theme-dark .sidebar,.theme-dark .card,.theme-dark .user-pill,.theme-dark .icon-btn,.theme-dark .offcanvas,.theme-dark .mobile-bottom-nav{background:var(--card)!important;color:var(--text)}
.theme-dark .sidebar{border-color:var(--line)}
.theme-dark .table thead th{background:#17221d;color:#a8bbb4;border-color:var(--line)}
.theme-dark .table>:not(caption)>*>*{border-color:#24302b;color:var(--text)}
.theme-dark .table tbody tr:hover{background:#17221d}
.theme-dark .form-control,.theme-dark .form-select{background:#101915;color:var(--text);border-color:#2c3b35}
.theme-dark .form-control:focus,.theme-dark .form-select:focus{background:#101915;color:var(--text)}
.theme-dark .text-muted,.theme-dark .section-subtitle,.theme-dark .metric-label,.theme-dark .metric-foot,.theme-dark .eyebrow,.theme-dark .brand-subtitle{color:var(--muted)!important}
.theme-dark .quick-action,.theme-dark .top-list-item,.theme-dark .private,.theme-dark .sidebar-card{background:#17221d;border-color:#24302b;color:var(--text)}
.theme-dark .btn-outline-dark{color:#dfe9e5;border-color:#465651}
.theme-dark .btn-light{background:#1c2823;border-color:#2b3b35;color:#eff7f3}
.theme-dark .alert{color:#fff}
