@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== VARIABLES ===== */
:root {
    --bg-primary: #0f2027;
    --bg-secondary: #162635;
    --text-primary: #f5f5f7;
    --text-secondary: #8a9db5;
    --accent: #f1c40f;
    --accent-hover: #f39c12;
    --card-border: rgba(241, 196, 15, 0.15);
    --card-bg: rgba(255, 255, 255, 0.04);
    --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.6);
    --red: #e74c3c;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER / NAV ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 64px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(241, 196, 15, 0.12);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-img { height: 36px; width: auto; }

.logo-text {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

/* Main nav */
.main-nav {
    display: flex;
    gap: 4px;
    align-items: center;
    position: relative;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 13px;
    border-radius: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a:hover {
    color: var(--text-primary);
    background: transparent;
}

.main-nav a.active {
    color: var(--accent);
    background: transparent;
}

.nav-indicator {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(241, 196, 15, 0.12);
    border-radius: 20px;
    z-index: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1.2), width 0.4s cubic-bezier(0.4, 0, 0.2, 1.2), height 0.4s cubic-bezier(0.4, 0, 0.2, 1.2);
    pointer-events: none;
}

.main-nav a {
    position: relative;
    z-index: 1;
}

.main-nav a svg { flex-shrink: 0; }

/* Auth section (right side) */
.auth-section { display: flex; align-items: center; gap: 12px; }

/* ===== BUTTONS ===== */
.btn {
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.btn-primary {
    background: var(--accent);
    color: #111;
    font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); }

.btn-danger {
    background: rgba(231,76,60,0.85);
    color: white;
}
.btn-danger:hover { background: #c0392b; }


.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
}

.glass-card { background: var(--card-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--card-border); border-radius: 20px; }

/* ===== MAIN CONTENT ===== */
.main-content { flex: 1; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5%;
}

/* ===== DASHBOARD LAYOUT ===== */
.dash-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.dash-profile-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.dash-profile-bar .avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
    flex-shrink: 0;
}

.dash-profile-bar h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.dash-profile-bar .subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Dashboard section cards — same look as kekkotech service cards */
.section { display: none; }
.section.active { display: block; }

.dash-section-card {
    padding: 28px;
    margin-bottom: 20px;
}

.section-title-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(241,196,15,0.1);
}

.section-title-bar h3 {
    font-size: 16px;
    font-weight: 600;
}

.section-title-bar .section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(241,196,15,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 14px;
}

/* ===== FORM ELEMENTS ===== */
.input-group { margin-bottom: 16px; }

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 7px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    outline: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--accent);
    background: rgba(241,196,15,0.04);
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    display: none;
    margin-bottom: 16px;
}
.alert.success { display: block; background: rgba(39,174,96,0.15); border: 1px solid rgba(39,174,96,0.3); color: #2ecc71; }
.alert.error { display: block; background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.3); color: #e74c3c; }
.alert.info { display: block; background: rgba(241,196,15,0.1); border: 1px solid rgba(241,196,15,0.25); color: var(--accent); }

/* ===== FOOTER ===== */
.footer {
    padding: 24px 5%;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-top: auto;
    border-top: 1px solid var(--card-border);
}

.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

app-footer { margin-top: auto; width: 100%; }

/* ===== INDEX / HERO ===== */
.id-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100vh - 64px - 80px);
    padding: 60px 20px;
}

.id-hero-logo {
    width: 100px;
    margin-bottom: 28px;
    filter: drop-shadow(0 6px 20px rgba(241,196,15,0.3));
}

.id-hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 14px;
}

.id-hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 32px;
}

.id-cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== STRENGTH RULES (auth, passreset, dashboard) ===== */
.str-rule, .dash-str-rule { 
    font-size: 11px; 
    padding: 3px 0; 
    color: rgba(255,255,255,0.4); 
    transition: color 0.25s; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    text-align: left;
}
.str-rule::before, .dash-str-rule::before { 
    content: '✗'; 
    font-size: 11px; 
    color: rgba(255,255,255,0.4); 
    transition: color 0.25s; 
}
.str-rule.ok, .dash-str-rule.ok { color: #2ecc71; }
.str-rule.ok::before, .dash-str-rule.ok::before { 
    content: '✓'; 
    color: #2ecc71; 
}

/* ===== SESSIONS LIST ===== */
.session-item, .service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 8px;
    font-size: 13px;
}

.service-item img { width: 28px; height: 28px; border-radius: 6px; margin-right: 10px; }
.service-item .service-name { font-weight: 500; }
.btn-small {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* ===== PRIVACY PAGE ===== */
.privacy-content { padding: 40px; max-width: 780px; margin: 40px auto; }
.privacy-content h1 { font-size: 26px; margin-bottom: 8px; }
.privacy-content h2 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; color: var(--accent); }
.privacy-content p, .privacy-content li { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.privacy-content ul { padding-left: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-nav {   
        position: fixed;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        width: max-content;
        min-width: 250px;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--card-border);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
        border-radius: 40px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 8px 16px;
        margin: 0 !important;
        z-index: 1000;
    }
    .main-nav a {
        flex-direction: column;
        gap: 4px;
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 8px;
        background: transparent !important;
    }
    .main-nav a.active {
        color: var(--accent);
    }
    .footer {
        padding-bottom: 90px;
    }
    .dash-container { padding: 24px 14px 90px; }
    .dash-section-card { padding: 18px; }
    .dash-profile-bar { flex-wrap: wrap; }
    .id-hero h1 { font-size: 30px; }
}
