:root {
  --bg: #f2f5fb;
  --bg-strong: #e8edf8;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe4f1;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --sidebar: #0c1424;
  --sidebar-soft: #121d34;
  --sidebar-text: #e2ebff;
  --shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

/* Member portal */
.portal-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.portal-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.portal-avatar {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  object-fit: cover;
  flex: 0 0 auto;
}

.portal-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.portal-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.portal-metric {
  padding: 15px 18px;
  border-right: 1px solid #e8edf3;
}

.portal-metric:last-child {
  border-right: 0;
}

.portal-metric-label {
  color: #64748b;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.portal-metric-value {
  margin-top: 4px;
  color: #172033;
  font-size: 1.15rem;
  font-weight: 800;
}

.portal-panel {
  margin-bottom: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.portal-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e8edf3;
}

.portal-panel-body {
  padding: 16px;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.portal-data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 22px;
}

.portal-data-label {
  margin-bottom: 3px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 600;
}

.portal-data-value {
  color: #172033;
  overflow-wrap: anywhere;
}

.portal-family-list {
  display: flex;
  flex-direction: column;
}

.portal-family-row {
  display: grid;
  grid-template-columns: 58px minmax(160px, 1.2fr) repeat(4, minmax(120px, 1fr));
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #edf1f5;
}

.portal-family-row:last-child {
  border-bottom: 0;
}

.portal-family-photo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid #dbe3ee;
  object-fit: cover;
  background: #f8fafc;
}

.portal-request-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}

