/* Toplu SMS / WA — ana tema (--accent, --panel-head-bg, --border) */

.sms-paket-page-hdr {
    margin-bottom: 12px;
}

.sms-paket-page-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.sms-paket-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 10px;
}

.sms-paket-shell {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 168px);
    min-height: 420px;
    max-height: calc(100vh - 140px);
}

.sms-paket-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
    gap: 14px;
    align-items: stretch;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.sms-paket-wrap--taslak {
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.95fr) 248px;
}

.sms-paket-wrap .panel {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.sms-paket-sol-head,
.sms-paket-orta-head,
.sms-paket-sablonlar__head {
    flex-shrink: 0;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    box-sizing: border-box;
    overflow: hidden;
}

/* —— Alıcılar —— */
.sms-paket-sol-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.sms-paket-sol-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.sms-paket-sol-title i {
    color: var(--accent);
    font-size: 12px;
}

.sms-paket-sol-count {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--accent-muted);
    border-radius: 999px;
    padding: 2px 10px;
    min-width: 28px;
    text-align: center;
}

.sms-paket-sol-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: var(--surface);
}

.sms-paket-bos-alicilar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    margin: 12px 12px 8px;
    padding: 20px 14px;
    color: var(--muted);
    background: var(--panel-head-bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

.sms-paket-bos-alicilar > i {
    font-size: 22px;
    color: var(--accent);
    opacity: 0.55;
}

.sms-paket-bos-alicilar__baslik {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.sms-paket-bos-alicilar__metin {
    margin: 0;
    max-width: 28rem;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
}

.sms-alici-tablo {
    width: 100%;
    table-layout: fixed;
    font-size: 12px;
    margin-bottom: 0;
}

.sms-alici-tablo thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--table-head-bg);
    padding: 8px 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.sms-alici-tablo thead tr:first-child th.sms-alici-th-sort {
    cursor: pointer;
    user-select: none;
}

.sms-alici-tablo thead tr:first-child th.sms-alici-th-sort:hover {
    color: var(--accent);
}

.sms-alici-tablo thead tr:first-child th.sms-alici-th-sort.is-sort-asc::after,
.sms-alici-tablo thead tr:first-child th.sms-alici-th-sort.is-sort-desc::after {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.65em;
    color: var(--accent);
}

.sms-alici-tablo thead tr:first-child th.sms-alici-th-sort.is-sort-asc::after {
    content: "▲";
}

.sms-alici-tablo thead tr:first-child th.sms-alici-th-sort.is-sort-desc::after {
    content: "▼";
}

.sms-alici-tablo thead tr.sms-alici-col-filters th {
    top: 33px;
    z-index: 2;
    padding: 6px 4px;
    background: var(--panel-head-bg);
    border-bottom: 2px solid #b8c4d8;
}

.sms-alici-tablo thead tr.sms-alici-col-filters .col-filter-input,
.sms-alici-tablo thead tr.sms-alici-col-filters .col-filter-select {
    width: 100%;
    min-width: 0;
    padding: 5px 6px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #94a3b8;
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
}

.sms-alici-tablo thead tr.sms-alici-col-filters .col-filter-input:focus,
.sms-alici-tablo thead tr.sms-alici-col-filters .col-filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--input-focus-ring);
}

.sms-alici-tablo__chk {
    width: 34px;
    text-align: center;
}

.sms-alici-tablo__chk input[type="checkbox"] {
    width: var(--sw-check-size);
    height: var(--sw-check-size);
    min-width: var(--sw-check-size);
    min-height: var(--sw-check-size);
    margin: 0;
    transform: scale(var(--sw-check-scale));
    transform-origin: center center;
    cursor: pointer;
    accent-color: var(--accent);
    vertical-align: middle;
}

.sms-alici-tablo__ad { width: 32%; }
.sms-alici-tablo__grup { width: 24%; }
.sms-alici-tablo__onceki,
.sms-alici-tablo__istenen { width: 22%; }

.sms-alici-tablo tbody td {
    padding: 7px 6px;
    border-bottom: 1px solid var(--table-row-border);
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.sms-alici-row {
    transition: background 0.12s ease;
}

.sms-alici-row:hover td {
    background: var(--table-row-hover);
}

.sms-alici-row.active td {
    background: var(--accent-soft);
}

.sms-alici-row--disi td {
    opacity: 0.45;
}

.sms-alici-row--disi .sms-alici-row__ad-btn {
    text-decoration: line-through;
    --sw-link: var(--muted);
    --sw-link-hover: var(--muted);
}

.sms-alici-row__ad-btn {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--sw-link, var(--text));
    --sw-link: var(--text);
    --sw-link-hover: var(--accent);
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sms-alici-row__ad-btn:hover,
.sms-alici-row__ad-btn:focus-visible {
    color: var(--sw-link-hover, var(--accent));
    text-decoration: underline;
}

.sms-alici-row__ad-btn:visited {
    color: var(--sw-link, var(--text));
}

.sms-alici-tablo__grup,
.sms-alici-tablo__onceki,
.sms-alici-tablo__istenen {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
}

.sms-alici-tablo__ad {
    text-align: left;
}

/* —— Mesaj —— */
.sms-paket-orta-head {
    display: flex;
    align-items: center;
}

.sms-paket-orta-head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sms-paket-orta-head i {
    color: var(--accent);
    font-size: 13px;
}

.sms-paket-orta-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    background: var(--surface);
    overflow: hidden;
}

