/* ========================================
   IMPERSONATION BANNER
======================================== */
.impersonation-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background-color: #e65100;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.impersonation-back {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 8px;
    white-space: nowrap;
}

.impersonation-back:hover {
    opacity: 0.85;
}

/* ========================================
   AUTH LAYOUT (Login / Register)
======================================== */
.auth-root {
    display: flex;
    min-height: 100vh;
    background-color: #f4f5f7;
}

/* Left brand panel */
.auth-brand-panel {
    width: 420px;
    flex-shrink: 0;
    background-color: #1b3325;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.auth-brand-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 40px 36px;
}

.auth-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: auto;
}

.auth-logo-icon {
    width: 44px;
    height: 44px;
    background-color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.auth-club-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    display: block;
    line-height: 1.3;
}

.auth-club-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    display: block;
}

.auth-brand-body {
    margin: auto 0 48px;
}

.auth-brand-title {
    color: rgba(255, 255, 255, 0.92);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 16px;
}

.auth-brand-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

.auth-brand-footer {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    margin-top: auto;
}

/* Right form panel */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

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

.auth-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.auth-card-header {
    margin-bottom: 28px;
}

.auth-card-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.auth-card-subtitle {
    font-size: 14px;
    color: #9e9e9e;
    margin: 0;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.auth-passkey-btn {
    width: 100%;
    margin-top: 10px !important;
    color: #2e7d32 !important;
    justify-content: center;
}

.auth-card-links {
    margin-top: 20px;
    text-align: center;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
    .auth-brand-panel {
        display: none;
    }
}

/* ========================================
   SIDEBAR / DRAWER
======================================== */
.mud-drawer {
    background-color: #1b3325 !important;
}

.mud-drawer .mud-nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    border-radius: 8px;
    margin: 1px 8px;
    padding: 8px 12px;
}

.mud-drawer .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.mud-drawer .mud-nav-link.active,
.mud-drawer .mud-nav-link-active {
    background-color: #2d7042 !important;
    color: #ffffff !important;
    font-weight: 600;
}

.mud-drawer .mud-nav-link .mud-icon-root {
    color: rgba(255, 255, 255, 0.65) !important;
}

.mud-drawer .mud-nav-link.active .mud-icon-root,
.mud-drawer .mud-nav-link-active .mud-icon-root {
    color: #ffffff !important;
}

/* Nav group headers */
.mud-drawer .mud-navgroup > .mud-navgroup-header {
    color: rgba(255, 255, 255, 0.87) !important;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 16px;
    margin-top: 4px;
}

.mud-drawer .mud-navgroup > .mud-navgroup-header .mud-icon-root {
    color: rgba(255, 255, 255, 0.65) !important;
}

.mud-drawer .mud-navgroup > .mud-navgroup-header:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Sub-items indent */
.mud-drawer .mud-navgroup .mud-navgroup-collapse .mud-nav-link {
    padding-left: 28px;
    font-size: 13.5px;
}

/* ========================================
   SIDEBAR LOGO
======================================== */
.sidebar-logo {
    display: flex;
    align-items: center;
    padding: 14px 16px 14px;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.logo-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    display: block;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.logo-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    display: block;
    line-height: 1.4;
}

/* Logout link at bottom of sidebar */
.sidebar-logout {
    margin-top: auto;
    padding: 12px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logout .mud-nav-link {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* ========================================
   APP BAR
======================================== */
.mud-appbar {
    background-color: #ffffff !important;
    color: #424242 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.mud-appbar .mud-icon-button {
    color: #616161 !important;
}

.appbar-search-wrapper {
    display: flex;
    align-items: center;
    background: #f6f7f8;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 6px 14px;
    gap: 8px;
    max-width: 400px;
    flex: 1;
    margin: 0 16px;
}

.appbar-search-icon {
    color: #9e9e9e;
    font-size: 18px;
    flex-shrink: 0;
}

.appbar-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #424242;
    width: 100%;
    font-family: inherit;
}

.appbar-search-input::placeholder {
    color: #b0b0b0;
}

.user-info-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.user-info-header:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.user-name {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 13px;
    display: block;
    line-height: 1.3;
}

.user-role {
    color: #9e9e9e;
    font-size: 11px;
    display: block;
    line-height: 1.3;
}

/* ========================================
   MAIN CONTENT AREA
======================================== */
.mud-main-content {
    background-color: #f4f5f7 !important;
}

/* ========================================
   KPI / STAT CARDS
======================================== */
.kpi-card {
    border-radius: 12px !important;
    background-color: #ffffff !important;
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon-green { background-color: #e8f5e9; }
.kpi-icon-teal  { background-color: #e0f2f1; }
.kpi-icon-blue  { background-color: #e3f2fd; }
.kpi-icon-orange { background-color: #fff8e1; }

/* ========================================
   ALERT ITEMS
======================================== */
.alert-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    background-color: #fafafa;
}

/* ========================================
   BIRTHDAY ITEMS
======================================== */
.birthday-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.birthday-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ========================================
   MENSALIDADES — TABELA AGRUPADA (ACORDEON)
======================================== */
.mensalidades-scroll {
    overflow-x: auto;
}

.mensalidades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.mensalidades-table thead th {
    text-align: left;
    font-weight: 600;
    color: #616161;
    font-size: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #eeeeee;
    background: #ffffff;
    white-space: nowrap;
}

.mensalidades-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #424242;
    vertical-align: middle;
}

.mensalidades-table tbody tr:last-child td {
    border-bottom: none;
}

/* Linha-resumo do grupo (clicável) */
.mensalidades-table .grupo-row {
    cursor: pointer;
    background: #fafafa;
}

.mensalidades-table .grupo-row:hover {
    background: #f1f4f2;
}

/* Linhas de detalhe (acordeon aberto) */
.mensalidades-table .detalhe-row td {
    background: #ffffff;
    border-bottom: 1px solid #f5f5f5;
}

.mensalidades-table .detalhe-row .detalhe-servico {
    position: relative;
    padding-left: 24px;
    color: #1a1a1a;
}

.mensalidades-table .detalhe-row .detalhe-servico::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 8px;
    height: 1px;
    background: #cfcfcf;
}

/* Chevron do acordeon */
.mensalidades-chevron {
    transition: transform 0.18s ease;
    color: #616161 !important;
}

.mensalidades-chevron.aberto {
    transform: rotate(90deg);
}

/* ========================================
   BLAZOR ERROR UI
======================================== */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