.portal-request-status.pending { background: #fff4cc; color: #7a5700; }
.portal-request-status.approved { background: #dff7e8; color: #126638; }
.portal-request-status.rejected { background: #fee2e2; color: #991b1b; }

.portal-form-section {
  padding: 18px 0;
  border-bottom: 1px solid #e8edf3;
}

.portal-form-section:first-child { padding-top: 0; }
.portal-form-section:last-child { border-bottom: 0; }

.portal-family-editor {
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fbfdff;
}

.portal-photo-editor {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 991.98px) {
  .portal-data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-family-row { grid-template-columns: 52px minmax(160px, 1fr) repeat(2, minmax(120px, 1fr)); }
}

@media (max-width: 767.98px) {
  .portal-page-head { align-items: flex-start; flex-direction: column; }
  .portal-metrics { grid-template-columns: 1fr; }
  .portal-metric { border-right: 0; border-bottom: 1px solid #e8edf3; }
  .portal-metric:last-child { border-bottom: 0; }
  .portal-data-grid { grid-template-columns: 1fr; }
  .portal-family-row { grid-template-columns: 48px 1fr; }
  .portal-photo-editor { align-items: flex-start; flex-direction: column; }
}

body[data-color="blue"] {
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
}
body[data-color="indigo"] {
  --brand: #4f46e5;
  --brand-strong: #4338ca;
}
body[data-color="green"] {
  --brand: #0f766e;
  --brand-strong: #0d5f59;
}
body[data-color="red"] {
  --brand: #dc2626;
  --brand-strong: #b91c1c;
}
body[data-color="orange"] {
  --brand: #ea580c;
  --brand-strong: #c2410c;
}

body[data-font="Inter"] {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
}
body[data-font="Roboto"] {
  font-family: "Manrope", "Roboto", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 6%, #e8efff 0, transparent 34%),
    radial-gradient(circle at 92% 10%, #e9fff6 0, transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, #f8fbff 100%);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  position: relative;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}

.app-sidebar {
  width: 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1rem;
  background:
    radial-gradient(circle at 10% 6%, rgba(56, 189, 248, 0.12) 0, transparent 34%),
    radial-gradient(circle at 90% 88%, rgba(59, 130, 246, 0.10) 0, transparent 36%),
    linear-gradient(180deg, #fdfefe 0%, #f5f9ff 52%, #eef4ff 100%);
  border-right: 1px solid #dbe7f6;
  color: #1f2937;
  box-shadow: 14px 0 34px rgba(15, 23, 42, 0.10);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  overflow: hidden;
}

.app-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.app-sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.78rem;
  padding: 0.2rem 0.3rem 1rem;
}

.brand-logo-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(145deg, #dbeafe, #e0f2fe);
  border: 1px solid #bfdbfe;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.16);
  display: grid;
  place-items: center;
}

.brand-logo {
  max-width: 30px;
  max-height: 30px;
  object-fit: contain;
}

.brand-title {
  color: #0f172a;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.sidebar-nav {
  margin-top: 0.55rem;
  gap: 0.28rem;
}

.sidebar-nav .nav-link {
  border-radius: 12px;
  padding: 0.68rem 0.72rem;
  display: flex;
  align-items: center;
  gap: 0.62rem;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.sidebar-nav .nav-link i {
  color: #3b82f6;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.sidebar-nav .nav-link:hover {
  color: #0f172a;
  background: linear-gradient(100deg, #e0edff, #e0f2fe);
  border-color: #bfdbfe;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.18);
  transform: translateX(4px);
}

.sidebar-nav .nav-link:hover i {
  transform: translateX(2px);
  opacity: 1;
}

.sidebar-nav .nav-link.active {
  color: #0f172a;
  background: linear-gradient(95deg, #dbeafe, #e0f2fe);
  border-color: #93c5fd;
  box-shadow: inset 3px 0 0 #2563eb, 0 10px 20px rgba(37, 99, 235, 0.16);
}

.sidebar-user {
  margin-top: auto;
  padding-top: 0.95rem;
  border-top: 1px solid #dbe7f6;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(219, 234, 254, 0.26));
  border-radius: 14px;
}

.sidebar-user .btn-outline-light {
  --bs-btn-color: #1e293b;
  --bs-btn-border-color: #94a3b8;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #334155;
  --bs-btn-hover-border-color: #334155;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #1e293b;
  --bs-btn-active-border-color: #1e293b;
  background: rgba(255, 255, 255, 0.85);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.2rem;
}

.user-chip i {
  font-size: 1.2rem;
}

.user-name {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.94rem;
}

.user-role {
  color: #64748b;
  text-transform: capitalize;
  font-size: 0.78rem;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.5rem;
}

.topbar-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
}


.topbar-fill {
  flex: 1;
  min-width: 0;
}

.topbar-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.68rem;
  font-weight: 700;
}

.topbar-title {
  margin: 0.1rem 0 0;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-date {
  white-space: nowrap;
  color: #334155;
  background: #eff4ff;
  border: 1px solid #cad6f2;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.8rem;
}

.app-content {
  padding: 1.45rem;
  min-width: 0;
}

.app-footer {
  font-size: 0.86rem;
  color: #64748b;
  text-align: center;
  padding: 0.7rem 1rem 1.1rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card .card-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0, var(--panel-soft) 100%);
}

.table {
  --bs-table-bg: #ffffff;
  --bs-table-striped-bg: #f8fbff;
  --bs-table-hover-bg: #eef4ff;
}

.table th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.table td {
  vertical-align: middle;
}

.form-control,
.form-select {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  min-height: 42px;
  background-color: #ffffff;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.14);
}

.input-group-modern .input-group-text {
  border-radius: 12px 0 0 12px;
}

.input-group-modern .form-control {
  border-radius: 0 12px 12px 0;
}

.btn {
  border-radius: 11px;
  font-weight: 600;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-strong);
  --bs-btn-hover-border-color: var(--brand-strong);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: #93c5fd;
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
}

.badge {
  border-radius: 999px;
  font-weight: 700;
}

.alert {
  border-radius: 12px;
  border: 0;
}

.modal-content {
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.25);
}

.dashboard-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.45fr);
  gap: 1.1rem;
}

.dashboard-panel {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96));
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  padding: 1rem;
}

.dashboard-reminders {
  position: relative;
  overflow: hidden;
}

.dashboard-reminders::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -22px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0));
  pointer-events: none;
}

