/* ═══════════════════════════════════════════════════════════
   DZQCOD v4.0.0 — Dashboard with Sidebar
   Layout: .dza-wrap > .dza-layout > (.dza-side + .dza-main)
   ═══════════════════════════════════════════════════════════ */
:root {
    --side-w: 230px;
    --side-bg: #0c1222;
    --side-hover: #182038;
    --side-active: #1e3a5f;
    --side-text: #8899b4;
    --side-text-active: #fff;
    --accent: #4f8cf7;
    --accent-light: #6ba3ff;
    --body-bg: #f0f2f5;
    --card-bg: #fff;
    --border: #e3e6ec;
    --text: #1a1f2e;
    --text2: #6b7280;
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.05);
    --shadow2: 0 4px 12px rgba(0,0,0,.08);
}

/* ─── Base ─── */
.dza-wrap { direction: rtl; font-family: 'Tajawal', Tahoma, Arial, sans-serif; margin: 0 !important; padding: 0 !important; background: var(--body-bg); }
.dza-wrap * { box-sizing: border-box; }

/* ─── Hide WP submenu — our sidebar handles navigation ─── */
#adminmenu .toplevel_page_dzqcod ul.wp-submenu,
#adminmenu .toplevel_page_dzqcod .wp-submenu-wrap,
#adminmenu .toplevel_page_dzqcod ul { display: none !important; height: 0 !important; overflow: hidden !important; }
#adminmenu .toplevel_page_dzqcod { height: auto !important; }
#adminmenu .toplevel_page_dzqcod > a { pointer-events: auto !important; }

/* ═══════════════════════════════════════
   FLEX LAYOUT: Sidebar + Main
   ═══════════════════════════════════════ */
.dza-layout {
    display: flex;
    min-height: calc(100vh - 32px);
}

/* ═══ SIDEBAR ═══ */
.dza-side {
    width: var(--side-w);
    min-width: var(--side-w);
    background: var(--side-bg);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 32px;
    height: calc(100vh - 32px);
    overflow: hidden;
    z-index: 100;
    transition: margin .25s ease;
}

/* Sidebar Header */
.dza-side-head {
    padding: 18px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dza-side-logo {
    font-size: 17px;
    font-weight: 900;
    color: #fff;
    letter-spacing: .5px;
}
.dza-side-ver {
    font-size: 10px;
    color: var(--side-text);
    background: rgba(255,255,255,.06);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Menu Scroll Area */
.dza-side-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.08) transparent;
}
.dza-side-menu::-webkit-scrollbar { width: 3px; }
.dza-side-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

/* Separator / Group Label */
.dza-side-sep {
    padding: 16px 16px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(136,153,180,.4);
    letter-spacing: 1.2px;
}

/* Menu Links */
.dza-side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin: 1px 8px;
    border-radius: 6px;
    color: var(--side-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all .15s ease;
    position: relative;
}
.dza-side-link:hover {
    background: var(--side-hover);
    color: #c8d6e5;
}
.dza-side-link.active {
    background: var(--side-active);
    color: var(--side-text-active);
    font-weight: 700;
}
.dza-side-link.active::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--accent);
    border-radius: 3px;
}

.dza-side-icon {
    font-size: 15px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.dza-side-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
}
.dza-side-badge {
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 8px;
    min-width: 18px;
    text-align: center;
}

/* Footer */
.dza-side-foot {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.dza-side-plan {
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 6px;
    border-radius: 6px;
    background: rgba(255,255,255,.04);
    color: var(--side-text);
}
.dza-side-plan.pro { color: var(--accent); border: 1px solid rgba(79,140,247,.3); }
.dza-side-plan.enterprise { color: var(--orange); border: 1px solid rgba(245,158,11,.3); }

/* ═══ MAIN CONTENT ═══ */
.dza-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Mobile Menu Button */
.dza-menu-btn {
    display: none;
    position: sticky;
    top: 32px;
    z-index: 99;
    background: var(--side-bg);
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    text-align: right;
}

/* Page Header */
.dza-header {
    padding: 18px 24px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    position: sticky;
    top: 32px;
    z-index: 50;
}
.dza-header h1 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
}
.dza-header h1 span {
    font-weight: 400;
    font-size: 13px;
    color: var(--text2);
    margin-right: 10px;
}
.dza-header .dza-ver { display: none; }

/* Content Area */
.dza-content { padding: 20px 24px; flex: 1; }

/* ═══════════════════════════════════════
   KPI CARDS
   ═══════════════════════════════════════ */
.dza-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.dza-kpi {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all .15s ease;
}
.dza-kpi:hover { box-shadow: var(--shadow2); transform: translateY(-1px); }
.dza-kpi .v { font-size: 28px; font-weight: 900; color: var(--text); line-height: 1.2; }
.dza-kpi .l { font-size: 12px; color: var(--text2); margin-top: 6px; font-weight: 500; }

