.apt-modal {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.apt-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}
.apt-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 18, 15, .6);
    backdrop-filter: blur(4px);
}
.apt-modal__dialog {
    position: relative;
    width: min(100%, 620px);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 26px 80px rgba(15, 23, 42, .22);
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
}
.apt-modal__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    margin-right: -6px;
    scrollbar-gutter: stable;
}
.apt-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.apt-modal__brand {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.apt-modal__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #fbf6ef;
    color: var(--color-brand-bg, #b8935a);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.apt-modal__title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    color: #1f1f1f;
}
.apt-modal__step-label {
    margin: 6px 0 0;
    font-size: 14px;
    color: #7c7c7c;
}
.apt-modal__close {
    border: 0;
    background: transparent;
    color: #202020;
    cursor: pointer;
    padding: 2px;
}
.apt-modal__progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 22px 0 24px;
}
.apt-modal__progress-bar {
    height: 3px;
    border-radius: 999px;
    background: #eae6df;
}
.apt-modal__progress-bar.is-active {
    background: var(--color-brand-bg, #b8935a);
}
.apt-step {
    display: none;
}
.apt-step.is-active {
    display: block;
}
.apt-step__title {
    margin: 0 0 18px;
    font-size: 15px;
    font-weight: 700;
    color: #1f1f1f;
}
.apt-purpose-list,
.apt-time-grid {
    display: grid;
    gap: 12px;
}
.apt-purpose-card,
.apt-date-card,
.apt-time-card,
.apt-product-result {
    border: 1px solid #e7dfd3;
    background: #fff;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.apt-purpose-card {
    width: 100%;
    min-height: 74px;
    padding: 0 20px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    font-size: 14px;
    color: #2a2a2a;
}
.apt-purpose-card:hover,
.apt-date-card:hover,
.apt-time-card:hover,
.apt-product-result:hover {
    border-color: #ccb080;
    transform: translateY(-1px);
}
.apt-purpose-card.is-selected,
.apt-date-card.is-selected,
.apt-time-card.is-selected {
    border-color: var(--color-brand-bg, #b8935a);
    background: #fbf6ef;
}
.apt-purpose-card__radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #ded6ca;
    position: relative;
    flex-shrink: 0;
}
.apt-purpose-card.is-selected .apt-purpose-card__radio::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--color-brand-bg, #b8935a);
}
.apt-product-box {
    margin-top: 16px;
    padding: 18px;
    border-radius: 20px;
    background: #faf9f7;
    border: 1px solid #efeae2;
}
.apt-product-box__head h4 {
    margin: 0 0 4px;
    font-size: 14px;
}
.apt-product-box__head p,
.apt-inline-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #767676;
}
.apt-product-search {
    margin-top: 12px;
}
.apt-input,
.apt-textarea {
    width: 100%;
    border: 1px solid #e5ddd0;
    border-radius: 14px;
    background: #fff;
    font: inherit;
    color: #1f1f1f;
}
.apt-input {
    min-height: 52px;
    padding: 0 16px;
}
.apt-textarea {
    padding: 14px 16px;
    resize: vertical;
}
.apt-input:focus,
.apt-textarea:focus {
    outline: none;
    border-color: var(--color-brand-bg, #b8935a);
    box-shadow: 0 0 0 3px rgba(184, 147, 90, .12);
}
.apt-product-results {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}
.apt-product-result {
    border-radius: 16px;
    padding: 12px 14px 12px 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    width: 100%;
}
.apt-product-result img {
    width: 60px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    background: #f6f2eb;
}
.apt-product-chip img {
    width: 52px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    background: #f6f2eb;
}
.apt-product-result__body,
.apt-product-chip__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}
.apt-product-result__body strong,
.apt-product-chip__body strong {
    font-size: 13.5px;
    line-height: 1.3;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.apt-product-result__meta {
    font-size: 11.5px;
    color: #797979;
    line-height: 1.45;
}
.apt-product-result__code {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(184, 147, 90, .4);
    background: rgba(255, 251, 244, .9);
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 600;
    letter-spacing: .06em;
    color: #9a6e30;
}
.apt-product-result__state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}
.apt-product-result__state-icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.apt-product-result__state-icon svg {
    width: 12px;
    height: 12px;
}
.apt-product-result__state-icon--warning {
    background: #fff5eb;
    color: #c66d1f;
    border: 1px solid rgba(236, 146, 70, .24);
}
.apt-product-result__state-icon--danger {
    background: #fef2f2;
    color: #d14343;
    border: 1px solid rgba(209, 67, 67, .2);
}
.apt-product-chip__body span {
    font-size: 11.5px;
    color: #797979;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .04em;
}
.apt-product-result__chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #c8b99a;
    transition: color .15s, transform .15s;
}
.apt-product-result:hover .apt-product-result__chevron {
    color: #b8935a;
    transform: translateX(2px);
}
.apt-product-result.is-unavailable {
    opacity: .58;
    cursor: not-allowed;
    background: #faf7f2;
}
.apt-product-result.is-unavailable:hover {
    transform: none;
    border-color: #e7dfd3;
}
.apt-product-empty {
    padding: 14px 4px 2px;
    font-size: 12px;
    color: #7f7f7f;
}
.apt-picker__feedback {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 12px;
    line-height: 1.55;
    border: 1px solid transparent;
}
.apt-picker__feedback.is-warning {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}
/* ── Çoklu ürün bölümü ─────────────────────────────────────────────────── */
.apt-product-section {
    margin-top: 16px;
}
.apt-selected-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.apt-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid #e7dfd3;
    background: #fff;
}
.apt-chip img {
    width: 44px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    background: #f6f2eb;
}
.apt-chip__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.apt-chip__body strong {
    font-size: 13px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.apt-chip__body span {
    font-size: 11px;
    color: #797979;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.apt-chip__warn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff5eb;
    border: 1px solid rgba(236, 146, 70, .28);
    color: #c66d1f;
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
}
.apt-chip__warn svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}
.apt-chip__remove {
    border: 0;
    background: transparent;
    color: #b8935a;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background .15s;
}
.apt-chip__remove:hover { background: #fef2e4; }
.apt-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 14px;
    border: 1.5px dashed #d5c9b8;
    background: transparent;
    color: #9a6e30;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.apt-add-btn:hover {
    border-color: #b8935a;
    background: #faf5ed;
}
/* ── Picker overlay ────────────────────────────────────────────────────── */
.apt-picker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 8px));
    width: min(calc(100vw - 32px), 680px);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 26px 80px rgba(15, 23, 42, .24);
    z-index: 320;
    padding: 20px 24px 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.apt-picker.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}
