/* =========================================================
   MAGAZIFY SİPARİŞ VE HESAP HAREKETLERİ
   Version: 1.0.0

   Sipariş Raporlama: .sy-*
   Hesap Hareketleri: .hh-*
   ========================================================= */

/* =========================================================
   SİPARİŞ RAPORLAMA
   ========================================================= */

.sy-order-report,
.sy-order-report *,
.sy-order-report *::before,
.sy-order-report *::after {
    box-sizing: border-box;
}

.sy-order-report {
    width: 100%;
    font-family: Roboto, Arial, sans-serif;
}


/* =========================================================
   BİLGİLENDİRME KUTUSU
   ========================================================= */

.sy-info-box {
    width: 100%;
    margin: 10px 0 20px;
    padding: 14px 18px;
    border-left: 4px solid #444;
    background: #f8f8f8;
    color: #333;
    font-family: Roboto, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.55;
}

.sy-info-box p {
    margin: 4px 0;
}

.sy-info-box strong {
    white-space: nowrap;
}


/* =========================================================
   BOŞ DURUM
   ========================================================= */

.sy-empty-state {
    width: 100%;
    margin: 15px 0 0;
    padding: 28px 20px;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    background: #fafafa;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}


/* =========================================================
   TABLO KAPSAYICISI
   ========================================================= */

.sy-table-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}


/* =========================================================
   TABLO IZGARASI
   =========================================================
   Sütun sıralaması:

   1. Sipariş Tarihi
   2. Sipariş No
   3. Durum
   4. Müşteri Adı
   5. Kargo Ödemesi
   6. KDV Hariç Satış
   7. KDV Oranı
   8. KDV Miktarı
   9. Toplam Satış
   ========================================================= */

.sy-header,
.sy-order-item {
    display: grid;
    grid-template-columns:
        125px
        105px
        120px
        145px
        120px
        145px
        95px
        120px
        135px;
    align-items: center;
    min-width: 1120px;
    padding: 12px 16px;
    column-gap: 14px;
    border-bottom: 1px solid #e5e5e5;
    font-family: Roboto, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
}


/* =========================================================
   TABLO BAŞLIĞI
   ========================================================= */

.sy-header {
    background: #f8f8f8;
    color: #666;
    font-weight: 600;
}

.sy-header > div {
    min-width: 0;
}


/* =========================================================
   SİPARİŞ SATIRLARI
   ========================================================= */

.sy-order-item {
    background: #fff;
    color: #222;
    transition: background-color 0.2s ease;
}

.sy-order-item:last-child {
    border-bottom: 0;
}

.sy-order-item:hover {
    background: #f7f7f7;
}

.sy-order-item > div {
    min-width: 0;
    overflow-wrap: anywhere;
}


/* =========================================================
   SİPARİŞ NUMARASI
   ========================================================= */

.sy-col-id {
    color: #111;
    font-weight: 700;
    white-space: nowrap;
}


/* =========================================================
   DURUM
   ========================================================= */

