* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #021b2d;
    --secondary-color: #021b2d;
    --accent-color: #d4af37;
    --success-color: #4a7c59;
    --danger-color: #c74b50;
    --warning-color: #e8a932;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --border-color: #dae0e5;
    --neutral-gray: #757575;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #021b2d;
    color: #4a5568;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Center main content below menu bar */
.main-centered {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: transparent;
    position: relative;
    z-index: 10;
}

body.dashboard-page {
    background: #ffffff;
}

/* White background for dashboard pages only */
.dashboard-page .main-centered {
    background: transparent;
    padding: 0;
    margin: 0;
    border-radius: 0;
}

/* White Outline Effect */
body::before {
    content: '';
    position: fixed;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 3px solid #fff;
    border-radius: 0;
    pointer-events: none;
    z-index: 250;
    box-sizing: border-box;
    animation: fadeInOnly 2s ease-out;
}

/* Hide outline on dashboard pages */
.dashboard-page::before {
    display: block !important;
    border-color: #021b2d;
}

/* Hamburger Menu Bar - Further In */
.menu-bar {
    position: fixed;
    top: 30px;
    left: 30px;
    width: auto;
    height: 40px;
    background: transparent;
    box-shadow: none;
    padding: 0;
    z-index: 100;
    animation: fadeInOnly 2s ease-out;
}

.hamburger {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 32px;
    height: 32px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    z-index: 300;
    position: relative;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background: #021b2d;
    border-radius: 0;
    margin-bottom: 6px;
    transition: background 0.2s;
}

/* White menu button on login pages */
body:not(.dashboard-page) .hamburger span {
    background: #fff;
}

.hamburger span:last-child {
    margin-bottom: 0;
}

/* Add top margin to main content to avoid overlap */
body > .screen,
body > .container {
    margin-top: 0;
}

.screen {
    display: none;
    width: 100%;
    max-width: 1200px;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    background: white;
    border-radius: 8px;
    padding: 20px 65px 10px 65px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    min-height: auto;
    animation: slideUpFadeIn 2s ease-out 0s both;
}

/* Remove styling on dashboard pages */
.dashboard-page .container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

#loginScreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding-top: 120px;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 20px;
}

.auth-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
}

@media (max-width: 650px) {
    .auth-container {
        max-width: calc(100% - 40px);
    }
    
    .container {
        padding: 20px 30px;
    }
    
    #loginScreen {
        padding-top: 80px;
    }
}

.auth-box {
    text-align: center;
    margin-top: 0;
    padding-top: 20px;
    padding-bottom: 10px;
}

.auth-box h1 {
    color: #021b2d;
    margin-bottom: 10px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: slideUpFadeIn 2s ease-out 0.15s both;
}

.subtitle {
    color: #718096;
    font-size: 16px;
    margin-bottom: 40px;
    animation: slideUpFadeIn 2s ease-out 0.25s both;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.header h1 {
    color: #021b2d;
    font-size: 24px;
    margin: 0;
    font-weight: 700;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: #021b2d;
    color: white;
}

.btn-primary:hover {
    background: #0a2f4a;
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--dark-text);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: #021b2d;
    color: #021b2d;
}

.btn-logout {
    background: #757575;
    color: white;
    padding: 8px 16px;
    font-size: 12px;
}

.btn-logout:hover {
    background: #5a5a5a;
    color: white;
}

.btn-success {
    background: #2d5a3d;
    color: white;
    width: 100%;
}

.btn-success:hover {
    background: #1f3d28;
}

/* Version Selection */
.version-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.version-btn {
    padding: 30px 20px;
    border: none;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.version-btn:hover {
    background: #eef0f3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.version-btn .icon {
    font-size: 48px;
}

.version-btn .title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-text);
}

.version-btn .desc {
    font-size: 12px;
    color: #718096;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #021b2d;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #021b2d;
    background: white;
    box-shadow: 0 0 0 3px rgba(2, 27, 45, 0.05);
}

