:root {
    --color-primary: #1a5276;
    --color-bg: #f4f6f8;
    --color-text: #1f2937;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

.container { max-width: 960px; margin: 0 auto; padding: 1rem; }

.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.brand { font-weight: 700; color: var(--color-primary); text-decoration: none; }

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

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

.btn-link { background: transparent; border: none; color: var(--color-primary); }

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

.form-control {
    width: 100%;
    max-width: 320px;
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.hero { text-align: center; padding: 3rem 1rem; }

.site-header .container { display: flex; align-items: center; gap: 1rem; }
.site-header .header-actions { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }

/* Version toggle (public) */
.version-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #12437a;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}
.version-toggle:hover { background: #0f2f57; }
.version-toggle__dot { width: 8px; height: 8px; border-radius: 50%; background: #17c3b2; }
.version-toggle--fixed { position: fixed; top: 14px; right: 16px; z-index: 1000; box-shadow: 0 4px 16px rgba(16,24,40,.18); }

/* Public portal shortcuts. */
.portal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.portal-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.portal-resource img { flex: 0 0 22px; }
.portal-actions .btn:focus-visible { outline: 3px solid #17a89c; outline-offset: 3px; }

.portal-actions .btn { width: auto; min-width: 150px; min-height: 46px; padding: 10px 14px; position: relative; }
.portal-actions .btn:hover { filter: brightness(1.08); }
.portal-actions .btn[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    width: max-content;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #123a6b;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
    box-shadow: 0 8px 20px rgba(16, 24, 40, .18);
    z-index: 20;
}
.portal-actions .btn[data-tip]::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #123a6b;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 20;
}
.portal-actions .btn[data-tip]:hover::after,
.portal-actions .btn[data-tip]:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.portal-actions .btn[data-tip]:hover::before,
.portal-actions .btn[data-tip]:focus-visible::before { opacity: 1; }