/* ═══════════════════════════════════════
   STATUS PILLS
   ═══════════════════════════════════════ */
.dza-status-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.dza-pill {
    color: #fff; padding: 10px 16px; border-radius: var(--radius);
    text-align: center; font-size: 16px; font-weight: 800; min-width: 65px;
    box-shadow: var(--shadow);
}
.dza-pill small { display: block; font-size: 10px; font-weight: 500; opacity: .9; margin-top: 2px; }

/* ═══════════════════════════════════════
   TABLES
   ═══════════════════════════════════════ */
.dza-badge { display: inline-block; color: #fff; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; white-space: nowrap; }

.dza-table {
    width: 100%; border-collapse: collapse; background: var(--card-bg);
    border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.dza-table thead { background: #f7f8fa; }
.dza-table th {
    padding: 11px 14px; text-align: right; font-size: 11px; font-weight: 700;
    color: var(--text2); border-bottom: 2px solid var(--border);
    text-transform: uppercase; letter-spacing: .3px;
}
.dza-table td { padding: 10px 14px; border-bottom: 1px solid #f3f4f6; font-size: 13px; vertical-align: middle; }
.dza-table tr:hover { background: #f8faff; }
.dza-table .empty { text-align: center; padding: 40px; color: #999; }
.dza-table .ltr { direction: ltr; text-align: right; }
.dza-table .sm { font-size: 12px; color: var(--text2); }
.dza-table .bold { font-weight: 700; }
.dza-table a { color: var(--accent); text-decoration: none; font-weight: 600; }
.dza-table a:hover { text-decoration: underline; }

.dza-section-title { font-size: 17px; font-weight: 800; color: var(--text); margin: 22px 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.dza-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border: none; border-radius: 6px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    text-decoration: none; font-family: inherit;
    transition: all .15s ease; background: #f1f3f5; color: var(--text);
}
.dza-btn:hover { background: #e2e5e9; }
.dza-btn.primary { background: var(--accent); color: #fff; }
.dza-btn.primary:hover { background: #3b7ae0; }
.dza-btn.success { background: var(--green); color: #fff; }
.dza-btn.success:hover { background: #16a34a; }
.dza-btn.danger { background: var(--red); color: #fff; }
.dza-btn.danger:hover { background: #dc2626; }
.dza-btn.sm { padding: 5px 10px; font-size: 12px; }

/* ═══════════════════════════════════════
   FORMS / FILTERS
   ═══════════════════════════════════════ */
.dza-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.dza-filters input, .dza-filters select {
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 13px; background: var(--card-bg); font-family: inherit;
}
.dza-filters input:focus, .dza-filters select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79,140,247,.15); }

.dza-batch-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 14px; background: #f7f8fa; border-radius: var(--radius); border: 1px solid var(--border); }
.dza-batch-bar label { font-size: 13px; display: flex; align-items: center; gap: 4px; }

.dza-pag { display: flex; gap: 4px; margin-top: 18px; justify-content: center; }
.dza-pag a { padding: 7px 14px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: var(--text); font-size: 13px; transition: all .15s; }
.dza-pag a:hover { border-color: var(--accent); color: var(--accent); }
.dza-pag a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ═══════════════════════════════════════
   CARDS
   ═══════════════════════════════════════ */
.dza-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.dza-card:hover { box-shadow: var(--shadow2); }
.dza-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid #f3f4f6; color: var(--text); }

.dza-call-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; box-shadow: var(--shadow); transition: all .15s; }
.dza-call-card:hover { box-shadow: var(--shadow2); }
.dza-call-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.dza-call-head .oid { font-weight: 700; color: var(--accent); text-decoration: none; font-size: 15px; }
.dza-call-head small { font-size: 11px; color: var(--text2); }
.dza-call-details { font-size: 13px; line-height: 1.7; }
.dza-call-details .phone { color: var(--accent); font-weight: 700; direction: ltr; unicode-bidi: embed; }
.dza-outcome-btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }

.dza-toggle { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; font-size: 13px; }
.dza-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }

.dza-two-col { display: flex; gap: 22px; flex-wrap: wrap; }
.dza-col { flex: 2; min-width: 380px; }
.dza-sidebar { flex: 1; min-width: 260px; }

.dza-camp-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.dza-fraud-row { padding: 6px 0; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.dza-color-row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; }
.dza-color-row span { font-size: 13px; }
.dza-color-row input[type=color] { width: 38px; height: 28px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; padding: 0; }
.dza-empty { text-align: center; padding: 50px; color: #94a3b8; font-size: 16px; }

.dza-pro-cta { background: linear-gradient(135deg, #eef4ff, #dbeafe) !important; border: 2px solid var(--accent) !important; text-align: center; }
.dza-pro-cta h3 { border: none !important; color: var(--accent) !important; }
.dza-pro-cta p { font-size: 13px; color: var(--text2); }

/* Dashboard Hero Banner */
.dza-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c1222 100%);
    border-radius: var(--radius); padding: 22px 26px; margin-bottom: 22px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px; color: #fff;
}
.dza-hero-stat { text-align: center; }
.dza-hero-stat .v { font-size: 30px; font-weight: 900; }
.dza-hero-stat .l { font-size: 12px; opacity: .7; margin-top: 2px; }

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════ */
@media (max-width: 960px) {
    .dza-side {
        position: fixed;
        top: 0; right: -280px;
        width: 270px; min-width: 270px;
        height: 100vh;
        z-index: 99999;
        box-shadow: -5px 0 20px rgba(0,0,0,.4);
        transition: right .25s ease;
    }
    .dza-side.open { right: 0; }
    .dza-menu-btn { display: block; }
    .dza-layout { flex-direction: column; }
    .dza-header { top: 73px; }
    .dza-content { padding: 14px; }
    .dza-two-col { flex-direction: column; }
    .dza-col, .dza-sidebar { min-width: 100%; }
    .dza-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

@media (max-width: 600px) {
    .dza-kpi .v { font-size: 22px; }
    .dza-hero { flex-direction: column; text-align: center; }
    .dza-table { font-size: 12px; }
    .dza-table th, .dza-table td { padding: 7px 6px; }
}

@media (max-width: 782px) {
    .dza-side { top: 0; }
    .dza-menu-btn { top: 46px; }
    .dza-header { top: 89px; }
}

/* Print */
@media print {
    .dza-side, .dza-menu-btn, .dza-header { display: none !important; }
    .dza-main { width: 100%; }
}

/* ═══ v3.0.7 UX Enhancement ═══ */
.dza-card{transition:box-shadow .2s,transform .15s}
.dza-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.06)}
.dza-btn{transition:all .2s;position:relative;overflow:hidden}
.dza-btn:active{transform:scale(.97)}
.dza-btn.primary:hover{filter:brightness(1.08);box-shadow:0 4px 12px rgba(79,140,247,.3)}
.dza-btn.ghost:hover{background:#e3e6ec;transform:translateY(-1px)}

/* Settings tabs enhanced */
.stab{transition:all .15s;border-bottom:3px solid transparent}
.stab:hover{background:rgba(79,140,247,.05)}
.stab.active{border-bottom-color:var(--accent)}

/* SMS Provider Cards */
.sms-prov-card{transition:all .2s}
.sms-prov-card:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.08)}
.sms-prov-card.selected{transform:translateY(-2px);box-shadow:0 4px 16px rgba(102,126,234,.2)}

/* Form template cards */
.form-tpl{transition:all .2s}
.form-tpl:hover:not(.locked){transform:translateY(-3px);box-shadow:0 6px 16px rgba(0,0,0,.1)}

/* Input focus effect */
.gen-setting:focus,.dza-card input:focus,.dza-card select:focus,.dza-card textarea:focus{border-color:var(--accent)!important;box-shadow:0 0 0 3px rgba(79,140,247,.12)!important;outline:none}

/* Nav items */
.nav-item{transition:all .15s;border-left:3px solid transparent}
.nav-item:hover{background:var(--side-hover);padding-right:4px}
.nav-item.active{border-left-color:var(--accent);background:var(--side-active)}

/* Order cards */
.dza-order-card{transition:all .2s}
.dza-order-card:hover{transform:translateX(-4px)}

/* Loading shimmer */
@keyframes dzShimmer{0%{background-position:-200px 0}100%{background-position:200px 0}}
.dza-loading{background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 37%,#f0f0f0 63%);background-size:400px 100%;animation:dzShimmer 1.4s ease infinite}

/* Toast notifications */
.dza-toast{position:fixed;bottom:24px;left:24px;padding:14px 24px;border-radius:12px;color:#fff;font-weight:700;font-size:13px;z-index:99999;animation:dzSlideUp .3s ease;box-shadow:0 8px 24px rgba(0,0,0,.15)}
.dza-toast.success{background:linear-gradient(135deg,#22c55e,#16a34a)}
.dza-toast.error{background:linear-gradient(135deg,#ef4444,#dc2626)}
.dza-toast.info{background:linear-gradient(135deg,#3b82f6,#2563eb)}
@keyframes dzSlideUp{from{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1}}

/* Responsive cards grid */
@media(max-width:768px){
    .dza-content{flex-direction:column!important}
    .dza-card{padding:14px!important}
    .stab{font-size:11px!important;padding:8px 10px!important}
}

/* ═══ DZQCOD Admin — Scoped overrides ═══ */
.dza-layout, .dza-main, .dza-sidebar, .dza-card, .dza-table,
.dza-btn, .dza-form, .dza-field, .dza-badge, .dza-modal { box-sizing: border-box; }
.dza-table { border-collapse: collapse; width: 100%; }
.dza-table th, .dza-table td { padding: 10px 12px; text-align: right; }
.dza-main .button { all: unset; }
.dza-main .dza-btn { display: inline-flex; align-items: center; cursor: pointer; }
