/* Custom CSS properties */
:root {
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --secondary-color: #3f37c9;
    --bg-color: #f4f7fe;
    --text-color: #2b3674;
    --light-text: #a3aed1;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 18px 40px 0 rgba(112, 144, 176, 0.12);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.fw-bold { font-weight: 700 !important; }
.fw-medium { font-weight: 500 !important; }

.btn {
    border-radius: 12px !important;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.btn:active {
    transform: scale(0.96);
}
.card {
    border-radius: 12px !important;
}
.form-control, .input-group-text, .login-input-group, .form-select {
    border-radius: 12px !important;
}

.modal-content {
    border-radius: 16px !important;
}

@keyframes slideUpFade {
    0% { transform: scale(0.9) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.swal2-popup {
    border-radius: 16px !important;
    padding: 1.5rem !important;
}
.swal2-confirm, .swal2-cancel {
    border-radius: 12px !important;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 12px;
}

/* Login specific styles */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at top right, #e0e8ff 0%, #f4f7fe 100%);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo-circle {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 3px solid white;
}

.login-title {
    font-weight: 900;
    font-size: 2rem;
    color: var(--primary-color);
    letter-spacing: -1px;
    margin-bottom: 0.2rem;
    line-height: 1;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.login-school-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
}

.login-card {
    width: 100%;
    max-width: 360px;
    padding: 2rem;
    background: var(--glass-bg); /* Fallback for glass */
    border-radius: 18px;
}

.login-input-group {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    background: white;
    transition: all 0.3s ease;
}

.login-input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.login-input-group .input-group-text {
    background: white;
    border: none;
    color: var(--light-text);
}

.login-input-group .form-control {
    border: none;
    background: white;
    padding: 0.8rem 1rem;
    font-weight: 500;
}

.login-input-group .form-control:focus {
    box-shadow: none;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.4);
    color: white;
}

.btn-login:disabled {
    opacity: 0.8;
    transform: none;
}

.custom-checkbox .form-check-input {
    border-color: #cbd5e1;
    cursor: pointer;
}

.custom-checkbox .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.toggle-pwd {
    border-radius: 0 12px 12px 0;
}

.cursor-pointer {
    cursor: pointer;
}

/* Common Scrollbar Hide */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Premium Header */
.premium-header {
    background: linear-gradient(135deg, #4C1D95, #6D28D9, #7C3AED);
    position: sticky;
    top: 0;
    z-index: 1030;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 10px 25px rgba(76, 29, 149, 0.2);
}
.premium-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    border-radius: 0 0 24px 24px;
}
.premium-header-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
}

/* Bottom Nav Adjustments */
.bottom-nav {
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05) !important;
    padding: 0.5rem 0.5rem calc(env(safe-area-inset-bottom) + 0.5rem) 0.5rem;
    background: white;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #a3aed1;
    position: relative;
    padding: 0.5rem;
    transition: all 0.3s ease;
    flex: 1;
}

.nav-item i {
    font-size: 24px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active i {
    transform: translateY(-4px);
    font-family: "Phosphor-Fill", 'Phosphor', sans-serif;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -2px;
    width: 20px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

@keyframes pulseDanger {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}
.pulse-danger {
    animation: pulseDanger 2s infinite;
}

/* BESTI Global Action Sheet */
.besti-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.besti-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.besti-action-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    z-index: 1055;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.besti-action-sheet.show {
    transform: translateY(0);
}

.action-sheet-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
}

.action-sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 12px;
}

.action-sheet-title {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    width: 100%;
    text-align: left;
}

.action-sheet-body {
    padding: 0 12px;
    display: flex;
    flex-direction: column;
}

.action-sheet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.2s ease;
    border-radius: 12px;
    margin-bottom: 4px;
}

.action-sheet-item:active {
    background: #f8fafc;
}

.action-sheet-item-left {
    display: flex;
    align-items: center;
}

.action-sheet-divider {
    border-top: 1px solid #f1f5f9;
    margin: 4px 16px;
    opacity: 1;
}
