:root {
    --brand: #111827;
    --brand-2: #1f2937;
    --accent: #967F65;
    --accent-2: #b99f7d;

    --bg: #f5f7fb;
    --surface: #ffffff;
    --text: #111827;
    --muted: #667085;
    --border: #e5e7eb;

    --radius: 18px;
    --shadow: 0 12px 34px rgba(15, 23, 42, .08);
}

/* Reset */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(150, 127, 101, .22), transparent 35%),
        linear-gradient(135deg, #111827, #273449);
}

.login-card {
    width: 100%;
    max-width: 430px;
    padding: 34px;
    border-radius: 26px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .25);
}

/* Brand */
.brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 22px;
    font-weight: 800;
}

.brand-title {
    margin: 16px 0 2px;
    font-size: 28px;
    font-weight: 800;
}

.brand-sub {
    margin: 0 0 24px;
    color: var(--muted);
}

/* Form */
.form-label {
    display: block;
    margin: 12px 0 7px;
    font-weight: 700;
}

.form-control,
.form-select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    font-size: 15px;
}

/* Button */
.btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
}

.btn-dark {
    background: var(--brand);
    color: #fff;
}

.btn-light {
    background: #f3f4f6;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-sm {
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 13px;
}

/* Alert */
.alert {
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 14px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

/* Layout */
.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 292px;
    padding: 22px;
    background: var(--brand);
    color: #fff;
}

.main {
    width: calc(100% - 292px);
    margin-left: 292px;
    padding: 28px;
}

/* Sidebar */
.side-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.side-brand .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.side-brand b {
    display: block;
    font-size: 20px;
}

.side-brand span {
    color: #cbd5e1;
    font-size: 12px;
}

.nav a {
    display: flex;
    margin: 5px 0;
    padding: 13px 14px;
    border-radius: 14px;
    color: #d1d5db;
    font-weight: 700;
}

.nav a.active,
.nav a:hover {
    background: rgba(150, 127, 101, .22);
    color: #fff;
}

/* Topbar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title h1 {
    margin: 0;
    font-size: 28px;
}

.page-title p {
    margin: 5px 0 0;
    color: var(--muted);
}

/* Card */
.card {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

/* Stats */
.stat h3 {
    margin: 0;
    font-size: 30px;
}

.stat p {
    margin: 5px 0 0;
    color: var(--muted);
    font-weight: 700;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 13px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.table th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
}

/* Badge */
.badge {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

.badge-red {
    background: #fee2e2;
    color: #991b1b;
}

/* Actions */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Player */
.player-body {
    margin: 0;
    background: #000;
    color: #fff;
    overflow: hidden;
}

.player-wrap {
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-info {
    position: fixed;
    left: 24px;
    bottom: 22px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 14px;
}

.empty-player {
    text-align: center;
    color: #9ca3af;
    font-size: 28px;
}

/* Responsive */
@media (max-width: 900px) {
    .app {
        display: block;
    }

    .sidebar {
        position: relative;
        inset: auto;
        width: 100%;
    }

    .main {
        width: 100%;
        margin-left: 0;
        padding: 18px;
    }

    .grid,
    .row {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .table {
        font-size: 13px;
    }
}

/* Admin Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    background:
        radial-gradient(circle at 20% 20%, rgba(183, 154, 117, .22), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, .16), transparent 28%),
        linear-gradient(135deg, #0b1220 0%, #17243a 55%, #24344f 100%);
    overflow: hidden;
}

.login-page::before,
.login-page::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    filter: blur(18px);
    opacity: .28;
    pointer-events: none;
}

.login-page::before {
    background: var(--accent);
    top: -160px;
    left: -120px;
}

.login-page::after {
    background: #60a5fa;
    right: -160px;
    bottom: -180px;
}

.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: stretch;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 28px;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(20px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.login-hero {
    padding: 46px;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, .82), rgba(15, 23, 42, .35)),
        radial-gradient(circle at 30% 20%, rgba(183, 154, 117, .35), transparent 30%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 560px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-name {
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.hero-title {
    margin: 50px 0 16px;
    font-size: clamp(22px, 2.5vw, 36px);
    line-height: 1.1;
    letter-spacing: -1px;
    font-weight: 800;
}

.hero-text {
    margin: 0;
    max-width: 420px;
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 15px;
}

.hero-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #e2e8f0;
    font-size: 13px;
}

.login-card {
    padding: 46px;
    background: rgba(255, 255, 255, .92);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card h1 {
    margin: 0;
    font-size: 32px;
    letter-spacing: -1px;
    font-weight: 900;
    color: #0f172a;
}

.login-card p {
    margin: 10px 0 30px;
    color: #64748b;
    line-height: 1.5;
    font-size: 14px;
}

.form-group {
    margin-bottom: 18px;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
}

.login-card .form-control {
    height: 52px;
    padding: 0 16px 0 44px;
    border-radius: 16px;
}

.login-card .form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(183, 154, 117, .18);
}

.btn-login {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(150, 127, 101, .30);
    transition: .2s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 38px rgba(150, 127, 101, .42);
}

.login-note {
    margin-top: 20px;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}

@media (max-width: 860px) {
    .login-page {
        overflow: auto;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-hero {
        min-height: auto;
        padding: 30px;
    }

    .hero-title {
        margin: 38px 0 14px;
        font-size: 30px;
    }

    .hero-footer {
        margin-top: 34px;
    }

    .login-card {
        padding: 30px;
    }
}

.login-shell {
    align-items: stretch !important;
}

.login-card {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    border-radius: 0 28px 28px 0 !important;
}

.login-hero {
    border-radius: 28px 0 0 28px;
}

.login-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 20px;
    text-align: center;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    z-index: 5;
}

.company-logo{
    max-height:60px;
    width:auto;
    display:block;
}

/* Player Login Compact Card */
body.login-page > .login-card {
    width: 100% !important;
    max-width: 380px !important;
    height: auto !important;
    min-height: auto !important;
    padding: 36px 34px !important;
    border-radius: 24px !important;
    justify-content: flex-start !important;
}

body.login-page > .login-card .brand-title {
    font-size: 28px;
}

body.login-page > .login-card .brand-sub {
    margin-bottom: 22px;
}

body.login-page > .login-card .form-control {
    height: 48px;
    padding: 12px 14px !important;
}

body.login-page > .login-card .btn {
    height: 46px;
}

@media (max-width: 480px) {
    body.login-page > .login-card {
        max-width: 100% !important;
        padding: 32px 26px !important;
    }
}