.sms-paket-mesaj-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 8px;
    overflow: hidden;
}

.sms-paket-mesaj-input {
    width: 100%;
    flex: 1;
    min-height: 0;
    height: 100%;
    resize: none;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.55;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow-y: auto;
}

.sms-paket-mesaj-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.sms-paket-mesaj-input::placeholder {
    color: #94a3b8;
}

.sms-paket-gunluk-plan-not {
    flex-shrink: 0;
    margin: 0;
}

.sms-paket-mesaj-ozet__txt {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
}

.sms-paket-foot {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--panel-head-bg);
}

.sms-paket-foot .btn-primary {
    min-width: 140px;
}

/* —— Şablonlar —— */
.sms-paket-sablonlar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sms-paket-sablonlar__head-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.sms-paket-sablonlar__baslik {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    flex-shrink: 0;
}

.sms-paket-sablonlar__baslik i {
    color: var(--accent);
    font-size: 12px;
}

.sms-paket-sablonlar__alt {
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.sms-paket-sablonlar__yonet {
    flex-shrink: 0;
    padding: 6px 10px;
}

.sms-paket-sablonlar__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px 14px;
    background: var(--surface);
}

.sms-paket-sablonlar__bos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 28px 12px;
    color: var(--muted);
    font-size: 12px;
}

.sms-paket-sablonlar__bos i {
    font-size: 28px;
    color: #cbd5e1;
}

.sms-paket-sablonlar__bos p {
    margin: 0;
}

.sms-paket-sablon-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    border: 1px solid var(--border);
    background: var(--panel-head-bg);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.sms-paket-sablon-btn:last-child {
    margin-bottom: 0;
}

.sms-paket-sablon-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent-muted);
}

.sms-paket-sablon-btn.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--input-focus-ring);
}

.sms-paket-sablon-btn__baslik {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}

.sms-paket-sablon-btn__icerik {
    display: none;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
    white-space: pre-wrap;
    width: 100%;
}

.sms-paket-sablon-btn.active .sms-paket-sablon-btn__icerik {
    display: block;
}

/* Durum rozetleri (ortak) */
.sms-durum-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 10px;
}

.sms-durum--bekliyor {
    color: #92400e;
    background: #fef3c7;
}

.sms-durum--ok {
    color: #166534;
    background: #dcfce7;
}

.sms-durum--hata {
    color: #991b1b;
    background: #fee2e2;
}

.sms-durum--uyari {
    color: #9a3412;
    background: #ffedd5;
}

@media (max-width: 1280px) {
    .sms-paket-shell {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .sms-paket-wrap,
    .sms-paket-wrap--taslak {
        grid-template-columns: 1fr;
        flex: none;
        overflow: visible;
    }

    .sms-paket-wrap .panel {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .sms-paket-sol-scroll {
        max-height: 42vh;
    }

    .sms-paket-orta-body,
    .sms-paket-sablonlar__body {
        max-height: 36vh;
    }

    .sms-paket-mesaj-input {
        min-height: 180px;
        height: auto;
    }
}

/* Kanal rozeti: telefon bildirimi (SMS / WhatsApp rozetlerinin üçüncüsü) */
.sms-kanal--bildirim {
    background: var(--accent-muted);
    color: var(--accent);
}

/* ---------- Resmi WhatsApp (22.11.2026): alt düğme çubuğu, yol notu, onay penceresi ---------- */
.sms-paket-foot--yollar {
    align-items: flex-start;
}

.sms-paket-gonder-form--yollar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.sms-paket-wa-yollar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.sms-paket-yol {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.sms-paket-yol__alt {
    max-width: 260px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--muted);
}

.sms-paket-foot__son {
    margin-left: auto;
}

.sms-paket-wa-yollar__not {
    align-self: center;
    max-width: 230px;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--muted);
}

/* Mesaj kutusunun altındaki «bu metin hangi yoldan gider» satırı */
.sms-paket-yol-bilgi {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    padding: 7px 10px;
    border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--border));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--warn) 6%, var(--surface));
    font-size: 12px;
    line-height: 1.4;
    color: var(--text);
}

.sms-paket-yol-bilgi > i {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--warn);
}

.sms-paket-yol-bilgi[hidden] {
    display: none;
}

/* Gönderim onay penceresi (app-modal + esm-head / esm-foot) */
.wa-resmi-modal .app-modal__dialog {
    display: flex;
    flex-direction: column;
    width: min(540px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: hidden;
}

.wa-resmi-modal .esm-head {
    flex-shrink: 0;
    margin: 0;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}

.wa-resmi-modal .esm-head__title h2 i {
    color: var(--wa);
}

.wa-resmi-modal__govde {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    margin: 0;
    padding: 14px 18px;
    overflow-y: auto;
}

.wa-resmi-modal .esm-foot {
    flex-shrink: 0;
    align-items: center;
    margin: 0;
    padding: 10px 18px;
    border-top: 1px solid var(--border);
    gap: 8px;
}

.wa-resmi-modal [hidden] {
    display: none;
}
