:root {
    --nc-blue: #003189;
    --nc-blue-dark: #001f5c;
    --nc-blue-light: #e8edf7;
    --nc-gold: #c8aa00;
    --nc-grey: #f5f6f7;
    --nc-grey-mid: #dde0e6;
    --nc-text: #1a1a2e;
    --nc-text-light: #555;
    --success: #18753c;
    --success-bg: #b8fec9;
    --success-border: #27a04c;
    --error: #c9191e;
    --error-bg: #ffe9e9;
    --error-border: #e1000f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Source Sans 3", sans-serif;
    background: var(--nc-grey);
    color: var(--nc-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── HEADER ── */
.header-main {
    background: #fff;
    border-bottom: 1px solid #dde0e5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
}
.nc-logo img {
    height: 70px;
    width: auto;
    display: block;
}

/* ── HERO ── */
.hero {
    background: linear-gradient(135deg, #006699 0%, #1a85d1 55%, #b3d7e8 100%);
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2rem;
    padding: 0.3rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    position: relative;
}
.hero-badge::before {
    content: "⛽";
    font-size: 0.9rem;
}
.hero h1 {
    color: #fff;
    font-size: clamp(1.4rem, 3.5vw, 2.1rem);
    font-weight: 700;
    line-height: 1.25;
    max-width: 740px;
    margin: 0 auto 0.75rem;
    position: relative;
}
.hero-sub {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    font-style: italic;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    line-height: 1.5;
}

/* ── MAIN ── */
main {
    flex: 1;
    padding: 2.5rem 1.5rem;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

/* ── INTRO CARD ── */
.intro-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--nc-grey-mid);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.intro-card p {
    font-size: 0.95rem;
    color: var(--nc-text);
    line-height: 1.65;
}
.intro-card strong {
    color: #006699;
    font-weight: 700;
}

/* ── SEARCH CARD ── */
.search-card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow:
        0 1px 6px rgba(0, 0, 0, 0.08),
        0 4px 20px rgba(0, 49, 137, 0.06);
    border: 1px solid var(--nc-grey-mid);
    margin-bottom: 1.5rem;
}
.search-card label {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--nc-text);
    margin-bottom: 0.5rem;
}
.label-hint {
    font-weight: 400;
    color: var(--nc-text-light);
    font-size: 0.875rem;
    display: block;
    margin-bottom: 1rem;
}
.input-group {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}
.ridet-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--nc-grey-mid);
    border-radius: 6px;
    font-size: 1.05rem;
    font-family: "Source Sans 3", sans-serif;
    color: var(--nc-text);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
    outline: none;
}
.ridet-input:focus {
    border-color: #006699;
    box-shadow: 0 0 0 3px rgba(0, 102, 153, 0.12);
}
.ridet-input::placeholder {
    color: #aab;
}
.btn-search {
    background: #006699;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: "Source Sans 3", sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition:
        background 0.15s,
        transform 0.1s;
    white-space: nowrap;
}
.btn-search:hover {
    background: #004d73;
}
.btn-search:active {
    transform: scale(0.98);
}
.btn-search:disabled {
    background: #aaa;
    cursor: not-allowed;
    transform: none;
}
.btn-search svg {
    width: 18px;
    height: 18px;
}

/* ── STATUS (loading / error) ── */
.status-bar {
    display: none;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    margin-top: 0.75rem;
}
.status-bar.loading {
    display: flex;
    background: #e8f4fb;
    color: #006699;
}
.status-bar.fetch-error {
    display: flex;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 102, 153, 0.25);
    border-top-color: #006699;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── RESULT ── */
.result {
    border-radius: 8px;
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    margin-bottom: 1rem;
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.result.success {
    background: var(--success-bg);
    border: 2px solid var(--success-border);
    color: var(--success);
}
.result.error {
    background: var(--error-bg);
    border: 2px solid var(--error-border);
    color: var(--error);
}
.result-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-top: 0.1rem;
}
.result.success .result-icon {
    background: rgba(24, 117, 60, 0.15);
}
.result.error .result-icon {
    background: rgba(201, 25, 30, 0.12);
}
.result-content h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.result-content p {
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.45;
}
.result-steps-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.result-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.result-steps li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0.9;
}
.result-steps li .step-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--success);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

/* ── INFO BOX ── */
.info-box {
    background: var(--nc-blue-light);
    border-left: 4px solid #006699;
    border-radius: 0 6px 6px 0;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--nc-blue-dark);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.info-box strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}
.info-box p {
    line-height: 1.55;
}
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.info-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}
.info-list li::before {
    content: "●";
    color: #1a85d1;
    font-size: 0.6rem;
    flex-shrink: 0;
}

/* ── FOOTER ── */
footer {
    background: var(--nc-blue-dark);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    text-align: center;
    padding: 1.25rem 2rem;
    margin-top: auto;
    border-top: 3px solid var(--nc-gold);
}
footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

/* ── MODAL ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.open {
    display: flex;
}
.modal {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.25s ease-out;
}
.modal-header {
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid var(--nc-grey-mid);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--nc-text);
}
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--nc-text-light);
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition:
        color 0.15s,
        background 0.15s;
    flex-shrink: 0;
}
.modal-close:hover {
    color: var(--nc-text);
    background: var(--nc-grey);
}
.modal-body {
    padding: 1.5rem;
}
.modal-intro {
    font-size: 0.875rem;
    color: var(--nc-text-light);
    margin-bottom: 1.25rem;
    line-height: 1.55;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}
.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--nc-text);
}
.form-group label .optional {
    font-weight: 400;
    color: var(--nc-text-light);
    font-size: 0.8rem;
}
.form-group input,
.form-group select {
    padding: 0.6rem 0.85rem;
    border: 2px solid var(--nc-grey-mid);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: "Source Sans 3", sans-serif;
    color: var(--nc-text);
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
    outline: none;
    background: #fff;
}
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}
.form-group input:focus,
.form-group select:focus {
    border-color: #006699;
    box-shadow: 0 0 0 3px rgba(0, 102, 153, 0.12);
}
.form-group input.invalid,
.form-group select.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(201, 25, 30, 0.1);
}
.field-error {
    font-size: 0.78rem;
    color: var(--error);
    display: none;
}
.field-error.visible {
    display: block;
}
.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    border-top: 1px solid var(--nc-grey-mid);
}
.btn-cancel {
    background: var(--nc-grey);
    color: var(--nc-text);
    border: 1px solid var(--nc-grey-mid);
    border-radius: 6px;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: "Source Sans 3", sans-serif;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-cancel:hover {
    background: #e2e5eb;
}
.btn-submit {
    background: #006699;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: "Source Sans 3", sans-serif;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-submit:hover {
    background: #004d73;
}
.btn-submit:disabled {
    background: #aaa;
    cursor: not-allowed;
}
.btn-open-form {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    background: var(--error);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: "Source Sans 3", sans-serif;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-open-form:hover {
    background: #a31015;
}
.modal-alert {
    padding: 0.65rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}
.modal-alert.error {
    display: block;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
}
.modal-alert.success {
    display: block;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
    .input-group {
        flex-direction: column;
    }
    .header-inner {
        padding: 0.5rem 1rem;
    }
    .nc-logo img {
        height: 52px;
    }
    main {
        padding: 1.5rem 1rem;
    }
    .search-card,
    .intro-card {
        padding: 1.25rem 1rem;
    }
}
