/* Sipariş Takip — bileşen stilleri */

.order-page {
    min-height: auto;
    background: transparent;
    padding: 0;
    margin: 0;
}

.order-container {
    max-width: none;
    margin: 0;
    background: transparent;
    padding: 0;
}

.section { margin-bottom: 0; }

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #0b1f44;
}

/* Uyarılar */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-error ul {
    margin: 0;
    padding-left: 18px;
}

.alert-success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ——— Giriş kartı ——— */
.section-track {
    display: flex;
    justify-content: center;
}

.track-card {
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border: 1px solid #e4e9f0;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(15, 35, 80, 0.06);
    padding: 24px 32px 32px;
}

.track-card .st-card-logo {
    margin: 0 0 16px;
    text-align: left;
}

.track-card-head {
    margin-bottom: 22px;
}

.track-card-title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    color: #0b2d6b;
    letter-spacing: -0.02em;
}

.track-card-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #6b7280;
}

.track-form .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.track-form label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.track-form input[type="text"],
.track-form input[type="email"] {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    padding: 12px 12px 12px 40px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.track-form input[type="email"] {
    background: #f0f5ff;
}

.track-form input[type="text"]:focus,
.track-form input[type="email"]:focus {
    border-color: #1d4ed8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.field-captcha .cap-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}

.field-captcha .cap-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}

.field-captcha .cap-question {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #ffffff;
    border: 2px solid #1d4ed8;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    color: #1d4ed8;
    min-width: 110px;
    white-space: nowrap;
}

.field-captcha .cap-row input[type="number"] {
    flex: 1;
    min-width: 100px;
    max-width: 160px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}

.field-captcha .cap-row input[type="number"]:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.form-actions { margin-top: 8px; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    border-radius: 8px;
    border: none;
    background: #0b2d6b;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(11, 45, 107, 0.25);
}

.btn-primary:hover {
    background: #082456;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(11, 45, 107, 0.32);
}

.btn-ghost,
.btn-copy-order {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #374151;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover,
.btn-copy-order:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* ——— Breadcrumb ——— */
.st-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}

.st-crumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
}

.st-crumb-done {
    color: #16a34a;
}

.st-crumb-active {
    color: #1d4ed8;
    font-weight: 600;
}

.st-crumb-sep {
    color: #d1d5db;
}

/* ——— Detay layout ——— */
.order-detail { margin-top: 0; }

.order-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.order-detail-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.order-detail-aside {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 16px;
}

/* Ödeme özeti kartı */
.order-summary-box {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 20px 22px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.order-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.order-summary-heading .title {
    font-weight: 700;
    font-size: 20px;
    color: #111827;
    margin-bottom: 4px;
}

.order-status-pill {
    display: inline-block;
    padding: 3px 0;
    color: #16a34a;
    font-size: 13px;
    font-weight: 600;
}

.order-summary-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.order-summary-body {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 20px;
}

.order-summary-meta .sum-row,
.order-summary-totals .sum-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.45;
}

.sum-row .label {
    color: #6b7280;
    flex-shrink: 0;
}

.sum-row .value {
    font-weight: 600;
    color: #111827;
    text-align: right;
    word-break: break-word;
}

.order-summary-totals {
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    padding: 14px 16px;
}

.sum-row-tahsilat {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed #dbe3ec;
}

.sum-row-tahsilat .label {
    font-weight: 700;
    color: #111827;
}

.sum-row-tahsilat .value {
    font-size: 22px;
    font-weight: 800;
    color: #16a34a;
}

.tahsilat-caption {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #9ca3af;
    text-align: right;
    margin-top: 2px;
}

.sum-row-kargo-track .value a {
    color: #1d4ed8;
    word-break: break-all;
}

