/**
 * Nethriq Custom Styles
 * Elite pro analytics look: dark, sleek, high-contrast
 */

:root {
    --primary-color: #22d3ee;
    --primary-strong: #06b6d4;
    --accent-color: #f97316;
    --ink-900: #eef6ff;
    --ink-700: #b4c5da;
    --ink-500: #7f93aa;
    --surface-100: #060d18;
    --surface-200: #0d1727;
    --surface-300: #152338;
    --white: #f8fbff;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-soft: 0 10px 26px rgba(1, 8, 20, 0.45);
    --shadow-lift: 0 18px 42px rgba(2, 10, 24, 0.58);
}

body {
    color: var(--ink-900);
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 48px,
            rgba(34, 211, 238, 0.04) 48px,
            rgba(34, 211, 238, 0.04) 49px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 48px,
            rgba(34, 211, 238, 0.04) 48px,
            rgba(34, 211, 238, 0.04) 49px
        ),
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.14), transparent 28%),
        radial-gradient(circle at 86% 2%, rgba(249, 115, 22, 0.12), transparent 24%),
        linear-gradient(165deg, #060b14 0%, #0a1322 46%, #121d31 100%);
    background-attachment: fixed, fixed, scroll, scroll, scroll;
    font-family: 'Manrope', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
    font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
    letter-spacing: 0.04em;
}

.text-muted {
    color: var(--ink-500) !important;
}

a {
    color: #7dd3fc;
}

a:hover {
    color: #bae6fd;
}

/* Navbar */
.navbar-dark {
    background: linear-gradient(120deg, rgba(5, 10, 18, 0.92) 0%, rgba(9, 18, 32, 0.9) 62%, rgba(8, 25, 39, 0.88) 100%) !important;
    box-shadow: 0 12px 30px rgba(2, 6, 15, 0.55);
    border-bottom: 1px solid rgba(34, 211, 238, 0.24);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 2rem;
    color: #f6fbff !important;
    text-transform: uppercase;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(224, 238, 255, 0.86);
    font-weight: 700;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    transition: all 0.2s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #fff;
    background: linear-gradient(120deg, rgba(34, 211, 238, 0.2) 0%, rgba(14, 165, 191, 0.24) 100%);
}

/* Cards */
.card {
    border: 1px solid rgba(61, 93, 128, 0.34);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(14, 24, 39, 0.9) 0%, rgba(10, 19, 32, 0.9) 100%);
    backdrop-filter: blur(6px);
}

.card-body {
    padding: 2rem;
}

.card-title {
    color: var(--ink-900);
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

#page-new-match .card h5 {
    color: #bfe4ff;
    font-size: 1.5rem;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--radius-md);
    border: 1px solid #314862;
    background-color: rgba(9, 18, 30, 0.92);
    color: var(--ink-900);
    padding: 0.7rem 0.85rem;
}

.form-control::placeholder {
    color: #6f849a;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    background-color: rgba(9, 18, 30, 0.98);
    color: var(--ink-900);
    box-shadow: 0 0 0 0.22rem rgba(34, 211, 238, 0.24);
}

.form-label {
    font-weight: 700;
    color: var(--ink-700);
}

/* Buttons */
.btn {
    border-radius: var(--radius-md);
    font-weight: 700;
    padding: 0.6rem 1.5rem;
    letter-spacing: 0.01em;
    border: none;
    transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(13, 27, 42, 0.32);
}

.btn-primary {
    background: linear-gradient(120deg, var(--primary-color) 0%, #0fb9d8 100%);
    color: #03111a;
    border: 1px solid rgba(125, 211, 252, 0.45);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(120deg, var(--primary-strong) 0%, #0891b2 100%);
    color: #e9fbff;
}

.btn-success {
    background: linear-gradient(120deg, #1ea65f 0%, #38d173 100%);
}

.btn-info {
    background: linear-gradient(120deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
}

.btn-secondary {
    background: #2a3c52;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success {
    border-width: 1px;
}

.btn-outline-primary {
    color: #7dd3fc;
    border-color: #0e7490;
}

.btn-outline-primary:hover {
    color: #03111a;
    background-color: #67e8f9;
    border-color: #67e8f9;
}

.btn-outline-secondary {
    color: #d3e2f3;
    border-color: #425a73;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #2b3f56;
    border-color: #2b3f56;
}

/* Tables */
.table {
    --bs-table-color: #dce8f6;
    --bs-table-bg: rgba(10, 18, 30, 0.9);
    --bs-table-striped-color: #e6f0fc;
    --bs-table-striped-bg: rgba(18, 31, 48, 0.82);
    --bs-table-hover-color: #f2f7ff;
    --bs-table-hover-bg: rgba(24, 42, 64, 0.82);
    --bs-table-border-color: rgba(75, 100, 129, 0.34);
    color: var(--bs-table-color);
    background-color: var(--bs-table-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.2rem;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: linear-gradient(120deg, #16253a 0%, #1a2f47 100%);
    border-bottom: 2px solid #254162;
}

.table thead th {
    background: transparent;
    border-bottom: 1px solid rgba(88, 116, 149, 0.38);
}

.table th {
    color: #9fc2e7;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--bs-table-striped-bg);
    color: var(--bs-table-striped-color);
}

.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: rgba(11, 20, 33, 0.84);
    color: #dce8f6;
}

.table tbody tr:hover {
    background-color: var(--bs-table-hover-bg);
}

.table > :not(caption) > * > * {
    border-bottom-color: rgba(74, 99, 127, 0.3);
}

/* Alerts */
.alert {
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    box-shadow: 0 8px 22px rgba(13, 27, 42, 0.22);
    font-weight: 600;
}

.alert-info {
    background-color: #10253a;
    color: #8ad7ff;
    border-color: #1f4f78;
}

.alert-success {
    background: linear-gradient(135deg, #0f4c2a 0%, #1a5e33 100%);
    color: #4ade80;
    border-color: #2c7a4a;
    border-width: 2px;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.16), inset 0 0 0 1px rgba(74, 222, 128, 0.25);
    font-weight: 600;
}

.alert-success strong {
    color: #86efac;
    font-weight: 800;
}

.alert-warning {
    background-color: #3a2b14;
    color: #ffd8a3;
    border-color: #6b4a1b;
}

.alert-danger {
    background-color: #3a1820;
    color: #ffb7be;
    border-color: #6f2736;
}

/* Player Thumbnail Selection */
.player-thumbnail {
    transition: all 0.3s ease;
    border: 1px solid rgba(57, 83, 112, 0.56);
    border-radius: 14px;
    overflow: hidden;
}

.player-thumbnail:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.18);
    border-color: var(--primary-color);
}

.player-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
}

.player-thumbnail .card-body {
    padding: 0.5rem;
    background: linear-gradient(180deg, #152436 0%, #111d2d 100%);
}

#player-search-results {
    max-height: 220px;
    overflow-y: auto;
    border-radius: var(--radius-md);
    box-shadow: inset 0 0 0 1px rgba(84, 109, 137, 0.36);
    background-color: #0e1a2a;
}

#player-search-results .list-group-item {
    cursor: pointer;
    border: none;
    border-bottom: 1px solid #243a53;
    background-color: transparent;
    color: #d2e5fb;
    transition: background-color 0.2s ease;
}

#player-search-results .list-group-item:hover {
    background-color: #16324d;
}

