@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

html, body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #0f172a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

/* Skeleton shimmer — usado pelos componentes Skeleton.razor.
   Gradient horizontal que desliza periodicamente sobre o cinza base. */
.skeleton-shimmer {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* NAV */
.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    margin: 1px 8px;
    color: #64748b;
    font-size: 13px;
    transition: 0.15s ease;
    text-decoration: none;
}

    .nav-item:hover {
        background: #f1f5f9;
        color: #0f172a;
    }

    .nav-item.active {
        background: #eff6ff;
        color: #1d4ed8;
        font-weight: 600;
    }

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
    line-height: 1.2;
}

.badge-ok {
    background: #dcfce7;
    color: #166534;
}

.badge-warn {
    background: #fef3c7;
    color: #92400e;
}

.badge-err {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-gray {
    background: #f1f5f9;
    color: #475569;
}

.badge-purple {
    background: #f3e8ff;
    color: #6b21a8;
}

/* PILLS */
.pill {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    transition: 0.15s ease;
}

    .pill:hover {
        background: #f8fafc;
    }

    .pill.active {
        background: #2563eb;
        color: #fff;
        border-color: #2563eb;
    }

/* MATCH / FIGHT */
.match-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 4px 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.match-fighter {
    padding: 8px 10px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .match-fighter.winner {
        background: #dcfce7;
        font-weight: 600;
        color: #166534;
    }

.match-divider {
    height: 1px;
    background: #f1f5f9;
}

/* IMPORT */
.import-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: #94a3b8;
    background: #fafafa;
    cursor: pointer;
    transition: 0.15s ease;
}

    .import-zone:hover {
        border-color: #2563eb;
        background: #f0f9ff;
    }

/* AREAS */
.area-drop {
    border: 1.5px dashed #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    min-height: 80px;
    background: #fafafa;
}

/* CORNERS */
.corner-red {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    flex: 1;
}

.corner-blue {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #93c5fd;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    flex: 1;
}

/* PODIUM */
.podium-1 {
    background: linear-gradient(135deg, #fef9c3, #fde68a);
    border: 1px solid #fbbf24;
}

.podium-2 {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border: 1px solid #94a3b8;
}

.podium-3 {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    border: 1px solid #fb923c;
}

/* TABLE / LIST HOVER */
.table-row:hover td {
    background: #f8fafc;
}

.checkin-row:hover {
    background: #f8fafc;
}

/* BOTÕES */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: 0.15s ease;
    text-decoration: none;
}

    .btn-primary:hover {
        background: #1d4ed8;
    }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: 0.15s ease;
    text-decoration: none;
}

    .btn-secondary:hover {
        background: #f8fafc;
    }

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #dc2626;
    color: #fff;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: 0.15s ease;
    text-decoration: none;
}

    .btn-danger:hover {
        background: #b91c1c;
    }

/* CARDS */
.page-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.section-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* FORM FIELDS */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: 0.15s ease;
}

    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    }

/* MODAL */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 16px;
}

.modal-panel {
    width: 100%;
    max-width: 42rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    padding: 24px;
    position: relative;
}

/* LAYOUT HELPERS */
.section-title {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 16px;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 16px;
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.sidebar-section-title {
    padding: 12px 16px 4px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: 0.15s ease;
    border: 0;
    background: transparent;
    cursor: pointer;
}

    .icon-button:hover {
        background: #f1f5f9;
    }

/* AREAS PAGE HELPERS */
.areas-container {
    display: flex;
    gap: 16px;
    height: calc(100vh - 220px);
}

.categories-column {
    width: 16rem;
    min-width: 16rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.areas-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 16px;
    overflow-y: auto;
    align-content: start;
}

@media (min-width: 768px) {
    .areas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .areas-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.add-area-card {
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    transition: 0.15s ease;
}

    .add-area-card:hover {
        background: #f8fafc;
    }

/* MASTER USERS PAGE HELPERS */
.list-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    padding: 16px;
}

.user-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    padding: 16px;
    transition: 0.15s ease;
}

    .user-card:hover {
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    }

.user-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}











.match-box {
    width: 200px;
    border-radius: 8px;
    overflow: hidden;
    border: 0.5px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

    .match-box:hover {
        border-color: #2563eb;
        box-shadow: 0 0 0 2px rgba(37,99,235,.15);
    }

.match-fighter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    height: 30px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
}

    .match-fighter.winner {
        background: #dcfce7;
        color: #166534;
        font-weight: 600;
    }

.match-divider {
    height: 1px;
    background: #f1f5f9;
}
/* ============================================================
   Estilos de impressão — usados pelo botão Imprimir em Brackets.
   .no-print esconde elementos da página durante a impressão
   (sidebar, toolbar, botões); o conteúdo principal é mantido.
   ============================================================ */
@media print {
    /* Layout limpo */
    body { background: white !important; }
    .no-print, .nav-item, button, select, input { display: none !important; }
    .sticky { position: static !important; }
    /* Remover overlays/sombras */
    .shadow-sm, .shadow-md, .shadow-lg, .shadow-xl { box-shadow: none !important; }
    /* Forçar bordas visíveis em mono */
    .border, .border-2 { border-color: #94a3b8 !important; }
    /* Evitar quebras feias dentro de match-box */
    .match-box { break-inside: avoid; }
    /* Reduzir paddings agressivos */
    main, [role="main"], .container { padding: 0 !important; margin: 0 !important; }
    /* Garantir que o bracket tree não corta texto */
    .bracket-tree { overflow: visible !important; }
}