/* Google Sign-In Button Styling */
#googleLoginContainer {
    margin: 28px auto 10px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    animation: fadeInOnly 1.5s ease-out 0.35s both;
    width: 100%;
    max-width: 100%;
}

#googleLoginContainer > div {
    display: flex !important;
    justify-content: center !important;
    transform: scale(1.2);
}

/* Custom Google Sign-In Button */
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #0a3d5f;
    color: white;
    border: none;
    padding: 16.5px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin: 33px auto 5px auto;
    min-width: 450px;
    animation: slideUpFadeIn 2s ease-out 0.35s both;
}

.google-signin-btn:hover {
    background: #0d4a73;
    transform: translateY(-1px);
}

.google-signin-btn:active {
    background: #083350;
    transform: translateY(0);
}

.google-signin-btn svg {
    flex-shrink: 0;
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 768px) {
    #googleLoginContainer {
        max-width: 90%;
        margin: 28px auto 10px auto;
    }
    
    #googleLoginContainer > div {
        transform: scale(0.95);
    }
}

@media (max-width: 480px) {
    #googleLoginContainer {
        max-width: calc(100% - 60px);
        margin: 28px auto 10px auto;
    }
    
    #googleLoginContainer > div {
        transform: scale(0.85);
    }
}

/* Stage Selection */
.stage-selector {
    margin: 40px 0;
}

.stage-selector h2 {
    color: var(--dark-text);
    margin-bottom: 20px;
    font-size: 20px;
}

.stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stage-option {
    padding: 20px;
    border: none;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stage-option:hover {
    background: #eef0f3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stage-option.selected {
    border-color: #021b2d;
    background: rgba(2, 27, 45, 0.05);
}

.stage-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.stage-points {
    font-size: 20px;
    font-weight: 600;
    color: #021b2d;
    margin-bottom: 4px;
}

.stage-deadline {
    font-size: 12px;
    color: #718096;
}

/* Content Area */
.content {
    margin-bottom: 20px;
}

/* Info Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border-left: 4px solid #021b2d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.info-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-text);
}

.info-value.highlight {
    color: #021b2d;
}

/* Progress Section */
.progress-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 6px;
    margin-bottom: 40px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.progress-header h2 {
    color: var(--dark-text);
    font-size: 18px;
    margin: 0;
}

.progress-percentage {
    font-size: 28px;
    font-weight: 700;
    color: #021b2d;
}

.progress-bar {
    width: 100%;
    height: 40px;
    background: #e8eaed;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    background: #021b2d;
    transition: width 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    min-width: 40px;
}

/* Time Info Grid */
.time-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.time-info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.time-label {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.time-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-text);
}

/* Teacher Entry Section */
.teacher-entry-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 6px;
    margin-bottom: 30px;
    border-left: 4px solid #021b2d;
}

.teacher-entry-section h2 {
    color: var(--dark-text);
    margin-bottom: 20px;
    font-size: 18px;
}

/* Lesson Submission Section */
.lesson-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 6px;
    margin-bottom: 30px;
    border-left: 4px solid #021b2d;
}

.lesson-section h2 {
    color: var(--dark-text);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.lesson-input-group {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.lesson-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lesson-row label {
    color: var(--dark-text);
    font-weight: 600;
    font-size: 14px;
}

#lessonNumber {
    color: #021b2d;
    font-weight: 700;
}

.lesson-input-wrapper {
    display: flex;
    gap: 10px;
}

.lesson-input-wrapper input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
}

.lesson-input-wrapper input:focus {
    outline: none;
    border-color: #021b2d;
    box-shadow: 0 0 0 3px rgba(2, 27, 45, 0.1);
}

.btn-lesson {
    padding: 12px 20px;
    background: #021b2d;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-lesson:hover {
    background: #0a2f4a;
}

.btn-lesson:active {
    transform: translateY(0);
}

/* Daily Progress Section */
.daily-progress-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.daily-progress-section h3 {
    color: var(--dark-text);
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
}

.daily-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #757575;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #021b2d;
}

.stat-value.highlight-red {
    color: #c74b50;
}