.dashboard-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.dashboard-panel-title {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.18rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.panel-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: linear-gradient(145deg, #dbeafe, #e0f2fe);
  border: 1px solid #bfdbfe;
}

.dashboard-chip {
  padding: 0.3rem 0.64rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.quick-action {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.95rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.quick-action:hover {
  transform: translateY(-3px);
  border-color: #bcd3fb;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.quick-action-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 1.1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.qa-member .quick-action-icon {
  background: linear-gradient(145deg, #4f46e5, #3b82f6);
}

.qa-service .quick-action-icon {
  background: linear-gradient(145deg, #f59e0b, #fb7185);
}

.qa-reminder .quick-action-icon {
  background: linear-gradient(145deg, #10b981, #14b8a6);
}

.quick-action-title {
  font-size: 0.96rem;
  font-weight: 800;
}

.quick-action-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.kpi-card {
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 0.98rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  display: flex;
  align-items: center;
  gap: 0.78rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 1.12rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.kpi-service .kpi-icon {
  background: linear-gradient(145deg, #f59e0b, #fb7185);
}

.kpi-members .kpi-icon {
  background: linear-gradient(145deg, #4f46e5, #3b82f6);
}

.kpi-payments .kpi-icon {
  background: linear-gradient(145deg, #059669, #14b8a6);
}

.kpi-events .kpi-icon {
  background: linear-gradient(145deg, #eab308, #f59e0b);
}

.kpi-value {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.28rem;
  line-height: 1.2;
}

.kpi-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.kpi-sub {
  color: var(--muted);
  font-size: 0.79rem;
}

.reminder-head,
.reminder-item {
  display: grid;
  grid-template-columns: 1.15fr 1.8fr 110px;
  gap: 0.7rem;
}

.reminder-head {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #f1f6ff);
  padding: 0.62rem 0.72rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #4b5563;
}

.reminder-item {
  margin-top: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #ffffff;
  padding: 0.72rem;
  position: relative;
  overflow: hidden;
}

.reminder-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: #f59e0b;
}

.reminder-item.is-done::before {
  background: #10b981;
}

.reminder-item.is-overdue::before {
  background: #ef4444;
}

.reminder-task {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}

.reminder-task.done {
  color: #94a3b8;
  text-decoration: line-through;
}

.reminder-status {
  justify-self: start;
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.reminder-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.reminder-status.done {
  background: #d1fae5;
  color: #065f46;
}

.reminder-status.overdue {
  background: #fee2e2;
  color: #991b1b;
}

.dashboard-empty {
  margin-top: 0.9rem;
  padding: 0.9rem 0.95rem;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.login-mode {
  background: linear-gradient(140deg, #0b1220 0%, #111f35 45%, #172d4f 100%);
}

.app-content-login {
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.login-page {
  width: 100%;
  max-width: 1100px;
}

.login-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1rem;
}

.login-brand-panel,
.login-form-panel {
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 55px rgba(2, 6, 23, 0.28);
}

.login-brand-panel {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.96), rgba(29, 78, 216, 0.86));
  color: #eff6ff;
  padding: 2rem 2.1rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(219, 234, 254, 0.55);
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.login-heading {
  margin-top: 1rem;
  margin-bottom: 0.55rem;
  font-family: "Manrope", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.14;
}

.login-subtext {
  margin-bottom: 1.3rem;
  color: #dbeafe;
  max-width: 44ch;
}

.login-highlights {
  display: grid;
  gap: 0.65rem;
}

.highlight-item {
  border: 1px solid rgba(191, 219, 254, 0.35);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font-weight: 600;
}

.highlight-item i {
  margin-right: 0.4rem;
}

.login-form-panel {
  padding: 2rem 1.9rem;
}

.login-logo-wrap {
  margin-bottom: 0.95rem;
}

.login-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.login-title {
  margin-bottom: 0.2rem;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}

.login-caption {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.btn-login-submit {
  min-height: 44px;
}

@media (max-width: 1199.98px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border-right: 1px solid rgba(148, 163, 184, 0.2);
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar-menu-btn {
    display: inline-grid;
    place-items: center;
  }

  .topbar-date {
    display: none;
  }

  .app-topbar {
    padding-inline: 1rem;
  }

  .app-content {
    padding: 1rem;
  }

  .dashboard-wrap {
    grid-template-columns: 1fr;
  }

  .dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .reminder-head,
  .reminder-item {
    grid-template-columns: 1fr;
  }

  .login-grid {
    grid-template-columns: 1fr;
  }
}





