/* --- Global Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    /* Brand Colors */
    --nq-navy: #1e293b;
    --nq-green: #10b981;
    --nq-green-hover: #059669;
    --nq-blue: #3b82f6;      /* Edit Button */
    --nq-yellow: #f59e0b;
    --nq-red: #ef4444;       /* Delete Button */
    --nq-border: #e2e8f0;
    --nq-bg: #f8fafc;
    --nq-text: #334155;
    
    /* Frontend Theme */
    --fe-glass: rgba(15, 23, 42, 0.90); /* Increased opacity for readability */
    --fe-text: #f8fafc;
    --fe-primary: #10b981;
}

/* ============================================================
   1. ADMIN LAYOUT (Split View + Edit Actions)
   ============================================================ */
.nq-wrap {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    max-width: 98%;
    margin: 25px 20px 0 0;
    color: var(--nq-text);
}
.nq-wrap * { box-sizing: border-box; }

/* Header Bar */
.nq-header {
    background: var(--nq-navy);
    padding: 20px 30px;
    border-radius: 8px 8px 0 0;
    display: flex; justify-content: space-between; align-items: center;
    color: #fff; margin-bottom: 0;
}
.nq-brand { display: flex; align-items: center; gap: 15px; }
.nq-logo { width: 45px; height: 45px; background: #fff; border-radius: 8px; padding: 4px; object-fit: contain; }
.nq-titles h1 { margin: 0; font-size: 20px; font-weight: 700; color: #fff; }
.nq-titles span { font-size: 12px; opacity: 0.8; font-weight: 400; }

.nq-btn-head {
    background: rgba(255,255,255,0.1); color: #fff; padding: 8px 15px;
    border-radius: 4px; text-decoration: none; font-size: 13px; font-weight: bold;
    border: 1px solid rgba(255,255,255,0.2); transition: 0.2s;
}
.nq-btn-head:hover { background: #fff; color: var(--nq-navy); }

/* Navigation Tabs */
.nq-tabs-wrap {
    background: #fff; border-bottom: 1px solid var(--nq-border);
    padding: 0 20px; display: flex; gap: 10px; margin-bottom: 30px;
    border-radius: 0 0 8px 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.nq-tab {
    text-decoration: none; color: #64748b; padding: 15px 20px;
    font-size: 14px; font-weight: 700; border-bottom: 3px solid transparent;
    transition: 0.2s;
}
.nq-tab:hover, .nq-tab.active { color: var(--nq-navy); border-bottom-color: var(--nq-green); }
.nq-tab .dashicons { margin-left: 6px; font-size: 18px; vertical-align: sub; }

/* --- THE SPLIT LAYOUT (1/3 Right - 2/3 Left) --- */
.nq-split-layout {
    display: grid;
    grid-template-columns: 1fr 2.5fr; /* Adjusted for better table space */
    gap: 25px;
    align-items: start;
}
@media (max-width: 991px) { .nq-split-layout { grid-template-columns: 1fr; } }

/* Panels Style */
.nq-panel {
    background: #fff; border: 1px solid var(--nq-border);
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.nq-panel-head {
    background: #f8fafc; padding: 15px 20px;
    border-bottom: 1px solid var(--nq-border);
    font-weight: 800; color: var(--nq-navy); font-size: 15px;
    display: flex; justify-content: space-between; align-items: center;
}
.nq-panel-body { padding: 25px; }

/* Form Styles (Right Side) */
.nq-form-group { margin-bottom: 20px; }
.nq-label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 13px; color: #1e293b; }
.nq-input-std {
    width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1;
    border-radius: 6px; font-family: 'Tajawal'; font-size: 14px; color: #334155;
    height: 42px; transition: 0.2s;
}
textarea.nq-input-std { height: auto; min-height: 100px; }
.nq-input-std:focus { border-color: var(--nq-green); box-shadow: 0 0 0 2px rgba(16,185,129,0.1); outline: none; }

.nq-btn-save {
    background: var(--nq-green); color: #fff; border: none;
    padding: 12px 25px; border-radius: 6px; font-weight: 700;
    cursor: pointer; width: 100%; font-size: 14px; font-family: 'Tajawal';
    transition: 0.2s;
}
.nq-btn-save:hover { background: var(--nq-green-hover); }
.nq-btn-cancel {
    display: block; text-align: center; margin-top: 10px; font-size: 12px; 
    color: #64748b; text-decoration: none;
}

/* List Styles (Left Side) */
.nq-data-table { width: 100%; border-collapse: collapse; }
.nq-data-table th {
    text-align: right; padding: 12px 15px; background: #f8fafc;
    font-size: 12px; font-weight: 800; color: #64748b;
    border-bottom: 1px solid var(--nq-border);
}
.nq-data-table td {
    padding: 12px 15px; border-bottom: 1px solid #f1f5f9;
    font-size: 13px; vertical-align: middle; color: #334155;
}
.nq-data-table tr:hover { background: #fdfdfd; }
.nq-data-table tr:last-child td { border-bottom: none; }

.row-title { font-weight: 700; color: var(--nq-navy); font-size: 14px; }
.row-meta { font-size: 12px; color: #94a3b8; display: block; margin-top: 3px; }

/* Action Buttons (Edit & Delete) */
.action-wrap { display: flex; gap: 5px; }
.btn-icon {
    width: 28px; height: 28px; border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; transition: 0.2s;
}
.btn-icon-edit { background: #eff6ff; color: var(--nq-blue); }
.btn-icon-edit:hover { background: var(--nq-blue); color: #fff; }
.btn-icon-del { background: #fee2e2; color: var(--nq-red); }
.btn-icon-del:hover { background: var(--nq-red); color: #fff; }

/* Dashboard Home Stats */
.nq-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 30px; }
.nq-stat-box { background: #fff; padding: 25px; border-radius: 12px; border: 1px solid var(--nq-border); border-bottom: 4px solid transparent; box-shadow: 0 2px 4px rgba(0,0,0,0.02); display: flex; justify-content: space-between; align-items: center; }
.nq-stat-box.green { border-bottom-color: var(--nq-green); }
.nq-stat-box.blue { border-bottom-color: var(--nq-blue); }
.nq-stat-box.yellow { border-bottom-color: var(--nq-yellow); }
.stat-val { font-size: 32px; font-weight: 800; color: var(--nq-navy); line-height: 1; }
.stat-lbl { font-size: 13px; color: #64748b; font-weight: 600; }

/* ============================================================
   2. FRONTEND FORM (Refined Dimensions)
   ============================================================ */
.nq-frontend-wrap {
    font-family: 'Outfit', 'Tajawal', sans-serif !important;
    background: var(--fe-glass); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px; padding: 50px 40px; /* More padding */
    max-width: 520px; margin: 40px auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6); backdrop-filter: blur(25px); direction: ltr;
}
.nq-fe-head { text-align: center; margin-bottom: 40px; }
.nq-fe-title { font-size: 26px; font-weight: 800; color: #f8fafc; margin: 0; letter-spacing: -0.5px; }
.nq-fe-desc { color: #94a3b8; font-size: 14px; margin-top: 8px; }

.nq-fe-group { margin-bottom: 25px; text-align: left; }
.nq-fe-label { 
    display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; 
    color: #94a3b8; text-transform: uppercase; letter-spacing: 1.5px; 
}
.nq-fe-input { 
    width: 100%; height: 54px; /* Taller input */
    padding: 0 20px; background: rgba(2,6,23,0.6); 
    border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; 
    color: #fff; font-size: 15px; box-sizing: border-box; transition: 0.3s;
}
.nq-fe-input:focus { border-color: var(--fe-primary); outline: none; background: rgba(2,6,23,0.9); box-shadow: 0 0 0 1px var(--fe-primary); }

.nq-fe-btn { 
    width: 100%; height: 56px; margin-top: 15px; 
    background: var(--fe-primary); color: #020617; 
    border: none; border-radius: 12px; font-size: 16px; font-weight: 800; 
    cursor: pointer; transition: 0.3s; letter-spacing: 1px;
}
.nq-fe-btn:hover { background: #059669; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2); }

select.nq-fe-input { background: rgba(2,6,23,0.6); }
select.nq-fe-input option { background: #0f172a; color: #fff; padding: 12px; }
#nq_msg { text-align: center; margin-top: 20px; padding: 15px; border-radius: 10px; display: none; font-size: 14px; font-weight: bold; }