/* ============================================================
   Design System – variáveis e reset global
   ============================================================ */
:root {
    --primary: #594AE8;
    --primary-light: #E5E4FF;
    --dark-navy: #191925;
    --bg-color: #F3F4F8;
    --bg-darker: #EAEBF2;
    --text-gray: #8A8B9D;
    --white: #FFFFFF;
    --green: #34B571;
    --green-light: #E4F8EE;
    --red: #F16063;
    --red-light: #FFE8E8;
    --border-color: #E6E7ED;
    /* Sidebar */
    --topbar-height: 80px;
    --sidebar-width: 64px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: 'Outfit', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--dark-navy);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ============================================================
   Top Bar
   ============================================================ */
.finmy-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    background-color: transparent;
    z-index: 1000;
}

.finmy-top-bar-left {
    display: flex;
    align-items: center;
    gap: 80px;
}

.finmy-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-navy);
    text-decoration: none;
}

.finmy-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--dark-navy);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 16px;
}

/* Nav links in top bar */
.finmy-top-nav {
    display: flex;
    gap: 40px;
}

.finmy-top-nav a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 15px;
    position: relative;
    padding-bottom: 6px;
}

.finmy-top-nav a.active {
    color: var(--dark-navy);
}

.finmy-top-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--dark-navy);
    border-radius: 2px;
}

/* Right side elements */
.finmy-top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.finmy-search-box {
    background: var(--white);
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-gray);
    border: 1px solid var(--border-color);
}

.finmy-search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    width: 180px;
    color: var(--dark-navy);
}

.finmy-search-box input::placeholder {
    color: var(--text-gray);
}

.finmy-theme-switch {
    background: var(--bg-darker);
    border-radius: 30px;
    padding: 4px;
    display: flex;
    align-items: center;
}

.finmy-theme-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-gray);
    transition: 0.3s;
}

.finmy-theme-btn.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(89, 74, 232, 0.2);
}

.finmy-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 20px;
}

.finmy-icon-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark-navy);
}

/* Custom buttons */
.finmy-btn {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.finmy-btn:hover {
    opacity: 0.9;
}

.finmy-btn-export {
    background: var(--primary-light);
    color: var(--primary);
}

.finmy-btn-add {
    background: var(--dark-navy);
    color: var(--white);
}

.finmy-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid #E6E7ED;
    background: var(--white);
    color: var(--dark-navy);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.finmy-user-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.finmy-user-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    border: none;
    background: var(--primary);
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(89, 74, 232, 0.25);
}

.finmy-user-pill:hover {
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: none;
    opacity: 1;
}

/* ============================================================
   Sidebar
   ============================================================ */
.finmy-sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
}

.finmy-sidebar-top {
    height: 100px;
    width: var(--sidebar-width);
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'><path d='M0,0 C0,65 100,35 100,100 L0,100 Z' fill='%23594AE8'/></svg>");
    background-size: 100% 100%;
}

.finmy-sidebar-middle {
    width: var(--sidebar-width);
    background-color: var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 0;
}

.finmy-sidebar-bottom {
    height: 100px;
    width: var(--sidebar-width);
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'><path d='M0,0 L100,0 C100,65 0,35 0,100 Z' fill='%23594AE8'/></svg>");
    background-size: 100% 100%;
}

/* Nav items dentro da sidebar */
.finmy-nav-item {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.finmy-nav-item:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
}

.finmy-nav-item.active {
    background-color: var(--white);
    color: var(--primary);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
}

/* Herda a cor do ícone MudBlazor */
.finmy-nav-item .mud-icon-root {
    color: inherit;
    font-size: inherit;
}

/* ============================================================
   Conteúdo principal
   ============================================================ */
.finmy-content {
    margin-top: var(--topbar-height);
    padding: 30px 40px 40px 100px;
    min-height: calc(100vh - var(--topbar-height));
}

/* ============================================================
   Tabela Limpa Style (Replica visual do print)
   ============================================================ */
.finmy-clean-table.mud-table-root {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Container do MudTable */
.finmy-clean-table .mud-table-container {
    overflow: visible !important;
}

/* Cabeçalho */
.finmy-clean-table .mud-table-head {
    /* display: none; */ 
    /* Recuperando display do cabeçalho caso desejado */
    background-color: transparent !important;
}
.finmy-clean-table .mud-table-head .mud-table-cell {
    color: var(--text-gray) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    border-bottom: 2px solid var(--bg-color) !important;
}

/* Linhas */
.finmy-clean-table .mud-table-row {
    background-color: transparent !important;
}

/* Células */
.finmy-clean-table .mud-table-cell {
    border-bottom: 1px solid var(--bg-color) !important;
    padding: 24px 0 !important;
    font-size: 14px;
    color: var(--dark-navy);
    vertical-align: middle;
}

/* Remove borda da última linha */
.finmy-clean-table .mud-table-row:last-child .mud-table-cell {
    border-bottom: none !important;
}

/* Paginação */
.finmy-clean-table .mud-table-pagination {
    background: transparent !important;
    border: none !important;
    color: var(--text-gray);
    margin-top: 10px;
}
.finmy-clean-table .mud-table-pagination .mud-icon-root {
    color: var(--text-gray);
} 

/* Estilos de Texto dentro das células */
.finmy-cell-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark-navy);
}

