/* ============================================================================
   extra.css — additions on top of the scraped panel.css for new components
   (CRUD modals, badges, helper cells). Keep visual language identical.
   ============================================================================ */

/* Modal backdrop */
.panel-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 999;
    align-items: center; justify-content: center;
    padding: 1rem;
}
.panel-modal[open] { display: flex; }
.panel-modal .panel-modal-card {
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 32rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.7);
    max-height: 90vh;
    overflow-y: auto;
}
.panel-modal .panel-modal-card.lg { max-width: 48rem; }
.panel-modal .panel-modal-card.xl { max-width: 64rem; }
.panel-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #1e1e1e;
}
.panel-modal-head h3 {
    font-size: 0.75rem; font-weight: 600;
    color: #ccc; text-transform: uppercase; letter-spacing: 0.05em;
    margin: 0;
}
.panel-modal-body { padding: 1.25rem; }
.panel-modal-foot {
    display: flex; justify-content: flex-end; gap: 0.5rem;
    padding: 0 1.25rem 1.25rem;
}

/* Status pills */
.pill {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.125rem 0.625rem; border-radius: 9999px;
    font-size: 0.7rem; font-weight: 600;
    border: 1px solid transparent;
}
.pill-on    { background: rgba(16,185,129,0.1); color: #34d399; border-color: rgba(16,185,129,0.3); }
.pill-off   { background: rgba(220,38,38,0.12);  color: #f87171; border-color: rgba(220,38,38,0.3); }
.pill-warn  { background: rgba(245,158,11,0.1);  color: #fbbf24; border-color: rgba(245,158,11,0.3); }
.pill-info  { background: rgba(59,130,246,0.1);  color: #60a5fa; border-color: rgba(59,130,246,0.3); }
.pill-neutral { background: rgba(255,255,255,0.04); color: #aaa; border-color: rgba(255,255,255,0.08); }

/* Mono cell */
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.75rem; color: #aaa; }

/* Action icon button (inside table rows) */
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.875rem; height: 1.875rem;
    border-radius: 0.375rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid #1e1e1e;
    color: #aaa; cursor: pointer;
    transition: all 0.15s;
}
.icon-btn:hover  { background: rgba(243,156,18,0.1); color: #f9b84a; border-color: #f39c12; }
.icon-btn.danger:hover { background: rgba(220,38,38,0.1); color: #f87171; border-color: #dc2626; }

/* Card head row */
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #1e1e1e;
    background: rgba(0,0,0,0.2);
}
.card-head h3 {
    font-size: 0.75rem; font-weight: 600; color: #fff;
    text-transform: uppercase; letter-spacing: 0.05em;
    margin: 0; display: flex; align-items: center; gap: 0.5rem;
}
.card-head h3 i { color: #f39c12; }

/* Empty state */
.empty-state {
    padding: 3rem 1rem; text-align: center; color: #555;
}
.empty-state i { font-size: 2.5rem; color: #2a2a2a; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.875rem; }

/* Table tweaks (longform tables) */
table.compact th, table.compact td { padding: 0.5rem 0.875rem; }

/* "Filter" / search input on table headers */
.table-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid #1e1e1e;
}
.table-toolbar .search {
    position: relative;
}
.table-toolbar .search i {
    position: absolute; left: 0.625rem; top: 50%;
    transform: translateY(-50%); color: #555; font-size: 1rem;
}
.table-toolbar .search input {
    padding-left: 2rem;
    background: #0a0a0a; border: 1px solid #1e1e1e;
    border-radius: 0.5rem; color: #ccc;
    font-size: 0.8rem; padding-top: 0.5rem; padding-bottom: 0.5rem;
    padding-right: 0.75rem; width: 240px; outline: none;
}
.table-toolbar .search input:focus { border-color: #f39c12; }

/* Log row */
.log-row pre {
    margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.7rem; color: #999; white-space: pre-wrap;
    max-height: 6rem; overflow: auto;
}

/* ============================================================================
   Shared widgets used by ported IBO GLASS pages (tabs, badges, secondary
   buttons, form check). Page-local style blocks should NOT redefine these.
   ============================================================================ */
.tab-active { color: #f39c12 !important; border-bottom-color: #f39c12 !important; }
.tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 18px; padding: 0 6px;
    background: #2a2a2a; color: #aaa; border-radius: 10px;
    font-size: 10px; font-weight: 600;
}
/* Original IBO keeps tab badges neutral (bg-dark-700) on the active tab. */

.btn-secondary {
    background: #2a2a2a; color: #ccc; border: 1px solid #3a3a3a;
    padding: 6px 12px; border-radius: 6px;
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
}
.btn-secondary:hover { background: #3a3a3a; color: #fff; }

/* Outline orange — matches original IBO "Bulk ZIP", "Backup", "Restore" buttons */
.btn-outline {
    background: transparent; color: #f39c12; border: 1px solid rgba(243,156,18,0.4);
    padding: 6px 12px; border-radius: 0.5rem;
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
}
.btn-outline:hover { background: rgba(243,156,18,0.10); border-color: rgba(243,156,18,0.7); }

/* Matches IBO original: bg-red-500/10 + border-red-500/20 (dimmer than typical) */
.btn-danger {
    background: rgba(239,68,68,0.10); color: #f87171; border: 1px solid rgba(239,68,68,0.20);
    padding: 6px 12px; border-radius: 0.5rem;
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
}
.btn-danger:hover { background: rgba(239,68,68,0.20); }

/* Original IBO uses browser-default blue checkbox accent (not orange). */
.form-check { width: 18px; height: 18px; }

.stat-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; font-size: 12px;
    background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 6px; color: #ccc;
}
.stat-chip i { color: #f39c12; }

.badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 16px; padding: 0 5px;
    background: rgba(243,156,18,0.15); color: #f39c12; border-radius: 8px;
    font-size: 10px; font-weight: 700;
}

[x-cloak] { display: none !important; }
