/* ============================================================================
   CVCNU MEMBERSHIP PORTAL — GREEN MODERN ADMIN THEME
   ============================================================================ */

:root {
  --cvc-green-900: #0b3d24;
  --cvc-green-800: #0f4d2d;
  --cvc-green-700: #14603a;
  --cvc-green-600: #1a7a48;
  --cvc-green-500: #1f9456;
  --cvc-green-400: #2fb46c;
  --cvc-green-100: #e5f5ec;
  --cvc-green-50:  #f2faf5;
  --cvc-gold: #d4a537;
  --ink-900: #14231c;
  --ink-700: #3d4c45;
  --ink-500: #6b7a72;
  --ink-300: #a8b5ae;
  --surface: #ffffff;
  --bg: #f4f8f6;
  --border: #e2ece6;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 77, 45, 0.06);
  --shadow-md: 0 6px 20px rgba(11, 61, 36, 0.08);
  --shadow-lg: 0 12px 32px rgba(11, 61, 36, 0.14);
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink-900);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

/* ---------------------------------------------------------------------------
   LAYOUT SHELL
--------------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--cvc-green-900) 0%, var(--cvc-green-800) 100%);
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 1030;
  transition: transform .25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand .mark {
  width: 38px; height: 38px;
  background: var(--cvc-gold);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--cvc-green-900);
  font-weight: 800;
  font-size: 15px;
}
.sidebar-brand .name { font-weight: 700; font-size: 15px; line-height: 1.2; color: #fff; }
.sidebar-brand .sub { font-size: 11px; color: rgba(255,255,255,0.6); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sidebar-nav .nav-section-title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,0.45);
  padding: 14px 12px 6px;
  font-weight: 700;
}
.sidebar-nav a.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.82);
  font-size: 13.8px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background .15s ease, color .15s ease;
}
.sidebar-nav a.nav-link i { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.sidebar-nav a.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-nav a.nav-link.active {
  background: var(--cvc-green-500);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.sidebar-nav a.nav-link .count-pill {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 11px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.main-wrap {
  margin-left: 260px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 68px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.topbar .page-title { font-size: 18px; font-weight: 700; color: var(--ink-900); }
.topbar .page-title .crumb { font-size: 12.5px; font-weight: 500; color: var(--ink-500); display:block; margin-bottom:1px;}

.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar .user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 30px;
  background: var(--cvc-green-50);
  border: 1px solid var(--cvc-green-100);
}
.topbar .user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--cvc-green-600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px;
}
.topbar .user-chip .u-name { font-size: 12.5px; font-weight: 600; color: var(--ink-900); line-height:1.1;}
.topbar .user-chip .u-role { font-size: 10.5px; color: var(--ink-500); }

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

@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
}

/* ---------------------------------------------------------------------------
   CARDS / STAT CARDS
--------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header-modern {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header-modern h2, .card-header-modern h5 { font-size: 15.5px; font-weight: 700; margin: 0; color: var(--ink-900); }
.card-body-modern { padding: 22px; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.stat-card .stat-label { font-size: 12.5px; color: var(--ink-500); font-weight: 600; margin-bottom: 6px; }
.stat-card .stat-value { font-size: 25px; font-weight: 800; color: var(--ink-900); }
.stat-card .stat-sub { font-size: 11.5px; color: var(--ink-500); margin-top: 4px; }
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
}
.stat-icon.green { background: var(--cvc-green-100); color: var(--cvc-green-700); }
.stat-icon.gold  { background: #fbf1da; color: #a97c17; }
.stat-icon.blue  { background: #e6f0fb; color: #2064c4; }
.stat-icon.red   { background: #fbe9e9; color: #c0392b; }

/* ---------------------------------------------------------------------------
   BUTTONS
--------------------------------------------------------------------------- */
.btn-cvc {
  background: var(--cvc-green-600);
  border: 1px solid var(--cvc-green-600);
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 18px;
  border-radius: 9px;
  transition: background .15s ease;
}
.btn-cvc:hover { background: var(--cvc-green-700); color: #fff; }
.btn-cvc-outline {
  background: #fff;
  border: 1px solid var(--cvc-green-600);
  color: var(--cvc-green-700);
  font-weight: 600;
  font-size: 13.5px;
  padding: 9px 18px;
  border-radius: 9px;
}
.btn-cvc-outline:hover { background: var(--cvc-green-50); color: var(--cvc-green-800); }
.btn-soft {
  background: var(--cvc-green-50);
  border: 1px solid var(--cvc-green-100);
  color: var(--cvc-green-700);
  font-weight: 600;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 8px;
}
.btn-soft:hover { background: var(--cvc-green-100); }

/* ---------------------------------------------------------------------------
   TABLES
--------------------------------------------------------------------------- */
table.table-modern { width: 100%; border-collapse: collapse; font-size: 13.3px; }
table.table-modern thead th {
  background: var(--cvc-green-50);
  color: var(--cvc-green-800);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.table-modern tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-900);
  vertical-align: middle;
}
table.table-modern tbody tr:hover { background: var(--cvc-green-50); }
table.table-modern tbody tr:last-child td { border-bottom: none; }