.value-mono {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.order-barcode {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.order-barcode-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.order-barcode img {
    max-width: 220px;
    height: auto;
}

/* Ürünler tablosu */
.order-items-box {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.order-items-box .items-header {
    padding: 14px 18px;
    background: #f8fafc;
    font-weight: 700;
    font-size: 15px;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

.items-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.detail-items {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 13px;
}

.detail-items th,
.detail-items td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    vertical-align: middle;
}

.detail-items th {
    font-weight: 600;
    color: #6b7280;
    background: #ffffff;
    font-size: 12px;
}

.detail-items .col-product {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    flex-shrink: 0;
}

.product-name {
    font-weight: 600;
    color: #111827;
}

.detail-items .col-total {
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

/* Problem bildir */
.order-problem-box {
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fffbfb;
    padding: 18px 20px 20px;
}

.order-problem-box h3 {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 8px;
}

.problem-form .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.problem-form label {
    font-size: 12px;
    font-weight: 600;
    color: #7f1d1d;
}

.problem-form input[type="text"],
.problem-form textarea {
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #ffffff;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.problem-form input[type="text"]:focus,
.problem-form textarea:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.order-problem-box .form-actions {
    display: flex;
    justify-content: flex-end;
}

.order-problem-box .btn-primary {
    width: auto;
    min-width: 120px;
    background: #0b2d6b;
}

.problem-alert {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.problem-alert.ok {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.problem-alert.err {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Yan panel */
.order-side-summary {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.side-summary-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.side-summary-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.side-summary-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.order-number-badge {
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

.side-summary-lines {
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-bottom: 12px;
}

.side-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 8px;
    color: #6b7280;
}

.side-line strong {
    color: #111827;
    font-weight: 600;
}

.side-line strong.is-green {
    color: #16a34a;
}

.side-grand-total {
    background: #f0f7ff;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    margin-bottom: 12px;
}

.side-grand-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 4px;
}

.side-grand-value {
    font-size: 26px;
    font-weight: 800;
    color: #15803d;
    line-height: 1.1;
}

.order-status-action {
    width: 100%;
    text-align: center;
    padding: 12px 14px;
    border-radius: 8px;
    background: #16a34a;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.side-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.side-trust i {
    color: #9ca3af;
}

.order-support-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f3ff;
    border: 1px solid #e9e5ff;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 13px;
    color: #4338ca;
}

.order-support-box i {
    font-size: 22px;
    flex-shrink: 0;
}

.order-support-box strong {
    display: block;
    color: #312e81;
    margin-bottom: 2px;
}

.order-support-box span {
    color: #6366f1;
    font-size: 12px;
}

/* Üye sipariş listesi */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.orders-table thead { background: #f8fafc; }

.orders-table th,
.orders-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

.orders-table th {
    font-weight: 600;
    color: #6b7280;
    font-size: 12px;
}

.orders-table tr:hover td { background: #fafbfc; }

.orders-table td.actions { white-space: nowrap; }

.orders-table .btn-ghost { margin-right: 6px; }

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.modal.show { display: flex; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

.modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.modal-body {
    padding: 14px;
    overflow: auto;
}

.modal-body iframe {
    width: 100%;
    border: 0;
    min-height: 400px;
}

/* Responsive */
@media (max-width: 1024px) {
    .order-detail-layout {
        grid-template-columns: 1fr;
    }

    .order-detail-aside {
        position: static;
    }
}

@media (max-width: 768px) {
    .track-card {
        padding: 20px 18px 24px;
        border-radius: 12px;
    }

    .track-card-title { font-size: 22px; }

    .order-summary-body {
        grid-template-columns: 1fr;
    }

    .order-summary-header {
        flex-direction: column;
    }

    .order-summary-right {
        width: 100%;
    }

    .order-summary-right .btn-copy-order,
    .order-summary-right .btn-ghost {
        flex: 1;
        justify-content: center;
    }

    .order-barcode {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-items { min-width: 480px; }
}

@media (max-width: 640px) {
    .st-breadcrumb { font-size: 12px; }

    .orders-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .field-captcha .cap-row input[type="number"] {
        max-width: none;
        width: 100%;
    }
}
