/* ── NImble Accounts — Shared List / Index Page Styles ────── */

/* ── Page Header ─────────────────────────────────────────── */
.li-page { padding: 1.75rem; }
.li-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 22px;
}
.li-title { font-size: 1.35rem; font-weight: 700; color: #0f172a; margin: 0 0 3px; }
.li-subtitle { font-size: 12.5px; color: #94a3b8; margin: 0; }
.li-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Status Tab Bar ─────────────────────────────────────── */
.tab-bar {
    display: flex; gap: 0; background: #f1f5f9;
    border-radius: 14px; padding: 5px; width: fit-content;
    border: 1px solid #e2e8f0; flex-wrap: wrap; margin-bottom: 20px;
}
.tab-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 20px; border-radius: 10px; font-size: 13.5px;
    font-weight: 500; text-decoration: none; color: #64748b;
    transition: all .18s cubic-bezier(.4,0,.2,1); white-space: nowrap;
    border: 1px solid transparent;
}
.tab-pill:hover { color: #334155; background: rgba(255,255,255,.7); }
/* --- color variants --- */
.tab-pill.active-open      { background:#fff; color:#1d4ed8; border-color:#bfdbfe; box-shadow:0 1px 6px rgba(59,130,246,.2),0 1px 2px rgba(0,0,0,.06); }
.tab-pill.active-accepted  { background:#fff; color:#15803d; border-color:#bbf7d0; box-shadow:0 1px 6px rgba(34,197,94,.2),0 1px 2px rgba(0,0,0,.06); }
.tab-pill.active-active    { background:#fff; color:#15803d; border-color:#bbf7d0; box-shadow:0 1px 6px rgba(34,197,94,.2),0 1px 2px rgba(0,0,0,.06); }
.tab-pill.active-paid      { background:#fff; color:#15803d; border-color:#bbf7d0; box-shadow:0 1px 6px rgba(34,197,94,.2),0 1px 2px rgba(0,0,0,.06); }
.tab-pill.active-converted { background:#fff; color:#6d28d9; border-color:#ddd6fe; box-shadow:0 1px 6px rgba(139,92,246,.2),0 1px 2px rgba(0,0,0,.06); }
.tab-pill.active-unpaid    { background:#fff; color:#b45309; border-color:#fde68a; box-shadow:0 1px 6px rgba(251,191,36,.25),0 1px 2px rgba(0,0,0,.06); }
.tab-pill.active-pending   { background:#fff; color:#b45309; border-color:#fde68a; box-shadow:0 1px 6px rgba(251,191,36,.25),0 1px 2px rgba(0,0,0,.06); }
.tab-pill.active-rejected  { background:#fff; color:#b45309; border-color:#fde68a; box-shadow:0 1px 6px rgba(245,158,11,.2),0 1px 2px rgba(0,0,0,.06); }
.tab-pill.active-cancelled { background:#fff; color:#b91c1c; border-color:#fecaca; box-shadow:0 1px 6px rgba(239,68,68,.2),0 1px 2px rgba(0,0,0,.06); }
.tab-pill.active-all       { background:#fff; color:#475569; border-color:#e2e8f0; box-shadow:0 1px 6px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.06); }

.tab-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tab-count { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 100px; line-height: 1.4; }
.tab-pill:not([class*="active"]) .tab-count { background: #e2e8f0; color: #64748b; }
.tab-pill:not([class*="active"]) .tab-dot   { background: #cbd5e1; }
.tab-pill.active-open      .tab-dot  { background: #3b82f6; }
.tab-pill.active-open      .tab-count{ background: #dbeafe; color: #1e40af; }
.tab-pill.active-accepted  .tab-dot  { background: #22c55e; }
.tab-pill.active-accepted  .tab-count{ background: #dcfce7; color: #166534; }
.tab-pill.active-active    .tab-dot  { background: #22c55e; }
.tab-pill.active-active    .tab-count{ background: #dcfce7; color: #166534; }
.tab-pill.active-paid      .tab-dot  { background: #22c55e; }
.tab-pill.active-paid      .tab-count{ background: #dcfce7; color: #166534; }
.tab-pill.active-converted .tab-dot  { background: #8b5cf6; }
.tab-pill.active-converted .tab-count{ background: #ede9fe; color: #5b21b6; }
.tab-pill.active-unpaid    .tab-dot  { background: #f59e0b; }
.tab-pill.active-unpaid    .tab-count{ background: #fef3c7; color: #92400e; }
.tab-pill.active-pending   .tab-dot  { background: #f59e0b; }
.tab-pill.active-pending   .tab-count{ background: #fef3c7; color: #92400e; }
.tab-pill.active-rejected  .tab-dot  { background: #f59e0b; }
.tab-pill.active-rejected  .tab-count{ background: #fef3c7; color: #92400e; }
.tab-pill.active-cancelled .tab-dot  { background: #ef4444; }
.tab-pill.active-cancelled .tab-count{ background: #fee2e2; color: #991b1b; }

/* ── Stat Cards ─────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; margin-bottom: 20px; }
.stat-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; margin-bottom: 20px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 20px; }
.stat-row .stat-card { flex: 1 1 180px; }
@media(max-width:900px) { .stat-grid { grid-template-columns: repeat(2,1fr); } .stat-grid-3 { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px) { .stat-grid, .stat-grid-3 { grid-template-columns: 1fr; } .stat-row { flex-direction: column; } }
.stat-card {
    border-radius: 12px; padding: 15px 16px;
    border: 1px solid; display: flex; align-items: center; gap: 12px;
}
/* Color variants */
.stat-blue   { background:#eff6ff; border-color:#bfdbfe; }
.stat-blue   .stat-label { color:#1e40af; }
.stat-blue   .stat-value { color:#1d4ed8; }
.stat-green  { background:#f0fdf4; border-color:#bbf7d0; }
.stat-green  .stat-label { color:#166534; }
.stat-green  .stat-value { color:#15803d; }
.stat-red    { background:#fff5f5; border-color:#fecaca; }
.stat-red    .stat-label { color:#991b1b; }
.stat-red    .stat-value { color:#dc2626; }
.stat-yellow { background:#fffbeb; border-color:#fde68a; }
.stat-yellow .stat-label { color:#92400e; }
.stat-yellow .stat-value { color:#b45309; }
.stat-purple { background:#f5f3ff; border-color:#ddd6fe; }
.stat-purple .stat-label { color:#5b21b6; }
.stat-purple .stat-value { color:#6d28d9; }
.stat-gray   { background:#f8fafc; border-color:#e2e8f0; }
.stat-gray   .stat-label { color:#475569; }
.stat-gray   .stat-value { color:#1e293b; }
.stat-amber  { background:#fffbeb; border-color:#fde68a; }
.stat-amber  .stat-label { color:#92400e; }
.stat-amber  .stat-value { color:#b45309; }
.stat-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.stat-value { font-size: 19px; font-weight: 700; line-height: 1.2; }
.stat-sub { font-size: 11px; margin-top: 1px; }

/* ── Filter Panel ───────────────────────────────────────── */
.filter-panel {
    background: #f8fafc; border: 1px solid #e9edf2; border-radius: 12px;
    padding: 16px 18px; margin-bottom: 18px;
}
.filter-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; user-select: none;
}
.filter-panel-title { font-size: 13px; font-weight: 600; color: #475569; display: flex; align-items: center; gap: 7px; }
.filter-toggle-icon { color: #94a3b8; transition: transform .2s; }
.filter-toggle-icon.open { transform: rotate(180deg); }
.filter-active-badge { background:#6366f1; color:#fff; font-size:10px; padding:2px 7px; border-radius:100px; font-weight:700; }
.filter-grid   { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 10px; align-items: end; }
.filter-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 10px; }
.filter-grid-5 { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-bottom: 10px; }
.filter-actions { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.filter-actions .btn { flex-shrink: 0; }

/* ── Table ──────────────────────────────────────────────── */
.table-wrap { border-radius: 12px; overflow: hidden; border: 1px solid #e5e7eb; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .6px;
    color: #64748b; background: #f8fafc; font-weight: 600;
    padding: .8rem 1rem; border-bottom: 1px solid #e5e7eb;
}
.table td { padding: .78rem 1rem; border-bottom: 1px solid #f1f5f9; font-size: .875rem; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fafbff; }
.table tfoot td {
    padding: .75rem 1rem; background: #f8fafc;
    font-size: .82rem; font-weight: 600; color: #374151;
    border-top: 2px solid #e5e7eb;
}
.table-link { font-weight: 600; color: #4f46e5; text-decoration: none; font-size: .82rem; }
.table-link:hover { color: #4338ca; text-decoration: underline; }

/* ── Status Badges ──────────────────────────────────────── */
.status-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 100px; font-size: .7rem; font-weight: 600;
}
.sb-open      { background: #dbeafe; color: #1e40af; }
.sb-active    { background: #dcfce7; color: #15803d; }
.sb-accepted  { background: #dcfce7; color: #15803d; }
.sb-paid      { background: #dcfce7; color: #15803d; }
.sb-converted { background: #ede9fe; color: #5b21b6; }
.sb-pending   { background: #fef9c3; color: #a16207; }
.sb-unpaid    { background: #fef9c3; color: #a16207; }
.sb-rejected  { background: #fef9c3; color: #a16207; }
.sb-inactive  { background: #f1f5f9; color: #64748b; }
.sb-cancelled { background: #fee2e2; color: #b91c1c; }
.sb-decommissioned { background: #f1f5f9; color: #64748b; }
.sb-maintenance    { background: #fef9c3; color: #a16207; }
.sb-available      { background: #dcfce7; color: #15803d; }
.sb-in-use         { background: #dbeafe; color: #1e40af; }

/* ── Action Buttons ─────────────────────────────────────── */
.act-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 11px; border-radius: 7px; font-size: .75rem;
    font-weight: 500; text-decoration: none; border: none; cursor: pointer;
    transition: all .15s;
}
.act-view     { background: #ede9fe; color: #5b21b6; }
.act-view:hover { background: #ddd6fe; }
.act-edit     { background: #fef3c7; color: #92400e; }
.act-edit:hover { background: #fde68a; }
.act-ledger   { background: #e0f2fe; color: #0369a1; }
.act-ledger:hover { background: #bae6fd; }
.act-convert  { background: #dcfce7; color: #15803d; }
.act-convert:hover { background: #bbf7d0; }
.act-issue    { background: #dbeafe; color: #1e40af; }
.act-issue:hover { background: #bfdbfe; }
.act-delete   { background: #fee2e2; color: #991b1b; }
.act-delete:hover { background: #fecaca; }
.act-cancel   { background: #fee2e2; color: #991b1b; }
.act-cancel:hover { background: #fecaca; }
.act-approve  { background: #dcfce7; color: #15803d; }
.act-approve:hover { background: #bbf7d0; }

/* ── Type Badges (items) ─────────────────────────────────── */
.type-badge { display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:100px; font-size:.68rem; font-weight:700; }
.tb-physical { background:#ede9fe; color:#5b21b6; }
.tb-virtual  { background:#e0f2fe; color:#0369a1; }
.tb-service  { background:#d1fae5; color:#065f46; }

/* ── Empty State ─────────────────────────────────────────── */
.li-empty {
    text-align: center; padding: 3rem 1rem;
}
.li-empty-inner {
    display: flex; flex-direction: column; align-items: center; gap: 10px; color: #94a3b8;
}
.li-empty-title { font-size: .9rem; font-weight: 500; }
.li-empty-sub   { font-size: .8rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media(max-width:768px) {
    .tab-bar { width: 100%; }
    .filter-grid,
    .filter-grid-4 { grid-template-columns: 1fr 1fr !important; }
    .filter-grid-5 { grid-template-columns: 1fr 1fr !important; }
}
@media(max-width:560px) {
    .filter-grid,
    .filter-grid-4,
    .filter-grid-5 { grid-template-columns: 1fr !important; }
    .tab-pill { padding: 7px 12px; font-size: 12px; }
}
