/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #6ab6f5 0%, #2196F3 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 70px;
}

/* ===== Layout ===== */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: #ffffff;
    padding: 42px 36px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    max-width: 420px;
    width: 100%;
}

/* ===== Typography ===== */
h1 { color: #222222; margin-bottom: 8px; font-size: 26px; font-weight: 600; text-align: center; }
h2 { color: #2196F3; margin-bottom: 12px; font-size: 22px; font-weight: 600; }
p  { color: #707579; margin-bottom: 24px; line-height: 1.5; text-align: center; font-size: 15px; }

code {
    background: #F5F5F5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 14px;
    color: #2196F3;
}

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

label { display: block; margin-bottom: 8px; color: #707579; font-weight: 500; font-size: 14px; }

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dadce0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.2s;
    background: #f5f5f5;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #2196F3;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(33,150,243,0.1);
}

/* ===== Buttons ===== */
.btn {
    background: #2196F3;
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 2px 8px rgba(33,150,243,0.3);
}
.btn:hover    { background: #1976D2; box-shadow: 0 4px 12px rgba(33,150,243,0.4); transform: translateY(-1px); }
.btn:active   { transform: translateY(0); }
.btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* ===== Alerts ===== */
.icon { font-size: 64px; margin-bottom: 16px; text-align: center; }

.success {
    background: #E8F5E9;
    border: 1px solid #4CAF50;
    border-left: 4px solid #4CAF50;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #2E7D32;
}
.success strong { color: #1B5E20; }

.info {
    background: #E3F2FD;
    border: 1px solid #2196F3;
    border-left: 4px solid #2196F3;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #0D47A1;
}
.info ul { margin-top: 8px; color: #1976D2; }

.error-container {
    background: #FFEBEE;
    border: 1px solid #EF5350;
    border-left: 4px solid #EF5350;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}
.error-icon    { font-size: 56px; margin-bottom: 12px; text-align: center; }
.error-container h2 { color: #C62828; text-align: center; }
.error-container p  { color: #D32F2F; }

.warning-box {
    background: #FFF3E0;
    border: 1px solid #FF9800;
    border-left: 4px solid #FF9800;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    color: #E65100;
    font-size: 14px;
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.loading-overlay.active { display: flex; }

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #E3F2FD;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.loading-text    { color: #333; font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.loading-subtext { color: #666; font-size: 14px; text-align: center; max-width: 300px; }
.loading-progress { margin-top: 20px; color: #2196F3; font-size: 13px; }

/* ===== Navigation ===== */
.nav-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}
.nav-logo         { display: flex; align-items: center; text-decoration: none; gap: 8px; }
.nav-logo-icon    { font-size: 28px; }
.nav-logo-text    { font-size: 22px; font-weight: 700; color: #2196F3; letter-spacing: -0.5px; }
.nav-menu         { display: flex; align-items: center; gap: 8px; }
.nav-item         { position: relative; }
.nav-link         { color: #444; text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 6px; transition: all 0.2s ease; display: flex; align-items: center; gap: 6px; }
.nav-link:hover   { background: #f5f5f5; color: #2196F3; }

.nav-dropdown     { position: relative; }
.nav-dropdown-btn {
    color: #444; font-size: 14px; font-weight: 500;
    padding: 8px 14px; border-radius: 6px;
    transition: all 0.2s ease;
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; border: none; background: none;
}
.nav-dropdown-btn:hover             { background: #f5f5f5; color: #2196F3; }
.nav-dropdown-arrow                 { font-size: 10px; transition: transform 0.2s; }
.nav-dropdown:hover .nav-dropdown-arrow { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute; top: 100%; left: 0;
    background: white; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 8px 0; min-width: 200px;
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    border: 1px solid #eee;
}
.nav-dropdown:hover .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(4px); }

.nav-dropdown-item  { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #444; text-decoration: none; font-size: 14px; transition: all 0.15s ease; }
.nav-dropdown-item:hover { background: #f8f9fa; color: #2196F3; }
.nav-dropdown-icon  { font-size: 18px; width: 24px; text-align: center; }
.nav-dropdown-label { font-weight: 500; }
.nav-dropdown-desc  { font-size: 12px; color: #888; margin-top: 2px; }

.nav-badge { background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%); color: white; padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.nav-cta {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 8px; font-weight: 600;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(33,150,243,0.3);
    transition: all 0.2s ease;
}
.nav-cta:hover { background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%) !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(33,150,243,0.4); }

.nav-divider { width: 1px; height: 24px; background: #e0e0e0; margin: 0 8px; }

/* ===== Footer ===== */
.site-footer { background: #f5f5f5; border-top: 1px solid #e0e0e0; padding: 40px 20px 20px; margin-top: 60px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.footer-brand   { color: #2196F3; font-size: 16px; margin-bottom: 12px; }
.footer-about   { color: #777; font-size: 13px; line-height: 1.6; }
.footer-heading { color: #333; font-size: 14px; margin-bottom: 12px; }
.footer-link    { display: block; color: #666; text-decoration: none; font-size: 13px; margin-bottom: 8px; }
.footer-link:hover { color: #2196F3; }
.footer-bottom  { max-width: 1200px; margin: 30px auto 0; padding-top: 20px; border-top: 1px solid #ddd; text-align: center; color: #999; font-size: 12px; }

/* ===== Page containers ===== */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 60px 40px;
    border-radius: 16px;
}

/* ===== Download links ===== */
.download-link {
    display: block;
    background: #E3F2FD;
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 8px;
    text-decoration: none;
    color: #1976D2;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #2196F3;
}
.download-link:hover { background: #2196F3; color: white; transform: translateX(5px); }
.download-icon { margin-right: 8px; }

/* ===== User info banner ===== */
.user-info { background: #E3F2FD; padding: 12px; border-radius: 8px; margin-bottom: 20px; text-align: center; color: #1976D2; font-size: 14px; }

/* ===== Logout button ===== */
.logout-btn { background: #f44336; margin-top: 20px; }
.logout-btn:hover { background: #d32f2f; }
