:root {
    --brand: #1669c9;
    --brand-dark: #0d3b74;
    --brand-soft: #eaf3ff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --surface: rgba(255, 255, 255, 0.94);
    --shadow: 0 18px 45px rgba(31, 41, 55, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(22, 105, 201, 0.14), transparent 32rem),
        linear-gradient(180deg, #fbfbfd 0%, #f3f4f6 100%);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

header {
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    padding: 1.4rem 0;
    background: linear-gradient(135deg, var(--brand-dark) 0%, #1257a7 45%, #1e73d6 100%);
    color: #fff;
    box-shadow: 0 12px 32px rgba(13, 59, 116, 0.28);
}

header::after {
    content: "";
    position: absolute;
    right: -5rem;
    top: -8rem;
    width: 20rem;
    height: 20rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

#header {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

#header > div {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 5rem;
}

#header img,
header img {
    float: none;
    width: 270px;
    height: 80px;
    max-width: 100%;
    object-fit: contain;
    margin: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

header h1 {
    margin: 0 0 0.25rem;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.container {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

/* Keresőblokkok középre rendezése */
.container > form,
.searchform,
.searchfieldset {
    width: min(900px, 100%);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.searchform,
.searchfieldset {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.searchfieldset legend,
.centered_legend {
    width: auto;
    margin: 0 0 1rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.searchfieldset legend,
.centered_legend {
    display: table;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.searchfieldset form {
    text-align: left;
}

.simple-top-row {
    display: grid;
    grid-template-columns: 180px minmax(320px, 1fr) 140px;
    gap: 12px;
    align-items: center;
}

.simple-main-input {
    width: 100%;
}

.simple-submit-btn,
.complex-submit-btn {
    width: 140px;
    min-height: 2.7rem;
    justify-self: start;
}

.simple-radio-row {
    display: grid;
    grid-template-columns: 180px minmax(320px, 1fr) 140px;
    gap: 12px;
    margin-top: 0.85rem;
    align-items: start;
}

.simple-radio-group {
    grid-column: 2 / 4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
}

.simple-doc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1rem;
    justify-content: flex-start;
}

.simple-doc-row label,
.complex-doc-row label {
    margin-bottom: 0;
    min-width: 140px;
}

.simple-doc-select,
.complex-doc-select {
    width: 170px;
    max-width: 100%;
}

.complex-top-row {
    display: grid;
    grid-template-columns: 150px minmax(150px, 1fr) 130px 150px minmax(150px, 1fr);
    gap: 12px;
    align-items: center;
}

.complex-logic-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.complex-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 1rem;
}

.complex-doc-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.searchfieldset .form-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0;
    margin-bottom: 0;
}

.form-space {
    margin-top: 0.85rem;
}

.form-control {
    min-height: 2.7rem;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(22, 105, 201, 0.14);
}

.form-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 1rem;
    margin-bottom: 0.35rem;
}

.form-check input[type="radio"] {
    accent-color: var(--brand);
}

label,
.col-form-label {
    color: var(--muted);
    font-weight: 600;
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 18px rgba(31, 41, 55, 0.12);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(31, 41, 55, 0.16);
}

.btn-primary,
.btn-info {
    border-color: var(--brand);
    background: linear-gradient(135deg, var(--brand) 0%, #1e73d6 100%);
    color: #fff;
}

.btn-primary:hover,
.btn-info:hover,
.btn-primary:focus,
.btn-info:focus {
    border-color: var(--brand-dark);
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
    color: #fff;
}

#errordiv.alert {
    margin: 0.5rem 0 1.5rem;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(22, 105, 201, 0.12);
}

h2 {
    margin: 1.5rem 0 1rem;
    color: var(--ink);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

#resdiv,
.table {
    border-radius: var(--radius);
}

.table {
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: #fff;
    box-shadow: var(--shadow);
}

.table caption {
    caption-side: top;
    padding: 0 0 0.7rem;
    color: var(--brand-dark);
    font-size: 1rem;
    text-align: left;
}

.table thead th {
    border: 0;
    background: #e1e1e1;
    color: #000000;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.table .btn-info {
    min-width: 115px;
    padding: 0.55rem 1.05rem;
    font-size: 0.95rem;
    line-height: 1.2;
}

.table td,
.table th {
    vertical-align: middle;
    border-top: 1px solid var(--line);
}

.table tbody tr {
    transition: background 0.16s ease;
}

.table tbody tr:hover {
    background: #f2f8ff;
}

.table-bordered {
    border: 0;
}

.table-bordered th {
    width: 28%;
    background: #f9fafb;
    color: var(--muted);
}

.details-actions {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    #header > div {
        align-items: flex-start;
    }

    #header img,
    header img {
        width: 270px;
        height: 80px;
        max-width: 100%;
        border-radius: 12px;
    }

    .searchfieldset {
        padding: 1rem;
    }

    .simple-top-row,
    .simple-radio-row,
    .complex-top-row,
    .complex-bottom-row,
    .simple-doc-row,
    .complex-doc-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .simple-radio-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .simple-submit-btn,
    .complex-submit-btn,
    .simple-doc-select,
    .complex-doc-select {
        width: 100%;
    }

    .form-check {
        display: flex;
        margin-right: 0;
    }

    .btn {
        width: 100%;
    }

    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
	
}

.details-page {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.details-page .row {
    justify-content: center;
}

.details-page .row > .col-1,
.details-page .row > .col-3 {
    display: none;
}

.details-page .row > .col-8 {
    flex: 0 0 92%;
    max-width: 92%;
}

.details-page .table {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.06rem;
}

.details-page .table caption {
    color: var(--brand-dark);
    font-size: 1.15rem;
    font-weight: 700;
    text-align: left;
}

.details-page .table th,
.details-page .table td {
    padding: 0.75rem 1rem;
}

.details-page .table-bordered th {
    width: 32%;
}

@media (max-width: 768px) {
    .details-page .row > .col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.details-page table caption {
    padding-left: 0.9rem !important;
    padding-right: 0.9rem !important;
    overflow: visible;
}

.details-page .table,
.details-page table {
    border-radius: 0 !important;
}

.details-page .table th,
.details-page .table td {
    border-radius: 0 !important;
}