.finmy-cell-subtitle {
    font-size: 11px;
    color: var(--text-gray);
    margin: 0;
}

.finmy-cell-label {
    font-size: 11px;
    color: var(--text-gray);
    display: block;
    margin-bottom: 2px;
}

.finmy-cell-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark-navy);
    margin: 0;
}

/* Barra de Progresso Customizada */
.finmy-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 13px;
    color: var(--dark-navy);
    width: 100%;
}
.finmy-progress-track {
    flex-grow: 1;
    height: 4px;
    background: var(--bg-color);
    border-radius: 2px;
    overflow: hidden;
}
.finmy-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

/* ============================================================
   Widgets & Cards
   ============================================================ */
.finmy-widget {
    background: var(--white);
    border-radius: 30px;
    padding: 25px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
}

.finmy-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.finmy-widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-navy);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Task / Row Styles */
.finmy-task-filters {
    display: flex;
    gap: 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
}

.finmy-task-filters span {
    padding: 4px 12px;
    border-radius: 12px;
    transition: 0.2s;
}

.finmy-task-filters span.active {
    background: var(--bg-color);
    color: var(--dark-navy);
}

.finmy-task-row {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--bg-color);
    gap: 20px;
}

.finmy-task-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.finmy-task-title-group {
    flex: 2;
}

.finmy-task-title-group h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark-navy);
}

.finmy-task-title-group p {
    font-size: 11px;
    color: var(--text-gray);
    margin: 0;
}

.finmy-task-duration {
    flex: 1;
}

.finmy-task-duration p {
    font-size: 11px;
    color: var(--text-gray);
    margin-bottom: 2px;
}

.finmy-task-duration h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark-navy);
    margin: 0;
}

.finmy-task-progress {
    flex: 1.5;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 13px;
    color: var(--dark-navy);
}

.finmy-progress-bar-bg {
    flex-grow: 1;
    height: 4px;
    background: var(--bg-color);
    border-radius: 2px;
}

.finmy-progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

.finmy-avatar-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.finmy-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--white);
    margin-left: -8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
}

/* 
 * Ajustes para remover o estilo padrão do MudTable e ficar igual ao design system
 */
.finmy-clean-table .mud-table-container {
    overflow: visible;
}
.finmy-clean-table.mud-table-root {
    background-color: transparent;
    box-shadow: none;
}
.finmy-clean-table .mud-table-cell {
    border-bottom: 1px solid var(--bg-color);
    padding: 20px 0;
}
.finmy-clean-table .mud-table-row:last-child .mud-table-cell {
    border-bottom: none;
}

/* ============================================================
   Auth Layout — estilos base compartilhados entre Login e Cadastro
   Posição e animações ficam nos arquivos .razor.css de cada página
   ============================================================ */
.login-screen {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
}

.login-brand-side {
    flex: 0 0 45%;
    background: linear-gradient(135deg, var(--primary) 0%, #3632b0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

@media (max-width: 960px) {
    .login-brand-side { display: none; }
    .login-form-side  { flex: 1; }
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -1px;
    line-height: 1.1;
}

.brand-tagline {
    font-size: 1.05rem;
    opacity: 0.85;
    font-weight: 300;
    max-width: 340px;
    line-height: 1.65;
}

/* Decorative floating blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    z-index: 1;
    animation: blobFloat 9s ease-in-out infinite;
    pointer-events: none;
}

.blob-1 {
    width: 460px;
    height: 460px;
    top: -130px;
    left: -130px;
    background: rgba(255, 255, 255, 0.07);
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    bottom: -70px;
    right: -70px;
    background: rgba(255, 255, 255, 0.06);
    animation-delay: -4.5s;
}

@keyframes blobFloat {
    0%,  100% { transform: translate(0,    0)    scale(1);    }
    33%        { transform: translate(18px, -14px) scale(1.04); }
    66%        { transform: translate(-12px, 10px) scale(0.97); }
}

.login-form-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: var(--bg-color);
}

.login-card {
    width: 100%;
    max-width: 480px;
    padding: 3rem !important;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.07);
}

.form-header {
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 0.4rem;
}

.form-header p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.link-forgot,
.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.link-forgot:hover,
.form-footer a:hover {
    color: #4333c4;
    text-decoration: underline;
}

.btn-signin {
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: none;
    background-color: var(--primary) !important;
    box-shadow: 0 4px 16px rgba(89, 74, 232, 0.38) !important;
    border-radius: 10px !important;
    transition: background-color 0.2s, box-shadow 0.2s !important;
}

.btn-signin:hover {
    background-color: #4333c4 !important;
    box-shadow: 0 6px 20px rgba(89, 74, 232, 0.5) !important;
}

.form-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* Alinhar progress bar e avatares dentro da célula da tabela */
.finmy-clean-table .finmy-task-progress {
    width: 100%;
}
.finmy-clean-table .finmy-avatar-group {
    justify-content: flex-end;
}

/* ============================================================
   Erro do Blazor
   ============================================================ */
#blazor-error-ui {
    display: none;
    background: #b32121;
    color: white;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 9999;
}

#blazor-error-ui a {
    color: #e8d7d7;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEz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M3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}