.apt-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    flex-shrink: 0;
    padding: 2px 0 14px;
}
.apt-picker__title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}
.apt-picker__close {
    border: 0;
    background: #f4f4f5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: background .15s;
    flex-shrink: 0;
}
.apt-picker__close:hover { background: #e4e4e7; }
.apt-picker__search {
    flex-shrink: 0;
    margin-bottom: 12px;
    padding: 0;
}
.apt-picker__results {
    flex: 1;
    min-height: 80px;
    max-height: min(62vh, 720px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border-radius: 0;
    transition: opacity .15s;
}
.apt-picker__results.is-loading {
    opacity: .45;
    pointer-events: none;
}
/* Müsaitlik rozeti */
.apt-avail-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
}
.apt-avail-badge--ok {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.apt-avail-badge--busy {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.apt-avail-badge--hold {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}
.apt-product-result.is-added {
    background: #fdf8f0;
    border: 1px solid #d4a96a;
}
.apt-product-result.is-added strong {
    color: #9a6e30;
}
.apt-result-check {
    flex-shrink: 0;
}
.apt-load-more {
    margin-top: 4px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 14px;
    border: 1.5px dashed #d5c9b8;
    background: transparent;
    color: #9a6e30;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    text-align: center;
}
.apt-load-more:hover {
    border-color: #b8935a;
    background: #faf5ed;
}
.apt-date-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}
.apt-date-card {
    min-height: 92px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
}
.apt-date-card__day,
.apt-date-card__month {
    font-size: 12px;
    color: #7b7b7b;
}
.apt-date-card__status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    color: #b8935a;
}
.apt-date-card__load {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #847567;
}
.apt-date-card__num {
    font-size: 24px;
    font-weight: 600;
    color: #1f1f1f;
    line-height: 1;
}
.apt-date-card--low {
    background: linear-gradient(180deg, #fffdf9 0%, #fff7ee 100%);
}
.apt-date-card--medium {
    background: linear-gradient(180deg, #fff9f0 0%, #fdf0dd 100%);
}
.apt-date-card--high {
    background: linear-gradient(180deg, #fff5ea 0%, #f9e3c4 100%);
}
.apt-date-card.is-disabled {
    opacity: .52;
    cursor: not-allowed;
    border-style: dashed;
    background: #faf7f2;
}
.apt-date-card.is-disabled .apt-date-card__status {
    color: #9a8f82;
}
.apt-time-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.apt-time-card {
    min-height: 48px;
    border-radius: 14px;
    color: #2a2a2a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 8px;
}
.apt-time-card__label {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
}
.apt-time-card__load {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #847567;
}
.apt-time-card--low {
    background: linear-gradient(180deg, #fffdf9 0%, #fff7ee 100%);
}
.apt-time-card--medium {
    background: linear-gradient(180deg, #fff9f0 0%, #fdf0dd 100%);
}
.apt-time-card--high {
    background: linear-gradient(180deg, #fff5ea 0%, #f9e3c4 100%);
}
.apt-time-card.is-disabled {
    cursor: not-allowed;
    opacity: .72;
    border-style: dashed;
}
.apt-time-card.is-disabled .apt-time-card__load {
    color: #c66d1f;
}
.apt-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.apt-label {
    font-size: 13px;
    font-weight: 600;
    color: #353535;
}
.apt-summary {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #faf7f2;
    border: 1px solid #efe7dc;
}
.apt-summary__date {
    font-size: 20px;
    font-weight: 700;
    color: #1f1f1f;
}
.apt-summary__meta {
    margin-top: 4px;
    font-size: 14px;
    color: #6f6f6f;
}
.apt-feedback {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
}
.apt-feedback.is-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}
.apt-feedback.is-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
}
.apt-step__actions {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 12px;
    margin-top: 20px;
}
.apt-step__actions--single {
    grid-template-columns: 1fr;
}
.apt-btn {
    min-height: 50px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.apt-btn:hover {
    transform: translateY(-1px);
}
.apt-btn--primary {
    border: 0;
    background: var(--color-brand-bg, #b8935a);
    color: #fff;
}
.apt-btn--secondary {
    border: 1px solid #ddd4c8;
    background: #fff;
    color: #1f1f1f;
}
.apt-success {
    text-align: center;
    padding: 28px 12px 8px;
}
.apt-success__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #f4fbf4;
    color: #15803d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.apt-success h3 {
    margin: 0 0 8px;
    font-family: var(--font-sans);
    font-size: 24px;
}
.apt-success p {
    margin: 0 0 24px;
    color: #696969;
    line-height: 1.7;
}
.apt-success .apt-btn {
    min-width: 200px;
    padding: 0 36px;
}
/* ── Kapatma onay overlay ─────────────────────────────────────────────── */
.apt-confirm {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 28px;
    z-index: 10;
    padding: 20px;
}
.apt-confirm.is-open { display: flex; }
.apt-confirm__card {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border: 1px solid #ece5d8;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(24,24,24,.18);
    padding: 22px 20px 18px;
}
.apt-confirm__title {
    margin: 0 0 8px;
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 700;
    color: #181818;
}
.apt-confirm__text {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.65;
    color: #6b7280;
}
.apt-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.apt-confirm__actions .apt-btn {
    min-height: 40px;
    padding: 0 18px;
    font-size: 13px;
}
@media (max-width: 720px) {
    .apt-modal__dialog {
        width: min(100%, 560px);
        padding: 20px 18px 22px;
        border-radius: 24px;
    }
    .apt-date-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .apt-time-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .apt-step__actions {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .apt-modal {
        padding: 12px;
    }
    .apt-modal__dialog {
        max-height: calc(100vh - 24px);
        padding: 18px 16px 20px;
    }
    .apt-date-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
