/* ═══════════════════════════════════════════
   NJ Design System — ملتقى التجار
   يُحمَّل من layouts/app.blade.php
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --nj-primary:       #2f4a6d;
    --nj-primary-dark:  #1e3450;
    --nj-primary-light: #eef3fc;
    --nj-primary-soft:  #d4e2f5;
    --nj-border:        #e6edf4;
    --nj-text:          #1a2634;
    --nj-text-muted:    #5a6e85;
    --nj-success:       #2c7a4d;
    --nj-danger:        #dc2626;
    --nj-warning:       #d97706;
    --nj-bg:            #f4f6fa;
    --nj-radius:        16px;
    --nj-radius-sm:     10px;
}

body { font-family: 'Tajawal', sans-serif; background: var(--nj-bg); color: var(--nj-text); line-height: 1.6; }
[x-cloak] { display: none !important; }

/* ── TOPBAR ── */
.nj-topbar { background: var(--nj-primary); padding: 10px 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.nj-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.nj-logo-dot { background: rgba(255,255,255,0.18); width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.3rem; }
.nj-logo-name { font-weight: 800; font-size: 1.3rem; color: white; }
.nj-topnav { display: flex; gap: 4px; }
.nj-topnav a { text-decoration: none; padding: 7px 16px; border-radius: 40px; font-weight: 500; font-size: 0.88rem; color: rgba(255,255,255,0.82); transition: 0.15s; }
.nj-topnav a:hover, .nj-topnav a.active { background: rgba(255,255,255,0.18); color: white; }
.nj-spacer { flex: 1; }
.nj-search { background: rgba(255,255,255,0.14); border-radius: 40px; padding: 8px 16px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,0.2); }
.nj-search input { background: transparent; border: none; outline: none; font-family: inherit; width: 180px; color: white; font-size: 0.88rem; }
.nj-search input::placeholder { color: rgba(255,255,255,0.55); }
.nj-search i { color: rgba(255,255,255,0.6); }
.nj-vdiv { width: 1px; height: 30px; background: rgba(255,255,255,0.18); flex-shrink: 0; }
.nj-icon-btns { display: flex; gap: 6px; }
.nj-icon-btn { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 40px; text-decoration: none; color: rgba(255,255,255,0.88); font-size: 0.8rem; transition: 0.15s; }
.nj-icon-btn:hover { background: rgba(255,255,255,0.2); color: white; }
.nj-notif-wrap { position: relative; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 40px; text-decoration: none; color: rgba(255,255,255,0.88); font-size: 0.8rem; transition: 0.15s; }
.nj-notif-wrap:hover { background: rgba(255,255,255,0.2); color: white; }
.nj-notif-badge { position: absolute; top: -5px; right: -4px; background: #ff6b4a; color: white; font-size: 10px; min-width: 18px; height: 18px; border-radius: 30px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.nj-btn-new { background: white; color: var(--nj-primary); padding: 8px 20px; border-radius: 40px; text-decoration: none; font-weight: 700; font-size: 0.88rem; display: inline-flex; align-items: center; gap: 7px; transition: 0.15s; flex-shrink: 0; }
.nj-btn-new:hover { background: #f0f4ff; transform: translateY(-1px); }
.nj-profile-btn { position: relative; }
.nj-profile-btn > button { background: rgba(255,255,255,0.1); border: none; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 6px; border-radius: 50px; cursor: pointer; transition: 0.15s; }
.nj-profile-btn > button:hover { background: rgba(255,255,255,0.2); }
.nj-avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); object-fit: cover; }
.nj-profile-name { font-weight: 700; font-size: 0.82rem; color: white; }
.nj-profile-role { font-size: 0.62rem; color: #ffd966; display: block; }
.nj-dropdown { position: absolute; left: 0; top: 50px; background: white; width: 220px; border-radius: 18px; box-shadow: 0 15px 40px rgba(0,0,0,0.14); z-index: 200; overflow: hidden; }
.nj-dropdown-header { background: var(--nj-primary-light); padding: 14px 16px; }
.nj-dropdown-name { font-weight: 700; font-size: 0.9rem; color: var(--nj-text); }
.nj-dropdown-user { font-size: 0.72rem; color: var(--nj-text-muted); }
.nj-dropdown-level { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 0.72rem; background: var(--nj-primary-soft); color: var(--nj-primary); padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.nj-dropdown-body { padding: 6px; }
.nj-dropdown-body a, .nj-dropdown-body button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; text-decoration: none; color: #1e293b; font-size: 0.85rem; width: 100%; background: transparent; border: none; cursor: pointer; border-radius: 10px; transition: 0.12s; text-align: right; font-family: inherit; }
.nj-dropdown-body a:hover, .nj-dropdown-body button:hover { background: var(--nj-primary-light); color: var(--nj-primary); }
.nj-dropdown-body .danger { color: var(--nj-danger); }
.nj-dropdown-body .danger:hover { background: #fff0f0; color: var(--nj-danger); }
.nj-dropdown-divider { height: 1px; background: var(--nj-border); margin: 4px 12px; }

/* ── BREADCRUMB ── */
.nj-breadcrumb { background: white; padding: 11px 24px; border-bottom: 1px solid var(--nj-border); display: flex; align-items: center; gap: 10px; font-size: 0.82rem; }
.nj-breadcrumb a { text-decoration: none; color: var(--nj-text-muted); transition: 0.15s; }
.nj-breadcrumb a:hover { color: var(--nj-primary); }
.nj-breadcrumb-current { color: var(--nj-primary); font-weight: 600; }

/* ── MAIN ── */
.nj-main { max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; }

/* ── FOOTER ── */
.nj-footer { background: var(--nj-primary-dark); padding: 32px 24px 24px; color: rgba(255,255,255,0.85); }
.nj-footer-inner { max-width: 1280px; margin: 0 auto; }
.nj-footer-row { display: flex; flex-wrap: wrap; gap: 28px; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,0.12); margin-bottom: 22px; }
.nj-footer-col { flex: 1; min-width: 150px; }
.nj-footer-col-title { font-weight: 700; font-size: 0.82rem; color: white; margin-bottom: 14px; display: flex; align-items: center; gap: 7px; border-right: 3px solid #ffd966; padding-right: 8px; }
.nj-footer-user { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.nj-footer-av { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.14); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; color: white; }
.nj-footer-uname { font-weight: 600; font-size: 0.78rem; color: white; }
.nj-footer-usub { font-size: 0.62rem; color: rgba(255,255,255,0.6); }
.nj-footer-bignum { font-size: 1.6rem; font-weight: 800; color: #ffd966; }
.nj-footer-bot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.72rem; color: rgba(255,255,255,0.55); }
.nj-footer-links a { text-decoration: none; color: rgba(255,255,255,0.65); margin-right: 18px; }
.nj-footer-links a:hover { color: white; }

/* ── SCROLL TOP ── */
.nj-scroll-top { position: fixed; bottom: 28px; left: 28px; background: var(--nj-primary); color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 90; box-shadow: 0 4px 12px rgba(0,0,0,0.2); transition: 0.2s; }
.nj-scroll-top:hover { background: var(--nj-primary-dark); transform: translateY(-2px); }

/* ── FLASH ── */
.nj-flash { padding: 12px 20px; border-radius: var(--nj-radius-sm); margin-bottom: 18px; font-size: 0.88rem; display: flex; align-items: center; gap: 10px; }
.nj-flash-success { background: #edfaf3; color: #2c7a4d; border: 1px solid #a7f0c4; }
.nj-flash-error   { background: #fff0f0; color: var(--nj-danger); border: 1px solid #ffc9c9; }

/* ── CARDS ── */
.nj-card { background: white; border-radius: var(--nj-radius); border: 1px solid var(--nj-border); overflow: hidden; }
.nj-card-header { background: var(--nj-primary); padding: 16px 22px; color: white; display: flex; align-items: center; gap: 10px; }
.nj-card-header i { font-size: 1.1rem; }
.nj-card-header h2, .nj-card-header h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.nj-card-body { padding: 26px; }

/* ── FORMS ── */
.nj-form-group { margin-bottom: 20px; }
.nj-form-label { display: block; font-weight: 600; font-size: 0.9rem; color: #1e293b; margin-bottom: 7px; }
.nj-form-label .opt { font-weight: 400; font-size: 0.7rem; color: var(--nj-text-muted); margin-right: 6px; }
.nj-form-input, .nj-form-select, .nj-form-textarea { width: 100%; padding: 11px 15px; border: 1px solid var(--nj-border); border-radius: var(--nj-radius-sm); font-family: inherit; font-size: 0.9rem; background: white; color: var(--nj-text); transition: 0.2s; }
.nj-form-input:focus, .nj-form-select:focus, .nj-form-textarea:focus { outline: none; border-color: var(--nj-primary); box-shadow: 0 0 0 3px rgba(47,74,109,0.1); }
.nj-form-textarea { resize: vertical; min-height: 80px; }
.nj-form-error { color: var(--nj-danger); font-size: 0.75rem; margin-top: 5px; }
.nj-char-count { font-size: 0.68rem; color: var(--nj-text-muted); text-align: left; margin-top: 4px; }
.nj-input-icon { position: relative; }
.nj-input-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--nj-text-muted); cursor: pointer; }
.nj-input-icon input { padding-left: 40px; }
.nj-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.nj-form-actions { display: flex; justify-content: flex-end; gap: 14px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--nj-border); }

/* ── BUTTONS ── */
.nj-btn-primary { background: var(--nj-primary); color: white; border: none; padding: 11px 26px; border-radius: 40px; font-weight: 600; font-size: 0.9rem; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 7px; transition: 0.2s; text-decoration: none; }
.nj-btn-primary:hover { background: var(--nj-primary-dark); transform: translateY(-1px); color: white; }
.nj-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.nj-btn-secondary { background: transparent; border: 1px solid var(--nj-border); padding: 11px 26px; border-radius: 40px; font-weight: 600; font-size: 0.9rem; color: #64748b; cursor: pointer; font-family: inherit; transition: 0.2s; }
.nj-btn-secondary:hover { background: #f1f5f9; }
.nj-btn-outline { background: white; border: 1px solid var(--nj-primary); color: var(--nj-primary); padding: 10px 22px; border-radius: 40px; font-weight: 600; font-size: 0.88rem; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 7px; transition: 0.2s; }
.nj-btn-outline:hover { background: var(--nj-primary); color: white; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .nj-topnav, .nj-search, .nj-icon-btns, .nj-vdiv { display: none; }
    .nj-main { padding: 18px 16px 48px; }
    .nj-grid-2 { grid-template-columns: 1fr; }
    .nj-form-actions { flex-direction: column; }
}

/* ── Pagination ── */





/* ── Pagination ── */
.nj-pagination { width:100%; margin-top:0; }
.nj-pagination > div { border-radius:0 0 20px 20px !important; border-top:none !important; }
