/* TheOracle Admin Styles */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8f9fa;
}

/* Layout shell */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    min-width: 250px;
    background-color: #1a1d21;
    color: #e9ecef;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h5 {
    color: #fff;
}

.sidebar-header .text-muted {
    color: #6c757d !important;
}

.admin-sidebar .nav {
    padding: 0.5rem 0;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 0.6rem 1rem;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.05);
    border-left-color: rgba(255,255,255,0.3);
}

.admin-sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(13,110,253,0.15);
    border-left-color: #0d6efd;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0 0 0.5rem;
}

.admin-content {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
}

/* Stats cards */
.stat-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Specs JSON viewer */
.specs-viewer {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 0.375rem;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.specs-viewer .json-key {
    color: #9cdcfe;
}

.specs-viewer .json-string {
    color: #ce9178;
}

.specs-viewer .json-number {
    color: #b5cea8;
}

.specs-viewer .json-boolean {
    color: #569cd6;
}

/* Status badges */
.badge-active { background-color: #198754; }
.badge-discontinued { background-color: #dc3545; }
.badge-superseded { background-color: #fd7e14; }

/* Product type badges */
.badge-type { background-color: #6c757d; }
.badge-type-firearm { background-color: #0d6efd; }
.badge-type-optic { background-color: #6610f2; }
.badge-type-ammunition { background-color: #dc3545; }

/* Search results */
.search-score {
    width: 60px;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.search-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

/* Graph container */
#graph-container {
    width: 100%;
    height: 600px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

#graph-container svg {
    width: 100%;
    height: 100%;
}

/* Graph legend */
.graph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
}

.legend-color {
    width: 16px;
    height: 3px;
    border-radius: 1px;
}

/* Table improvements */
.table-admin th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

.table-admin td {
    vertical-align: middle;
}

.table-admin .actions {
    white-space: nowrap;
}

/* Loading spinner */
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #6c757d;
}