#global-jobs-table-container table td,
#global-jobs-table-container table th {
    vertical-align: middle;
}

#page-global-dashboard {
    background: linear-gradient(160deg, rgba(9, 16, 27, 0.7) 0%, rgba(13, 24, 39, 0.72) 100%);
    border: 1px solid rgba(66, 93, 123, 0.32);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 14px 34px rgba(1, 8, 20, 0.45);
}

#global-jobs-table-container {
    background: rgba(8, 14, 24, 0.52);
    border: 1px solid rgba(69, 95, 124, 0.28);
    border-radius: 14px;
    padding: 0.75rem 0.75rem 0.2rem;
}

#global-jobs-count {
    color: #97adc5 !important;
}

.deliverable-summary {
    letter-spacing: 0.01em;
}

.deliverable-summary-alert {
    margin-bottom: 0.9rem;
}

.deliverable-item {
    background: rgba(11, 20, 33, 0.66);
    border-color: rgba(74, 99, 127, 0.42) !important;
}

.deliverable-item.is-unavailable {
    background: rgba(28, 20, 24, 0.82);
    border-color: rgba(111, 39, 54, 0.45) !important;
}

.deliverable-status-note {
    margin-top: 0.3rem;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.55;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* Modals */
.modal-content {
    border: 1px solid rgba(78, 108, 144, 0.32);
    box-shadow: var(--shadow-lift);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(180deg, #111d2f 0%, #0c1625 100%);
}

.modal-header {
    border-bottom: 1px solid #274261;
    background: linear-gradient(120deg, #15253a 0%, #132840 100%);
}

/* Page Sections */
.page-section {
    animation: fadeIn 0.36s ease-in;
}

.page-section h2 {
    text-transform: uppercase;
    color: var(--ink-900);
    position: relative;
    display: inline-block;
    padding-right: 0.35rem;
}

.page-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.28rem;
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--accent-color) 0%, #fb7185 100%);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtlePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.18);
    }
    100% {
        box-shadow: 0 0 0 12px rgba(249, 115, 22, 0);
    }
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

@keyframes badgeGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.65;
        transform: scale(1.12);
    }
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .card-title {
        font-size: 1.65rem;
    }

    .page-section h2 {
        font-size: 1.6rem;
    }

    .table {
        font-size: 0.9rem;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    #alert-container {
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
    }
}

/* Status Badges */
.badge {
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}

.badge::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    opacity: 0;
    z-index: -1;
}

.bg-info {
    background-color: #0284c7 !important;
    color: #fff;
}

.bg-info::before {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.6) 0%, rgba(34, 211, 238, 0) 70%);
    opacity: 0.25;
    animation: badgePulse 2.8s ease-in-out infinite;
}

.bg-success {
    background-color: var(--success) !important;
}

.bg-success::before {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.6) 0%, rgba(34, 197, 94, 0) 70%);
}

.bg-warning {
    background-color: var(--warning) !important;
    color: #fff !important;
}

.bg-warning::before {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.6) 0%, rgba(245, 158, 11, 0) 70%);
    opacity: 0.22;
    animation: badgePulse 2.8s ease-in-out infinite;
}

.bg-danger {
    background-color: var(--danger) !important;
}

.bg-danger::before {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.6) 0%, rgba(239, 68, 68, 0) 70%);
    opacity: 0.24;
    animation: badgePulse 2.8s ease-in-out infinite;
}

.bg-secondary {
    background-color: #41566d !important;
}

.bg-secondary::before {
    background: radial-gradient(circle, rgba(65, 86, 109, 0.6) 0%, rgba(65, 86, 109, 0) 70%);
}

/* Loading States */
.spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Progress Bar */
.progress {
    height: 1.5rem;
    border-radius: 999px;
    background-color: #20344b;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(120deg, var(--accent-color) 0%, #ef4444 100%);
    animation: subtlePulse 1.8s infinite;
}