.daily-progress-bar {
    width: 100%;
    height: 30px;
    background: #e8eaed;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.daily-fill {
    height: 100%;
    background: #021b2d;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 30px;
}

/* Messages */
.status-message {
    padding: 16px;
    border-radius: 6px;
    margin-top: 20px;
    font-weight: 500;
    display: none;
}

.status-message.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.status-message.success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid var(--success-color);
}

.status-message.error {
    background: #fed7d7;
    color: #742a2a;
    border-left: 4px solid var(--danger-color);
}

.status-message.warning {
    background: #feebc8;
    color: #7c2d12;
    border-left: 4px solid var(--warning-color);
}

.status-message.info {
    background: #bee3f8;
    color: #2c5282;
    border-left: 4px solid #021b2d;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Error Messages */
.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 10px;
    font-weight: 500;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 60px;
    margin-bottom: 0;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.action-buttons .btn {
    flex: 1;
}

/* Login Visual Enhancements */
.login-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    margin-top: 8px;
    animation: slideUpFadeIn 1.5s ease-out 0s both;
}

.login-logo {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: white;
}

.login-logo-yago {
    width: 160px;
    height: 120px;
    margin-bottom: 18px;
    border-radius: 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.13);
    background: white;
    object-fit: contain;
}

.login-logo-yago-noshadow {
    width: 160px;
    height: 120px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: transparent;
    object-fit: contain;
    box-shadow: none;
}

.login-welcome {
    font-size: 20px;
    color: #021b2d;
    font-weight: 700;
    margin-bottom: 6px;
    margin-top: 0;
}

.login-desc {
    color: #4a5568;
    font-size: 15px;
    margin-bottom: 0;
    text-align: center;
    line-height: 1.5;
}

.login-tagline {
    font-size: 28px;
    color: #021b2d;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 0;
    line-height: 1.3;
    animation: slideUpFadeIn 1.5s ease-out 0.1s both;
}

.login-tagline-main {
    font-size: 52px;
    color: #ffffff;
    font-weight: 900;
    font-style: italic;
    margin-bottom: 50px;
    margin-top: 0;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    animation: slideUpFadeIn 1.5s ease-out 0s both;
    letter-spacing: 0.5px;
}/* Teacher Entry Section */
    .container {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-buttons {
        width: 100%;
    }

    .header-buttons .btn {
        flex: 1;
    }

    .version-selection {
        grid-template-columns: 1fr;
    }

    .stage-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .time-info-grid {
        grid-template-columns: 1fr;
    }

    .progress-fill {
        font-size: 10px;
    }

    .auth-box h1 {
        font-size: 24px;
    }

    .header h1 {
        font-size: 22px;
    }

    form {
        gap: 12px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 12px;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
        border-radius: 8px;
    }

    .stage-grid {
        grid-template-columns: 1fr;
    }

    .info-value {
        font-size: 24px;
    }

    .time-value {
        font-size: 20px;
    }

    .progress-percentage {
        font-size: 20px;
    }
}

