/**
 * CompressX — Admin Panel Stylesheet
 */

:root {
    --bg-main: #0b0f19;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --border-color: #374151;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #60a5fa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px;
}

/* Navbar */
.admin-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.accent {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-user-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* Container */
.admin-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 30px 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
}

.text-muted {
    color: var(--text-muted);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator.online {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #4b5563;
}

.stat-icon {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2px;
}

.text-success {
    color: var(--success);
}

/* Table Card */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.table-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.table-header-bar h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-control-sm {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
}

.form-control-sm:focus {
    border-color: var(--primary);
}

/* Table Styling */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 14px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 14px;
    border-bottom: 1px solid #1f2937;
    font-size: 0.875rem;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.record-id-link {
    color: var(--accent);
    font-family: monospace;
    font-weight: 600;
    text-decoration: none;
}

.record-id-link:hover {
    text-decoration: underline;
}

.code-hash {
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-all;
    color: #93c5fd;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-id {
    background: #1e3a8a;
    color: #93c5fd;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-format {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-info {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Action Buttons */
.action-btn-group {
    display: flex;
    gap: 8px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.btn-outline:hover {
    color: var(--text-main);
    border-color: #6b7280;
}

.btn-outline-light {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger-sm {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.8rem;
}

.btn-danger-sm:hover {
    background: rgba(239, 68, 68, 0.4);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 25px;
}

.page-link {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Login Page Styling */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 20%, #1e293b, #0b0f19);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 35px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-header .brand-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.login-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn-block {
    width: 100%;
    padding: 11px;
}

.alert {
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

.login-footer a:hover {
    color: var(--text-main);
}

/* Details Page Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.detail-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 14px;
}

.detail-card .card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.detail-table {
    width: 100%;
}

.detail-table th {
    width: 38%;
    color: var(--text-muted);
    font-weight: 500;
    padding: 8px 0;
    font-size: 0.85rem;
    vertical-align: top;
}

.detail-table td {
    padding: 8px 0;
    font-size: 0.85rem;
    vertical-align: top;
}

.page-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 6px;
}

.font-bold {
    font-weight: 700;
}
