/* ============================================================
   Nevada Esports – CMS Admin Styles
   ============================================================ */

/* Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f3f4f6;
    font-family: 'Montserrat', sans-serif;
}

.admin-sidebar {
    width: 220px;
    min-height: 100vh;
    background: #111827;
    color: #d1d5db;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.admin-main {
    margin-left: 220px;
    flex: 1;
    padding: 2rem;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar-brand {
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar-brand a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.admin-sidebar-brand img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.admin-nav {
    flex: 1;
    padding: 0.75rem 0;
}

.admin-nav-section {
    padding: 0.75rem 1.25rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.25rem;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.12s, color 0.12s;
    border-left: 3px solid transparent;
}

.admin-nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #e5e7eb;
    text-decoration: none;
}

.admin-nav-item.active {
    background: rgba(99,102,241,0.15);
    color: #a5b4fc;
    border-left-color: #6366f1;
}

.admin-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-sidebar-link {
    color: #9ca3af;
    font-size: 0.82rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-sidebar-link:hover { color: #e5e7eb; text-decoration: none; }

.admin-sidebar-logout {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-sidebar-logout:hover { color: #f87171; }

/* Page header */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Cards */
.admin-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.admin-card-body {
    padding: 1.5rem;
}

/* Tables */
.admin-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.65rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}

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

/* Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.12s, color 0.12s, opacity 0.12s;
    white-space: nowrap;
    font-family: inherit;
}

.admin-btn-primary { background: #4f46e5; color: #fff; }
.admin-btn-primary:hover { background: #4338ca; color: #fff; text-decoration: none; }

.admin-btn-secondary { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.admin-btn-secondary:hover { background: #e5e7eb; color: #374151; text-decoration: none; }

.admin-btn-danger { background: #fee2e2; color: #dc2626; }
.admin-btn-danger:hover { background: #fecaca; color: #dc2626; text-decoration: none; }

.admin-btn-warning { background: #fef3c7; color: #92400e; }
.admin-btn-warning:hover { background: #fde68a; color: #92400e; text-decoration: none; }

.admin-btn-sm { padding: 0.25rem 0.6rem; font-size: 0.8rem; }

/* Forms */
.admin-form label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.3rem;
}

.admin-form .form-control,
.admin-form .form-select {
    border-color: #d1d5db;
    font-size: 0.875rem;
    font-family: inherit;
}

.admin-form .form-control:focus,
.admin-form .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 0.2rem rgba(99,102,241,0.2);
}

.admin-form textarea.form-control { resize: vertical; }

.admin-form-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}

.admin-form-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Alerts */
.admin-alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-alert-success { background: #d1fae5; color: #065f46; }
.admin-alert-danger  { background: #fee2e2; color: #991b1b; }

/* Badges */
.admin-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.admin-badge-primary   { background: #dbeafe; color: #1e40af; }
.admin-badge-success   { background: #d1fae5; color: #065f46; }
.admin-badge-secondary { background: #f3f4f6; color: #6b7280; }

/* Stats dashboard */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.admin-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    text-decoration: none;
    display: block;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.admin-stat-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 2px 8px rgba(99,102,241,0.12);
    text-decoration: none;
}

.admin-stat-number {
    font-size: 1.85rem;
    font-weight: 700;
    color: #4f46e5;
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.3rem;
    font-weight: 500;
}

/* Dynamic list rows (event features, tournaments) */
.admin-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.admin-list-item .form-control { flex: 1; }

/* HTML preview */
.admin-preview-panel {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    min-height: 200px;
    background: #fff;
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.65;
    overflow-y: auto;
}

.admin-preview-panel h1, .admin-preview-panel h2,
.admin-preview-panel h3, .admin-preview-panel h4 {
    color: #111827;
}

/* Login page */
.admin-login-page {
    min-height: 100vh;
    background: #0f1117;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
}

.admin-login-card {
    background: #1f2937;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}

.admin-login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-login-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.admin-login-card label {
    color: #9ca3af;
    font-size: 0.82rem;
    font-weight: 500;
}

.admin-login-card .form-control {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
    font-size: 0.9rem;
}

.admin-login-card .form-control:focus {
    background: #374151;
    border-color: #6366f1;
    color: #f9fafb;
    box-shadow: 0 0 0 0.2rem rgba(99,102,241,0.3);
}

.admin-login-card .form-control::placeholder { color: #9ca3af; }

.admin-login-submit {
    width: 100%;
    background: #4f46e5;
    color: #fff;
    border: none;
    padding: 0.65rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    margin-top: 0.5rem;
}

.admin-login-submit:hover { background: #4338ca; }

.admin-login-error {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 6px;
    padding: 0.6rem 0.875rem;
    font-size: 0.82rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Truncate long text in tables */
.admin-truncate {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Image thumbnail */
.admin-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}