.status-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-paid      { background: #e3f6ea; color: #1a7a48; }
.badge-unpaid    { background: #fdeeea; color: #c0392b; }
.badge-partial   { background: #fdf3d9; color: #a97c17; }
.badge-overdue   { background: #f9d9d9; color: #a3261a; }
.badge-cancelled { background: #eceff1; color: #607d8b; }
.cat-federal { background: #e6f0fb; color: #2064c4; }
.cat-state   { background: #fbf1da; color: #a97c17; }
.cat-private { background: #f1e6fb; color: #7a2fc4; }

/* ---------------------------------------------------------------------------
   FORMS
--------------------------------------------------------------------------- */
.form-label { font-size: 12.8px; font-weight: 600; color: var(--ink-700); margin-bottom: 5px; }
.form-control, .form-select {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 13px;
  font-size: 13.5px;
  background: #fcfdfd;
}
.form-control:focus, .form-select:focus {
  border-color: var(--cvc-green-500);
  box-shadow: 0 0 0 3px var(--cvc-green-100);
  background: #fff;
}
.required-mark { color: #c0392b; }

/* Modal */
.modal-content { border-radius: 14px; border: none; overflow: hidden; }
.modal-header { background: var(--cvc-green-50); border-bottom: 1px solid var(--border); padding: 18px 24px; }
.modal-header .modal-title { font-weight: 700; font-size: 15.5px; color: var(--ink-900); }
.modal-body { padding: 24px; }
.modal-footer { border-top: 1px solid var(--border); padding: 16px 24px; }

/* Login page */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at top left, var(--cvc-green-700), var(--cvc-green-900) 70%);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 38px 34px;
}
.login-card .mark {
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--cvc-gold); color: var(--cvc-green-900);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; margin: 0 auto 14px;
}

/* Sidebar/Filter panels */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: #fafcfb;
}
.filter-bar .field { min-width: 160px; }
.filter-bar .field label { display:block; font-size: 11px; font-weight: 700; color: var(--ink-500); text-transform: uppercase; margin-bottom: 4px;}

/* Print statement / receipt / demand note */
.doc-sheet {
  background: #fff;
  max-width: 800px;
  margin: 26px auto;
  padding: 46px 50px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.doc-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--cvc-green-700); padding-bottom: 18px; margin-bottom: 24px;}
.doc-header .org-name { font-weight: 800; font-size: 17px; color: var(--cvc-green-800); }
.doc-header .org-sub { font-size: 11.5px; color: var(--ink-500); }
.doc-title { font-size: 20px; font-weight: 800; color: var(--ink-900); text-align: right; }
.doc-meta { font-size: 12.5px; color: var(--ink-500); text-align: right; }
.doc-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.doc-table th { background: var(--cvc-green-50); text-align: left; font-size: 11.5px; text-transform: uppercase; padding: 10px 12px; color: var(--cvc-green-800); }
.doc-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.doc-total-row td { font-weight: 800; font-size: 15px; color: var(--ink-900); }
.doc-stamp { display:inline-block; border: 2px solid var(--cvc-green-600); color: var(--cvc-green-600); padding: 6px 16px; border-radius: 8px; font-weight: 800; transform: rotate(-6deg); font-size: 13px; letter-spacing: .05em;}
.doc-footer-note { margin-top: 34px; font-size: 11.5px; color: var(--ink-500); border-top: 1px dashed var(--border); padding-top: 14px; }

@media print {
  .no-print { display: none !important; }
  .doc-sheet { box-shadow: none; border: none; margin: 0; max-width: 100%; }
  body { background: #fff; }
}

/* Misc */
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-500); }
.empty-state i { font-size: 40px; color: var(--cvc-green-200, #bfe3cd); margin-bottom: 14px; display:block;}
.page-subtitle { color: var(--ink-500); font-size: 13px; margin-top: 2px; }
.tab-pill { border-radius: 30px !important; padding: 7px 16px !important; font-size: 13px !important; font-weight: 600 !important; border: 1px solid var(--border) !important; color: var(--ink-700) !important; }
.tab-pill.active { background: var(--cvc-green-600) !important; color: #fff !important; border-color: var(--cvc-green-600) !important; }
.avatar-sm { width: 34px; height: 34px; border-radius: 9px; background: var(--cvc-green-100); color: var(--cvc-green-700); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:12.5px; }
