/* ═══════════════════════════════════════════════════════
   IK Dashboard v4 — İletişim Koordinasyonu
   Extracted from index-v4.php
   ═══════════════════════════════════════════════════════ */

    /* ═══════════════════════════════════════
       IK4 — Premium Communication Dashboard
       ═══════════════════════════════════════ */

    /* ── Stats ── */
    .ik4-stats {
        display: flex;
        gap: 2px;
        margin-bottom: 24px;
        background: #2c3e50;
        border-radius: 6px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(44, 62, 80, .2);
    }

    .ik4-st {
        flex: 1;
        padding: 16px 12px;
        text-align: center;
        background: #34495e;
        position: relative;
    }

    .ik4-st:first-child {
        border-radius: 6px 0 0 6px;
    }

    .ik4-st:last-child {
        border-radius: 0 6px 6px 0;
    }

    .ik4-st-val {
        font-size: 26px;
        font-weight: 800;
        color: #fff;
        line-height: 1;
        margin-bottom: 4px;
    }

    .ik4-st-lbl {
        font-size: 10px;
        color: rgba(255, 255, 255, .55);
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: 600;
    }

    .ik4-st-lbl i {
        margin-right: 3px;
    }

    .ik4-st-accent {
        border-bottom: 3px solid;
    }

    /* Filter Buttons */
    .ik4-st-btn {
        cursor: pointer;
        transition: background .2s, transform .15s;
        user-select: none;
    }

    .ik4-st-btn:hover {
        background: #3d566e;
        transform: scale(1.03);
    }

    .ik4-st-btn:active {
        transform: scale(.97);
    }

    .ik4-st-btn.ik4-st-active {
        background: #2c3e50;
        border-bottom-width: 4px;
    }

    .ik4-st-btn.ik4-st-active .ik4-st-val {
        color: #fff;
    }

    .ik4-st-btn.ik4-st-active .ik4-st-lbl {
        color: rgba(255, 255, 255, .85);
    }

    .ik4-st-btn:not(.ik4-st-active) .ik4-st-val {
        color: rgba(255, 255, 255, .6);
    }

    .ik4-st-btn:not(.ik4-st-active) .ik4-st-lbl {
        color: rgba(255, 255, 255, .35);
    }

    .ik4-filter-label {
        text-align: center;
        font-size: 12px;
        color: #8899a8;
        margin-bottom: 12px;
        display: none;
    }

    .ik4-filter-label strong {
        color: #2c3e50;
    }

    .ik4-filter-label .ik4-fl-clear {
        color: #3598dc;
        cursor: pointer;
        margin-left: 6px;
        text-decoration: underline;
        font-weight: 600;
    }

    .ik4-filter-label .ik4-fl-clear:hover {
        color: #e74c3c;
    }

    /* ── Section Crystal Block ── */
    .ik4-sec {
        margin-bottom: 36px;
        position: relative;
        background: #fff;
        border: 2px solid #e1e5ec;
        border-radius: 8px;
        box-shadow: 0 4px 16px rgba(44, 62, 80, .07),
        0 1px 3px rgba(0, 0, 0, .04),
        inset 0 1px 0 rgba(255, 255, 255, .9);
        overflow: hidden;
    }

    .ik4-sec::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 100%;
        background: linear-gradient(180deg, rgba(53, 152, 220, .018) 0%, transparent 40%);
        pointer-events: none;
        z-index: 0;
    }

    .ik4-sec-bar {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: stretch;
        border-bottom: 2px solid #e9edef;
        background: linear-gradient(135deg, #fcfdfe 0%, #f6f8fb 50%, #f0f3f7 100%);
    }

    .ik4-sec-accent {
        width: 5px;
        flex-shrink: 0;
    }

    .ik4-sec-inner {
        flex: 1;
        padding: 18px 24px;
        display: flex;
        align-items: center;
        gap: 18px;
    }

    .ik4-sec-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        color: #fff;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .18),
        inset 0 1px 0 rgba(255, 255, 255, .25);
    }

    .ik4-sec-txt {
        flex: 1;
        min-width: 0;
    }

    .ik4-sec-title {
        font-size: 18px;
        font-weight: 800;
        color: #2C3E50;
        margin: 0 0 4px;
        line-height: 1.3;
        letter-spacing: -0.2px;
    }

    .ik4-sec-cnt {
        display: inline-block;
        font-size: 11px;
        font-weight: 700;
        padding: 3px 12px;
        border-radius: 12px;
        color: #fff;
        margin-left: 10px;
        vertical-align: middle;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    }

    .ik4-sec-desc {
        font-size: 13px;
        color: #67809F;
        line-height: 1.55;
        margin: 0;
    }

    .ik4-sec-no-desc {
        font-size: 12px;
        color: #bfcad1;
        font-style: italic;
        margin: 0;
    }

    /* Cards area inside crystal block */
    .ik4-sec-cards {
        position: relative;
        z-index: 1;
        padding: 16px 20px 8px;
        background: linear-gradient(180deg, #f8f9fb 0%, #fff 60px);
    }

    /* ── Grid ── */
    .ik4-grid {
        margin: 0 -8px;
    }

    .ik4-col {
        padding: 0 8px;
        margin-bottom: 16px;
    }

    /* ── Card Shell (inside crystal section) ── */
    .ik4-card {
        background: #fff;
        border: 1px solid #e1e5ec;
        border-radius: 6px;
        height: 100%;
        display: flex;
        flex-direction: column;
        box-shadow: 0 1px 4px rgba(44, 62, 80, .05);
        transition: opacity .4s ease, transform .25s ease,
        box-shadow .3s ease, border-color .3s ease;
        overflow: hidden;
    }

    .ik4-card:hover {
        border-color: #94A0B2;
        box-shadow: 0 4px 16px rgba(44, 62, 80, .10);
        transform: translateY(-2px);
    }

    /* Inactive / Off */
    .ik4-card.ik4-off {
        opacity: .4;
        border: 1px dashed #bfcad1;
        background: #fcfcfd;
    }

    .ik4-card.ik4-off:hover {
        opacity: .6;
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
    }

    /* Animations */
    .ik4-card.ik4-shrink {
        transform: scale(.96);
    }

    .ik4-card.ik4-glow {
        box-shadow: 0 0 0 3px rgba(53, 152, 220, .25), 0 4px 16px rgba(44, 62, 80, .12);
    }

    /* ── Card Top: Colored Banner ── */
    .ik4-banner {
        height: 5px;
        width: 100%;
    }

    /* ── Card Header ── */
    .ik4-card-head {
        padding: 12px 14px 8px;
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }

    .ik4-tpl-name {
        flex: 1;
        font-size: 13px;
        font-weight: 700;
        color: #2c3e50;
        line-height: 1.35;
        min-width: 0;
    }

    .ik4-tpl-name a {
        color: inherit;
        text-decoration: none;
        border-bottom: 1px dashed transparent;
        transition: border-color .2s;
    }

    .ik4-tpl-name a:hover {
        border-color: #3598dc;
        color: #3598dc;
    }

    .ik4-card-num {
        font-size: 10px;
        color: #c0c8d2;
        font-weight: 600;
        background: #f5f7fa;
        padding: 2px 6px;
        border-radius: 4px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* ── Template Detail Box ── */
    .ik4-tpl-box {
        margin: 0 14px 10px;
        padding: 10px 12px;
        background: linear-gradient(135deg, #f8fafe 0%, #f2f5fa 100%);
        border: 1px solid #dce3f0;
        border-radius: 6px;
    }
    .ik4-tpl-badge {
        display: inline-flex; align-items: center; gap: 4px;
        font-size: 10px; font-weight: 700; text-transform: uppercase;
        letter-spacing: .6px; margin-bottom: 6px;
    }
    .ik4-tpl-badge i { font-size: 11px; }
    .ik4-tpl-subject-label {
        font-size: 9px; font-weight: 700; color: #94A0B2;
        text-transform: uppercase; letter-spacing: .5px;
        margin-bottom: 2px;
    }
    .ik4-tpl-subject {
        font-size: 12px; font-weight: 600; color: #2C3E50;
        line-height: 1.35; margin-bottom: 6px;
        word-break: break-word;
    }
    .ik4-tpl-preview {
        font-size: 11px; color: #67809F; line-height: 1.45;
        word-break: break-word;
    }
    .ik4-tpl-preview-more {
        color: #3598dc; font-weight: 600; cursor: pointer;
        text-decoration: none; font-size: 11px;
        white-space: nowrap;
    }
    .ik4-tpl-preview-more:hover { text-decoration: underline; }
    .ik4-tpl-actions {
        display: flex; gap: 6px; margin-top: 8px;
        padding-top: 7px; border-top: 1px solid #e4e9f2;
    }
    .ik4-tpl-btn {
        display: inline-flex; align-items: center; gap: 4px;
        font-size: 11px; font-weight: 600; padding: 3px 10px;
        border-radius: 4px; text-decoration: none;
        transition: background .15s, color .15s;
    }
    .ik4-tpl-btn i { font-size: 11px; }
    .ik4-tpl-btn-edit {
        background: #3598dc; color: #fff;
    }
    .ik4-tpl-btn-edit:hover { background: #2C3E50; color: #fff; }
    .ik4-tpl-btn-view {
        background: #e9edef; color: #5e738b;
    }
    .ik4-tpl-btn-view:hover { background: #d5dbe3; color: #2C3E50; }

    /* ── Card Body ── */
    .ik4-card-body {
        padding: 0 16px 12px;
        flex: 1;
    }

    /* ── Main 2-Column Layout ── */
    .ik4-main-row {
        margin: 0 -12px;
    }

    .ik4-main-col {
        padding: 0 12px;
        border-right: 2px solid #eef1f5;
    }

    .ik4-main-col:last-child {
        border-right: none;
    }

    /* Type Pill */
    .ik4-type-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
    }

    .ik4-type-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 12px;
        font-weight: 700;
        padding: 4px 12px;
        border-radius: 6px;
        line-height: 1;
    }

    .ik4-type-pill i {
        font-size: 13px;
    }

    /* Status Row */
    .ik4-status-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        margin: 0 -16px;
        background: #f8f9fb;
        border-top: 1px solid #eef1f5;
        border-bottom: 1px solid #eef1f5;
    }

    .ik4-status-icon {
        font-size: 18px;
        transition: color .3s;
    }

    .ik4-card:not(.ik4-off) .ik4-status-icon {
        color: #27ae60;
    }

    .ik4-card.ik4-off .ik4-status-icon {
        color: #e74c3c;
    }

    .ik4-status-row .editable {
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
    }

    .ik4-status-hint {
        font-size: 10px;
        color: #a8b3c0;
        margin-left: auto;
        font-style: italic;
    }

    /* Recipients */
    .ik4-rcpt {
        margin-top: 10px;
        padding: 8px 0 0;
    }

    .ik4-rcpt-label {
        font-size: 10px;
        font-weight: 700;
        color: #a0aab5;
        text-transform: uppercase;
        letter-spacing: .8px;
        margin-bottom: 4px;
    }

    .ik4-rcpt-list {
        font-size: 12px;
        color: #5a6978;
        line-height: 1.6;
    }

    .ik4-rcpt-list i {
        color: #3598dc;
        margin-right: 3px;
    }

    /* Kurum */
    .ik4-kurum {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        color: #8899a8;
        margin-top: 6px;
    }

    .ik4-kurum i {
        color: #bcc5d0;
    }

    /* ── Card Footer ── */
    .ik4-card-foot {
        padding: 8px 16px;
        border-top: 1px solid #eef1f5;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        background: #fafbfc;
    }

    .ik4-card-foot .btn {
        padding: 3px 8px;
        font-size: 11px;
    }

    /* ── Scheduler Info & Preview ── */
    .ik4-sched {
        margin: 8px 0 0;
        padding: 8px 0 0;
        border-top: 1px dashed #e9edef;
    }
    .ik4-sched-row {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        color: #67809F;
        margin-bottom: 4px;
    }
    .ik4-sched-row i { color: #94A0B2; font-size: 12px; width: 14px; text-align: center; }
    .ik4-sched-label { color: #8899a8; }
    .ik4-sched-val { font-weight: 600; color: #2C3E50; }
    .ik4-sched-badge {
        display: inline-flex; align-items: center; gap: 3px;
        font-size: 10px; font-weight: 700; padding: 2px 8px;
        border-radius: 4px; line-height: 1;
    }
    .ik4-sched-badge-cron { background: #eafaf1; color: #27ae60; }
    .ik4-sched-badge-event { background: #fef5e7; color: #e67e22; }
    .ik4-sched-badge-scheduler { background: #e6f1fb; color: #3598dc; }
    .ik4-preview-btn {
        display: inline-flex; align-items: center; gap: 4px;
        font-size: 11px; font-weight: 600; padding: 4px 12px;
        border-radius: 5px; border: 1px solid #3598dc;
        background: #fff; color: #3598dc; cursor: pointer;
        transition: all .15s; margin-top: 6px;
    }
    .ik4-preview-btn:hover { background: #3598dc; color: #fff; }
    .ik4-preview-btn i { font-size: 12px; }
    .ik4-preview-btn.ik4-pb-loading { opacity: .6; pointer-events: none; }

    /* ── Communication Log Row & Button ── */
    .ik4-comm-log-row {
        display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
        margin-top: 8px; padding-top: 8px;
        border-top: 1px dashed #e9edef;
    }
    .ik4-comm-log-btn {
        display: inline-flex !important; align-items: center; gap: 4px;
        font-size: 10px !important; font-weight: 600 !important; padding: 3px 10px !important;
        border-radius: 5px !important; border: 1px solid #67809F !important;
        background: #fff !important; color: #67809F !important; cursor: pointer;
        transition: all .15s; margin: 0 !important; text-decoration: none !important;
        line-height: 1.4 !important; white-space: nowrap;
    }
    .ik4-comm-log-btn:hover { background: #67809F !important; color: #fff !important; }
    .ik4-comm-log-btn i { font-size: 10px !important; margin-right: 2px; }

    /* ── Cron Item: badge + durum toggle row ── */
    .ik4-cron-item {
        display: inline-flex; align-items: center; gap: 6px;
        margin: 3px 6px 3px 0; vertical-align: middle;
        background: #f8f9fb; border: 1px solid #e9edef;
        border-radius: 6px; padding: 3px 8px 3px 4px;
    }
    .ik4-cron-toggle {
        display: inline-flex; align-items: center;
    }
    .ik4-cron-toggle a.editable {
        font-size: 10px !important; padding: 2px 6px !important;
        border-radius: 4px !important; font-weight: 700 !important;
        line-height: 1.2 !important; white-space: nowrap;
    }
    .ik4-preview-count {
        display: inline-flex; align-items: center; gap: 3px;
        font-size: 10px; font-weight: 700; padding: 2px 8px;
        border-radius: 10px; background: #3598dc; color: #fff;
        margin-left: 4px;
    }
    .ik4-preview-nodata {
        font-size: 10px; color: #bcc5d0; font-style: italic;
        margin-top: 4px;
    }

    /* ── Preview Results Modal ── */
    .ik4-prev-overlay {
        display: none; position: fixed; top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(44,62,80,.55); z-index: 10060;
    }
    .ik4-prev-overlay.ik4-prev-open {
        display: flex; align-items: center; justify-content: center;
    }
    .ik4-prev-modal {
        background: #fff; border-radius: 10px;
        width: 800px; max-width: 94vw; max-height: 85vh;
        display: flex; flex-direction: column;
        box-shadow: 0 20px 60px rgba(0,0,0,.25);
        overflow: hidden;
    }
    .ik4-prev-head {
        padding: 18px 24px; border-bottom: 2px solid #e9edef;
        background: linear-gradient(135deg, #fcfdfe, #f6f8fb);
        display: flex; align-items: center; gap: 14px;
    }
    .ik4-prev-head-icon {
        width: 40px; height: 40px; border-radius: 10px;
        background: #3598dc; color: #fff;
        display: flex; align-items: center; justify-content: center;
        font-size: 16px;
    }
    .ik4-prev-head-txt { flex: 1; }
    .ik4-prev-head-title {
        font-size: 15px; font-weight: 800; color: #2C3E50; margin: 0 0 2px;
    }
    .ik4-prev-head-sub {
        font-size: 12px; color: #67809F;
    }
    .ik4-prev-close {
        width: 32px; height: 32px; border-radius: 8px;
        border: none; background: #e9edef; color: #5e738b;
        font-size: 16px; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
    }
    .ik4-prev-close:hover { background: #e7505a; color: #fff; }
    .ik4-prev-body {
        flex: 1; overflow-y: auto; padding: 16px 24px;
    }
    .ik4-prev-table {
        width: 100%; border-collapse: collapse; font-size: 12px;
    }
    .ik4-prev-table th {
        background: #f5f7fa; color: #5e738b; font-weight: 700;
        padding: 8px 10px; text-align: left; border-bottom: 2px solid #e9edef;
        font-size: 11px; text-transform: uppercase; letter-spacing: .3px;
    }
    .ik4-prev-table td {
        padding: 8px 10px; border-bottom: 1px solid #f0f2f5; color: #2C3E50;
    }
    .ik4-prev-table tr:hover td { background: #f8f9fb; }
    .ik4-prev-empty {
        text-align: center; padding: 30px; color: #a8b3c0; font-size: 13px;
    }
    .ik4-prev-foot {
        padding: 12px 24px; border-top: 2px solid #e9edef;
        background: #fcfcfd; display: flex; align-items: center;
        justify-content: space-between;
    }
    .ik4-prev-foot-info { font-size: 12px; color: #67809F; }
    .ik4-prev-foot-close {
        padding: 6px 18px; border-radius: 6px; border: none;
        background: #e9edef; color: #5e738b; font-size: 12px;
        font-weight: 600; cursor: pointer;
    }
    .ik4-prev-foot-close:hover { background: #d5dbe3; color: #2C3E50; }

    /* ── Template & Rendered Message ── */
    .ik4-prev-tpl {
        margin-bottom: 16px; padding: 12px 16px;
        background: #f8f9fb; border: 1px solid #e1e5ec;
        border-radius: 8px; font-size: 12px;
    }
    .ik4-prev-tpl-label {
        font-size: 10px; font-weight: 700; text-transform: uppercase;
        color: #94A0B2; letter-spacing: .5px; margin-bottom: 6px;
    }
    .ik4-prev-tpl-text {
        font-family: 'Courier New', monospace; font-size: 12px;
        color: #5e738b; line-height: 1.5; word-break: break-word;
    }
    .ik4-prev-tpl-text .ik4-ph {
        background: #fef5e7; color: #e67e22; padding: 1px 4px;
        border-radius: 3px; font-weight: 700; font-size: 11px;
    }
    .ik4-msg-bubble {
        margin: 6px 0 12px; padding: 10px 14px;
        background: #eafaf1; border-left: 3px solid #27ae60;
        border-radius: 0 8px 8px 0; font-size: 13px;
        color: #2C3E50; line-height: 1.5; word-break: break-word;
    }
    .ik4-msg-bubble.ik4-msg-error {
        background: #fef0ef; border-left-color: #e7505a;
    }
    .ik4-msg-unresolved {
        background: #fce4e4; color: #c0392b; padding: 1px 4px;
        border-radius: 3px; font-weight: 700; font-size: 12px;
        border: 1px dashed #e7505a;
    }
    .ik4-msg-label {
        font-size: 10px; font-weight: 700; color: #27ae60;
        text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px;
    }
    .ik4-rcpt-card {
        border: 1px solid #e9edef; border-radius: 8px;
        margin-bottom: 12px; overflow: hidden;
    }
    .ik4-rcpt-card-head {
        display: flex; align-items: center; gap: 10px;
        padding: 10px 14px; background: #f8f9fb;
        border-bottom: 1px solid #e9edef; font-size: 12px;
    }
    .ik4-rcpt-card-head strong { color: #2C3E50; }
    .ik4-rcpt-card-head .ik4-rcpt-phone {
        color: #67809F; font-family: monospace;
    }
    .ik4-rcpt-card-head .ik4-rcpt-detail {
        margin-left: auto; color: #94A0B2; font-size: 11px;
    }
    .ik4-rcpt-card-body { padding: 10px 14px; }

    /* ── Exclusion styles ── */
    .ik4-rcpt-excluded {
        border-color: #e7505a;
        background: #fdf2f2;
    }
    .ik4-rcpt-excluded .ik4-rcpt-card-head {
        background: #fbeaea;
        border-bottom-color: #f0c8c8;
    }
    .ik4-rcpt-excluded .ik4-msg-bubble {
        opacity: 0.45;
        text-decoration: line-through;
    }
    .ik4-excl-badge {
        display: inline-flex; align-items: center; gap: 4px;
        background: #e7505a; color: #fff;
        font-size: 10px; font-weight: 600;
        padding: 2px 8px; border-radius: 10px;
        letter-spacing: 0.3px;
    }
    .ik4-excl-reason {
        padding: 6px 14px;
        background: #fdf2f2;
        border-top: 1px solid #f0c8c8;
        font-size: 11px; color: #c0392b;
    }
    .ik4-excl-reason i { margin-right: 4px; }
    .ik4-rcpt-actions {
        display: flex; align-items: center; gap: 6px;
        padding: 6px 14px;
        border-top: 1px solid #e9edef;
        background: #fdfdfd;
    }
    .ik4-act-btn {
        display: inline-flex; align-items: center; gap: 4px;
        padding: 4px 10px; border-radius: 4px;
        font-size: 11px; cursor: pointer;
        border: 1px solid #ddd; background: #fff;
        transition: all .15s;
    }
    .ik4-act-btn:hover { background: #f5f5f5; }
    .ik4-act-skip {
        color: #3598dc; border-color: #3598dc;
    }
    .ik4-act-skip:hover { background: #eaf4fd; }
    .ik4-act-block {
        color: #e7505a; border-color: #e7505a;
    }
    .ik4-act-block:hover { background: #fdf2f2; }
    .ik4-act-remove {
        color: #27ae60; border-color: #27ae60;
    }
    .ik4-act-remove:hover { background: #eafaf1; }
    .ik4-act-done {
        font-size: 11px; color: #3598dc; font-weight: 500;
    }
    .ik4-act-done-block { color: #e7505a; }
    .ik4-act-done-ok { color: #27ae60; }

    /* ── SweetAlert z-index override (SA1 default: 10051/10052, preview modal: 10060) ── */
    .sweet-overlay { z-index: 10080 !important; }
    .sweet-alert { z-index: 10081 !important; }

    /* ── Mail Preview Modal (separate from main preview) ── */
    .ik4-mail-overlay {
        display: none; position: fixed; top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(44,62,80,.6); z-index: 10070;
    }
    .ik4-mail-overlay.ik4-mail-open {
        display: flex; align-items: center; justify-content: center;
    }
    .ik4-mail-modal {
        background: #fff; border-radius: 10px;
        width: 900px; max-width: 96vw; height: 80vh;
        display: flex; flex-direction: column;
        box-shadow: 0 20px 60px rgba(0,0,0,.3);
        overflow: hidden;
    }
    .ik4-mail-head {
        padding: 14px 20px; border-bottom: 2px solid #e9edef;
        background: linear-gradient(135deg, #fcfdfe, #f6f8fb);
        display: flex; align-items: center; gap: 12px;
        flex-shrink: 0;
    }
    .ik4-mail-head-icon {
        width: 36px; height: 36px; border-radius: 8px;
        background: #e67e22; color: #fff;
        display: flex; align-items: center; justify-content: center;
        font-size: 15px;
    }
    .ik4-mail-head-txt { flex: 1; }
    .ik4-mail-head-title { font-size: 14px; font-weight: 800; color: #2C3E50; }
    .ik4-mail-head-sub { font-size: 11px; color: #67809F; }
    .ik4-mail-close {
        width: 32px; height: 32px; border-radius: 8px;
        border: none; background: #e9edef; color: #5e738b;
        font-size: 16px; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
    }
    .ik4-mail-close:hover { background: #e7505a; color: #fff; }
    .ik4-mail-subj {
        padding: 8px 20px; background: #f8f9fb;
        border-bottom: 1px solid #e9edef; font-size: 12px;
        flex-shrink: 0;
    }
    .ik4-mail-subj-label { color: #94A0B2; font-weight: 700; font-size: 10px; text-transform: uppercase; }
    .ik4-mail-subj-text { color: #2C3E50; font-weight: 600; }
    .ik4-mail-body { flex: 1; overflow: hidden; }
    .ik4-mail-body iframe {
        width: 100%; height: 100%; border: none;
    }
    .ik4-mail-foot {
        padding: 10px 20px; border-top: 2px solid #e9edef;
        background: #fcfcfd; display: flex; align-items: center;
        justify-content: space-between; flex-shrink: 0;
    }
    .ik4-mail-foot-info { font-size: 11px; color: #67809F; }

    /* Mail preview button in recipient card */
    .ik4-mail-view-btn {
        display: inline-flex; align-items: center; gap: 5px;
        font-size: 11px; font-weight: 600; padding: 5px 14px;
        border-radius: 5px; border: 1px solid #e67e22;
        background: #fff; color: #e67e22; cursor: pointer;
        transition: all .15s;
    }
    .ik4-mail-view-btn:hover { background: #e67e22; color: #fff; }

    /* ── Empty ── */
    .ik4-empty {
        padding: 60px 20px;
        text-align: center;
        color: #a8b3c0;
        font-size: 15px;
        font-weight: 500;
    }

    .ik4-empty i {
        font-size: 48px;
        display: block;
        margin-bottom: 14px;
        color: #dde2e8;
    }

    /* ── Divider between sections ── */
    .ik4-divider {
        height: 0;
        margin: 0 0 8px;
    }

    /* ── Search Bar ── */
    .ik4-search {
        position: relative;
        margin-bottom: 20px;
    }

    .ik4-search-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 15px;
        color: #a0aab5;
        pointer-events: none;
    }

    .ik4-search-input {
        width: 100%;
        padding: 10px 14px 10px 40px;
        border: 2px solid #e0e5ec;
        border-radius: 8px;
        font-size: 14px;
        color: #2c3e50;
        background: #fff;
        outline: none;
        transition: border-color .2s, box-shadow .2s;
    }

    .ik4-search-input:focus {
        border-color: #3598dc;
        box-shadow: 0 0 0 3px rgba(53, 152, 220, .12);
    }

    .ik4-search-input::placeholder {
        color: #b8c2cc;
    }

    .ik4-search-clear {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 14px;
        color: #c0c8d2;
        cursor: pointer;
        display: none;
        background: none;
        border: none;
        padding: 4px;
    }

    .ik4-search-clear:hover {
        color: #e74c3c;
    }

    .ik4-search-count {
        position: absolute;
        right: 40px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 11px;
        color: #a0aab5;
        display: none;
    }

    .ik4-sec.ik4-sec-hidden,
    .ik4-col.ik4-col-hidden {
        display: none;
    }

    .ik4-no-results {
        text-align: center;
        padding: 30px 20px;
        color: #a8b3c0;
        font-size: 14px;
        display: none;
    }

    .ik4-no-results i {
        font-size: 28px;
        display: block;
        margin-bottom: 8px;
        color: #dde2e8;
    }

    /* ── IK Acknowledgement Top Banner ── */
    .ik4-ack {
        display: flex; align-items: center; gap: 14px;
        padding: 14px 22px;
        margin-bottom: 20px;
        border-radius: 8px; overflow: hidden;
        border: 2px solid #e7505a;
        background: linear-gradient(135deg, #fdf2f2 0%, #fff8f8 50%, #fff 100%);
        box-shadow: 0 3px 14px rgba(231,80,90,.10), 0 1px 3px rgba(0,0,0,.04);
        animation: ik4AckPulse 3s ease infinite;
    }
    @keyframes ik4AckPulse {
        0%, 100% { box-shadow: 0 3px 14px rgba(231,80,90,.10); }
        50% { box-shadow: 0 3px 20px rgba(231,80,90,.22); }
    }
    .ik4-ack-ico {
        width: 42px; height: 42px; border-radius: 10px;
        background: #e7505a; color: #fff;
        display: flex; align-items: center; justify-content: center;
        font-size: 18px; flex-shrink: 0;
        box-shadow: 0 3px 8px rgba(231,80,90,.25);
    }
    .ik4-ack-msg { flex: 1; min-width: 0; }
    .ik4-ack-msg strong {
        display: block; font-size: 14px; font-weight: 800;
        color: #2C3E50; margin-bottom: 2px;
    }
    .ik4-ack-msg span {
        font-size: 12px; color: #67809F; line-height: 1.4;
    }
    .ik4-ack-msg span b { color: #e7505a; }
    .ik4-ack-btn {
        display: inline-flex; align-items: center; gap: 6px;
        padding: 9px 22px; border-radius: 6px; border: none;
        font-size: 13px; font-weight: 700; cursor: pointer;
        background: #27ae60; color: #fff; white-space: nowrap;
        box-shadow: 0 2px 8px rgba(39,174,96,.2);
        transition: background .2s, transform .15s;
    }
    .ik4-ack-btn:hover { background: #219a52; }
    .ik4-ack-btn:active { transform: scale(.97); }
    .ik4-ack.ik4-ack-done {
        border-color: #27ae60;
        background: linear-gradient(135deg, #f0faf4 0%, #fff 100%);
        animation: none;
    }
    .ik4-ack.ik4-ack-done .ik4-ack-ico { background: #27ae60; }
    .ik4-ack.ik4-ack-done .ik4-ack-msg strong { color: #27ae60; }

    /* ── Template Preview Modal ── */
    .ik4-modal-overlay {
        display: none;
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(44,62,80,.55);
        z-index: 10050;
        animation: ik4fadeIn .2s ease;
    }
    .ik4-modal-overlay.ik4-modal-open { display: flex; align-items: center; justify-content: center; }
    @keyframes ik4fadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes ik4slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

    .ik4-modal {
        background: #fff;
        border-radius: 10px;
        width: 720px; max-width: 92vw;
        max-height: 85vh;
        display: flex; flex-direction: column;
        box-shadow: 0 20px 60px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.05);
        animation: ik4slideUp .25s ease;
        overflow: hidden;
    }

    .ik4-modal-header {
        padding: 20px 24px 16px;
        border-bottom: 2px solid #e9edef;
        background: linear-gradient(135deg, #fcfdfe, #f6f8fb);
        display: flex; align-items: flex-start; gap: 14px;
        flex-shrink: 0;
    }
    .ik4-modal-icon {
        width: 44px; height: 44px; border-radius: 12px;
        display: flex; align-items: center; justify-content: center;
        font-size: 18px; color: #fff; flex-shrink: 0;
        box-shadow: 0 3px 10px rgba(0,0,0,.15);
    }
    .ik4-modal-meta { flex: 1; min-width: 0; }
    .ik4-modal-title {
        font-size: 16px; font-weight: 800; color: #2C3E50;
        margin: 0 0 4px; line-height: 1.3;
    }
    .ik4-modal-type {
        font-size: 11px; font-weight: 700; text-transform: uppercase;
        letter-spacing: .5px;
    }
    .ik4-modal-close {
        width: 32px; height: 32px; border-radius: 8px;
        border: none; background: #e9edef; color: #5e738b;
        font-size: 16px; cursor: pointer; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        transition: background .15s;
    }
    .ik4-modal-close:hover { background: #e7505a; color: #fff; }

    .ik4-modal-subject {
        padding: 12px 24px;
        border-bottom: 1px solid #eef1f5;
        background: #fafbfc;
        flex-shrink: 0;
    }
    .ik4-modal-subject-label {
        font-size: 9px; font-weight: 700; color: #94A0B2;
        text-transform: uppercase; letter-spacing: .5px;
        margin-bottom: 2px;
    }
    .ik4-modal-subject-text {
        font-size: 14px; font-weight: 600; color: #2C3E50;
    }

    .ik4-modal-body {
        flex: 1; overflow-y: auto; padding: 0;
    }
    .ik4-modal-body iframe {
        width: 100%; border: none; min-height: 300px;
        display: block;
    }

    .ik4-modal-footer {
        padding: 12px 24px;
        border-top: 2px solid #e9edef;
        background: #fcfcfd;
        display: flex; align-items: center; justify-content: flex-end; gap: 8px;
        flex-shrink: 0;
    }
    .ik4-modal-footer .ik4-tpl-btn { padding: 6px 16px; font-size: 12px; border-radius: 6px; }
    .ik4-modal-footer .ik4-tpl-btn-close {
        background: #e9edef; color: #5e738b;
    }
    .ik4-modal-footer .ik4-tpl-btn-close:hover { background: #d5dbe3; color: #2C3E50; }

/* ── Wizard Modal ── */
.ik4-wiz-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(44,62,80,.6); z-index: 10050;
    display: flex; align-items: center; justify-content: center;
    animation: ik4fadeIn .25s ease;
}
@keyframes ik4fadeIn { from { opacity:0 } to { opacity:1 } }
.ik4-wiz {
    background: #fff; border-radius: 12px; width: 560px; max-width: 92vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: ik4slideUp .3s ease;
    overflow: hidden;
}
@keyframes ik4slideUp { from { transform:translateY(30px);opacity:0 } to { transform:translateY(0);opacity:1 } }
.ik4-wiz-header {
    padding: 28px 32px 20px;
    background: linear-gradient(135deg, #2C3E50 0%, #34495e 100%);
    color: #fff; text-align: center;
}
.ik4-wiz-header i.ik4-wiz-big-icon {
    font-size: 48px; margin-bottom: 14px; display: block;
    color: rgba(255,255,255,.85);
}
.ik4-wiz-header h3 {
    font-size: 20px; font-weight: 800; margin: 0 0 8px;
}
.ik4-wiz-header p {
    font-size: 13px; opacity: .8; margin: 0; line-height: 1.55;
}
.ik4-wiz-body { padding: 24px 32px; }
.ik4-wiz-step {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #eef1f5;
}
.ik4-wiz-step:last-child { border-bottom: none; }
.ik4-wiz-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: #3598dc; color: #fff; font-weight: 800; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ik4-wiz-step-txt strong {
    display: block; font-size: 14px; color: #2C3E50; margin-bottom: 3px;
}
.ik4-wiz-step-txt span {
    font-size: 12px; color: #67809F; line-height: 1.45;
}
.ik4-wiz-footer {
    padding: 16px 32px;
    background: #f8f9fb;
    border-top: 2px solid #e9edef;
    text-align: center;
}
.ik4-wiz-footer .mc-ik-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 32px; border-radius: 6px; border: none;
    font-size: 14px; font-weight: 700; cursor: pointer;
    background: #3598dc; color: #fff;
    box-shadow: 0 3px 10px rgba(53,152,220,.2);
    transition: background .2s;
}
.ik4-wiz-footer .mc-ik-btn:hover { background: #2C3E50; }
.ik4-wiz-warn {
    display: flex; align-items: center; gap: 8px;
    margin-top: 16px; padding: 10px 14px;
    background: #fff5f5; border: 1px solid #f5c6cb;
    border-radius: 6px; font-size: 12px; color: #e7505a;
}
.ik4-wiz-warn i { font-size: 16px; flex-shrink: 0; }