/* User Icon Top Right */
.user-icon-bar {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 120;
    animation: fadeInOnly 2s ease-out;
}
.user-icon-btn {
    background: #021b2d;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s;
    padding: 0;
}
.user-icon-btn:hover {
    background: #021b2d;
}
.user-icon-btn svg {
    display: block;
}
/* Smoother User Popup Animation */
.user-popup {
    display: block;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 54px;
    right: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(2,27,45,0.13);
    padding: 16px 18px 12px 18px;
    color: #0a3d5f;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    z-index: 130;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.22s cubic-bezier(.4,0,.2,1), transform 0.22s cubic-bezier(.4,0,.2,1);
}
.user-popup.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.user-popup-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.user-popup-name {
    font-weight: 700;
    margin-bottom: 6px;
    color: #0a3d5f;
}
.user-popup-title {
    font-size: 14px;
    font-weight: 700;
    color: #0a3d5f;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

/* User Popup Buttons */
.user-popup .btn.btn-primary,
.user-popup a.btn.btn-primary {
    background: #0a3d5f;
    border: none;
}

.user-popup .btn.btn-primary:hover,
.user-popup a.btn.btn-primary:hover {
    background: #0d4a73;
}

/* ========== HOME PAGE STYLES ========== */

/* Home Page Body */
body.home-page {
    background: #ffffff;
}

body.home-page::before {
    border: 3px solid #021b2d;
}

/* Home Page Outline */
.home-page-outline {
    position: fixed;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 3px solid #021b2d;
    pointer-events: none;
    z-index: 200;
    box-sizing: border-box;
    animation: fadeInOnly 2s ease-out;
}

/* Home Page Menu Bar */
body.home-page .menu-bar .hamburger span {
    background: #021b2d;
}

/* Home Page User Icon */
body.home-page .user-icon-btn {
    background: #ffffff;
    border: 2px solid #021b2d;
}

body.home-page .user-icon-btn:hover {
    background: #f0f0f0;
}

/* Sidebar Menu Container */
.sidebar-menu-container {
    position: fixed;
    top: 18px;
    left: 0;
    bottom: 18px;
    width: 300px;
    z-index: 100;
    pointer-events: none;
}

/* Home page outline stays on top */
body.home-page .sidebar-menu-container {
    z-index: 199;
}

.sidebar-menu-container.active {
    pointer-events: auto;
}

.sidebar-menu-container.active .sidebar-menu {
    pointer-events: auto;
}

/* Sidebar Menu */
.sidebar-menu {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: #ffffff;
    transform: translateX(-280px);
    transition: transform 0.3s ease;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 12px rgba(0,0,0,0.15);
}

.sidebar-menu-container.active .sidebar-menu {
    transform: translateX(0);
}

/* Dark overlay when menu is open - DISABLED */
.sidebar-menu-container.active::after {
    display: none;
}

/* White blocker for area outside outline */
.sidebar-menu-container::before {
    content: '';
    position: absolute;
    top: -18px;
    left: -3px;
    width: 18px;
    bottom: -18px;
    background: #ffffff;
    z-index: 350;
    pointer-events: none;
}

/* Dark blocker for login page */
body:not(.home-page):not(.dashboard-page) .sidebar-menu-container::before {
    background: #021b2d;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
    position: relative;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: #021b2d;
    margin-bottom: 16px;
    padding-left: 15px;
    padding-top: 7px;
    border-bottom: 1px solid rgba(2, 27, 45, 0.1);
    padding-bottom: 12px;
}

.sidebar-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 28px;
    color: #021b2d;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    position: absolute;
    top: 16px;
    right: 16px;
}

.sidebar-close:hover {
    opacity: 0.7;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #021b2d;
    text-decoration: none;
    padding: 14px 7px 14px 25px;
    border-radius: 0;
    transition: background 0.2s, padding-left 0.2s;
    font-size: 15px;
    font-weight: 500;
}

.sidebar-nav-item:hover {
    background: rgba(2, 27, 45, 0.1);
    padding-left: 30px;
}

.sidebar-nav-item:hover {
    background: rgba(2, 27, 45, 0.1);
}

.sidebar-icon {
    font-size: 20px;
}

.sidebar-label {
    flex: 1;
}

/* Home Page Main */
body.home-page .main-centered {
    background: transparent;
}

body.home-page .home-main {
    padding: 40px 20px;
}

.home-container {
    max-width: 600px;
    margin: 0 auto;
}

.home-hero {
    text-align: center;
    margin-bottom: 60px;
    margin-top: -20px;
}

.home-logo {
    width: 240px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 24px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    animation: slideUpFadeIn 1.5s ease-out 0.1s both;
}

body.home-page h1 {
    font-size: 36px;
    color: #021b2d;
    margin-bottom: 8px;
    animation: slideUpFadeIn 1.5s ease-out 0.3s both;
}

.home-subtitle {
    font-size: 16px;
    color: #718096;
    margin-bottom: 32px;
    animation: slideUpFadeIn 1.5s ease-out 0.4s both;
}

