/* GA Academy Admin Panel - Custom Design System */
:root {
    --ga-primary: #683091;
    --ga-primary-dark: #4f2470;
    --ga-primary-light: #8b4fc4;
    --ga-accent: #05c76a;
    --ga-accent-dark: #04a858;
    --ga-sidebar-bg: #1a1225;
    --ga-sidebar-hover: rgba(104, 48, 145, 0.25);
    --ga-sidebar-active: rgba(104, 48, 145, 0.45);
    --ga-topbar-bg: #ffffff;
    --ga-body-bg: #f4f6fb;
    --ga-topbar-height: 70px;
    --ga-sidebar-width: 260px;
    --ga-card-shadow: 0 2px 12px rgba(104, 48, 145, 0.08);
    --ga-card-shadow-hover: 0 8px 24px rgba(104, 48, 145, 0.15);
    --ga-border-radius: 10px;
    --ga-transition: all 0.25s ease;
}

/* ---- Base / Layout ---- */
body {
    background-color: var(--ga-body-bg) !important;
}

/* Hyper theme uses fixed navbar — top padding MUST match navbar height */
.content-page {
    padding: var(--ga-topbar-height) 24px 24px !important;
}

.content-page .content {
    min-height: calc(100vh - var(--ga-topbar-height));
}

/* Main page content area — sits below fixed topbar */
.ga-main-content {
    position: relative;
    z-index: 1;
}

/* ---- Sidebar ---- */
.leftside-menu {
    background: var(--ga-sidebar-bg) !important;
    border-right: none !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
}

