/* Reset básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===================== LOGIN ===================== */

.auth-body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top, #025f2a 0, #02120b 40%, #000 100%);
    color: #f6f6f6;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 16px;
}

.auth-card {
    background: rgba(7, 12, 10, 0.96);
    border-radius: 18px;
    padding: 32px 26px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.auth-logo img {
    max-width: 110px;
    height: auto;
    object-fit: contain;
    background: transparent; /* sem fundo extra */
    padding: 0;              /* sem “margem” branca à volta */
    border-radius: 0;        /* sem círculo forçado */
    border: none;            /* sem borda vermelha */
    display: block;
}

.auth-title {
    text-align: center;
    font-size: 1.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
    color: #f6f6f6;
}

.auth-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: #c3e9cb;
    margin-bottom: 24px;
}

.auth-alert {
    background: rgba(209, 32, 40, 0.12);
    border: 1px solid rgba(209, 32, 40, 0.7);
    color: #ffe5e5;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: #dbe7de;
}

.auth-field input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid #1e3b29;
    background: #050806;
    color: #f6f6f6;
    padding: 10px 14px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-field input::placeholder {
    color: #5b7763;
}

.auth-field input:focus {
    border-color: #1daa4b;
    box-shadow: 0 0 0 1px rgba(29, 170, 75, 0.4);
    background: #050b07;
}

.auth-btn {
    margin-top: 8px;
    width: 100%;
    border-radius: 999px;
    border: none;
    padding: 11px 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #1daa4b, #d12028);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
    box-shadow: 0 10px 22px rgba(0,0,0,0.6);
    transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, filter 0.08s;
}

.auth-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(0,0,0,0.7);
}

.auth-btn:active {
    transform: translateY(1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

.auth-footer-text {
    margin-top: 16px;
    font-size: 0.8rem;
    color: #8fa994;
    text-align: center;
}

.auth-footer {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #6f8574;
    text-align: center;
}

.auth-footer a {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 18px;
    }
    .auth-title {
        font-size: 1.5rem;
    }
}

/* ===================== DASHBOARD ===================== */

.app-body {
    min-height: 100vh;
    background: radial-gradient(circle at top, #025f2a 0, #02120b 40%, #000 100%);
    color: #f6f6f6;
    display: flex;
    flex-direction: column;
}

/* HEADER GLOBAL DO SITE (LOGO + NOME DO CLUBE) */
.site-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: rgba(1, 10, 6, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.7);
    /* header normal, rola com a página */
    position: relative;
}

.site-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo-wrap {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* sem círculo, sem fundo, sem borda */
    border-radius: 0;
    background: transparent;
    border: none;
    overflow: visible;
}

.site-logo {
    max-width: 60px;
    max-height: 60px;
    height: auto;
    object-fit: contain;
}

.site-title {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.site-club-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.site-subtitle {
    font-size: 0.78rem;
    color: #9bb6a1;
}

.site-header-right {
    font-size: 0.8rem;
}

.site-env-badge {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #1daa4b;
    font-weight: 500;
}

/* Ajustar layout abaixo do header */
.app-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.app-sidebar {
    width: 250px;
    background: rgba(5, 9, 8, 0.98);
    border-right: 1px solid rgba(0, 0, 0, 0.7);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 20;
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    padding: 6px 8px;
    border-radius: 12px;
    background: rgba(2, 22, 10, 0.9);
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1daa4b, #d12028);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 10px;
}

.sidebar-avatar span {
    color: #fff;
}

.sidebar-user-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.sidebar-user-status {
    font-size: 0.78rem;
    color: #9bb6a1;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #1daa4b;
    margin-right: 5px;
}

.sidebar-menu {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
}

.menu-section-title {
    margin-top: 10px;
    margin-bottom: 4px;
    padding: 4px 8px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #7e9683;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    color: #dde7de;
    text-decoration: none;
    gap: 8px;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.menu-item .menu-icon {
    width: 22px;
    text-align: center;
}

.menu-item:hover {
    background: rgba(18, 56, 32, 0.9);
    border-color: rgba(29, 170, 75, 0.4);
}

.menu-item.active {
    background: linear-gradient(135deg, #1daa4b, #d12028);
    border-color: transparent;
    color: #fff;
}

/* MAIN */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: rgba(1, 10, 6, 0.96);
    border-bottom: 1px solid rgba(0, 0, 0, 0.7);
}

.topbar-title {
    font-weight: 600;
    font-size: 1rem;
}

.topbar-menu-btn {
    display: none;
    border: none;
    background: transparent;
    color: #f6f6f6;
    font-size: 1.3rem;
    cursor: pointer;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.topbar-club {
    font-size: 0.78rem;
    color: #98b1a0;
}

.app-content {
    padding: 18px 20px 26px;
}

.page-title {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 0.9rem;
    color: #a7c2ae;
    margin-bottom: 16px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.kpi-card {
    background: rgba(5, 12, 9, 0.96);
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(17, 51, 30, 0.9);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.65);
}

.kpi-card--highlight {
    border-color: rgba(209, 32, 40, 0.8);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.8);
}

.kpi-label {
    font-size: 0.85rem;
    color: #a8c3af;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.kpi-footer {
    font-size: 0.8rem;
    color: #7f9784;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: 2fr 1.3fr;
    gap: 14px;
}

.panel {
    background: rgba(5, 12, 9, 0.96);
    border-radius: 14px;
    border: 1px solid rgba(15, 47, 28, 0.9);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.75);
    overflow: hidden;
}

.panel-header {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.8);
    background: radial-gradient(circle at top left, rgba(29,170,75,0.16), rgba(1,7,3,0.95));
}

.panel-title {
    font-size: 0.95rem;
}

.panel-body {
    padding: 14px;
}

.chart-placeholder {
    border-radius: 10px;
    border: 1px dashed rgba(116, 148, 125, 0.7);
    padding: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #96b29e;
}

.events-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.86rem;
}

