:root {
    --primary: #1a1a1a;
    --secondary: #6c757d;
    --accent: #dc3545;
    --bg-gradient: linear-gradient(135deg, #1a1a1a 0%, #444 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

body.bg-light {
    background: var(--bg-gradient) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    width: 250px;
    z-index: 1040;
    padding: 0;
    background: #1a1a1a;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    padding: 0.6rem 1rem;
    border-radius: 0;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    background: #2d2d2d;
    color: #fff;
}

.sidebar .nav-link.active {
    color: #fff;
    background: #333;
    border-right: 3px solid #888;
}

.sidebar .sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888 !important;
}

main {
    margin-top: 56px;
    min-height: calc(100vh - 56px);
    position: relative;
}

main::before {
    content: '';
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/ncsm.png') center 40% no-repeat;
    background-size: 150px 150px;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

main > * {
    position: relative;
    z-index: 1;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 2.5rem;
    opacity: 0.2;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-card {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-card .card-header {
    background: var(--bg-gradient);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.5rem;
    text-align: center;
    border: none;
}

.login-card .card-body {
    padding: 2rem;
}

.login-card .card-body .form-label {
    color: #fff;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.2);
}

.btn-primary {
    background: var(--bg-gradient);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* === Professional Table Design === */
.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-bottom: none;
    padding: 0.85rem 0.75rem;
    position: sticky;
    top: 0;
    z-index: 2;
}

.table thead th:first-child {
    border-radius: 0;
}

.table tbody tr {
    transition: all 0.15s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.table tbody tr:hover {
    background: #f5f7fa !important;
    transform: scale(1.002);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.table tbody td {
    vertical-align: middle;
    padding: 0.7rem 0.75rem;
    font-size: 0.88rem;
    color: #444;
}

.table tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* Card that wraps tables */
.card .table-container {
    margin: -1px;
}

.card .table-container .table {
    border-collapse: separate;
    border-spacing: 0;
}

.card > .card-body:first-child .table thead th:first-child,
.card-body.p-0 .table thead th:first-child {
    border-radius: 0;
}

.card > .card-body:first-child .table thead th:last-child,
.card-body.p-0 .table thead th:last-child {
    border-radius: 0;
}

/* Status-based row accents */
.table tbody tr.row-approved {
    border-left: 3px solid #198754;
}

.table tbody tr.row-rejected {
    border-left: 3px solid #dc3545;
}

.table tbody tr.row-submitted,
.table tbody tr.row-pending {
    border-left: 3px solid #ffc107;
}

.table tbody tr.row-draft {
    border-left: 3px solid #6c757d;
}

.table tbody tr.row-live {
    border-left: 3px solid #dc3545;
}

.table tbody tr.row-completed {
    border-left: 3px solid #198754;
}

.table tbody tr.row-scheduled {
    border-left: 3px solid #6c757d;
}

.player-photo {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #dee2e6;
}

.player-photo-lg {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #dee2e6;
}

.photo-upload {
    position: relative;
    display: inline-block;
}

.photo-upload .photo-preview {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px dashed #dee2e6;
    cursor: pointer;
    transition: all 0.3s;
}

.photo-upload .photo-preview:hover {
    border-color: var(--secondary);
    opacity: 0.8;
}

.notification-dropdown {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown .unread {
    background: rgba(108, 117, 125, 0.08);
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary);
    border: 2px solid white;
}

.timeline-item.approved::before { background: #198754; }
.timeline-item.rejected::before { background: #dc3545; }
.timeline-item.submitted::before { background: #0dcaf0; }

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.group-badge {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
}

.group-A { background: #dc3545; }
.group-B { background: #0d6efd; }
.group-C { background: #C8A032; }
.group-D { background: #1B5E20; }

.filter-section {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.registration-progress .step {
    text-align: center;
    padding: 1rem;
    position: relative;
}

.registration-progress .step .step-number {
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: inline-block;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.registration-progress .step.active .step-number {
    background: var(--secondary);
    color: white;
}

.registration-progress .step.completed .step-number {
    background: #198754;
    color: white;
}

.registration-progress .step .step-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.registration-progress .step.active .step-label {
    color: var(--secondary);
    font-weight: 600;
}

.print-friendly {
    padding: 2rem;
}

@media print {
    .sidebar, .navbar, .btn, .no-print { display: none !important; }
    main { margin-left: 0 !important; }
    .print-friendly { padding: 0; }
}

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        transform: translateX(-100%);
        width: 260px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    main {
        margin-left: 0 !important;
    }
}