.leftside-menu .logo {
    /* padding: 16px 20px !important; */
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.leftside-menu .logo img {
    max-height: 52px !important;
    width: auto;
    object-fit: contain;
    filter: brightness(1.05);
}

.leftside-menu .side-nav-title {
    color: rgba(255, 255, 255, 0.35) !important;
    font-size: 0.68rem !important;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 20px 24px 8px !important;
    margin-top: 4px;
}

.leftside-menu .side-nav-link {
    color: rgba(255, 255, 255, 0.72) !important;
    padding: 10px 24px !important;
    border-radius: 0 24px 24px 0;
    margin-right: 12px;
    transition: var(--ga-transition);
    font-size: 0.875rem;
    font-weight: 500;
}

.leftside-menu .side-nav-link i {
    font-size: 1.1rem;
    width: 22px;
    opacity: 0.85;
}

.leftside-menu .side-nav-link:hover,
.leftside-menu .side-nav-link:focus {
    color: #fff !important;
    background: var(--ga-sidebar-hover) !important;
}

.leftside-menu .side-nav-item.menuitem-active > .side-nav-link,
.leftside-menu .side-nav-second-level li.menuitem-active > a {
    color: #fff !important;
    background: var(--ga-sidebar-active) !important;
    border-left: 3px solid var(--ga-accent);
}

.leftside-menu .side-nav-second-level {
    padding-left: 0 !important;
}

.leftside-menu .side-nav-second-level li a {
    color: rgba(255, 255, 255, 0.55) !important;
    padding: 8px 24px 8px 52px !important;
    font-size: 0.82rem;
    transition: var(--ga-transition);
    border-radius: 0 20px 20px 0;
    margin-right: 12px;
}

.leftside-menu .side-nav-second-level li a:hover,
.leftside-menu .side-nav-second-level li.menuitem-active > a {
    color: #fff !important;
    background: var(--ga-sidebar-hover) !important;
}

.leftside-menu .menu-arrow {
    opacity: 0.5;
}

/* ---- Top Navbar ---- */
.navbar-custom {
    background: var(--ga-topbar-bg) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    border-bottom: 1px solid rgba(104, 48, 145, 0.08);
    padding: 0 24px !important;
    min-height: var(--ga-topbar-height) !important;
    height: var(--ga-topbar-height);
    position: fixed !important;
    top: 0 !important;
    left: var(--ga-sidebar-width) !important;
    right: 0 !important;
    z-index: 1001 !important;
}

.navbar-custom .navbar-brand-text {
    float: left;
    height: var(--ga-topbar-height);
    line-height: var(--ga-topbar-height);
    margin-left: 4px;
    max-width: calc(100% - 280px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-custom .navbar-brand-text h5 {
    font-size: 0.92rem;
    color: #4a5568;
    margin: 0;
    font-weight: 600;
}

.navbar-custom .topbar-menu > li {
    line-height: var(--ga-topbar-height);
}

.navbar-custom .topbar-menu .nav-link {
    display: inline-flex;
    align-items: center;
    height: var(--ga-topbar-height);
}

.navbar-custom .topbar-menu .nav-link {
    color: #4a5568 !important;
    font-weight: 500;
    transition: var(--ga-transition);
}

.navbar-custom .topbar-menu .nav-link:hover {
    color: var(--ga-primary) !important;
}

.navbar-custom .account-user-avatar img {
    border: 2px solid var(--ga-primary-light);
    object-fit: cover;
}

.navbar-custom .account-user-name {
    font-weight: 600 !important;
    color: #2d3748;
}

.navbar-custom .account-position {
    color: var(--ga-primary) !important;
    font-size: 0.75rem;
    font-weight: 500;
}

.navbar-custom .button-menu-mobile {
    color: var(--ga-primary) !important;
}

.navbar-custom .button-menu-mobile:hover {
    background: rgba(104, 48, 145, 0.08) !important;
    border-radius: 8px;
}

.navbar-custom .app-search .form-control {
    border-radius: 24px 0 0 24px !important;
    border: 1px solid #e2e8f0 !important;
    padding-left: 16px;
}

.navbar-custom .app-search .input-group-text.btn-primary {
    background: var(--ga-primary) !important;
    border-color: var(--ga-primary) !important;
    border-radius: 0 24px 24px 0 !important;
}

.navbar-custom .lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(104, 48, 145, 0.08);
    border: 1px solid rgba(104, 48, 145, 0.15);
    transition: var(--ga-transition);
}

.navbar-custom .lang-switch:hover {
    background: rgba(104, 48, 145, 0.15);
}

/* ---- Cards ---- */
.card {
    border: none !important;
    border-radius: var(--ga-border-radius) !important;
    box-shadow: var(--ga-card-shadow) !important;
    transition: var(--ga-transition);
}

.card:hover {
    box-shadow: var(--ga-card-shadow-hover) !important;
}

.card .card-body {
    padding: 1.25rem 1.5rem;
}

/* ---- Dashboard Stat Cards ---- */
.stat-card {
    border: none;
    border-radius: var(--ga-border-radius);
    overflow: hidden;
    position: relative;
    transition: var(--ga-transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ga-card-shadow-hover);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a202c;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-purple .stat-icon { background: rgba(104, 48, 145, 0.12); color: var(--ga-primary); }
.stat-card-green .stat-icon { background: rgba(5, 199, 106, 0.12); color: var(--ga-accent); }
.stat-card-blue .stat-icon { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.stat-card-orange .stat-icon { background: rgba(249, 115, 22, 0.12); color: #f97316; }

.stat-card-purple::before,
.stat-card-green::before,
.stat-card-blue::before,
.stat-card-orange::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card-purple::before { background: var(--ga-primary); }
.stat-card-green::before { background: var(--ga-accent); }
.stat-card-blue::before { background: #3b82f6; }
.stat-card-orange::before { background: #f97316; }

/* ---- Welcome Banner ---- */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--ga-primary) 0%, var(--ga-primary-dark) 100%);
    border-radius: var(--ga-border-radius);
    color: #fff;
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
}

.dashboard-welcome::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.dashboard-welcome::before {
    content: '';
    position: absolute;
    right: 60px;
    bottom: -40px;
    width: 100px;
    height: 100px;
    background: rgba(5, 199, 106, 0.15);
    border-radius: 50%;
}

.dashboard-welcome h3 {
    font-weight: 700;
    margin-bottom: 6px;
}

.dashboard-welcome p {
    opacity: 0.85;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.dashboard-welcome .welcome-date {
    font-size: 0.82rem;
    opacity: 0.7;
}

/* ---- Breadcrumb ---- */
.ga-page-header {
    margin-bottom: 20px;
    padding-top: 4px;
}

.ga-breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.ga-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #a0aec0;
    font-size: 1.1rem;
    line-height: 1;
}

.ga-breadcrumb .breadcrumb-item a {
    color: var(--ga-primary);
    text-decoration: none;
    font-weight: 500;
}

.ga-breadcrumb .breadcrumb-item.active {
    color: #718096;
}

.ga-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

/* ---- Buttons ---- */
.btn-primary {
    background-color: var(--ga-primary) !important;
    border-color: var(--ga-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--ga-primary-dark) !important;
    border-color: var(--ga-primary-dark) !important;
}

.btn-success {
    background-color: var(--ga-accent) !important;
    border-color: var(--ga-accent) !important;
}

.btn-success:hover {
    background-color: var(--ga-accent-dark) !important;
    border-color: var(--ga-accent-dark) !important;
}

.btn-rounded {
    border-radius: 24px !important;
    padding: 8px 20px !important;
    font-weight: 500;
}

/* ---- Forms ---- */
.form-control,
.form-select {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.85rem;
    transition: var(--ga-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ga-primary-light) !important;
    box-shadow: 0 0 0 3px rgba(104, 48, 145, 0.12) !important;
}

.form-label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

/* ---- Tables ---- */
.table {
    font-size: 0.875rem;
}

.table thead th,
.mythead th {
    background: linear-gradient(135deg, var(--ga-primary) 0%, var(--ga-primary-dark) 100%) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none !important;
    padding: 12px 16px !important;
    white-space: nowrap;
}

.table thead th:first-child {
    border-radius: 8px 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 8px 0 0;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(104, 48, 145, 0.02);
}

.table tbody td {
    padding: 10px 16px !important;
    vertical-align: middle;
    border-color: #edf2f7 !important;
}

/* ---- Footer ---- */
.footer {
    background: transparent !important;
    border-top: 1px solid rgba(104, 48, 145, 0.08);
    color: #718096 !important;
    font-size: 0.82rem;
    padding: 16px 0;
}

.footer-links a {
    color: var(--ga-primary) !important;
    font-weight: 500;
}

/* ---- Modals ---- */
.modal-content {
    border: none;
    border-radius: var(--ga-border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, var(--ga-primary) 0%, var(--ga-primary-dark) 100%);
    color: #fff;
    border-radius: var(--ga-border-radius) var(--ga-border-radius) 0 0;
    padding: 16px 24px;
}

.modal-header .modal-title {
    font-weight: 600;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* ---- Login Page ---- */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(135deg, var(--ga-primary-dark) 0%, var(--ga-primary) 50%, #3d1f5c 100%); */
    position: relative;
    overflow: hidden;
}

.auth-page-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(5, 199, 106, 0.08);
    border-radius: 50%;
    top: -150px;
    right: -100px;
}

.auth-page-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.auth-card-header {
    background: linear-gradient(135deg, var(--ga-primary) 0%, var(--ga-primary-dark) 100%);
    padding: 32px 24px 24px;
    text-align: center;
    color: #fff;
}

.auth-card-header img {
    max-height: 64px;
    margin-bottom: 12px;
    filter: brightness(1.1);
}

.auth-card-header h4 {
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-card-header p {
    opacity: 0.8;
    font-size: 0.875rem;
    margin: 0;
}

.auth-card-body {
    padding: 28px 32px 32px;
}

.auth-card-body .btn-primary {
    width: 100%;
    padding: 10px;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* ---- Tabs (student info etc.) ---- */
.tab-link {
    background: var(--ga-primary-light) !important;
    border-radius: 8px 8px 0 0 !important;
    transition: var(--ga-transition);
}

.tab-link.active {
    background: var(--ga-primary) !important;
}

.tab-link.disabled {
    background: #cbd5e0 !important;
}

/* ---- Widget flat override ---- */
.widget-flat {
    border-radius: var(--ga-border-radius) !important;
}

.widget-flat .widget-icon {
    color: var(--ga-primary) !important;
    opacity: 0.3;
    font-size: 2.5rem !important;
}

/* ---- Dropdown menus ---- */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 8px;
}

.dropdown-item {
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    transition: var(--ga-transition);
}

.dropdown-item:hover {
    background: rgba(104, 48, 145, 0.08);
    color: var(--ga-primary);
}

.profile-dropdown .dropdown-header {
    background: rgba(104, 48, 145, 0.06);
    border-radius: 6px;
    margin-bottom: 4px;
}

/* ---- Page title box ---- */
.page-title-box {
    padding: 12px 0 !important;
}

.page-title-box .page-title {
    font-weight: 700;
    color: #1a202c;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .navbar-custom {
        left: 0 !important;
    }
}

@media (max-width: 768px) {
    .content-page {
        padding: var(--ga-topbar-height) 12px 16px !important;
    }

    .navbar-custom .navbar-brand-text {
        display: none !important;
    }

    .dashboard-welcome {
        padding: 20px;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* Sidebar condensed mode */
body[data-leftbar-compact-mode="condensed"] .navbar-custom {
    left: 70px !important;
}
