/* CricScore Admin — Dark Theme CSS */
:root {
    --bg: #0f0f14;
    --bg-surface: #16161d;
    --bg-card: #1c1c26;
    --bg-hover: #22222e;
    --border: rgba(99, 102, 241, 0.12);
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;
    --green: #22c55e;
    --red: #ef4444;
    --amber: #f59e0b;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --radius: 10px;
    --radius-sm: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text-primary); font-size: 14px; line-height: 1.5; }
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent); }

/* Layout */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: var(--bg-surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; z-index: 10; }
.sidebar-header { padding: 20px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.sidebar-logo { font-size: 28px; }
.sidebar-title { font-weight: 700; font-size: 18px; background: linear-gradient(135deg, var(--accent), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 13px; font-weight: 500; transition: all 0.15s; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: rgba(99, 102, 241, 0.12); color: var(--accent-light); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.main-content { flex: 1; margin-left: 220px; display: flex; flex-direction: column; }
.topbar { height: 56px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: var(--bg-surface); position: sticky; top: 0; z-index: 5; }
.page-title { font-size: 16px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.admin-name { font-size: 13px; color: var(--text-secondary); }
.content-area { padding: 24px; }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-row { padding: 12px 20px; border-bottom: 1px solid rgba(99,102,241,0.06); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title { font-size: 14px; font-weight: 600; }
.link-accent { font-size: 12px; color: var(--accent-light); }

/* Stat Grid */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; transition: transform 0.15s, box-shadow 0.15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 24px; font-weight: 700; margin-top: 4px; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Table */
.table-card { padding: 0; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--bg-surface); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid rgba(99,102,241,0.06); font-size: 13px; }
.data-table tr:hover { background: var(--bg-hover); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; }
.badge-green { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-red { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-amber, .badge-upcoming { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-blue, .badge-toss, .badge-innings_break { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-purple, .badge-completed { background: rgba(139,92,246,0.15); color: #a78bfa; }
.badge-gray { background: rgba(107,107,128,0.15); color: #a0a0b8; }
.badge-live { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-abandoned { background: rgba(239,68,68,0.15); color: #f87171; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; border: none; cursor: pointer; transition: all 0.15s; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: white; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-light); }
.btn-danger { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-full { width: 100%; justify-content: center; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-input { width: 100%; padding: 9px 12px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13px; font-family: inherit; transition: border-color 0.15s; }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.form-input::placeholder { color: var(--text-muted); }

/* Toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search-form { display: flex; gap: 8px; align-items: center; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal.show { display: flex; }
.modal-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; width: 100%; max-width: 440px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; }

/* Avatar */
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: white; flex-shrink: 0; }
.user-row { display: flex; align-items: center; gap: 12px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.alert-success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.2); color: #4ade80; }
.alert-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.2); color: #f87171; }

/* Empty state */
.empty-state { padding: 40px 20px; text-align: center; }
.empty-state span { font-size: 32px; display: block; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 13px; }

/* Utils */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-xs { font-size: 11px; }

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: radial-gradient(ellipse at top, #1a1a2e 0%, var(--bg) 70%); }
.login-container { width: 100%; max-width: 400px; padding: 20px; }
.login-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 40px 32px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.login-header { text-align: center; margin-bottom: 32px; }
.login-header h1 { font-size: 22px; font-weight: 700; margin-top: 12px; background: linear-gradient(135deg, var(--accent), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-header p { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* Pagination */
nav[role="navigation"] { margin-top: 16px; display: flex; justify-content: center; }
nav[role="navigation"] .relative { display: flex; gap: 4px; }
nav[role="navigation"] span, nav[role="navigation"] a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-sm); font-size: 12px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); }
nav[role="navigation"] span[aria-current="page"] span { background: var(--accent); color: white; border-color: var(--accent); }

/* Animations */
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.content-area > * { animation: slideUp 0.25s ease; }
