/* ═══════════════════════════════════════════════════════════
   KIIFF Phase7 — Fixes
   ═══════════════════════════════════════════════════════════ */

/* ─────── ۱) کارت درگاه‌ها — تضمین تم تیره ─────── */
html body #k3Content .k3-gw{
    background: rgba(0, 0, 0, .28) !important;
    border: 1px solid rgba(232, 237, 242, .14) !important;
    color: #E8EDF2 !important;
}
html body #k3Content .k3-gw.on{
    background: rgba(76, 175, 80, .07) !important;
    border-color: rgba(76, 175, 80, .45) !important;
}
html body #k3Content .k3-gw-name{
    color: #E8EDF2 !important;
    font-weight: 800 !important;
}
html body #k3Content .k3-gw-slug{
    color: #9AA5B1 !important;
}
html body #k3Content .k3-gw-status.on{ color: #6fcf8f !important; }
html body #k3Content .k3-gw-status.off{ color: #9AA5B1 !important; }
html body #k3Content .k3-gw-field label{
    color: #E8EDF2 !important;
    font-weight: 600 !important;
}
html body #k3Content .k3-gw-field input{
    background: rgba(255, 255, 255, .05) !important;
    border: 1px solid rgba(232, 237, 242, .18) !important;
    color: #E8EDF2 !important;
}
html body #k3Content .k3-gw-field input:focus{
    background: rgba(255, 255, 255, .08) !important;
    border-color: #D4AF37 !important;
}
html body #k3Content .k3-gw-field input::placeholder{
    color: #6f8fa8 !important;
}
html body #k3Content .k3-gw-checks label{
    color: #E8EDF2 !important;
    font-weight: 500 !important;
}
html body #k3Content .k3-gw-checks input[type=checkbox]{
    accent-color: #D4AF37 !important;
}
html body #k3Content .k3-gw-foot .k3-btn{
    color: #E8EDF2 !important;
}
html body #k3Content .k3-gw-foot .k3-btn.primary{
    color: #0a121c !important;
}

/* ─────── ۲) Override force-dark-mode ─────── */
html body { color-scheme: dark !important; }
html body #k3Content,
html body #k3Workspace,
html body .k3-sidebar,
html body .k3-workspace { color-scheme: dark !important; }

/* ─────── ۳) پاپ‌آپ موفقیت جدید ─────── */
.k7-success-overlay{
    position: fixed; inset: 0;
    background: rgba(10, 18, 28, .78);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    z-index: 999998;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    animation: k7FadeIn .3s ease;
}
@keyframes k7FadeIn{ from{opacity:0} to{opacity:1} }

.k7-success-card{
    background: linear-gradient(160deg, rgba(45, 70, 95, .98), rgba(25, 50, 70, .99));
    border: 1px solid rgba(212, 175, 55, .5);
    border-radius: 24px;
    max-width: 540px; width: 100%;
    padding: 0;
    color: #E8EDF2;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255,255,255,.04) inset;
    position: relative;
    overflow: hidden;
    animation: k7Slide .4s cubic-bezier(.2,.9,.4,1.1);
}
@keyframes k7Slide{
    from { opacity: 0; transform: translateY(30px) scale(.96); }
    to { opacity: 1; transform: none; }
}

.k7-success-header{
    background: linear-gradient(135deg, #6fcf8f 0%, #4caf50 100%);
    padding: 28px 24px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.k7-success-header::after{
    content: ''; position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
    animation: k7Shine 4s ease-in-out infinite;
}
@keyframes k7Shine{ 0%{left:-100%} 60%{left:100%} 100%{left:100%} }

.k7-success-check{
    width: 72px; height: 72px; border-radius: 50%;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.4rem; font-weight: 900; color: #4caf50;
    margin: 0 auto 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25), inset 0 -3px 0 rgba(0,0,0,.08);
    animation: k7CheckPop .5s cubic-bezier(.3, 1.5, .5, 1);
    position: relative; z-index: 2;
}
@keyframes k7CheckPop{
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0); }
}

.k7-success-header h2{
    color: #ffffff; margin: 0; font-size: 1.25rem; font-weight: 900;
    position: relative; z-index: 2;
    text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.k7-success-body{
    padding: 26px 24px 24px;
}

.k7-track-label{
    text-align: center; font-size: .85rem; color: #9AA5B1;
    margin-bottom: 10px;
}

.k7-track-box{
    background: linear-gradient(135deg, rgba(212,175,55,.14), rgba(212,175,55,.04));
    border: 2px dashed #D4AF37;
    border-radius: 14px;
    padding: 18px 20px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: .25s;
    position: relative;
}
.k7-track-box:hover{
    background: linear-gradient(135deg, rgba(212,175,55,.22), rgba(212,175,55,.08));
    transform: translateY(-1px);
}
.k7-track-code{
    font-family: 'Courier New', monospace;
    font-size: 1.5rem; font-weight: 900;
    color: #D4AF37;
    letter-spacing: 3px;
    direction: ltr;
    word-break: break-all;
}
.k7-track-hint{
    font-size: .7rem; color: #6f8fa8; margin-top: 8px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}

.k7-success-note{
    text-align: center; font-size: .82rem;
    color: #9AA5B1; line-height: 1.9;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .03);
    border-radius: 10px;
    border: 1px solid rgba(232, 237, 242, .08);
}
.k7-success-note b{ color: #E8EDF2; }

.k7-success-actions{
    display: flex; gap: 10px; flex-wrap: wrap;
    justify-content: center;
}
.k7-btn{
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 24px;
    border-radius: 40px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 800;
    cursor: pointer;
    transition: .25s;
    border: 1px solid transparent;
    text-decoration: none;
}
.k7-btn.primary{
    background: linear-gradient(135deg, #D4AF37 0%, #C9A03D 100%);
    color: #0a121c;
    box-shadow: 0 6px 18px rgba(212, 175, 55, .3);
}
.k7-btn.primary:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(212, 175, 55, .45);
}
.k7-btn.ghost{
    background: transparent;
    border-color: rgba(232, 237, 242, .3);
    color: #E8EDF2;
}
.k7-btn.ghost:hover{
    background: rgba(255, 255, 255, .06);
    border-color: #E8EDF2;
}

@media (max-width: 480px){
    .k7-success-card{ border-radius: 18px; }
    .k7-success-header{ padding: 22px 18px 18px; }
    .k7-success-body{ padding: 20px 18px; }
    .k7-track-code{ font-size: 1.15rem; letter-spacing: 2px; }
    .k7-btn{ flex: 1 1 100%; justify-content: center; }
}