:root {
    --bs-primary: #6538f5;
    --bs-primary-rgb: 101, 56, 245;
    --bs-link-color: #6538f5;
    --bs-link-hover-color: #5125df;
    --bs-body-font-family: 'Inter', system-ui, sans-serif;
    --bs-body-bg: #f8f9fd;
    --shadow-primary: 0 10px 30px rgba(109, 61, 245, 0.25);
}

h1, h2, h3, h4, .navbar-brand {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
}

.btn-primary {
    --bs-btn-bg: #6538f5;
    --bs-btn-border-color: #6538f5;
    --bs-btn-hover-bg: #5125df;
    --bs-btn-hover-border-color: #5125df;
    --bs-btn-active-bg: #5125df;
    --bs-btn-active-border-color: #5125df;
    height: 52px;
    border: 0;
    border-radius: 14px;
    background: #6d3df5;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-primary);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.btn-primary:hover {
    background: var(--bs-link-hover-color);
    box-shadow: 0 12px 28px rgba(109, 61, 245, 0.28), 0 4px 8px rgba(109, 61, 245, 0.14);
    transform: translateY(-1px);
}

.navbar-brand span {
    color: #6538f5;
}

.card {
    border: none;
    box-shadow: 0 4px 16px rgba(44, 31, 100, 0.06);
    background: #fff;
    border-radius: 20px;
}
h2.h6.card-title {
    font-weight: 700;
    font-size: 19px;
    margin-bottom: 16px;
}
.form-group label {
color: #29263a;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
}
.form-group input:not([type="checkbox"]) {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #e2e0ea;
  border-radius: 12px;
  background: #ffffff;
  color: #17152a;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.form-group textarea {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #e2e0ea;
  border-radius: 12px;
  background: #ffffff;
  color: #17152a;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.form-group input::placeholder {
    color: #aaa7b7;
}

.form-group input:hover {
    border-color: #c9c5d6;
}

.form-group input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(109, 61, 245, 0.30);
}

.login-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 34px;
    border-top: 1px solid #e2e0ea;
    padding-top: 24px;
}

.forgot-password {
  color: #6d3df5;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-password:hover {
  color: #5f32e6;
  text-decoration: underline;
}

.register {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.register span {
    color: #77738a;
}

.register a {
    color: #6d3df5;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.register a:hover {
    color: #5f32e6;
    text-decoration: underline;
}

.link-primary {
    color: #6d3df5!important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-primary:hover {
    color: #5f32e6!important;
    text-decoration: underline;
}

.auth-page {
    max-width: 480px;
    margin: 3rem auto;
}

.auth-page > .card {
    width: 100%;
    max-width: 480px;
    padding: 40px;
    background: #ffffff;
    border: 1px solid rgba(229, 227, 238, 0.8);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(35, 25, 80, 0.08), 0 4px 16px rgba(35, 25, 80, 0.04);
}

@media (max-width: 520px) {
    .auth-page > .card {
        padding: 32px 24px;
        border-radius: 20px;
    }
}

.auth-page h1 {
    margin: 0;
    color: #17152a;
    font-size: 32px;
    text-align: center;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.6px;
}

.alert-success {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
    padding: 14px 16px;
    background: #ecfdf5;
    border: 1px solid #a7e3c7;
    border-radius: 12px;
    color: #166534;
    font-size: 14px;
    line-height: 1.6;
}

.login-subtitle {
    margin: 10px 0px 20px;
    color: #77738a;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
}

.brand-mark {
    position: relative;
    width: 48px;
    height: 42px;
    margin: 0 auto;
    margin-bottom: 10px;
}
.brand-circle {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}
.brand-circle-left {
    left: 0px;
    top: 0px;
    background: #6d3df5;
    box-shadow: 0 6px 16px rgba(109, 61, 245, 0.22);
}
.brand-circle-right {
    left: 18px;
    top: 12px;
    background: #9b7aff;
    opacity: 0.9;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: #f5f2ff;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-box strong {
    display: block;
    font-size: 1.75rem;
    font-family: 'Quicksand', sans-serif;
    color: #6538f5;
}

.stat-box span {
    font-size: 0.85rem;
    color: #626579;
}

.stat-box-trend {
    display: flex;
    flex-direction: column;
}

.stat-sparkline-wrap {
    height: 32px;
    margin-top: 0.5rem;
}

.stat-sparkline-wrap canvas {
    width: 100%;
    height: 100%;
}

.meter-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0.5rem auto;
}

.meter-wrap canvas {
    width: 100%;
    height: 100%;
}

.meter-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #6538f5;
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.rank-badge {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #6538f5;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-value {
    flex: 0 0 auto;
    font-weight: 600;
    color: #6538f5;
    font-family: 'Quicksand', sans-serif;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.filter-form .filter-input {
    max-width: 260px;
}

.filter-form .filter-select {
    max-width: 200px;
}

td.actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 160px;
}

td.actions form {
    margin: 0;
}

/* ========================================================
   App shell: left sidebar + topbar (admin.php / superadmin.php)
   ======================================================== */

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

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #eceaf3;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    z-index: 1030;
    transition: transform 0.25s ease;
}

.app-sidebar-brand {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #17152a;
    text-decoration: none;
    padding: 0 0.5rem 1.5rem;
}

.app-sidebar-brand span {
    color: #6538f5;
}

.app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    color: #4b4760;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.app-nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

.app-nav-link:hover {
    background: #f5f2ff;
    color: #6538f5;
}

.app-nav-link.active {
    background: #6538f5;
    color: #ffffff;
    box-shadow: var(--shadow-primary);
}

h2.h5.card-title {
    font-weight: 700;
    margin-bottom: 16px;
}

.app-sidebar-logout {
    border-top: 1px solid #eceaf3;
    padding-top: 26px;
    border-top: 1px solid #eceaf3;
    margin-top: 20px !important;
}

.app-content {
    flex: 1 1 auto;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    border-bottom: 1px solid #eceaf3;
    padding: 0.85rem 1.5rem;
}

.app-topbar-project {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    color: #17152a;
}

.app-topbar-email {
    font-size: 0.8rem;
}

.app-main {
    padding-top: 1.5rem;
}

.sidebar-toggle {
    border: 0;
    background: transparent;
    font-size: 1.25rem;
    color: #4b4760;
    padding: 0.25rem 0.5rem;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(23, 21, 42, 0.35);
    z-index: 1025;
}

.sidebar-backdrop.show {
    display: block;
}

/* rounded pill badges + pagination, used across admin/superadmin tables */
.badge {
    border-radius: 999px;
    padding: 0.4em 0.85em;
    font-weight: 600;
}

.datatable-input {
        border-radius: 12px;
    outline: none;
    border: 1px solid #6c757d;
}

.datatable-pagination a,
.datatable-pagination button {
    border-radius: 999px !important;
}

.datatable-pagination .active a,
.datatable-pagination .active button {
    background: #6538f5 !important;
    border-color: #6538f5 !important;
    color: #ffffff !important;
}

.datatable-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.datatable-export-btn {
    margin-left: auto;
    border-radius: 10px;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
    }

    .app-content {
        margin-left: 0;
    }
}

