/* MPM AGD Web — shared styles */

:root {
    --brand: #1a56db;
    --brand-dark: #143a99;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --error: #dc2626;
    --success: #16a34a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Nav ─────────────────────────────────────────────────────── */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
}
.navbar-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 1.5rem;
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand);
    text-decoration: none;
    white-space: nowrap;
}
.navbar-brand span { color: var(--text); }
.navbar-links {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    align-items: center;
}
.navbar-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: color 0.15s, background 0.15s;
}
.navbar-links a:hover { color: var(--text); background: var(--bg); }
.navbar-links a.active { color: var(--brand); font-weight: 600; }

/* User badge */
.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
    border-left: 1px solid var(--border);
    margin-left: 0.25rem;
}
.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
}
.user-login {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Main / Footer ───────────────────────────────────────────── */
.main {
    flex: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}
.footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.card h1 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.card h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.card p { margin-bottom: 1rem; color: var(--text); }
.card a:not(.btn) { color: var(--brand); }

/* ── Forms ────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
.form-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--surface);
}
.form-input:focus {
    outline: 2px solid var(--brand);
    outline-offset: -1px;
    border-color: var(--brand);
}
.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}
.form-success {
    background: var(--success);
    border: 1px solid #15803d;
    color: #ffffff;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}nt-size: 0.9rem;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #eef2f7; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; text-align: center; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* Focus-visible for keyboard accessibility */
.btn:focus-visible,
a:focus-visible,
.form-input:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 3rem 1rem; }
.hero h1 { font-size: 2rem; margin-bottom: 1rem; }
.hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto 1.5rem; }
.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Login form wrapper ──────────────────────────────────────── */
.login-wrapper {
    max-width: 400px;
    margin: 2rem auto;
}

/* ── Release info ─────────────────────────────────────────────── */
.release-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.release-meta span { margin-right: 1rem; }
.release-notes {
    background: var(--bg);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    white-space: pre-wrap;
    font-size: 0.9rem;
}
.checksum {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-all;
}
.checksum-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.checksum-row code {
    flex: 1;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-all;
}
.file-size {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-required { background: #fef2f2; color: var(--error); }
.badge-optional { background: #f0fdf4; color: var(--success); }

/* ── Empty state ──────────────────────────────────────────────── */
.empty-state { text-align: center; color: var(--text-muted); padding: 2rem; }

/* ── Icon button (copy, etc.) ─────────────────────────────────── */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.icon-btn:hover { background: #eef2f7; color: var(--text); }
.icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── Copy confirmation tooltip (GitHub-style) ─────────────────── */
.copy-confirm {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--text);
    color: #fff;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
    z-index: 10;
}
.copy-confirm svg {
    flex-shrink: 0;
}
.copy-confirm.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Error page (404/500) ─────────────────────────────────────── */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}
.error-page h1 {
    font-size: 4rem;
    color: var(--brand);
    margin-bottom: 0.5rem;
}
.error-page p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* ── Cookie banner ────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    font-size: 0.85rem;
}
.cookie-banner-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cookie-banner-text {
    flex: 1;
    color: var(--text-muted);
    margin: 0;
}
.cookie-banner-text a {
    color: var(--brand);
    text-decoration: underline;
}
.cookie-banner-btn {
    flex-shrink: 0;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* ── Cookie policy page list ──────────────────────────────────── */
.cookie-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.cookie-list li {
    margin-bottom: 0.4rem;
    color: var(--text);
}
.cookie-list a {
    color: var(--brand);
}

/* ── Service request form (wide) ─────────────────────────────── */
.form-wrapper {
    max-width: 820px;
    margin: 2rem auto;
}
.form-section-title {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
}
.form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
}
@media (max-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}
