/* ===== GLOBAL ===== */
:root {
    --primary: #0099D5;
    --primary-light: #4FC3F7;
    --primary-dark: #0077A8;
    --bg-main: #F3F4F6;
    --bg-card: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --nav-height: 64px;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ===== APP CONTAINER ===== */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    background: var(--bg-main);
    position: relative;
}

.app-main {
    padding-bottom: calc(var(--nav-height) + 16px);
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.08);
    z-index: 1000;
    border-top: 1px solid #E5E7EB;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.65rem;
    padding: 6px 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
    gap: 2px;
}

.bottom-nav-item i {
    font-size: 1.3rem;
}

.bottom-nav-item.active {
    color: var(--primary);
    font-weight: 600;
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-header {
    flex: 0 0 auto;
    text-align: center;
    padding: 60px 24px 40px;
}

.login-logo .logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    backdrop-filter: blur(10px);
}

.login-logo img {
    filter: brightness(0) invert(1);
    max-width: 300px;
}

.login-logo .logo-circle i {
    font-size: 2.2rem;
    color: #fff;
}

.login-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    margin: 0;
}

.login-form-container {
    flex: 1;
    background: var(--bg-card);
    border-radius: 28px 28px 0 0;
    padding: 32px 24px;
}

.login-form-container .form-control {
    border-radius: var(--radius-sm);
    border: 1.5px solid #E5E7EB;
    padding: 14px 16px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.login-form-container .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.login-form-container .form-floating > label {
    color: var(--text-secondary);
}

.btn-login {
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    transition: all 0.2s;
}

.btn-login:hover, .btn-login:active {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #F3F4F6;
}

/* ===== DASHBOARD HEADER ===== */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px 20px 28px;
    border-radius: 0 0 24px 24px;
}

.btn-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    backdrop-filter: blur(10px);
    transition: background 0.2s;
}

.btn-header-icon:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.btn-header-icon i {
    font-size: 1.1rem;
}

/* ===== DASHBOARD CONTENT ===== */
.dashboard-content {
    padding: 16px;
    margin-top: -8px;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-student {
    background: var(--bg-card);
    margin-bottom: 12px;
}

.card-section {
    background: var(--bg-card);
    margin-bottom: 12px;
}

.student-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1.1rem;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ===== NOTIFICATION ITEMS ===== */
.notification-item {
    padding: 10px 0;
    border-bottom: 1px solid #F3F4F6;
}

.notification-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.notification-item.unread {
    position: relative;
}

.noti-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* ===== HOMEWORK & PAYMENT ===== */
.homework-item, .payment-item {
    padding: 4px 0;
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
    border-radius: 0 0 24px 24px;
    color: #fff;
}

.page-header h5 {
    color: #fff;
}

.page-header h5 i {
    color: rgba(255,255,255,0.8) !important;
}

.page-content {
    padding: 16px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ===== PROGRESS BAR ===== */
.progress {
    background: #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 8px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    transition: width 0.6s ease;
}

/* ===== BADGES ===== */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 8px;
}

/* ===== FORMS ===== */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 481px) {
    .app-container {
        border-left: 1px solid #E5E7EB;
        border-right: 1px solid #E5E7EB;
    }

    body {
        background: #E5E7EB;
    }
}