.market-panel .form-control,
.market-panel .form-select {
    border: 1px solid #d9d3c7;
    margin-bottom: 0;
}

.market-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 18px;
    font-size: 18px;
}

.market-links a {
    color: #576632;
    text-decoration: underline;
}

.market-error,
.market-ok {
    background: #fff;
    padding: 12px 16px;
    margin: 0 0 22px;
    color: #000;
}

.market-error {
    border-left: 4px solid #e68533;
}

.market-ok {
    border-left: 4px solid #576632;
}

.market-error p,
.market-ok p {
    margin: 0 0 6px;
}

.market-error p:last-child,
.market-ok p:last-child {
    margin-bottom: 0;
}

.market-form {
    display: grid;
    gap: 16px;
    max-width: 640px;
}

.market-form .form-label {
    margin-bottom: 6px;
}

.week-cal {
    margin-top: 8px;
}

.week-cal-title {
    color: #576632;
    font-size: 28px;
    margin: 0 0 14px;
}

.week-cal-head,
.week-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.week-cal-head {
    margin-bottom: 6px;
    text-align: center;
    color: #23356d;
    font-size: 14px;
    font-weight: 700;
}

.week-row {
    margin-bottom: 6px;
}

.week-day {
    background: #fff;
    border-radius: 10px;
    min-height: 92px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.week-day.is-past,
.week-day.is-later {
    background: #e7e2d8;
    color: #7d776e;
}

.week-day.is-today {
    box-shadow: inset 0 0 0 2px #576632;
}

.week-month {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #576632;
    line-height: 1;
}

.week-num {
    font-weight: 700;
    color: #23356d;
    font-size: 18px;
    line-height: 1;
}

.week-day.is-past .week-num,
.week-day.is-later .week-num,
.week-day.is-past .week-month,
.week-day.is-later .week-month {
    color: #7d776e;
}

.week-note {
    font-size: 12px;
    line-height: 1.25;
    color: #6f6962;
}

.week-slots {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.week-slots form {
    margin: 0;
}

.week-slots button {
    width: 100%;
    background: #fff;
    border: 2px solid #576632;
    color: #23356d;
    border-radius: 8px;
    padding: 4px 6px;
    text-align: left;
    font-size: 14px;
    line-height: 1.2;
}

.week-slots button span {
    display: block;
    color: #576632;
    font-size: 12px;
}

.week-slots button:hover {
    background: #576632;
    color: #fff;
}

.week-slots button:hover span {
    color: #fff;
}

.appt-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 12px;
}

.appt-card h2 {
    color: #23356d;
    font-size: 24px;
    margin-bottom: 4px;
}

.market-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.market-call {
    font-size: 28px;
    color: #576632;
    margin-bottom: 8px;
}

.dev-code {
    font-size: 32px;
    letter-spacing: 4px;
    color: #23356d;
    font-weight: 700;
}

.otp {
    display: grid;
    gap: 10px;
}

.otp-boxes {
    display: flex;
    gap: 8px;
    max-width: 440px;
}

.otp-digit {
    box-sizing: border-box;
    flex: 1 1 0;
    width: 0;
    max-width: 64px;
    height: 68px;
    margin: 0;
    padding: 0;
    border: 2px solid #d5cfc3;
    border-radius: 14px;
    background: #fff;
    color: #23356d;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
    caret-color: #576632;
    appearance: none;
    -webkit-appearance: none;
}

.otp-digit:nth-child(4) {
    margin-left: 8px;
}

.otp-digit:focus {
    outline: none;
    border-color: #576632;
    box-shadow: 0 0 0 4px rgba(87, 102, 50, 0.18);
}

.otp-digit.is-filled {
    border-color: #8ea06a;
}

.otp-digit:focus.is-filled {
    border-color: #576632;
}

@media (max-width: 700px) {
    .week-cal-head {
        font-size: 12px;
    }

    .week-cal-head,
    .week-row {
        gap: 3px;
    }

    .week-day {
        padding: 6px 3px;
        min-height: 72px;
    }

    .week-num {
        font-size: 15px;
    }

    .week-note,
    .week-month {
        font-size: 10px;
    }

    .week-slots button {
        font-size: 11px;
        padding: 3px 3px;
    }

    .week-slots button span {
        font-size: 10px;
    }

    .otp-digit {
        height: 52px;
        font-size: 22px;
        border-radius: 12px;
    }

    .otp-boxes {
        gap: 6px;
    }

    .otp-digit:nth-child(4) {
        margin-left: 4px;
    }
}
