/* ============================================================
   barox Zertifikats-Generator – Design im barox Corporate Style
   Farben: Navy #002D4E · Orange #F2A700
   Schrift: Helvetica Now
   ============================================================ */

@font-face {
    font-family: "Helvetica Now Text";
    src: url("../fonts/HelveticaNowText-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Helvetica Now Text";
    src: url("../fonts/HelveticaNowText-Medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Helvetica Now Text";
    src: url("../fonts/HelveticaNowText-Bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Helvetica Now Display";
    src: url("../fonts/HelveticaNowDisplay-Bd.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy:        #002D4E;
    --navy-700:    #013a64;
    --navy-600:    #0a4a78;
    --orange:      #F2A700;
    --orange-600:  #d99600;
    --ink:         #16242f;
    --muted:       #5d6b76;
    --line:        #e0e5ea;
    --bg:          #f4f6f8;
    --white:       #ffffff;
    --danger:      #c0392b;
    --danger-bg:   #fdecea;
    --success:     #1e7e57;
    --success-bg:  #e6f4ee;
    --info-bg:     #eaf1f7;
    --radius:      10px;
    --shadow:      0 2px 8px rgba(0, 45, 78, .07);
    --shadow-lg:   0 12px 40px rgba(0, 45, 78, .16);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Helvetica Now Text", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: "Helvetica Now Display", "Helvetica Now Text", Arial, sans-serif;
    color: var(--navy);
    line-height: 1.2;
    margin: 0 0 .4em;
}
h1 { font-size: 1.85rem; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.02rem; }

a { color: var(--navy-600); }

/* ---------- Header ---------- */
.site-header {
    background: var(--navy);
    color: #fff;
}
.site-header__inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { display: block; }
.site-header__title {
    font-weight: 500;
    color: rgba(255,255,255,.78);
    border-left: 1px solid rgba(255,255,255,.25);
    padding-left: 18px;
    font-size: .98rem;
}
.site-header__user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: .9rem;
}
.site-header__user-name { color: rgba(255,255,255,.85); }

/* ---------- Layout ---------- */
.site-main {
    flex: 1;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.site-footer {
    background: #fff;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .82rem;
}
.site-footer__inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Card ---------- */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
}
.card__lead { color: var(--muted); margin-top: 0; }

.accent-bar {
    height: 4px;
    width: 56px;
    background: var(--orange);
    border-radius: 2px;
    margin-bottom: 18px;
}

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 22px;
}
.field { display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }

label.field-label,
.field-label {
    font-weight: 500;
    font-size: .88rem;
    color: var(--navy);
    margin-bottom: 6px;
}
.field-label .req { color: var(--orange-600); }
.field-hint {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 5px;
}

input[type="text"],
input[type="number"],
textarea,
select {
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    width: 100%;
    transition: border-color .12s, box-shadow .12s;
}
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--navy-600);
    box-shadow: 0 0 0 3px rgba(0, 45, 78, .12);
}
textarea { resize: vertical; min-height: 70px; }

fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0;
}
fieldset legend {
    font-weight: 500;
    font-size: .85rem;
    color: var(--navy);
    padding: 0 6px;
}
.radio-row { display: flex; gap: 22px; flex-wrap: wrap; }
.radio-opt { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.radio-opt input { width: auto; }

.checkbox-row { display: flex; gap: 22px; flex-wrap: wrap; }
.checkbox-opt { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.checkbox-opt input { width: auto; }

.section-title {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 700;
    margin: 28px 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.section-title:first-of-type { margin-top: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 11px 22px;
    text-decoration: none;
    transition: background .12s, border-color .12s, color .12s, transform .04s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange); color: var(--navy); }
.btn--primary:hover { background: var(--orange-600); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-700); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { background: #fff; border-color: var(--line); color: var(--navy); }
.btn--outline:hover { border-color: var(--navy-600); }
.btn--danger { background: #fff; border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); }
.btn--sm { padding: 7px 14px; font-size: .85rem; }
.btn--lg { padding: 14px 30px; font-size: 1.02rem; }

.form-actions {
    margin-top: 28px;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

/* ---------- Alerts / Notes ---------- */
.alert {
    border-radius: 8px;
    padding: 13px 16px;
    margin-bottom: 18px;
    font-size: .92rem;
    border: 1px solid transparent;
}
.alert--error   { background: var(--danger-bg);  border-color: #f3c0ba; color: var(--danger); }
.alert--success { background: var(--success-bg); border-color: #bfe3d2; color: var(--success); }
.alert--info    { background: var(--info-bg);    border-color: #cfe0ee; color: var(--navy); }
.alert ul { margin: 6px 0 0; padding-left: 20px; }

.note {
    background: var(--info-bg);
    border-left: 4px solid var(--navy-600);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: .86rem;
    color: var(--navy);
    margin: 8px 0 0;
}
.note--warn {
    background: #fff7e6;
    border-left-color: var(--orange);
    color: #7a5b00;
}

/* ---------- Login ---------- */
.login-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.login-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}
.login-card__top {
    background: var(--navy);
    padding: 34px 34px 28px;
    text-align: center;
}
.login-card__top img { height: 38px; }
.login-card__body { padding: 30px 34px 34px; text-align: center; }
.login-card__body h1 { font-size: 1.4rem; }
.login-card__body p { color: var(--muted); margin: 0 0 24px; }
.login-card .btn { width: 100%; }
.ms-icon { width: 18px; height: 18px; }

/* ---------- Result downloads ---------- */
.download-list { display: grid; gap: 12px; margin: 6px 0 0; }
.download-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.download-item__icon {
    width: 42px; height: 42px;
    flex: 0 0 42px;
    border-radius: 8px;
    background: var(--info-bg);
    color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .72rem;
}
.download-item--primary { border-color: var(--orange); background: #fffdf5; }
.download-item--primary .download-item__icon { background: var(--orange); color: var(--navy); }
.download-item__meta { flex: 1; }
.download-item__name { font-weight: 500; color: var(--navy); }
.download-item__desc { font-size: .8rem; color: var(--muted); }

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    margin-top: 6px;
}
.summary-table th, .summary-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.summary-table th { color: var(--muted); font-weight: 500; width: 230px; }
code, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.pem-preview {
    background: var(--navy);
    color: #cfe0ee;
    border-radius: 8px;
    padding: 16px;
    font-size: .8rem;
    overflow-x: auto;
    white-space: pre;
}

@media (max-width: 680px) {
    .form-grid { grid-template-columns: 1fr; }
    .summary-table th { width: auto; }
    .site-header__title { display: none; }
}
