/* =========================================================
   ADMIN PANEL STYLES
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Anton&display=swap');

:root {
    --a-bg: #0f1115;
    --a-bg-2: #181b22;
    --a-surface: #1f232c;
    --a-border: #2c313c;
    --a-text: #e8eaee;
    --a-muted: #8a92a3;
    --a-red: #B0152A;
    --a-red-bright: #E11D2E;
    --a-green: #15a045;
    --a-amber: #f5a623;
    --a-blue: #3b82f6;
    --rainbow: linear-gradient(90deg, #8B0F22, #B0152A, #E63946, #FF6B47);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Manrope', system-ui, sans-serif;
    background: var(--a-bg);
    color: var(--a-text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--a-red-bright); text-decoration: none; }

/* ---------- LOGIN SCREEN ---------- */
.login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 30% 20%, rgba(176,21,42,0.15), transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(225,29,46,0.1), transparent 50%),
        var(--a-bg);
}
.login__card {
    width: 100%;
    max-width: 420px;
    background: var(--a-surface);
    border: 1px solid var(--a-border);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}
.login__card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--rainbow);
}
.login__logo {
    width: 80px; height: 80px;
    margin: 0 auto 1rem;
    object-fit: contain;
}
.login__title {
    font-family: 'Anton', sans-serif;
    font-size: 1.6rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}
.login__subtitle {
    text-align: center;
    color: var(--a-muted);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}
.login__error {
    background: rgba(225,29,46,0.1);
    border: 1px solid rgba(225,29,46,0.4);
    color: #ff8a8a;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none;
}
.login__error.is-visible { display: block; }

/* ---------- ADMIN LAYOUT ---------- */
.admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}
@media (min-width: 1024px) {
    .admin-layout { grid-template-columns: 260px 1fr; }
}

.sidebar {
    background: var(--a-bg-2);
    border-right: 1px solid var(--a-border);
    padding: 1.5rem;
    position: relative;
}
.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--a-border);
}
.sidebar__logo {
    width: 40px; height: 40px;
    object-fit: contain;
}
.sidebar__brand-text {
    font-family: 'Anton', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1.1rem;
    line-height: 1;
}
.sidebar__brand-sub {
    font-size: 0.75rem;
    color: var(--a-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.sidebar__nav { display: flex; flex-direction: column; gap: 0.15rem; }
.sidebar__item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.9rem;
    border-radius: 4px;
    color: var(--a-text);
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
}
.sidebar__item:hover { background: rgba(255,255,255,0.04); }
.sidebar__item.is-active {
    background: var(--a-red);
    color: white;
}
.sidebar__item-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar__footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--a-border);
}

/* Main content area */
.main {
    padding: 1.5rem;
    overflow-x: hidden;
}
@media (min-width: 768px) {
    .main { padding: 2rem 2.5rem; }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--a-border);
}
.page-title {
    font-family: 'Anton', sans-serif;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.page-sub { color: var(--a-muted); font-size: 0.9rem; }

/* ---------- FORM ELEMENTS ---------- */
.field { margin-bottom: 1.1rem; }
.field__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--a-text);
}
.field__hint {
    font-size: 0.78rem;
    color: var(--a-muted);
    margin-top: 0.3rem;
}
.input, .textarea, .select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: var(--a-bg);
    border: 1px solid var(--a-border);
    border-radius: 4px;
    color: var(--a-text);
    font-size: 0.95rem;
    transition: border 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--a-red-bright);
    box-shadow: 0 0 0 3px rgba(225,29,46,0.15);
}
.textarea { resize: vertical; min-height: 100px; font-family: inherit; }
.select { cursor: pointer; }

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.2rem;
    background: var(--a-red);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}
