/**
 * NestSacco v1.0.0 | NESTICT INFOTECH
 * Admin + Member portal design system
 */
:root {
  --ns-green: #0F766E;
  --ns-green-dark: #115E59;
  --ns-green-soft: #99F6E4;
  --ns-accent: #EA580C;
  --ns-blue: #2563EB;
  --ns-success: #15803D;
  --ns-danger: #B91C1C;
  --ns-navy: #0F172A;
  --ns-sidebar: #0B1220;
  --ns-sidebar-text: #F8FAFC;
  --ns-sidebar-hover: #1E293B;
  --ns-topbar: #FFFFFF;
  --ns-bg: #F1F5F9;
  --ns-card: #FFFFFF;
  --ns-border: #CBD5E1;
  --ns-muted: #475569;
  --ns-text: #0F172A;
  --ns-radius: 10px;
  --ns-shadow: 0 2px 12px rgb(15 23 42 / 0.08);
  --sidebar-w: 280px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--ns-bg);
  color: var(--ns-text);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--ns-green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ========== LANDING ========== */
.land {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgb(15 118 110 / 0.25), transparent),
    linear-gradient(180deg, #0f172a 0%, #0b1220 40%, #134e4a 100%);
  color: #fff;
}
.land-nav {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
}
.land-brand { display: flex; align-items: center; gap: 0.75rem; }
.land-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #2dd4bf, #0f766e);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}
.land-brand h1 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.land-brand p { margin: 0; font-size: 0.7rem; color: #94a3b8; }
.land-nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.land-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.55rem 1.1rem; border-radius: 8px; font-size: 0.875rem; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none !important;
}
.land-btn-ghost { background: transparent; color: #e2e8f0; border: 1px solid #334155; }
.land-btn-ghost:hover { background: #1e293b; }
.land-btn-primary { background: #14b8a6; color: #0f172a; }
.land-btn-primary:hover { background: #2dd4bf; }
.land-btn-outline { background: transparent; color: #fff; border: 1px solid #14b8a6; }
.land-hero {
  max-width: 1100px; margin: 0 auto; padding: 3.5rem 1.5rem 4rem;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center;
}
@media (max-width: 800px) { .land-hero { grid-template-columns: 1fr; padding-top: 2rem; } }
.land-hero h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.15; margin: 0 0 1rem; font-weight: 800;
}
.land-hero h2 span { color: #5eead4; }
.land-hero .lead { color: #94a3b8; font-size: 1.05rem; margin: 0 0 1.75rem; max-width: 32rem; }
.land-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.land-panel {
  background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 16px; padding: 1.5rem; backdrop-filter: blur(8px);
}
.land-panel h3 { margin: 0 0 1rem; font-size: 0.95rem; color: #5eead4; }
.land-stat {
  display: flex; justify-content: space-between; padding: 0.65rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.08); font-size: 0.875rem;
}
.land-stat:last-child { border-bottom: none; }
.land-stat span { color: #94a3b8; }
.land-features {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 4rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
@media (max-width: 800px) { .land-features { grid-template-columns: 1fr; } }
.land-feat {
  background: rgb(255 255 255 / 0.05); border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 12px; padding: 1.25rem;
}
.land-feat strong { display: block; margin-bottom: 0.35rem; font-size: 0.95rem; }
.land-feat p { margin: 0; font-size: 0.8rem; color: #94a3b8; }
.land-footer {
  text-align: center; padding: 1.5rem; font-size: 0.75rem; color: #64748b;
  border-top: 1px solid rgb(255 255 255 / 0.06);
}

/* ========== APP SHELL ========== */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--ns-sidebar); color: #e2e8f0;
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0;
  z-index: 40; transition: transform 0.2s ease;
}
.sidebar-brand {
  padding: 1.15rem 1.25rem; border-bottom: 1px solid #1e293b;
  display: flex; align-items: center; gap: 0.75rem;
}
.sidebar-brand .mark {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--ns-green); border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; color: #fff;
}
.sidebar-brand .name { font-weight: 700; font-size: 0.95rem; color: #fff; }
.sidebar-brand .role { font-size: 0.65rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem 0.65rem 1rem; }
.nav-group { margin-bottom: 0.25rem; }
.nav-group-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.75rem; border: none; background: transparent; color: #94a3b8;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  cursor: pointer; border-radius: 8px; text-align: left;
}
.nav-group-btn:hover { color: #e2e8f0; background: var(--ns-sidebar-hover); }
.nav-group-btn .chev {
  width: 14px; height: 14px; transition: transform 0.2s;
  opacity: 0.7;
}
.nav-group.open .nav-group-btn .chev { transform: rotate(90deg); }
.nav-group-body { display: none; padding: 0.15rem 0 0.35rem; }
.nav-group.open .nav-group-body { display: block; }
.nav-link {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 0.75rem 0.5rem 1rem; margin: 0.1rem 0;
  border-radius: 8px; color: #cbd5e1; font-size: 0.875rem; text-decoration: none !important;
}
.nav-link:hover { background: var(--ns-sidebar-hover); color: #fff; }
.nav-link.active { background: var(--ns-green); color: #fff; font-weight: 800; }
.nav-link .ico { width: 1.1rem; text-align: center; opacity: 0.85; font-size: 0.9rem; }
.sidebar-foot {
  padding: 0.85rem 1rem; border-top: 1px solid #1e293b; font-size: 0.7rem; color: #64748b;
}
.main {
  margin-left: var(--sidebar-w); flex: 1; min-width: 0;
  display: flex; flex-direction: column; min-height: 100vh;
}
.topbar {
  height: 56px; background: var(--ns-card); border-bottom: 1px solid var(--ns-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem; position: sticky; top: 0; z-index: 30;
}
.topbar h2 { margin: 0; font-size: 0.95rem; font-weight: 600; color: #334155; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem; color: var(--ns-muted); }
.menu-toggle {
  display: none; border: 1px solid var(--ns-border); background: #fff;
  border-radius: 8px; padding: 0.35rem 0.55rem; cursor: pointer;
}
.content { padding: 1.25rem 1.35rem 2.5rem; flex: 1; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgb(0 0 0 / 0.4); z-index: 35;
  }
  .sidebar-backdrop.show { display: block; }
}

/* Cards & UI */
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { margin: 0 0 0.25rem; font-size: 1.35rem; font-weight: 700; }
.page-head p { margin: 0; color: var(--ns-muted); font-size: 0.875rem; }
.grid { display: grid; gap: 1rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
.card {
  background: var(--ns-card); border: 1px solid var(--ns-border);
  border-radius: var(--ns-radius); box-shadow: var(--ns-shadow); padding: 1.15rem 1.25rem;
}
.card h3 { margin: 0 0 0.75rem; font-size: 0.9rem; font-weight: 600; color: #334155; }
.stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ns-muted); font-weight: 600; }
.stat-value { font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; color: var(--ns-navy); }
.stat-hint { font-size: 0.75rem; color: var(--ns-muted); margin-top: 0.2rem; }
.badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600;
}
.badge-ok { background: #d1fae5; color: #065f46; }
.badge-warn { background: #ffedd5; color: #9a3412; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-muted { background: #f1f5f9; color: #475569; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.data th {
  text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--ns-border);
  color: var(--ns-muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase;
}
table.data td { padding: 0.7rem 0.75rem; border-bottom: 1px solid #f1f5f9; }
table.data tr:hover td { background: #f8fafc; }
.btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.95rem; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none !important;
}
.btn-primary { background: var(--ns-green); color: #fff; font-weight: 800; border: 2px solid var(--ns-green-dark); }
.btn-primary:hover { background: var(--ns-green-dark); }
.btn-secondary { background: #fff; color: #334155; border: 1px solid var(--ns-border); }
.btn-secondary:hover { background: #f8fafc; }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
.empty {
  text-align: center; padding: 2rem 1rem; color: var(--ns-muted); font-size: 0.9rem;
}
.list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.875rem;
}
.list-row:last-child { border-bottom: none; }
.member-theme .sidebar { background: #042f2e; }
.member-theme .nav-link.active { background: rgb(20 184 166 / 0.25); color: #5eead4; }
