:root {
    --primary: #10b981;
    /* Emerald Green */
    --primary-dark: #059669;
    --secondary: #d1fae5;
    --accent: #34d399;
    --success: #22c55e;
    --error: #ef4444;
    --surface: #ffffff;
    --background: #f0fdf4;
    /* Light Green Background */
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --login-bg: #3b5a7a;
    /* Pastest dark blue */
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
}

/* ============ LOGIN PAGE ============ */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--login-bg) 0%, #2d4a63 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-brand {
    color: white;
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    text-align: center;
    font-size: 0.95rem;
}

.login-card {
    background: white;
    border-radius: 1rem;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text);
    font-weight: 400;
    font-size: 1.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 2rem;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.5rem;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.forgot-password {
    text-align: center;
    margin-top: 1.5rem;
}

.forgot-password a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.login-version {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-top: 3rem;
    font-size: 0.85rem;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ============ NAVBAR ============ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.brand-icon {
    width: 28px;
    height: 28px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.btn-logout {
    background: none;
    border: 2px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: var(--error);
    color: var(--error);
}

/* ============ MAIN LAYOUT ============ */
#main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ============ TABS ============ */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn:hover {
    color: var(--primary);
}

/* ============ COMPONENTS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.card {
    background-color: var(--surface);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* ============ FOLDER CARDS ============ */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.folder-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.folder-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.folder-icon {
    width: 48px;
    height: 48px;
    background: var(--secondary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.folder-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.folder-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============ PROGRESS CIRCLES ============ */
.progress-container {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin: 3rem 0;
}

.progress-circle {
    text-align: center;
}

.circle-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 1rem;
}

.circle-svg {
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 12;
}

.circle-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.progress-label {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.progress-stats {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============ QUESTION STYLES ============ */
.question-header {
    margin-bottom: 1.5rem;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-btn {
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    background-color: var(--surface);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background-color: var(--secondary);
}

.option-btn.selected {
    border-color: var(--primary);
    background-color: var(--secondary);
    font-weight: 600;
}

.option-btn.correct {
    border-color: var(--success);
    background-color: #dcfce7;
    color: #166534;
}

.option-btn.incorrect {
    border-color: var(--error);
    background-color: #fee2e2;
    color: #991b1b;
}

.explanation-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--secondary);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
}

/* ============ TABLE ============ */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    background: var(--background);
}

/* ============ UTILITIES ============ */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-muted {
    color: var(--text-muted);
}

/* ============ MODAL SYSTEM ============ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 1.25rem;
    width: 95%;
    max-width: 550px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.modal-close:hover {
    background: var(--background);
    color: var(--error);
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
}

/* ============ TOAST NOTIFICATIONS ============ */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 4px solid var(--primary);
    transform: translateX(120%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 320px;
    max-width: 450px;
}

.toast.active {
    transform: translateX(0);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast-message {
    font-size: 0.95rem;
    color: var(--text);
}