.btn:hover { background: var(--a-red-bright); }
.btn--secondary { background: var(--a-border); }
.btn--secondary:hover { background: #3a4150; }
.btn--ghost {
    background: transparent;
    border: 1px solid var(--a-border);
}
.btn--ghost:hover { background: rgba(255,255,255,0.04); }
.btn--danger { background: #b3261e; }
.btn--danger:hover { background: #d32f2f; }
.btn--success { background: var(--a-green); }
.btn--success:hover { background: #18b54f; }
.btn--block { width: 100%; }
.btn--sm { padding: 0.4rem 0.8rem; font-size: 0.82rem; }

/* ---------- CARDS ---------- */
.card {
    background: var(--a-surface);
    border: 1px solid var(--a-border);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.card__title {
    font-family: 'Anton', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--a-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- ITEM LIST (news, players, sponsors) ---------- */
.item-list { display: flex; flex-direction: column; gap: 0.75rem; }
.item-row {
    background: var(--a-bg);
    border: 1px solid var(--a-border);
    border-radius: 4px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.item-row__thumb {
    width: 48px; height: 48px;
    object-fit: cover;
    background: var(--a-border);
    border-radius: 4px;
    flex-shrink: 0;
}
.item-row__body { flex: 1; min-width: 0; }
.item-row__title { font-weight: 600; font-size: 0.95rem; }
.item-row__sub { color: var(--a-muted); font-size: 0.82rem; }
.item-row__actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* ---------- TOAST / NOTIFICATIONS ---------- */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--a-green);
    color: white;
    padding: 0.9rem 1.25rem;
    border-radius: 4px;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.25s;
    z-index: 1000;
    max-width: 90%;
}
.toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}
.toast--error { background: #b3261e; }

/* ---------- MODAL ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-backdrop.is-visible { display: flex; }
.modal {
    background: var(--a-surface);
    border: 1px solid var(--a-border);
    border-radius: 8px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    position: relative;
}
.modal__title {
    font-family: 'Anton', sans-serif;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--a-border);
}
.modal__actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--a-border);
}

/* ---------- LOGO VARIANT GRID ---------- */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.9rem;
}
.logo-tile {
    background: var(--a-bg);
    border: 2px solid var(--a-border);
    border-radius: 6px;
    padding: 0.9rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.logo-tile.is-active {
    border-color: var(--a-red-bright);
    box-shadow: 0 0 0 3px rgba(225,29,46,0.2);
}
.logo-tile:hover { border-color: rgba(255,255,255,0.15); }
.logo-tile__img {
    width: 80px; height: 80px;
    object-fit: contain;
    margin: 0 auto 0.5rem;
}
.logo-tile__name {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    word-break: break-word;
}
.logo-tile__badge {
    position: absolute;
    top: -8px; right: -8px;
    background: var(--a-green);
    color: white;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}
.logo-tile__delete {
    position: absolute;
    top: 4px; left: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}
.logo-tile:hover .logo-tile__delete { opacity: 1; }

.upload-zone {
    border: 2px dashed var(--a-border);
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--a-bg);
}
.upload-zone:hover { border-color: var(--a-red-bright); background: rgba(225,29,46,0.04); }
.upload-zone.is-dragover { border-color: var(--a-red-bright); background: rgba(225,29,46,0.08); }
.upload-zone input[type="file"] { display: none; }
.upload-zone__icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.upload-zone__text { font-weight: 600; }
.upload-zone__hint { color: var(--a-muted); font-size: 0.8rem; margin-top: 0.25rem; }

/* ---------- TAB PANELS ---------- */
.panel { display: none; }
.panel.is-active { display: block; animation: fadeIn 0.25s; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- INFO BANNER ---------- */
.banner {
    background: rgba(245, 166, 35, 0.08);
    border: 1px solid rgba(245, 166, 35, 0.35);
    color: #ffd187;
    padding: 0.85rem 1.1rem;
    border-radius: 4px;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.banner__icon { flex-shrink: 0; font-size: 1.1rem; }
.banner--info { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.35); color: #93c5fd; }
.banner a { color: inherit; text-decoration: underline; }

/* ---------- IMAGE PREVIEW ---------- */
.img-preview {
    margin-top: 0.5rem;
    max-width: 200px;
    max-height: 150px;
    border: 1px solid var(--a-border);
    border-radius: 4px;
    background: var(--a-bg);
}
