:root {
    --blue-900: #355f9f;
    --blue-800: #5b8def;
    --blue-700: #6f9cff;
    --blue-100: #eef5ff;
    --gray-900: #1f2937;
    --gray-700: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --green-700: #3f9f62;
    --green-600: #66c98a;
    --green-100: #f1fbf4;
    --red-700: #d86161;
    --red-600: #ff9e9e;
    --red-100: #fff5f5;
    --amber-700: #c48a2c;
    --amber-600: #f5c46b;
    --amber-100: #fffaf0;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--gray-900);
    background:
        radial-gradient(circle at top left, rgba(111, 156, 255, 0.18), transparent 32rem),
        linear-gradient(135deg, #f8fbff 0%, #f1f6ff 45%, #fbfdff 100%);
    line-height: 1.55;
}

.page {
    width: min(940px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(91, 141, 239, 0.13);
    backdrop-filter: blur(8px);
}

.card + .card {
    margin-top: 22px;
}

.intro-card {
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--blue-800), var(--blue-700), #afc8ff);
}

.school-name {
    color: var(--blue-700);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    color: var(--blue-900);
    font-size: clamp(2rem, 5vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.lead {
    max-width: 720px;
    color: var(--gray-700);
    font-size: 1.08rem;
    margin-bottom: 28px;
}

.search-form {
    margin-top: 28px;
}

.search-form label {
    display: block;
    margin-bottom: 9px;
    font-weight: 700;
    color: var(--blue-900);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row input {
    flex: 1;
    min-width: 0;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 15px 16px;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.form-row input:focus {
    outline: none;
    border-color: var(--blue-700);
    box-shadow: 0 0 0 4px rgba(111, 156, 255, 0.18);
}

.form-row button {
    border: 0;
    border-radius: 14px;
    padding: 15px 24px;
    background: linear-gradient(135deg, var(--blue-800), var(--blue-700));
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(91, 141, 239, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.form-row button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(91, 141, 239, 0.34);
    filter: brightness(1.04);
}

.alert {
    margin-top: 20px;
    padding: 15px 17px;
    border-radius: 14px;
    font-weight: 700;
}

.alert-error {
    color: var(--red-700);
    background: var(--red-100);
    border: 1px solid rgba(220, 38, 38, 0.22);
}

.result-card {
    border-left: 8px solid var(--blue-700);
}

.result-prijat {
    border-left-color: var(--green-600);
}

.result-neprijat {
    border-left-color: var(--red-600);
}

.result-nahradnik {
    border-left-color: var(--amber-600);
}

.result-header {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.eyebrow {
    margin-bottom: 6px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    font-size: 0.76rem;
}

.result-header h2 {
    margin-bottom: 0;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.1;
    color: var(--blue-900);
}

.result-prijat .result-header h2 {
    color: var(--green-700);
}

.result-neprijat .result-header h2 {
    color: var(--red-700);
}

.result-nahradnik .result-header h2 {
    color: var(--amber-700);
}

.score-box {
    min-width: 160px;
    padding: 18px 22px;
    border-radius: 20px;
    background: var(--blue-100);
    text-align: center;
    display: grid;
    place-content: center;
}

.score-box span {
    display: block;
    color: var(--gray-700);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.score-box strong {
    display: block;
    color: var(--blue-900);
    font-size: 2.45rem;
    line-height: 1;
    margin-top: 6px;
}

.result-grid {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.result-grid > div {
    padding: 16px;
    border-radius: 16px;
    background: #fbfdff;
    border: 1px solid #e5e7eb;
}

.result-grid dt {
    color: var(--gray-500);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.result-grid dd {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--gray-900);
}

.info-card h3 {
    margin-bottom: 16px;
    font-size: 1.55rem;
    line-height: 1.2;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-success {
    background: linear-gradient(180deg, #ffffff 0%, #f3fff8 100%);
    border-color: rgba(22, 163, 74, 0.25);
}

.info-success h3 {
    color: var(--green-700);
}

.info-danger {
    background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
    border-color: rgba(220, 38, 38, 0.25);
}

.info-danger h3 {
    color: var(--red-700);
}

.info-waiting {
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
    border-color: rgba(217, 119, 6, 0.25);
}

.info-waiting h3 {
    color: var(--amber-700);
}

.info-text {
    color: var(--gray-700);
    font-size: 1.05rem;
    margin-bottom: 18px;
}

.important-date {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #7ba7ff, #afc8ff);
    padding: 28px;
    border-radius: 22px;
    margin: 22px 0;
    box-shadow: 0 18px 36px rgba(91, 141, 239, 0.28);
}

.important-date::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -60px;
    top: -70px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
}

.important-date-title {
    position: relative;
    z-index: 1;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 900;
    opacity: 0.92;
    margin-bottom: 10px;
}

.important-date-value {
    position: relative;
    z-index: 1;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.important-date-time {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.25rem;
    font-weight: 900;
}

.important-date-note {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.92);
}

.contract-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    background: #fbfdff;
    border: 1px solid #e5e7eb;
    margin-top: 20px;
}

.contract-panel strong {
    display: block;
    color: var(--blue-900);
    font-size: 1.08rem;
    margin-bottom: 3px;
}

.contract-panel p {
    color: var(--gray-700);
    margin: 0;
}

.contract-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff !important;
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    text-decoration: none !important;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.contract-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(22, 163, 74, 0.34);
    filter: brightness(1.04);
}

.contract-button-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.small-note {
    margin-top: 18px;
    color: var(--gray-700);
}

a {
    color: var(--blue-700);
}

@media (max-width: 760px) {
    .page {
        width: min(100% - 22px, 940px);
        padding: 18px 0;
    }

    .card {
        padding: 22px;
        border-radius: 20px;
    }

    .form-row,
    .result-header,
    .contract-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row button,
    .contract-button {
        width: 100%;
    }

    .score-box {
        min-width: 0;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .important-date {
        padding: 22px;
    }
}
