:root {
  --twcc-primary: #4154f1;
  --twcc-primary-dark: #2f3fc2;
  --twcc-bg: #f6f9ff;
  --twcc-text: #444;
  --twcc-sidebar-w: 260px;
  --twcc-topbar-h: 60px;
}

body {
  font-family: "Segoe UI", "Open Sans", sans-serif;
  background: var(--twcc-bg);
  color: var(--twcc-text);
}

a { color: var(--twcc-primary); text-decoration: none; }
a:hover { color: var(--twcc-primary-dark); }

/* ---------- Topbar ---------- */
.twcc-topbar {
  height: var(--twcc-topbar-h);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  padding: 0 1rem;
}
.twcc-topbar .brand {
  font-weight: 700;
  color: var(--twcc-primary);
  font-size: 1.15rem;
  text-decoration: none;
}
.twcc-topbar .brand-logo {
  height: 34px;
  width: auto;
}

/* ---------- Sidebar ---------- */
.twcc-sidebar {
  position: fixed;
  top: var(--twcc-topbar-h);
  bottom: 0;
  left: 0;
  width: var(--twcc-sidebar-w);
  background: #0b1f4d;
  box-shadow: 2px 0 8px rgba(0,0,0,.15);
  overflow-y: auto;
  transition: transform .25s ease;
  z-index: 1020;
  padding: 1rem 0;
}
.twcc-sidebar .nav-link {
  color: rgba(255,255,255,.82);
  padding: .65rem 1.25rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.twcc-sidebar .nav-link i { font-size: 1.15rem; }
.twcc-sidebar .nav-link.active,
.twcc-sidebar .nav-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-left: 3px solid #4a9bd6;
}

/* ---------- Main content ---------- */
.twcc-main {
  margin-top: var(--twcc-topbar-h);
  margin-left: var(--twcc-sidebar-w);
  padding: 1.5rem;
  min-height: calc(100vh - var(--twcc-topbar-h));
  transition: margin-left .25s ease;
}

/* ---------- Cards / widgets ---------- */
.twcc-card {
  background: #fff;
  border-radius: .5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  border: none;
}
.stat-card { padding: 1.25rem; }
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  background: rgba(65,84,241,.12);
  color: var(--twcc-primary);
}
.avatar-circle {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover;
  background: var(--twcc-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.avatar-lg { width: 110px; height: 110px; font-size: 2rem; }

/* ---------- Responsive: tablet & mobile ---------- */
.twcc-sidebar-toggle { display: none; }

@media (max-width: 991.98px) {
  :root { --twcc-sidebar-w: 240px; }
  .twcc-sidebar { transform: translateX(-100%); }
  .twcc-sidebar.show { transform: translateX(0); }
  .twcc-main { margin-left: 0; padding: 1rem; }
  .twcc-sidebar-toggle { display: inline-flex; }
  .twcc-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1015;
  }
  .twcc-backdrop.show { display: block; }
}

@media (max-width: 575.98px) {
  .twcc-main { padding: .75rem; }
  .twcc-topbar .brand-full { display: none; }
  .table-responsive-cards thead { display: none; }
  .table-responsive-cards tbody tr {
    display: block;
    margin-bottom: .75rem;
    border-radius: .5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    padding: .75rem;
  }
  .table-responsive-cards tbody td {
    display: flex;
    justify-content: space-between;
    border: none;
    padding: .35rem 0;
  }
  .table-responsive-cards tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #777;
    padding-right: .75rem;
  }
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--twcc-primary) 0%, #6a7cf5 100%);
  padding: 1rem;
}
.login-card {
  max-width: 420px;
  width: 100%;
  border-radius: .75rem;
  overflow: hidden;
}

/* ---------- Member registration tabs ---------- */
#regTabs { border-bottom: 2px solid #dee2e6; }
#regTabs .nav-link {
  font-size: .78rem;
  font-weight: 700;
  color: #555;
  padding: .6rem .9rem;
}
#regTabs .nav-link.active {
  color: var(--twcc-primary);
  border-bottom: 2px solid var(--twcc-primary);
}
