@import url('theme.css');
/* =========================================
   CWL ADMIN PANEL STYLES
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;700&family=Karla:wght@400;700&display=swap');

:root {
    --admin-bg: var(--theme-bg-main);
    --admin-surface: var(--theme-bg-surface);
    --admin-card: var(--theme-bg-card);
    --admin-border: var(--theme-border);
    --admin-border-hover: var(--theme-border);
    --fg-white: var(--theme-text-main);
    --fg-muted: var(--theme-text-muted);
    --fg-dim: var(--theme-border);
    --lime-main: var(--theme-accent-yellow);
    --lime-dark: var(--theme-accent-yellow-dark);
    --blue-main: var(--theme-accent-blue);
    --red-main: var(--theme-accent-red);
    --orange-main: var(--theme-accent-yellow-dark);
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Karla', sans-serif;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background-color: var(--theme-bg-main) !important;
    background: var(--theme-bg-main) !important;
}

body {
    background: var(--theme-bg-main) !important;
    color: var(--fg-white);
    font-family: var(--font-body);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================
   SIDEBAR
========================================= */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--admin-surface);
    border-right: 1px solid var(--admin-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.sidebar-logo {
    padding: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo img {
    height: 36px;
    width: auto;
    filter: none;
}

.sidebar-logo h2 {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 2px;
    color: var(--lime-main);
    text-transform: uppercase;
}

/* Lang Switcher Admin */
.lang-switcher {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    margin-left: auto;
    align-items: center;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    font-family: var(--font-heading);
    font-size: 0.85rem;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    width: 130px;
    display: none;
    z-index: 1000;
    margin-top: 10px;
    padding: 5px 0;
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown div {
    padding: 8px 12px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    font-family: var(--font-body);
}

.lang-dropdown div:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--lime-main);
}

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

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    color: var(--fg-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
    user-select: none;
}

.sidebar-nav-item:hover {
    color: var(--fg-white);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-nav-item.active {
    color: var(--lime-main);
    background: rgba(255, 214, 31, 0.05);
    border-left-color: var(--lime-main);
}

.sidebar-nav-item .nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.nav-badge {
    background: var(--red-main);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
    font-family: var(--font-body);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--admin-border);
    font-size: 0.75rem;
    color: var(--fg-dim);
}

.sidebar-footer a {
    color: var(--lime-main);
    text-decoration: none;
}

/* =========================================
   MAIN CONTENT
========================================= */
.admin-main {
    margin-left: 260px;
    flex: 1;
    padding: 2rem 2rem 0 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--admin-border);
}

.admin-header h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* =========================================
   SECTIONS
========================================= */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   CARDS & ITEMS LIST
========================================= */
.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: var(--transition);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.item-card:hover {
    border-color: var(--admin-border-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.item-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--fg-white);
}

.item-card-subtitle {
    font-size: 0.8rem;
    color: var(--fg-muted);
    margin-top: 0.25rem;
}

