/* ============================================================
   XSLab – HZP Corporate Design
   ============================================================ */

:root {
    --hzp-primary:       #2596be;
    --hzp-primary-dark:  #1e7ba8;
    --hzp-header-bg:     #2c3e50;
    --hzp-text:          #495057;
    --hzp-heading:       #2c3e50;
    --hzp-light:         #f4f6f8;
    --hzp-border:        #dee2e6;
    --hzp-white:         #ffffff;
    --hzp-muted:         #6c757d;
    --transition:        0.18s ease;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--hzp-light);
    color: var(--hzp-text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── Header / Navigation ───────────────────────────────────── */
.site-header {
    background: var(--hzp-header-bg);
    border-bottom: 3px solid var(--hzp-primary);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--hzp-white);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: opacity var(--transition);
}
.header-brand:hover { opacity: 0.85; color: var(--hzp-white); }

.header-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--hzp-primary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--hzp-white);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-user {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
}

.btn-header {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
}

.btn-header-outline {
    border: 1px solid rgba(255,255,255,0.28);
    color: rgba(255,255,255,0.82);
    background: transparent;
}
.btn-header-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: var(--hzp-white);
}

/* ── Landing page ──────────────────────────────────────────── */
.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5rem 2rem 3rem;
    min-height: calc(100vh - 56px - 44px);
}

.landing-hero {
    text-align: center;
    max-width: 660px;
    margin-bottom: 4rem;
}

.landing-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--hzp-primary);
    background: rgba(37, 150, 190, 0.08);
    border: 1px solid rgba(37, 150, 190, 0.22);
    border-radius: 20px;
    padding: 0.22rem 0.85rem;
    margin-bottom: 1.2rem;
}

.landing-title {
    font-size: 3.4rem;
    font-weight: 800;
    color: var(--hzp-heading);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.landing-title span { color: var(--hzp-primary); }

.landing-subtitle {
    font-size: 1.05rem;
    color: var(--hzp-muted);
    line-height: 1.75;
    margin-bottom: 2.2rem;
}

.btn-primary-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 2rem;
    background: var(--hzp-primary);
    color: var(--hzp-white);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 2px solid var(--hzp-primary);
    box-shadow: 0 2px 12px rgba(37,150,190,0.25);
}
.btn-primary-lg:hover {
    background: var(--hzp-primary-dark);
    border-color: var(--hzp-primary-dark);
    color: var(--hzp-white);
    box-shadow: 0 4px 18px rgba(37,150,190,0.35);
}

/* ── XSLab dashboard ───────────────────────────────────────── */
.app-wrapper {
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.app-toolbar {
    background: var(--hzp-white);
    border-bottom: 1px solid var(--hzp-border);
    padding: 0.55rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 0.82rem;
    color: var(--hzp-muted);
    flex-shrink: 0;
}

.app-toolbar-title {
    font-weight: 700;
    color: var(--hzp-heading);
    font-size: 0.88rem;
}

.app-toolbar-sep {
    margin-left: auto;
}

.app-toolbar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--hzp-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color var(--transition);
}
.app-toolbar-link:hover { color: var(--hzp-primary); }

.app-container {
    flex: 1;
}

.plotly_class {
    height: 100%;
    width: 100%;
}

/* ── Login page ────────────────────────────────────────────── */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px - 44px);
    padding: 2rem;
}

.login-card {
    background: var(--hzp-white);
    border: 1px solid var(--hzp-border);
    border-top: 3px solid var(--hzp-primary);
    border-radius: 12px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.07);
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--hzp-heading);
}

.login-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--hzp-primary);
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--hzp-white);
    letter-spacing: 0.02em;
}

.login-card h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--hzp-heading);
    letter-spacing: -0.025em;
    margin-bottom: 0.3rem;
}

.login-card > p {
    font-size: 0.85rem;
    color: var(--hzp-muted);
    margin-bottom: 1.75rem;
}

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

.form-group label {
    display: block;
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--hzp-heading);
    margin-bottom: 0.38rem;
}

.form-group input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--hzp-border);
    border-radius: 6px;
    font-size: 0.88rem;
    color: var(--hzp-text);
    background: var(--hzp-white);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus {
    border-color: var(--hzp-primary);
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.13);
}

.btn-submit {
    width: 100%;
    padding: 0.72rem;
    background: var(--hzp-primary);
    color: var(--hzp-white);
    border: none;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    margin-top: 0.4rem;
}
.btn-submit:hover { background: var(--hzp-primary-dark); }

.error-list {
    list-style: none;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    color: #b91c1c;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
    background: var(--hzp-header-bg);
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    font-size: 0.73rem;
    letter-spacing: 0.03em;
    padding: 0.85rem 1rem;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
