:root {
    --primary: #1f4e8c;
    --primary-light: #2f6fd1;
    --bg: #f4f6fb;
    --white: #ffffff;
    --text: #1e1e1e;
    --gray: #e2e6f0;
    --success: #2e7d32;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

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

/* ── Header ── */
.header {
    color: var(--white);
    position: relative;
}

.header-main {
    background: var(--primary);
    padding: 28px 0 0;
}

.header-wave {
    display: block;
    background: var(--primary);
    line-height: 0;
}

.header-wave svg {
    display: block;
    width: 100%;
    height: 56px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding-bottom: 24px;
}

.logo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.9);
    box-shadow: 0 0 0 5px rgba(255,255,255,0.15);
    flex-shrink: 0;
}

.header-text { text-align: left; }

.header-subtitle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.header-line {
    flex: 0 0 36px;
    height: 1px;
    background: #b8974a;
    opacity: 0.9;
}

.subtitle {
    margin: 0;
    font-size: 18px;
    opacity: 0.85;
    white-space: nowrap;
}

/* ── Service cards ── */
.services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
    transition: 0.4s ease;
}

.service-card {
    background: var(--white);
    padding: 40px 25px;
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--gray);
    transition: all 0.4s ease;
}

/* Tracking card — subtle style, no full-width span */
.service-card--track {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border: 2px dashed var(--primary-light);
}

/* Tracking card hover — keep its own style, no dark blue */
.service-card--track:hover {
    background: #e0e8ff;
    color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.service-card--track:hover p { color: var(--primary-light); }

.service-card h2 { margin-bottom: 15px; font-size: 18px; }
.service-card p   { margin: 0; font-size: 14px; color: #666; }

.service-card:not(.service-card--track):hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.service-card:not(.service-card--track):hover p { color: rgba(255,255,255,0.8); }

.service-card.active {
    transform: scale(1.05);
    border: 2px solid var(--primary);
    box-shadow: 0 25px 45px rgba(0,0,0,0.15);
}

.service-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* ── Form section ── */
.form-section {
    margin-top: 25px;
    background: var(--white);
    padding: 35px;
    border-radius: 18px;
    border: 1px solid var(--gray);
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}

input,
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 2px;
    border-radius: 10px;
    border: 1px solid #ccd3e0;
    font-size: 14px;
    font-family: inherit;
}

textarea { resize: vertical; }

.btn-primary {
    background: var(--primary-light);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.btn-primary:hover  { background: var(--primary); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-back {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 20px;
    cursor: pointer;
}

.btn-back:hover { text-decoration: underline; }

/* ── Success ── */
.success {
    text-align: center;
    padding: 50px 40px;
    display: none;
    animation: fadeIn 0.4s ease;
}

.success-icon { font-size: 48px; margin-bottom: 16px; }
.success h3   { color: var(--success); font-size: 22px; margin-bottom: 10px; }

.ticket-box {
    background: var(--bg);
    border: 2px solid var(--primary-light);
    border-radius: 14px;
    padding: 20px 30px;
    margin: 24px auto;
    max-width: 340px;
}

.ticket-box p { margin: 0 0 6px; font-size: 13px; color: #666; }

.ticket-box strong {
    display: block;
    font-size: 26px;
    color: var(--primary);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.ticket-hint { font-size: 12px !important; color: #999 !important; }

/* ── Tracking result ── */
.tracking-result {
    margin-top: 24px;
    background: var(--bg);
    border-radius: 14px;
    padding: 22px;
    border: 1px solid var(--gray);
    animation: fadeIn 0.3s ease;
}

.track-error { color: #c0392b; }

.track-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.track-id   { font-size: 20px; font-weight: 700; color: var(--primary); }
.track-type { font-size: 13px; color: #888; margin-top: 4px; }

.track-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

/* Progress steps */
.track-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 18px;
    padding: 0 8px;
}

.track-steps::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--gray);
    z-index: 0;
}

.track-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #aaa;
    z-index: 1;
    flex: 1;
    text-align: center;
}

.track-step.done  { color: var(--primary); }
.track-step.current { color: var(--primary); font-weight: 700; }

.track-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gray);
    border: 2px solid var(--gray);
    transition: 0.3s;
}

.track-step.done .track-dot {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.track-step.current .track-dot {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31,78,140,0.15);
}

.track-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.track-comment {
    margin-top: 14px;
    background: #fff8e1;
    border-left: 3px solid #f0a500;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #555;
}

/* ── Footer ── */
.footer {
    margin-top: 80px;
    padding: 30px 0;
    background: var(--white);
    border-top: 1px solid var(--gray);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-info { font-size: 13px; color: #666; }
.footer-info span { display: block; margin-top: 5px; font-size: 12px; opacity: 0.8; }

.footer-socials { display: flex; gap: 15px; }

.social-link {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg);
    text-decoration: none;
    font-size: 16px;
    color: var(--primary);
    transition: 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .header-inner { flex-direction: column; text-align: center; gap: 12px; }
    .logo { width: 110px; height: 110px; }
    .header-text { text-align: center; }
    .header-subtitle-row { justify-content: center; }
    .subtitle { white-space: normal; font-size: 15px; }
    .form-section { margin-top: 5px; padding: 18px 12px; }
    .track-step span { font-size: 10px; }
    .container { padding: 0 10px; }
    .success { padding: 30px 12px; }
}

@media (max-width: 600px) {
    .services { grid-template-columns: 1fr; }

}

/* ── Admin link in footer ── */
.admin-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 14px;
    color: #aaa;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.admin-link:hover {
    opacity: 1;
    color: var(--primary);
}

/* ── Select styling ── */
select {
    width: 100%;
    padding: 10px;
    margin-top: 2px;
    border-radius: 10px;
    border: 1px solid #ccd3e0;
    font-size: 14px;
    font-family: inherit;
    background: white;
    cursor: pointer;
    appearance: auto;
}

/* ── Consent checkbox ── */
.consent-group {
    margin-top: 20px;
    margin-bottom: 12px;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
    border-radius: 4px;
}

.consent-link {
    color: var(--primary-light);
    text-decoration: underline;
}

.consent-link:hover {
    color: var(--primary);
}