.item-card-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.item-card-body {
    font-size: 0.9rem;
    color: var(--fg-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.item-card-footer {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* =========================================
   BUTTONS
========================================= */
.btn-admin {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-primary {
    background: var(--lime-main);
    color: var(--theme-bg-surface);
}

.btn-primary:hover {
    background: var(--lime-dark);
}

.btn-danger {
    background: var(--red-main);
    color: #FFFFFF;
}

.btn-danger:hover {
    opacity: 0.8;
}

.btn-warning {
    background: var(--lime-dark);
    color: var(--theme-bg-surface);
}

.btn-warning:hover {
    opacity: 0.8;
}

.btn-ghost {
    background: transparent;
    color: var(--fg-muted);
    border: 1px solid var(--admin-border);
}

.btn-ghost:hover {
    border-color: var(--fg-muted);
    color: var(--fg-white);
}

.btn-small {
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
}

.btn-add {
    background: var(--lime-main);
    color: var(--theme-bg-surface);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(255, 214, 31, 0.3);
}

.btn-add:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(255, 214, 31, 0.5);
}

/* =========================================
   BADGES & STATUS
========================================= */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge-article {
    background: var(--blue-main);
    color: #FFFFFF;
}

.badge-video {
    background: var(--theme-accent-blue);
    color: #FFFFFF;
}

.badge-match {
    background: var(--lime-dark);
    color: var(--theme-bg-surface);
}

.badge-hidden {
    background: var(--theme-bg-surface);
    color: var(--theme-text-muted);
}

.badge-visible {
    background: rgba(255, 214, 31, 0.15);
    color: var(--lime-main);
}

.badge-registration {
    background: rgba(100, 200, 255, 0.15);
    color: var(--theme-accent-blue);
}

.badge-ongoing {
    background: rgba(58, 181, 162, 0.15);
    color: var(--lime-dark);
}

.badge-completed {
    background: rgba(255, 214, 31, 0.15);
    color: var(--lime-main);
}

/* =========================================
   MODAL
========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 500;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5vh;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    position: relative;
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
    color: var(--lime-main);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--fg-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--fg-white);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--admin-border);
}

/* =========================================
   FORMS
========================================= */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    color: var(--fg-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--lime-main);
    box-shadow: 0 0 0 2px rgba(255, 214, 31, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: auto;
    cursor: pointer;
}

.form-radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--admin-bg);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-radio:hover {
    border-color: var(--admin-border-hover);
}

.form-radio.selected {
    border-color: var(--lime-main);
    background: rgba(255, 214, 31, 0.05);
    color: var(--lime-main);
}

.form-radio input[type="radio"] {
    display: none;
}

/* =========================================
   TABLE VIEW (Player Profiles)
========================================= */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--fg-muted);
    padding: 0.75rem 1rem;
    text-align: left;
    background: var(--admin-card);
    border-bottom: 1px solid var(--admin-border);
}

.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--fg-white);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.data-table .clickable {
    cursor: pointer;
}

.data-table .clickable:hover td {
    color: var(--lime-main);
}

/* =========================================
   STATUS TOGGLE BUTTONS
========================================= */
.status-toggle {
    display: flex;
    gap: 0.5rem;
}

.status-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--admin-border);
    background: transparent;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    color: var(--fg-muted);
}

.status-btn.active-registration {
    background: rgba(100, 200, 255, 0.15);
    color: var(--theme-accent-blue);
    border-color: var(--theme-accent-blue);
}

.status-btn.active-ongoing {
    background: rgba(58, 181, 162, 0.15);
    color: var(--lime-dark);
    border-color: var(--lime-dark);
}

.status-btn.active-completed {
    background: rgba(255, 214, 31, 0.15);
    color: var(--lime-main);
    border-color: var(--lime-main);
}

/* =========================================
   SEARCH BAR
========================================= */
.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.6rem 1rem;
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    color: var(--fg-white);
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--lime-main);
}

/* =========================================
   EMPTY STATE
========================================= */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--fg-dim);
    min-height: 250px;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* =========================================
   TOAST NOTIFICATIONS
========================================= */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 1px;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    min-width: 250px;
}

.toast-success {
    background: rgba(255, 214, 31, 0.15);
    color: var(--lime-main);
    border: 1px solid rgba(255, 214, 31, 0.3);
}

.toast-error {
    background: rgba(255, 74, 74, 0.15);
    color: var(--red-main);
    border: 1px solid rgba(255, 74, 74, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* =========================================
   DETAIL PANEL (slide-in for teams etc.)
========================================= */
.detail-panel {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.detail-panel-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    color: var(--lime-main);
}

/* =========================================
   LOGIN WALL
========================================= */
.login-wall {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
    text-align: center;
    gap: 1.5rem;
}

.login-wall img {
    height: 60px;
    filter: none;
}

.login-wall h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: var(--lime-main);
}

.login-form {
    width: 100%;
    max-width: 360px;
}