.events-list li {
    display: flex;
    flex-direction: column;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(5, 19, 11, 0.96);
}

.event-date {
    font-size: 0.78rem;
    color: #8db19a;
}

.event-name {
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .dashboard-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .app-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        transition: left 0.2s ease-out;
    }

    .app-sidebar.open {
        left: 0;
    }

    .app-main {
        margin-left: 0;
    }

    .topbar-menu-btn {
        display: inline-flex;
    }

    .app-content {
        padding: 14px 12px 20px;
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table thead {
    background: rgba(4, 18, 11, 0.96);
}

.table th,
.table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(14, 40, 24, 0.8);
    text-align: left;
}

.table tr:nth-child(even) {
    background: rgba(5, 16, 10, 0.9);
}

.link-acao {
    font-size: 0.8rem;
    text-decoration: underline;
}

.link-danger {
    color: #ff8080;
}

/* Form utilizadores */

.user-form {
    max-width: 760px;
    background: rgba(5, 12, 9, 0.96);
    border-radius: 14px;
    padding: 16px 16px 18px;
    border: 1px solid rgba(17, 51, 30, 0.9);
    box-shadow: 0 10px 20px rgba(0,0,0,0.65);
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.form-group label {
    font-size: 0.85rem;
    color: #dbe7de;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    border-radius: 999px;
    border: 1px solid #1e3b29;
    background: #050806;
    color: #f6f6f6;
    padding: 8px 12px;
    font-size: 0.9rem;
    outline: none;
}

.modules-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.module-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(5, 19, 11, 0.96);
    border: 1px solid rgba(19, 62, 33, 0.9);
    font-size: 0.8rem;
}

.module-chip input {
    accent-color: #1daa4b;
}

.form-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-secondary {
    border-radius: 999px;
    padding: 8px 16px;
    border: 1px solid #41594a;
    background: transparent;
    color: #d3e2d7;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(8, 30, 17, 0.95);
}

@media (max-width: 640px) {
    .form-row {
        flex-direction: column;
    }
}

.movement-form {
    max-width: 900px;
    background: rgba(5, 12, 9, 0.96);
    border-radius: 14px;
    padding: 16px 16px 18px;
    border: 1px solid rgba(17, 51, 30, 0.9);
    box-shadow: 0 10px 20px rgba(0,0,0,0.65);
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filters-row .form-group {
    min-width: 140px;
}

.movement-form .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.movement-form .form-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.movement-form select {
    border-radius: 999px;
    border: 1px solid #1e3b29;
    background: #050806;
    color: #f6f6f6;
    padding: 8px 12px;
    font-size: 0.9rem;
    outline: none;
}

.movement-form textarea {
    border-radius: 10px;
    border: 1px solid #1e3b29;
    background: #050806;
    color: #f6f6f6;
    padding: 8px 12px;
    font-size: 0.9rem;
    resize: vertical;
}

.radio-row {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
}

.radio-row input {
    margin-right: 4px;
}

/* ==== SIDEBAR MODERNO (ACC) ===================================== */

.app-sidebar {
    background: #020a07;
    width: 240px;
    min-height: 100vh;
    color: #e5e7eb;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.6);
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-section {
    padding: 6px 14px 10px;
}

.sidebar-section + .sidebar-section {
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    margin-top: 4px;
    padding-top: 10px;
}

.sidebar-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
}

.sidebar-link {
    display: block;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #e5e7eb;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

.sidebar-link:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #f9fafb;
    transform: translateX(1px);
}

.sidebar-link.active {
    background: linear-gradient(90deg, #16a34a, #f97316);
    color: #ffffff;
    font-weight: 600;
}

.sidebar-link-danger {
    color: #fecaca;
}

.sidebar-link-danger:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #fee2e2;
}