.sy-col-status {
    align-self: center;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.sy-status-processing,
.sy-status-completed {
    color: #26733a;
}

.sy-status-pending,
.sy-status-on-hold {
    color: #8a6200;
}

.sy-status-cancelled,
.sy-status-failed,
.sy-status-refunded {
    color: #a02222;
}


/* =========================================================
   MÜŞTERİ VE ÜRÜNLER
   ========================================================= */

.sy-col-customer {
    line-height: 1.5;
}

/* =========================================================
   FİNANS SÜTUNLARI
   ========================================================= */

.sy-col-ship,
.sy-col-tax-exclusive,
.sy-col-tax-rate,
.sy-col-tax,
.sy-col-total {
    white-space: nowrap;
}

.sy-col-ship {
    color: #444;
    font-weight: 600;
}

.sy-col-tax-exclusive {
    color: #222;
    font-weight: 600;
}

.sy-col-tax-rate { color: #444; font-weight: 600; white-space: nowrap; }

.sy-order-title { margin: 0 0 24px; font-size: 34px; line-height: 1.2; }

.sy-col-tax {
    color: #444;
    font-weight: 600;
}

.sy-col-total {
    color: #000;
    font-weight: 700;
}


/* =========================================================
   YÖNETİM PANELİ
   ========================================================= */

.sy-admin-wrap .sy-order-report {
    margin-top: 20px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .sy-info-box {
        padding: 13px 16px;
    }
}


/* =========================================================
   MOBİL KART GÖRÜNÜMÜ
   ========================================================= */

@media (max-width: 768px) {

    .sy-info-box {
        padding: 12px 14px;
        font-size: 12px;
    }

    .sy-info-box strong {
        white-space: normal;
    }

    .sy-table-scroll {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .sy-header {
        display: none;
    }

    .sy-order-item {
        display: block;
        min-width: 0;
        margin-bottom: 14px;
        padding: 14px;
        border: 1px solid #ddd;
        border-radius: 5px;
        background: #fff;
        font-size: 13px;
    }

    .sy-order-item:last-child {
        border-bottom: 1px solid #ddd;
    }

    .sy-order-item:hover {
        background: #fff;
    }

    .sy-order-item > div {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 10px;
        padding: 7px 0;
        border-bottom: 1px solid #eee;
        overflow-wrap: anywhere;
    }

    .sy-order-item > div:last-child {
        border-bottom: 0;
    }

    .sy-order-item > div::before {
        content: attr(data-label);
        color: #666;
        font-weight: 600;
    }

    .sy-col-date {
        padding-top: 0;
    }

    .sy-col-total {
        padding-bottom: 0;
    }

    .sy-col-ship,
    .sy-col-tax-exclusive,
    .sy-col-tax-rate,
    .sy-col-tax,
    .sy-col-total {
        white-space: normal;
    }
}


/* =========================================================
   ÇOK KÜÇÜK EKRANLAR
   ========================================================= */

@media (max-width: 420px) {

    .sy-order-item {
        padding: 12px;
    }

    .sy-order-item > div {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 8px;
        font-size: 12px;
    }

    .sy-empty-state {
        padding: 22px 14px;
        font-size: 13px;
    }
}


/* =========================================================
   HESAP HAREKETLERİ
   ========================================================= */

/* =========================================================
   HESAP HAREKETLERİ
   ========================================================= */

.hh-wrapper,
.hh-wrapper *,
.hh-wrapper *::before,
.hh-wrapper *::after {
    box-sizing: border-box;
}

.hh-wrapper {
    width: 100%;
    font-family: Roboto, Arial, sans-serif;
}


/* =========================================================
   ÖZET
   ========================================================= */

.hh-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}

.hh-summary-card {
    padding: 15px 16px;
    border: 1px solid #dedede;
    border-radius: 6px;
    background: #fff;
}

.hh-summary-card span {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 12px;
    font-weight: 600;
}

.hh-summary-card strong {
    display: block;
    color: #111;
    font-size: 19px;
    line-height: 1.25;
}

.hh-summary-balance {
    border-color: #222;
    background: #f5f5f5;
}

.hh-summary-balance strong {
    font-size: 21px;
}


/* =========================================================
   GÖNDERİM POLİTİKASI BİLGİLENDİRMESİ
   ========================================================= */

.hh-info-box {
    width: 100%;
    margin: 0 0 20px;
    padding: 14px 18px;
    border-left: 4px solid #444;
    background: #f8f8f8;
    color: #333;
    font-size: 13px;
    line-height: 1.6;
}

.hh-info-box p {
    margin: 5px 0;
}

.hh-info-box strong {
    font-weight: 700;
}


/* =========================================================
   ADMIN ÖDEME FORMU
   ========================================================= */

.hh-admin-form-box {
    margin: 0 0 20px;
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.hh-admin-form-box h2 {
    margin: 0 0 15px;
    font-size: 18px;
}

.hh-payment-form {
    display: grid;
    grid-template-columns: 160px 170px minmax(240px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.hh-form-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
}

.hh-form-field input {
    width: 100%;
    min-height: 40px;
}

.hh-add-payment {
    min-height: 40px;
}


/* =========================================================
   HAREKET TABLOSU
   ========================================================= */

.hh-table-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.hh-header,
.hh-row {
    display: grid;
    grid-template-columns:
        110px
        150px
        100px
        minmax(260px, 1fr)
        130px;
    align-items: center;
    min-width: 800px;
    padding: 12px 16px;
    column-gap: 14px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 13px;
    line-height: 1.45;
}

.hh-admin-view .hh-header,
.hh-admin-view .hh-row {
    grid-template-columns:
        110px
        150px
        100px
        minmax(240px, 1fr)
        130px
        240px;
    min-width: 1060px;
}

.hh-header {
    background: #f8f8f8;
    color: #555;
    font-weight: 600;
}

.hh-row {
    background: #fff;
    color: #222;
    transition: background-color 0.2s ease;
}

.hh-row:last-child {
    border-bottom: 0;
}

.hh-row:hover {
    background: #f7f7f7;
}

.hh-row > div,
.hh-header > div {
    min-width: 0;
    overflow-wrap: anywhere;
}


/* =========================================================
   HAREKET TÜRLERİ VE TUTARLAR
   ========================================================= */

.hh-type-entitlement {
    border-left: 3px solid #2f7d46;
}

.hh-type-shipping {
    border-left: 3px solid #a16b00;
}

.hh-type-payment {
    border-left: 3px solid #9c2f2f;
}

.hh-amount {
    font-weight: 700;
    white-space: nowrap;
}

.hh-credit {
    color: #26733a;
}

.hh-debit {
    color: #a02222;
}


/* =========================================================
   İŞLEMLER
   ========================================================= */

.hh-actions {
    min-width: 0;
}

.hh-locked {
    color: #777;
    font-size: 12px;
}

.hh-delete-payment-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}


/* =========================================================
   BOŞ DURUM
   ========================================================= */

.hh-empty-state {
    padding: 28px 20px;
    color: #666;
    font-size: 14px;
    text-align: center;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .hh-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hh-payment-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hh-form-field-wide {
        grid-column: 1 / -1;
    }

    .hh-add-payment {
        width: max-content;
    }
}


/* =========================================================
   MOBİL
   ========================================================= */

@media (max-width: 768px) {

    .hh-info-box {
        padding: 12px 14px;
        font-size: 12px;
    }

    .hh-summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .hh-summary-card {
        padding: 13px 14px;
    }

    .hh-payment-form {
        grid-template-columns: 1fr;
    }

    .hh-form-field-wide {
        grid-column: auto;
    }

    .hh-add-payment {
        width: 100%;
    }

    .hh-table-scroll {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .hh-header {
        display: none;
    }

    .hh-row,
    .hh-admin-view .hh-row {
        display: block;
        min-width: 0;
        margin-bottom: 12px;
        padding: 12px 14px;
        border: 1px solid #ddd;
        border-left-width: 4px;
        border-radius: 5px;
        font-size: 13px;
    }

    .hh-row:last-child {
        border-bottom: 1px solid #ddd;
    }

    .hh-row > div {
        display: grid;
        grid-template-columns: 105px minmax(0, 1fr);
        gap: 8px;
        padding: 6px 0;
        border-bottom: 1px solid #eee;
    }

    .hh-row > div:last-child {
        border-bottom: 0;
    }

    .hh-row > div::before {
        content: attr(data-label);
        color: #666;
        font-weight: 600;
    }
}


/* =========================================================
   ÇOK KÜÇÜK EKRANLAR
   ========================================================= */

@media (max-width: 420px) {

    .hh-row > div {
        grid-template-columns: 88px minmax(0, 1fr);
        font-size: 12px;
    }
}


/* =========================================================
   SİPARİŞ VE HESAP AYARLARI
   ========================================================= */

.msh-settings-page,
.msh-settings-page * {
    box-sizing: border-box;
}

.msh-settings-page {
    max-width: 1180px;
}

.msh-settings-intro {
    max-width: 900px;
    margin: 8px 0 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.65;
}

.msh-settings-form {
    width: 100%;
}

.msh-settings-card {
    margin: 0 0 16px;
    padding: 20px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
}

.msh-settings-card h2 {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.35;
}

.msh-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.msh-settings-field {
    margin-bottom: 14px;
}

.msh-settings-field:last-child {
    margin-bottom: 0;
}

.msh-settings-field label {
    display: block;
    margin-bottom: 6px;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
}

.msh-settings-field input {
    width: 100%;
    min-height: 40px;
}

.msh-settings-field p {
    margin: 6px 0 0;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
}

.msh-settings-result {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 88px;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f7f7f7;
}

.msh-settings-result strong {
    margin-bottom: 7px;
    font-size: 13px;
}

.msh-settings-result span {
    font-size: 20px;
    font-weight: 700;
}

@media (max-width: 782px) {

    .msh-settings-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   1.1.1 — HESAP HAREKETLERİ ÖZET GÖRÜNÜMÜ
   ========================================================= */

/* Kart başlıkları daha okunaklı */
.hh-summary-card .hh-summary-title {
    display: block !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    color: #555 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

/* Fiyat tek satır, daha güçlü */
.hh-summary-card strong {
    display: block !important;
    margin: 0 !important;
    color: #111 !important;
    font-size: 23px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

.hh-summary-amount {
    display: inline !important;
    white-space: nowrap !important;
    color: inherit !important;
    font: inherit !important;
    line-height: inherit !important;
}

/*
 * Eksi işareti yerine kırmızı renk.
 * Tutarın kendisi pozitif biçimde gösterilir.
 */
.hh-summary-amount.is-negative {
    color: #c62828 !important;
}

.hh-summary-balance strong {
    font-size: 24px !important;
}


/* =========================================================
   1.1.1 — GÖNDERİM POLİTİKASI SATIRLARI
   ========================================================= */

.hh-info-box {
    font-size: 13px;
    line-height: 1.6;
}

.hh-info-line {
    display: flex !important;
    align-items: flex-start !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 6px 0 !important;
    padding: 0 !important;
}

.hh-info-line > strong {
    display: inline !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 700 !important;
    line-height: inherit !important;
    white-space: nowrap !important;
}

.hh-info-line > span {
    display: inline !important;
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: inherit !important;
}

/*
 * WooCommerce wc_price içindeki symbol ve amount parçalarının
 * bilgi kutusunda ayrı satıra düşmesini engeller.
 */
.hh-info-line .woocommerce-Price-amount,
.hh-info-line .woocommerce-Price-currencySymbol,
.hh-info-line bdi {
    display: inline !important;
    white-space: nowrap !important;
}

@media (max-width: 680px) {
    .hh-summary-card .hh-summary-title {
        font-size: 14px !important;
    }

    .hh-summary-card strong,
    .hh-summary-balance strong {
        font-size: 21px !important;
    }
}
