:root {
    --navy: #17365d;
    --blue: #1f5f9f;
    --light: #f5f7fa;
    --border: #d5dbe3;
    --text: #1d2430;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--light);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

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

.container.narrow { max-width: 850px; }

.page-header {
    text-align: center;
    margin-bottom: 24px;
}

.page-header h1 { margin: 0 0 6px; color: var(--navy); }
.page-header p { margin: 0; color: #667085; }

.form-card, .report-list {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.section {
    padding: 18px 0 22px;
    border-bottom: 1px solid #e6eaf0;
}
.section:last-of-type { border-bottom: 0; }
.section h2 { margin: 0 0 16px; color: var(--navy); font-size: 20px; }

.grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.span-two { grid-column: 1 / -1; }

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    color: #344054;
}

input, select, textarea {
    width: 100%;
    border: 1px solid #cfd6df;
    border-radius: 7px;
    padding: 10px 11px;
    font: inherit;
    background: #fff;
}

textarea { resize: vertical; }

.choice-row { display: flex; gap: 18px; }
.choice { flex-direction: row; align-items: center; font-weight: 500; }
.choice input { width: auto; }

.pensioner { display: none; }

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

button, .button {
    border: 0;
    border-radius: 7px;
    padding: 11px 18px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
}

.primary { background: var(--navy); color: #fff; }
.secondary { background: #eef2f6; color: var(--navy); }

.report-list {
    display: grid;
    gap: 10px;
}

.report-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}

.report-card:hover { background: #f8fafc; }
.report-card strong { color: var(--navy); }

@media (max-width: 800px) {
    .grid.two { grid-template-columns: 1fr; }
    .span-two { grid-column: auto; }
    .container { padding: 14px; }
}

.alert.error {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #c62828;
    background: #ffebee;
    color: #8e0000;
    border-radius: 6px;
}


/* Employee name prefix + name control */
.name-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.name-input-group select {
    width: 88px;
    flex: 0 0 88px;
}

.name-input-group input {
    flex: 1 1 auto;
    min-width: 0;
}


/* Generated Reports page */
body.reports-page {
    background:
        radial-gradient(circle at 10% 10%, rgba(31, 95, 159, 0.12), transparent 24%),
        radial-gradient(circle at 90% 20%, rgba(23, 54, 93, 0.10), transparent 22%),
        linear-gradient(145deg, #eef4f9 0%, #f8fafc 48%, #edf3f8 100%);
    min-height: 100vh;
}

.reports-page .container.narrow {
    max-width: 900px;
    padding-top: 28px;
    padding-bottom: 28px;
}

.reports-page .page-header {
    position: relative;
    overflow: hidden;
    padding: 30px 28px 26px;
    border-radius: 22px;
    background: linear-gradient(135deg, #17365d 0%, #1f5f9f 68%, #357db8 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(23, 54, 93, 0.20);
    margin-bottom: 18px;
}

.reports-page .page-header::before,
.reports-page .page-header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.reports-page .page-header::before {
    width: 170px;
    height: 170px;
    top: -92px;
    left: -28px;
}

.reports-page .page-header::after {
    width: 190px;
    height: 190px;
    right: -72px;
    bottom: -110px;
}

.reports-page .page-header h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(30px, 4vw, 40px);
    letter-spacing: 0.2px;
}

.reports-page .page-header p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255,255,255,0.96);
    font-size: 15px;
    font-weight: 500;
}

.reports-page .report-list {
    padding: 10px;
    border: 1px solid rgba(213, 219, 227, 0.9);
    border-radius: 18px;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 14px 35px rgba(30, 55, 75, 0.10);
}

.reports-page .report-card {
    align-items: center;
    min-height: 58px;
    padding: 14px 16px 14px 18px;
    border: 1px solid #dbe3eb;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.reports-page .report-card:hover {
    background: #fff;
    border-color: #b8cbe0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 54, 93, 0.10);
}

.reports-page .report-card span {
    font-size: 16px;
    font-weight: 600;
    color: #1d2430;
}

.reports-page .report-card strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 7px 12px;
    border-radius: 8px;
    background: #eef4fa;
    color: #17365d;
    font-size: 14px;
}

.reports-page .actions {
    margin-top: 20px;
}

.reports-page .actions .button {
    min-width: 145px;
    padding: 12px 18px;
    border: 1px solid #cfd9e4;
    background: rgba(255,255,255,0.86);
    box-shadow: 0 5px 14px rgba(23, 54, 93, 0.06);
}

.reports-page .actions .button:hover {
    background: #fff;
    border-color: #b7c8d8;
}

.site-footer {
    margin-top: 18px;
    text-align: center;
    color: #68717c;
    font-size: 11px;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .reports-page .container.narrow {
        padding: 16px;
    }

    .reports-page .page-header {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .reports-page .report-card {
        min-height: 54px;
        padding: 12px 12px 12px 14px;
    }

    .reports-page .report-card span {
        font-size: 15px;
    }
}


/* Index page footer */
.index-footer {
    margin: 24px 0 4px;
    text-align: center;
    color: #c0c0c0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 400;
}

.reports-page .site-footer {
    margin-top: 26px;
    color: #c0c0c0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.2;
}


/* Server-side validation highlighting: every invalid field is visibly marked. */
.field-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.14) !important;
    background: #fff7f7 !important;
}
.has-error {
    outline: 2px solid rgba(220, 53, 69, 0.25);
    outline-offset: 2px;
    border-radius: 6px;
}


/* Index header branding */
.page-header .site-name {
    font-size: 30px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.page-header .developer-line {
    margin: 8px 0 4px;
    color: #111111;
    font-size: 14px;
    font-weight: 600;
}