.home-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: slideUpFadeIn 1.5s ease-out 0.5s both;
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInOnly {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeInOnly {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.home-cta {
    font-size: 16px;
    padding: 14px 32px;
    display: inline-block;
}

/* Home Info Cards */
.home-info {
    display: none;
}

@media (max-width: 600px) {
    .sidebar-menu {
        width: 240px;
    }
    
    body.home-page h1 {
        font-size: 28px;
    }
    
    .home-info {
        gap: 12px;
    }
}

/* ============================================
   STAGE MANAGER DASHBOARD STYLING
   ============================================ */

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.dashboard-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px 5px 30px;
}

.dashboard-content {
    padding: 30px 30px 0 30px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Stage Selection */
.stage-selection-wrapper {
    text-align: center;
    padding: 20px 0;
}

.stage-selection-wrapper h2 {
    font-size: 28px;
    color: #021b2d;
    margin-bottom: 10px;
}

.stage-instruction {
    color: #757575;
    font-size: 14px;
    margin-bottom: 30px;
}

.stage-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stage-card {
    background: linear-gradient(135deg, #021b2d 0%, #0a2f4a 100%);
    border: 2px solid #0a2f4a;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-align: center;
}

.stage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(2, 27, 45, 0.3);
    border-color: #d4af37;
}

.stage-card-number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #d4af37;
}

.stage-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.detail-label {
    color: #c0c0c0;
}

.detail-value {
    font-weight: 600;
    color: #ffffff;
}

/* Dashboard Sections */
section {
    margin-bottom: 30px;
}

section h2 {
    font-size: 20px;
    color: #021b2d;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Overview Section */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.overview-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.card-label {
    color: #757575;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    color: #021b2d;
}

/* Progress Section */
.progress-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-label {
    color: #757575;
    font-weight: 500;
}

.progress-percentage {
    font-size: 24px;
    font-weight: 700;
    color: #021b2d;
}

.progress-bar-container {
    background: #e0e0e0;
    border-radius: 8px;
    height: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #4a7c59 0%, #6ba876 100%);
    height: 100%;
    border-radius: 8px;
    transition: width 0.3s ease;
}

/* Entry Section */
.entry-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.entry-instruction {
    color: #757575;
    font-size: 13px;
    margin-bottom: 15px;
}

.entry-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-wrapper {
    display: flex;
    gap: 8px;
}

#dailyPointsInput {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dae0e5;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

#dailyPointsInput:focus {
    outline: none;
    border-color: #021b2d;
    background: #f0f4f8;
}

.btn-submit {
    padding: 10px 20px;
    background: #021b2d;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: #0a2f4a;
    transform: translateY(-2px);
}

/* Daily Status Section */
.daily-status-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.daily-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.status-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.status-label {
    color: #757575;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}

.status-value {
    font-size: 24px;
    font-weight: 700;
    color: #021b2d;
}

.status-message {
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    background: #fff3cd;
    color: #856404;
    font-weight: 500;
    font-size: 13px;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
}

.status-message.warning {
    background: #fff3cd;
    color: #856404;
}

/* Remaining Section */
.remaining-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.remaining-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.remaining-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.remaining-label {
    color: #757575;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}

.remaining-value {
    font-size: 28px;
    font-weight: 700;
    color: #c74b50;
}

/* Header Buttons */
.header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 10px 20px;
    background: #021b2d;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #0a2f4a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-content {
        padding: 20px;
    }
    
    .stage-grid-large {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    #dailyPointsInput {
        width: 100%;
    }
    
    .header-buttons {
        flex-direction: column;
    }
    
    .btn-secondary,
    .btn-logout {
        width: 100%;
    }
}

