:root {
    --sidebar-bg: #1e2d45;
    --sidebar-hover: #2a3f61;
    --sidebar-active: #2d6fd6;
    --sidebar-text: #8fa3bc;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 220px;
    --topbar-height: 56px;
    --content-bg: #f0f2f5;
    --card-bg: #ffffff;
    --primary: #2d6fd6;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --border: #e2e8f0;
}

body {
    background: var(--content-bg);
    font-family: 'Segoe UI', sans-serif;
    color: var(--text-main);
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: width 0.2s;
    display: flex;
    flex-direction: column;
}

#sidebar .sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

#sidebar .sidebar-brand span {
    color: var(--sidebar-active);
}

#sidebar .nav-section {
    padding: 18px 14px 6px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.25);
}

#sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--sidebar-text);
    border-radius: 6px;
    margin: 2px 8px;
    font-size: 0.9rem;
    transition: all 0.15s;
    text-decoration: none;
}

#sidebar .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

#sidebar .nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

#sidebar .nav-link.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

/* Topbar */
#topbar {
    height: var(--topbar-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 99;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

#topbar .topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
}

#topbar .admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

#topbar .admin-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sidebar-active);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Main content */
#main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 28px;
    min-height: calc(100vh - var(--topbar-height));
}

/* Cards */
.admin-card {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stat boxes */
.stat-box {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stat-box .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.stat-box .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.stat-box .stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Tables */
.admin-table {
    width: 100%;
    font-size: 0.88rem;
}

.admin-table thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.admin-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge-estado {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-activo { background: #e6f9f0; color: #1a9e5c; }
.badge-jugando { background: #e8f0fd; color: #2d6fd6; }
.badge-inactivo { background: #f1f5f9; color: #7f8c8d; }
.badge-baneado { background: #fdecea; color: #e53e3e; }

/* Typeahead */
.typeahead-wrapper {
    position: relative;
}

.typeahead-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 200;
    max-height: 240px;
    overflow-y: auto;
}

.typeahead-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    border-bottom: 1px solid #f1f5f9;
}

.typeahead-item:last-child { border-bottom: none; }
.typeahead-item:hover { background: #f8fafc; }

.typeahead-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sidebar-active);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Tabs */
.admin-tabs {
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    display: flex;
    gap: 0;
}

.admin-tab {
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    text-decoration: none;
}

.admin-tab:hover { color: var(--primary); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Buttons */
.btn-admin {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-admin:hover { opacity: 0.88; color: white; }

.btn-admin-sm {
    padding: 4px 10px;
    font-size: 0.78rem;
}

.btn-outline-admin {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-outline-admin:hover {
    background: var(--primary);
    color: white;
}

/* Form controls */
.form-control {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.88rem;
    font-family: 'Segoe UI', sans-serif;
    color: var(--text-main);
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45,111,214,0.1);
}

.form-control::placeholder {
    color: #b0bec5;
}

.form-control-sm {
    padding: 5px 9px;
    font-size: 0.82rem;
    border-radius: 6px;
}

/* Log panel */
.log-panel {
    background: #1a2535;
    border-radius: 8px;
    padding: 14px 16px;
    max-height: 180px;
    overflow-y: auto;
    font-family: 'Consolas', monospace;
    font-size: 0.78rem;
}

.log-entry {
    color: #7ec8a0;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.log-entry .log-time { color: #5a8a9f; margin-right: 8px; }
.log-entry .log-warn { color: #e6b354; }
.log-entry .log-error { color: #e05c5c; }
