/* Sohbet, sipariş kartları, modern ilan detay */

.listing-detail-modern .listing-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow);
}

.listing-status-pill {
    margin-left: auto;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(0, 212, 170, 0.12);
    color: var(--accent);
    border-radius: 999px;
    border: 1px solid rgba(0, 212, 170, 0.25);
}

.listing-detail-actions-modern {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-lg {
    width: 100%;
    justify-content: center;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.listing-buy-form,
.listing-contact-form {
    width: 100%;
}

/* Chat */
.chat-page {
    display: flex;
    flex-direction: column;
    min-height: min(70vh, 600px);
    max-height: 75vh;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.chat-page-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}

.chat-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.chat-back:hover { color: var(--accent); }

.chat-peer strong { display: block; font-size: 15px; }
.chat-peer span { font-size: 12px; color: var(--text-muted); }

.chat-listing-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 212, 170, 0.06);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.chat-listing-card:hover { background: rgba(0, 212, 170, 0.1); }

.chat-listing-card img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-listing-card div {
    flex: 1;
    min-width: 0;
}

.chat-listing-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    font-weight: 700;
}

.chat-listing-card strong {
    display: block;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-listing-card em {
    font-style: normal;
    font-size: 13px;
    color: var(--warm);
    font-weight: 700;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg);
}

.chat-bubble-wrap {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.chat-mine { align-self: flex-end; align-items: flex-end; }
.chat-theirs { align-self: flex-start; align-items: flex-start; }
.chat-system { align-self: center; max-width: 95%; align-items: center; }

.chat-bubble-name {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    padding: 0 4px;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-mine .chat-bubble {
    background: var(--accent);
    color: #041210;
    border-bottom-right-radius: 4px;
}

.chat-theirs .chat-bubble {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

.chat-bubble-system {
    background: var(--bg-input);
    border: 1px dashed var(--border-light);
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    border-radius: 10px;
}

.chat-bubble-wrap time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.chat-compose {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.chat-compose input {
    flex: 1;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.chat-compose input:focus {
    outline: none;
    border-color: var(--accent);
}

.chat-compose .btn-primary {
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

/* Konuşma listesi */
.conv-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.15s, background 0.15s;
}

.conv-item:hover {
    border-color: var(--border-light);
    background: var(--bg-elevated);
}

.conv-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.conv-thumb-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-muted);
}

.conv-item-body { flex: 1; min-width: 0; }

.conv-item-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.conv-item-top strong { font-size: 14px; }
.conv-item-top time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

.conv-listing {
    display: block;
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 4px;
}

.conv-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-state-box {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state-box .sub { font-size: 14px; margin-top: 8px; }

/* Siparişler */
.order-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.order-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.order-tab.active {
    background: rgba(0, 212, 170, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    overflow: hidden;
}

.order-card-complaint {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.04);
}

.order-card-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.order-card-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.order-card-head h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.order-meta {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.order-delivery-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.delivery-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-muted);
}

.delivery-tag-warn {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warm);
}

.order-meta-escrow {
    color: var(--warm);
    font-size: 11px;
}

.order-meta-ok {
    color: var(--accent);
    font-size: 11px;
}

.order-wait-msg {
    width: 100%;
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 10px;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.order-wait-msg-seller {
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--warm);
}

.profile-edit-card {
    max-width: 520px;
}

.profile-avatar-upload {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.profile-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    flex-shrink: 0;
}

.profile-avatar-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-avatar-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.site-logo-preview-wrap {
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.site-logo-preview {
    max-height: 56px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.balance-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 420px) 1fr;
    gap: 20px;
    align-items: start;
}

.balance-card-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.balance-card-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 20px;
}

.balance-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.25);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
}

.balance-approval-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: var(--radius);
}

.balance-approval-notice .ico {
    color: var(--warm);
    margin-top: 2px;
    flex-shrink: 0;
}

.balance-approval-notice strong {
    color: var(--warm);
}

.balance-iban-info {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.balance-iban-info h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}

.balance-iban-info ol {
    margin: 0 0 16px 1.1rem;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.balance-iban-info li {
    margin-bottom: 8px;
}

.balance-support-btn {
    width: 100%;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    border-radius: var(--radius);
}

.balance-side-title {
    font-size: 1rem;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .balance-page-grid {
        grid-template-columns: 1fr;
    }
}

/* Hesap detayları — ilan ekle & ilan sayfası */
.listing-add-card {
    max-width: 560px;
}

.account-details-form {
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.account-details-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.account-details-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.account-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.account-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.account-detail-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    min-width: 120px;
}

.account-toggle {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.account-toggle-btn {
    position: relative;
    cursor: pointer;
}

.account-toggle-btn input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.account-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
    transition: all 0.15s;
    white-space: nowrap;
}

.account-toggle-btn.is-active:not(.is-off) {
    background: rgba(0, 212, 170, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.account-toggle-btn.is-active.is-off {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.listing-account-details {
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.listing-account-details-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.listing-account-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.listing-account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.listing-account-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-input);
    flex-shrink: 0;
}

.listing-account-item-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    min-width: 100px;
}

.listing-account-item-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.listing-account-item.is-connected .listing-account-item-status {
    background: rgba(0, 212, 170, 0.12);
    color: var(--accent);
}

.listing-account-item.is-disconnected .listing-account-item-status {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.listing-account-item.is-connected .listing-account-item-icon {
    color: var(--accent);
}

@media (max-width: 768px) {
    .account-detail-row {
        flex-direction: column;
        align-items: stretch;
    }

    .account-detail-label {
        min-width: 0;
    }

    .account-toggle {
        width: 100%;
    }

    .account-toggle-btn {
        flex: 1;
    }

    .listing-account-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .listing-account-item-status {
        align-self: flex-start;
    }

    .listing-add-card,
    .listing-add-form {
        max-width: 100%;
    }
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-action-form { display: inline; }

.btn-order {
    padding: 8px 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-order-ok {
    background: rgba(0, 212, 170, 0.12);
    border-color: rgba(0, 212, 170, 0.35);
    color: var(--accent);
}

.btn-order-warn {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.35);
    color: var(--warm);
}

.btn-order-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.btn-order-ghost {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .chat-page {
        max-height: none;
        min-height: 50vh;
    }

    .order-actions {
        flex-direction: column;
    }

    .btn-order,
    .btn-order-ghost {
        width: 100%;
        justify-content: center;
    }

    .order-card-head {
        flex-wrap: wrap;
    }
}