@media (max-width: 650px) {
    .dashboard-container {
        padding: 0 15px;
    }
    
    .dashboard-content {
        padding: 15px;
    }
    
    section h2 {
        font-size: 18px;
    }
    
    .card-value {
        font-size: 22px;
    }
    
    .status-value,
    .remaining-value {
        font-size: 20px;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   OFFICIAL DASHBOARD STYLING
   ============================================ */

.auth-notice-section {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.auth-notice {
    color: #856404;
    font-weight: 600;
    margin: 0;
    font-size: 14px;
}

/* Official Entry Form */
.official-entry-form {
    flex-direction: column;
    gap: 15px;
}

.official-entry-form .form-group {
    min-width: unset;
    flex: unset;
}

.official-entry-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dae0e5;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.official-entry-form input:focus {
    outline: none;
    border-color: #021b2d;
    background: #f0f4f8;
}

.official-entry-form .btn-submit {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}

/* Authentication Message */
.auth-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    display: none;
}

.auth-message:not(:empty) {
    display: block;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Entry Log Section */
.log-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-top: 20px;
}

.entry-log-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-entries {
    text-align: center;
    color: #757575;
    font-style: italic;
    padding: 20px;
    margin: 0;
}

.log-entry {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    display: grid;
    grid-template-columns: 50px 1fr 100px;
    gap: 15px;
    align-items: center;
}

.log-entry-number {
    font-weight: 700;
    color: #021b2d;
    font-size: 14px;
}

.log-entry-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-timestamp {
    color: #757575;
    font-size: 12px;
}

.log-points {
    font-weight: 600;
    color: #021b2d;
    font-size: 13px;
}

.log-status {
    text-align: right;
}

.log-authenticated {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

@media (max-width: 650px) {
    .log-entry {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .log-status {
        text-align: left;
    }
}

/* ============================================
   TEACHER DASHBOARD STYLING
   ============================================ */

.teacher-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 0px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.teacher-email {
    color: #021b2d;
    font-size: 13px;
    margin: 0;
}

/* Dropdown Sections */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid white;
    user-select: none;
    transition: all 0.2s ease;
}

.section-header:hover {
    background: white;
}

.section-header h2 {
    margin: 0;
    font-size: 18px;
    color: #021b2d;
}

.toggle-arrow {
    color: #757575;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown-content {
    display: none;
    padding: 15px;
    background: white;
    border: 1px solid white;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.dropdown-content.show {
    display: block;
    max-height: 2000px;
}

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 10px;
}

.form-row .form-group {
    margin: 0;
}

.form-row .form-group label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
}

.form-row input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dae0e5;
    border-radius: 6px;
    font-size: 13px;
}

.form-row input:focus {
    outline: none;
    border-color: #021b2d;
    background: #f0f4f8;
}

.form-row .btn {
    padding: 8px 15px;
    font-size: 13px;
}

/* Section Instruction */
.section-instruction {
    color: #757575;
    font-size: 12px;
    margin: 0 0 12px 0;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, #021b2d 0%, #0a2f4a 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: white;
}

.stats-section h2 {
    color: white;
    border-bottom-color: rgba(255,255,255,0.2);
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}



/* Add Student Section */
.add-student-section {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid white;
}

/* Students List */
.students-list-section {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid white;
}

.students-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-students {
    text-align: center;
    color: #757575;
    font-style: italic;
    padding: 20px;
    margin: 0;
    font-size: 13px;
}

.student-card {
    background: white;
    border: 1px solid white;
    border-radius: 6px;
    padding: 12px;
    display: grid;
    grid-template-columns: 200px 80px 100px auto;
    gap: 12px;
    align-items: center;
}

.student-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.student-name {
    font-weight: 600;
    color: #021b2d;
    font-size: 13px;
}

.student-email {
    color: #757575;
    font-size: 11px;
}

.student-stage,
.student-progress {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.stage-label,
.progress-label {
    color: #757575;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.stage-value,
.progress-value {
    font-weight: 600;
    color: #021b2d;
    font-size: 12px;
}

.student-actions {
    display: flex;
    gap: 6px;
}

.btn-small {
    padding: 6px 10px;
    font-size: 12px;
    background: #021b2d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-small:hover {
    background: #0a2f4a;
}

.btn-small:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
    .student-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .student-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .teacher-container {
        padding: 0 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .student-card {
        padding: 10px;
    }

    .student-actions {
        flex-direction: column;
    }

    .btn-small {
        width: 100%;
    }
}

/* ============ STUDENT DASHBOARD ============ */

.dashboard-container {
    width: 100%;
    max-width: 1200px;
    padding: 0px 20px;
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.dashboard-header {
    margin-bottom: 10px;
    text-align: center;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    color: #021b2d;
    margin-bottom: 8px;
}

.header-subtitle {
    font-size: 1.1rem;
    color: #757575;
    margin-bottom: 20px;
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 50px;
    margin-left: -100px;
}

/* Stats Sidebar */
.stats-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 24px 24px 24px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #021b2d;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.info-box:hover {
    box-shadow: 0 4px 12px rgba(2, 27, 45, 0.2);
    transform: translateY(-2px);
    border-color: #021b2d;
}

.info-box-label {
    font-size: 0.9rem;
    color: #021b2d;
    font-weight: 600;
}

.info-box-icon {
    font-size: 1.2rem;
}

/* Stage Details Box */
.stage-details-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    margin-bottom: 8px;
}

.stage-details-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #021b2d;
}

.stage-details-label {
    font-size: 0.9rem;
    color: #021b2d;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-header h2 {
    color: #021b2d;
    font-size: 1.8rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #757575;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #021b2d;
}

.modal-body {
    padding: 25px;
}

.stage-info {
    background: #f8f9fa;
    border-left: 4px solid #021b2d;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.stage-info h3 {
    color: #021b2d;
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.stage-info p {
    margin: 5px 0;
    color: #757575;
    font-size: 0.95rem;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.75rem;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    white-space: nowrap;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #021b2d;
    line-height: 0.9;
    margin: -2px 0;
}

/* Dashboard Content */
.dashboard-content {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px 30px 15px 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.content-section h2 {
    font-size: 1.8rem;
    color: #021b2d;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Stages Grid */
.stages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.stage-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stage-card:hover {
    border-color: #021b2d;
    box-shadow: 0 8px 20px rgba(2, 27, 45, 0.15);
    transform: translateY(-4px);
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stage-header h3 {
    font-size: 1.5rem;
    color: #021b2d;
}

.stage-badge {
    background: #d4af37;
    color: #021b2d;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.stage-details p {
    color: #757575;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a7c59 0%, #6ba876 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: #999;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-container {
        padding: 30px 15px;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stages-grid {
        grid-template-columns: 1fr;
    }
}

/* ============ CHART STYLES ============ */

.bottom-cover-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: white;
    z-index: 9999;
}

.top-cover-slide {
    position: fixed;
    top: 0;
    left: -15px;
    right: 0;
    height: 18px;
    background: white;
    z-index: 100;
}

.dashboard-page .top-cover-slide,
.dashboard-page .bottom-cover-bar {
    background: white;
}

.login-page .bottom-cover-bar {
    background: #021b2d;
}

.chart-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: absolute;
    top: 32px;
    right: 32px;
    z-index: 10;
}

.chart-btn {
    background: white;
    border: 2px solid #021b2d;
    color: #021b2d;
    padding: 10px 20px;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-btn:hover {
    background: #021b2d;
    color: white;
}

.chart-btn.active {
    background: #021b2d;
    color: white;
}

.chart-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

#progressChart {
    width: 100%;
    height: 400px;
    display: block;
}

#chartLegend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: absolute;
    top: 32px;
    left: 32px;
    z-index: 10;
    font-size: 0.9rem;
    background: white;
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chart-legend-topleft {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 5;
    font-size: 0.9rem;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    pointer-events: none;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: #021b2d;
}

/* Stage Progress Bar */
.stage-progress-section {
    margin-top: 25px;
    margin-bottom: 0;
    padding-top: 20px;
    padding-bottom: 0;
    border-top: 1px solid #e0e0e0;
}

.stage-progress-bar-container {
    position: relative;
    padding-right: 40px;
    padding-bottom: 0;
    padding-top: 0px;
}

.stage-progress-bar {
    width: 100%;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: visible;
    position: relative;
}

.stage-progress-fill {
    height: 100%;
    background: #021b2d;
    border-radius: 12px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.stage-progress-popup {
    position: absolute;
    top: -32px;
    right: -5px;
    background: white;
    border: 2px solid #021b2d;
    color: #021b2d;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transform: translateX(50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stage-progress-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #021b2d;
}

.stage-progress-popup::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid white;
    z-index: 1;
}

.stage-progress-percent {
    position: absolute;
    top: 3px;
    right: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #021b2d;
}

/* Stage Completion Progress Bar */
.stage-completion-container {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.stage-completion-label {
    font-weight: 600;
    margin-bottom: 12px;
    color: #021b2d;
}

.stage-completion-bar {
    width: 100%;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.stage-completion-progress {
    height: 100%;
    background: #021b2d;
    border-radius: 12px;
    width: 0%;
    transition: width 0.3s ease;
}

.stage-completion-percent {
    text-align: right;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
    .dashboard-container {
        padding: 20px 10px;
    }

    .dashboard-header h1 {
        font-size: 1.6rem;
    }

    .dashboard-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        font-size: 1.8rem;
    }

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

    .stages-grid {
        grid-template-columns: 1fr;
    }

    .stage-card {
        padding: 20px;
    }

    .stage-header h3 {
        font-size: 1.2rem;
    }

    .chart-controls {
        gap: 8px;
    }

    .chart-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .chart-container {
        padding: 15px;
    }

    #progressChart {
        height: 300px;
    }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 0;
    justify-content: center;
}

.action-btn {
    background: #021b2d;
    color: white;
    border: none;
    padding: 10px 30px 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    flex: 1;
}

.action-btn:hover {
    background: #0a2d45;
}

.action-btn:active {
    background: #051a28;
}

/* Password Modal */
.password-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.password-modal {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.password-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #021b2d;
    font-size: 1.5rem;
}

.password-modal input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

.password-modal input:focus {
    outline: none;
    border-color: #021b2d;
}

.password-modal-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.password-modal-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.password-modal-actions .btn-primary {
    background: #021b2d;
    color: white;
}

.password-modal-actions .btn-primary:hover {
    background: #0a2d45;
}

.password-modal-actions .btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.password-modal-actions .btn-secondary:hover {
    background: #d0d0d0;
}

.password-error {
    color: #d32f2f;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Mobile Responsive - Phones */
@media (max-width: 900px) {
    .hamburger {
        width: 40px;
        height: 40px;
    }
    
    .hamburger span {
        width: 32px;
        height: 3px;
    }
    
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-left: 0;
    }
    
    .stats-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Hide Points Earned on mobile */
    .points-earned-card {
        display: none;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    #progressChart {
        height: 250px;
    }
    
    .chart-controls {
        top: 25px !important;
        right: 25px !important;
    }
    
    #chartLegend {
        top: 20px !important;
        left: 20px !important;
        display: none;
    }
    
    .stage-progress-bar-container {
        padding-right: 8px;
    }
    
    .stage-progress-popup {
        right: -10px;
    }
    
    .action-buttons {
        padding-left: 0;
        padding-right: 0;
        padding-top: 15px;
    }
}

@media (max-width: 600px) {
    .hamburger {
        width: 44px;
        height: 44px;
    }
    
    .hamburger span {
        width: 36px;
        height: 3px;
    }
    
    .dashboard-container {
        padding: 10px;
        padding-top: 70px;
    }
    
    .dashboard-content {
        padding: 15px;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .stats-sidebar {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .chart-container {
        padding: 10px;
    }
    
    #progressChart {
        height: 200px;
    }
    
    .chart-controls {
        flex-wrap: wrap;
        gap: 5px;
        top: 15px !important;
        right: 15px !important;
    }
    
    .chart-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    #chartLegend {
        top: 10px !important;
        left: 10px !important;
        font-size: 12px;
        display: none;
    }
    
    .stage-progress-bar-container {
        padding-right: 38px;
        padding-top: 15px;
        padding-left: 5px;
    }
    
    .stage-progress-popup {
        right: -10px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 8px;
        margin-top: 16px;
        padding-top: 15px;
        border-top: 1px solid #e0e0e0;
    }
    
    .action-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .password-modal {
        width: 85%;
        padding: 20px;
    }
    
    .password-modal h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
}
