/* public/admin.css */
@import url('style.css');

/* Data Tables */
.data-table-wrapper {
    background: var(--glass-bg); 
    border: 1px solid var(--glass-border);
    border-radius: 20px; 
    overflow-x: auto; 
    margin-top: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    text-align: left; 
    font-size: 0.95rem; 
}
th { 
    background: var(--bg-dark); 
    padding: 1.25rem 1rem; 
    color: var(--text-main); 
    font-weight: 700; 
    border-bottom: 2px solid var(--glass-border); 
}
td { 
    padding: 1.25rem 1rem; 
    border-bottom: 1px solid rgba(49, 94, 38, 0.1); 
    color: var(--text-muted); 
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(165, 195, 45, 0.03); }

/* Global List Item Safety Override for Admin Dashboard */
ul, li, p, span, div {
    color: inherit;
}

/* Badges */
.badge { 
    padding: 6px 12px; 
    border-radius: 8px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    display: inline-block;
}
.badge-active { background: rgba(165, 195, 45, 0.15); color: var(--primary); }
.badge-pending { background: rgba(243, 156, 18, 0.1); color: #d35400; }
.badge-suspended { background: rgba(231, 76, 60, 0.1); color: var(--danger); }

/* Nav Badges Override */
.nav-btn .badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-left: auto; /* Push badge to the right */
    background: var(--danger) !important;
    color: white !important;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.4);
}

/* Grid for Stats */
.stat-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); 
    gap: 1.5rem; 
}

/* Notification Bell */
.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}
.notification-bell:hover { color: var(--primary); }
.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--bg-dark);
}

@media (max-width: 768px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .notification-bell { margin-top: 5px; }
    #search-container input { font-size: 0.95rem; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .stat-grid .glass-card { padding: 1.5rem; }
}

/* System Testing Center */
.test-category-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px; margin-bottom: 1.5rem; overflow: hidden; }
.test-category-header { padding: 1.25rem 1.5rem; background: rgba(49, 94, 38, 0.03); border-bottom: 1px solid var(--glass-border); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.test-category-header h3 { margin: 0; font-size: 1.1rem; color: var(--primary); }
.test-category-body { padding: 0 1.5rem; display: none; }
.test-category-body.expanded { display: block; }
.test-row { display: flex; align-items: center; padding: 1rem 0; border-bottom: 1px dashed var(--glass-border); }
.test-row:last-child { border-bottom: none; }
.test-info { flex: 1; padding-right: 1rem; }
.test-info h4 { margin: 0 0 4px 0; font-size: 0.95rem; color: var(--text-main); }
.test-info p { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.test-actions { display: flex; align-items: center; gap: 10px; min-width: 180px; justify-content: flex-end; }
.test-status { font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; gap: 5px; width: 80px; }
.status-pending { color: var(--text-muted); }
.status-success { color: var(--success); }
.status-warning { color: var(--warning); }
.status-failed { color: var(--danger); }
.test-progress-bar { height: 8px; background: rgba(0,0,0,0.05); border-radius: 4px; overflow: hidden; margin: 1.5rem 0; position: relative; }
.test-progress-fill { height: 100%; background: var(--primary); width: 0%; transition: width 0.3s ease; }
.test-logs-terminal { background: #1e1e1e; color: #a9b7c6; font-family: monospace; padding: 1rem; border-radius: 12px; height: 300px; overflow-y: auto; font-size: 0.85rem; line-height: 1.5; }
.log-entry { margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 4px; }
.log-time { color: #629755; margin-right: 8px; }
.log-success { color: #A5C32D; }
.log-error { color: #cc666e; }
.log-info { color: #a9b7c6; }
log-warning { color: #f39c12; }

/* Database Manager Styles */
.db-table-list { list-style: none; padding: 0; margin: 0; }
.db-table-item { padding: 10px 15px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; transition: var(--transition); border: 1px solid transparent; }
.db-table-item:hover { background: rgba(49, 94, 38, 0.05); }
.db-table-item.active { background: var(--primary); color: white; box-shadow: 0 4px 10px rgba(49, 94, 38, 0.2); }
.db-table-item.active .badge { background: white; color: var(--primary); }
.spreadsheet-container { flex: 1; overflow: auto; border: 1px solid var(--glass-border); border-radius: 8px; background: white; }
.spreadsheet-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.spreadsheet-table th, .spreadsheet-table td { padding: 10px 15px; border-bottom: 1px solid var(--glass-border); border-right: 1px solid var(--glass-border); white-space: nowrap; max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
.spreadsheet-table th { background: var(--bg-dark); position: sticky; top: 0; z-index: 10; font-weight: 700; color: var(--text-main); }
.spreadsheet-table tr:hover td { background: rgba(165, 195, 45, 0.05); }
.spreadsheet-actions { position: sticky; right: 0; background: white; text-align: center; border-left: 2px solid var(--glass-border); z-index: 5; }
.spreadsheet-table th.spreadsheet-actions { background: var(--bg-dark); z-index: 11; }