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

    html {
      height: 100%
    }

    body {
      font-family: 'Inter', -apple-system, sans-serif;
      background: #0A0F1E;
      color: #E2E8F0;
      font-size: 13.5px;
      line-height: 1.6;
      display: flex;
      height: 100vh;
      overflow: hidden
    }

    /* :root legado morto — tema escuro original da v1/v2, sempre sobrescrito por
       design-system.css e v3.css (que carregam depois e/ou têm especificidade maior).
       Mantido comentado por histórico; não produz efeito visual algum hoje. */

    ::-webkit-scrollbar {
      width: 4px;
      height: 4px
    }

    ::-webkit-scrollbar-track {
      background: transparent
    }

    ::-webkit-scrollbar-thumb {
      background: var(--border3);
      border-radius: var(--radius-xs)
    }

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

    button {
      font-family: inherit;
      cursor: pointer
    }

    input,
    select,
    textarea {
      font-family: inherit
    }

    /* LANDING */
    #app-landing {
      min-height: 100vh;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 32px;
      overflow: auto;
      background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(12, 79, 65, .25), transparent), radial-gradient(ellipse 40% 40% at 90% 90%, rgba(16, 185, 129, .12), transparent), #0A0F1E
    }

    .landing-shell {
      width: min(1100px, 100%);
      display: grid;
      grid-template-columns: 1.1fr 1fr;
      background: rgba(20, 29, 53, .7);
      backdrop-filter: blur(24px);
      border: 1px solid rgba(12, 79, 65, .2);
      border-radius: var(--radius-lg);
      box-shadow: 0 32px 80px rgba(0, 0, 0, .6);
      overflow: hidden
    }

    .landing-left {
      padding: 52px 44px;
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      gap: 24px
    }

    .landing-right {
      padding: 44px 36px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 20px;
      background: rgba(10, 15, 30, .4)
    }

    .landing-brand {
      display: flex;
      align-items: center;
      gap: 12px
    }

    .landing-logo {
      width: 44px;
      height: 44px;
      border-radius: var(--radius);
      background: linear-gradient(135deg, var(--brand), var(--purple));
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 24px rgba(12, 79, 65, .4);
      flex-shrink: 0
    }

    .landing-brand-name {
      font-size: 22px;
      font-weight: 800;
      letter-spacing: -.5px;
      background: linear-gradient(135deg, #E2E8F0, #94A3B8);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent
    }

    .landing-h1 {
      font-size: 40px;
      font-weight: 800;
      line-height: 1.1;
      letter-spacing: -1.5px;
      background: linear-gradient(135deg, #F1F5F9, #94A3B8);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent
    }

    .landing-h1 span {
      background: linear-gradient(135deg, var(--brand2), var(--brand));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent
    }

    .landing-sub {
      font-size: 14px;
      color: var(--text2);
      line-height: 1.7
    }

    .landing-pills {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .landing-pill {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 11px 14px;
      background: rgba(255, 255, 255, .03);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      font-size: 12.5px;
      color: var(--text2)
    }

    .pill-icon {
      width: 30px;
      height: 30px;
      border-radius: var(--radius-xs);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      flex-shrink: 0
    }

    .lf-label {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--text3);
      margin-bottom: 6px;
      display: block
    }

    .lf-input {
      width: 100%;
      background: rgba(255, 255, 255, .05);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 13px 16px;
      font-size: 14px;
      color: var(--text);
      outline: none;
      transition: .2s
    }

    .lf-input:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px var(--brand-light)
    }

    .lf-input::placeholder {
      color: var(--text3)
    }

    .lf-btn {
      width: 100%;
      border: none;
      border-radius: var(--radius-sm);
      background: linear-gradient(135deg, var(--brand), var(--brand3));
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      padding: 14px;
      cursor: pointer;
      transition: .2s;
      box-shadow: 0 8px 32px rgba(12, 79, 65, .4)
    }

    .lf-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 12px 40px rgba(12, 79, 65, .5)
    }

    .lf-note {
      font-size: 11.5px;
      color: var(--text3);
      line-height: 1.6;
      text-align: center
    }

    .landing-form-title {
      font-size: 20px;
      font-weight: 700
    }

    .landing-form-sub {
      font-size: 12.5px;
      color: var(--text3)
    }

    /* SIDEBAR */
    .sidebar {
      width: var(--sidebar-w);
      background: var(--bg2);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 0;
      left: 0;
      height: 100vh;
      z-index: 100;
      overflow-y: auto
    }

    .sidebar-logo {
      display: flex;
      align-items: center;
      gap: 12px;
      height: var(--header-h);
      padding: 0 20px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
      cursor: pointer
    }

    .logo-mark {
      width: 36px;
      height: 36px;
      border-radius: var(--radius-sm);
      background: linear-gradient(135deg, var(--brand), var(--purple));
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 16px rgba(12, 79, 65, .4);
      flex-shrink: 0
    }

    .logo-text {
      font-size: 16px;
      font-weight: 800;
      letter-spacing: -.4px;
      background: linear-gradient(135deg, #E2E8F0, var(--brand2));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent
    }

    .logo-sub {
      font-size: 9.5px;
      color: var(--text3);
      font-weight: 600;
      letter-spacing: .04em;
      text-transform: uppercase;
      margin-top: 1px
    }

    .nav-section {
      padding: 20px 16px 6px;
      font-size: 9.5px;
      font-weight: 700;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: .1em
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      margin: 1px 8px;
      border-radius: var(--radius-sm);
      color: var(--text2);
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: .15s;
      border: none;
      background: none;
      width: calc(100% - 16px);
      text-align: left;
      position: relative
    }

    .nav-item:hover {
      background: var(--bg4);
      color: var(--text)
    }

    .nav-item.active {
      background: var(--brand-light);
      color: var(--brand2);
      font-weight: 600
    }

    .nav-item.active::before {
      content: '';
      position: absolute;
      left: -8px;
      top: 25%;
      height: 50%;
      width: 3px;
      background: var(--brand);
      border-radius: 0 3px 3px 0
    }

    .nav-icon {
      font-size: 14px;
      flex-shrink: 0;
      width: 18px;
      text-align: center;
      opacity: .8
    }

    .nav-item.active .nav-icon {
      opacity: 1
    }

    .sidebar-footer {
      margin-top: auto;
      padding: 12px 8px;
      border-top: 1px solid var(--border)
    }

    .btn-reset {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 9px 14px;
      border-radius: var(--radius-sm);
      color: var(--red2);
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      border: none;
      background: none;
      width: 100%;
      text-align: left;
      transition: .15s
    }

    .btn-reset:hover {
      background: var(--red-light)
    }

    .btn-ai-cfg {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 9px 14px;
      border-radius: var(--radius-sm);
      color: var(--text2);
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      border: 1px solid var(--border);
      background: none;
      width: 100%;
      text-align: left;
      transition: .15s;
      margin-bottom: 6px
    }

    .btn-ai-cfg:hover {
      background: var(--bg4)
    }

    /* MAIN */
    .main {
      margin-left: var(--sidebar-w);
      flex: 1;
      display: flex;
      flex-direction: column;
      height: 100vh;
      overflow: hidden
    }

    /* HEADER */
    .header {
      height: var(--header-h);
      background: rgba(9, 15, 30, .8);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      padding: 0 24px;
      gap: 14px;
      flex-shrink: 0;
      position: sticky;
      top: 0;
      z-index: 50
    }

    .header-title-block {
      flex: 1
    }

    .header-title {
      font-size: 18px;
      font-weight: 700;
      letter-spacing: -.4px
    }

    .header-subtitle {
      font-size: 11px;
      color: var(--text3);
      margin-top: 1px
    }

    .header-right {
      display: flex;
      align-items: center;
      gap: 8px
    }

    /* MULTI-SELECT */
    .ms-container {
      position: relative
    }

    .ms-button {
      background: var(--bg4);
      border: 1px solid var(--border);
      padding: 7px 14px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: .15s;
      font-size: 12px;
      font-weight: 600;
      color: var(--text)
    }

    .ms-button:hover {
      border-color: var(--border3);
      background: var(--bg5)
    }

    .ms-btn-label {
      font-size: 10px;
      font-weight: 700;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: .05em
    }

    .ms-menu {
      position: absolute;
      top: 115%;
      right: 0;
      background: var(--bg3);
      border: 1px solid var(--border2);
      border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
      z-index: 1000;
      display: none;
      min-width: 220px;
      padding: 8px;
      max-height: 320px;
      overflow-y: auto
    }

    .ms-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 10px;
      cursor: pointer;
      border-radius: var(--radius-xs);
      transition: .1s
    }

    .ms-item:hover {
      background: var(--bg5)
    }

    .ms-item input[type="checkbox"] {
      accent-color: var(--brand);
      width: 15px;
      height: 15px
    }

    .ms-item label {
      cursor: pointer;
      flex: 1;
      font-size: 12.5px;
      color: var(--text)
    }

    /* CONTENT */
    .content {
      flex: 1;
      overflow-y: auto;
      padding: 24px
    }

    .tab-pane {
      display: none
    }

    .tab-pane.active {
      display: block;
      animation: fadeUp .2s ease
    }

    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(6px)
      }

      to {
        opacity: 1;
        transform: none
      }
    }

    /* GRIDS */
    .grid-4 {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 14px;
      margin-bottom: 20px
    }

    .grid-2 {
      display: grid;
      grid-template-columns: 1.6fr 1fr;
      gap: 14px;
      margin-bottom: 14px
    }

    .grid-2-equal {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin-bottom: 14px
    }

    .grid-3 {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 14px;
      margin-bottom: 14px
    }

    /* CARD */
    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden
    }

    .card::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(255, 255, 255, .015) 0%, transparent 60%);
      pointer-events: none
    }

    .card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 18px
    }

    .card-title {
      font-size: 11px;
      font-weight: 700;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: .07em
    }

    .card-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: var(--radius-lg);
      background: var(--brand-light);
      color: var(--brand2);
      border: 1px solid rgba(12, 79, 65, .2)
    }

    .card-action {
      font-size: 11px;
      color: var(--brand2);
      font-weight: 600;
      cursor: pointer;
      background: none;
      border: none;
      padding: 4px 8px;
      border-radius: var(--radius-xs);
      transition: .15s
    }

    .card-action:hover {
      background: var(--brand-light)
    }

    /* KPI CARDS */
    .kpi-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      transition: .25s cubic-bezier(.4, 0, .2, 1);
      box-shadow: var(--shadow);
      position: relative;
      overflow: hidden
    }

    .kpi-card:hover {
      transform: translateY(-3px);
      box-shadow: var(--shadow-lg);
      border-color: var(--border3)
    }

    .kpi-top {
      display: flex;
      align-items: center;
      justify-content: space-between
    }

    .kpi-icon {
      width: 40px;
      height: 40px;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      flex-shrink: 0
    }

    .kpi-label {
      font-size: 10.5px;
      font-weight: 600;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: .06em;
      margin-bottom: 4px
    }

    .kpi-value {
      font-size: 22px;
      font-weight: 800;
      letter-spacing: -.5px;
      line-height: 1
    }

    .kpi-footer {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: var(--text3)
    }

    .kpi-bar {
      height: 3px;
      background: var(--bg5);
      border-radius: var(--radius-xs);
      overflow: hidden;
      margin-top: 2px
    }

    .kpi-bar-fill {
      height: 100%;
      border-radius: var(--radius-xs);
      transition: width .5s ease
    }

    /* BUTTONS */
    .btn {
      border: none;
      border-radius: var(--radius-sm);
      padding: 9px 18px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: .15s;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: inherit
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--brand), var(--brand3));
      color: #fff;
      box-shadow: 0 4px 16px rgba(12, 79, 65, .35)
    }

    .btn-primary:hover {
      box-shadow: 0 6px 24px rgba(12, 79, 65, .45);
      transform: translateY(-1px)
    }

    .btn-primary:disabled {
      background: var(--bg5);
      color: var(--text3);
      box-shadow: none;
      transform: none;
      cursor: not-allowed
    }

    .btn-secondary {
      background: var(--bg4);
      color: var(--text);
      border: 1px solid var(--border2)
    }

    .btn-secondary:hover {
      background: var(--bg5)
    }

    .btn-danger {
      background: linear-gradient(135deg, var(--red), var(--red2));
      color: #fff
    }

    .btn-ghost {
      background: transparent;
      color: var(--text2);
      border: 1px solid var(--border)
    }

    .btn-ghost:hover {
      background: var(--bg4);
      color: var(--text)
    }

    .btn-success {
      background: linear-gradient(135deg, var(--green), var(--green2));
      color: #fff
    }

    .btn-sm {
      padding: 6px 12px;
      font-size: 12px;
      border-radius: var(--radius-xs)
    }

    .btn-block {
      width: 100%;
      justify-content: center
    }

    .btn-icon {
      width: 36px;
      height: 36px;
      background: var(--bg4);
      border: 1px solid var(--border);
      border-radius: var(--radius-xs);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      cursor: pointer;
      transition: .15s
    }

    .btn-icon:hover {
      background: var(--bg5)
    }

    .btn-icon-sm {
      width: 30px;
      height: 30px;
      border-radius: var(--radius-xs);
      background: var(--bg4);
      border: 1px solid var(--border);
      color: var(--text2);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      transition: .15s
    }

    .btn-icon-sm:hover {
      background: var(--bg5)
    }

    .btn-icon-sm svg,
    .btn-sm svg {
      display: block;
      flex-shrink: 0
    }

    .btn-icon-sm.danger:hover {
      background: var(--red-light);
      border-color: rgba(239, 68, 68, .3)
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    .loader {
      display: inline-block;
      animation: spin .8s linear infinite
    }

    /* ALERTS */
    .alert {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 14px 16px;
      border-radius: var(--radius-sm);
      margin-bottom: 14px;
      font-size: 12.5px;
      border: 1px solid
    }

    .alert-icon {
      font-size: 16px;
      flex-shrink: 0;
      margin-top: 1px
    }

    .alert-body {
      flex: 1
    }

    .alert-title {
      font-weight: 700;
      margin-bottom: 2px
    }

    .alert-text {
      color: var(--text2);
      line-height: 1.5;
      font-size: 12px
    }

    .alert-red {
      background: var(--red-light);
      border-color: rgba(239, 68, 68, .3)
    }

    .alert-red .alert-title {
      color: var(--red2)
    }

    .alert-amber {
      background: var(--amber-light);
      border-color: rgba(245, 158, 11, .3)
    }

    .alert-amber .alert-title {
      color: var(--amber2)
    }

    .alert-brand {
      background: var(--brand-light);
      border-color: rgba(12, 79, 65, .3)
    }

    .alert-brand .alert-title {
      color: var(--brand2)
    }

    .alert-green {
      background: var(--green-light);
      border-color: rgba(16, 185, 129, .3)
    }

    .alert-green .alert-title {
      color: var(--green2)
    }

    /* BADGES */
    .badge {
      display: inline-flex;
      align-items: center;
      font-size: 10px;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: var(--radius-lg);
      letter-spacing: .02em;
      white-space: nowrap
    }

    .badge-income {
      background: var(--green-light);
      color: var(--green2);
      border: 1px solid rgba(16, 185, 129, .2)
    }

    .badge-expense {
      background: var(--red-light);
      color: var(--red2);
      border: 1px solid rgba(239, 68, 68, .2)
    }

    .badge-transfer {
      background: var(--purple-light);
      color: var(--purple2);
      border: 1px solid rgba(23, 94, 78, .2)
    }

    .badge-brand {
      background: var(--brand-light);
      color: var(--brand2);
      border: 1px solid rgba(12, 79, 65, .2)
    }

    .badge-neutral {
      background: var(--bg5);
      color: var(--text2);
      border: 1px solid var(--border)
    }

    .badge-amber {
      background: var(--amber-light);
      color: var(--amber2);
      border: 1px solid rgba(245, 158, 11, .2)
    }

    /* FORMS */
    .form-group {
      margin-bottom: 16px
    }

    .form-label {
      display: block;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text2);
      margin-bottom: 7px
    }

    .form-input {
      width: 100%;
      background: var(--bg4);
      border: 1px solid var(--border2);
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      font-size: 13px;
      color: var(--text);
      outline: none;
      transition: .15s;
      font-family: inherit
    }

    .form-input:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px var(--brand-light)
    }

    .form-input::placeholder {
      color: var(--text3)
    }

    .form-select {
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 10px center;
      background-size: 14px;
      padding-right: 32px;
      cursor: pointer
    }

    .form-hint {
      font-size: 11px;
      color: var(--text3);
      margin-top: 5px
    }

    /* TX LIST */
    .tx-filters {
      display: flex;
      gap: 8px;
      margin-bottom: 14px;
      flex-wrap: wrap;
      align-items: center
    }

    .tx-search {
      flex: 1;
      min-width: 160px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 9px 12px;
      font-size: 12.5px;
      background: var(--bg4);
      color: var(--text);
      outline: none;
      transition: .15s
    }

    .tx-search:focus {
      border-color: var(--brand);
      background: var(--bg5)
    }

    .tx-search::placeholder {
      color: var(--text3)
    }

    .tx-select {
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 9px 28px 9px 12px;
      font-size: 12.5px;
      background: var(--bg4);
      color: var(--text);
      outline: none;
      cursor: pointer;
      transition: .15s;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 8px center;
      background-size: 13px
    }

    .tx-select:focus {
      border-color: var(--brand)
    }

    .tx-list {
      max-height: 480px;
      overflow-y: auto
    }

    .tx-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 8px;
      border-bottom: 1px solid rgba(30, 45, 78, .5);
      transition: .1s;
      border-radius: var(--radius-xs);
      margin-bottom: 1px
    }

    .tx-row:hover {
      background: var(--bg4)
    }

    .tx-row:last-child {
      border-bottom: none
    }

    .tx-dot {
      width: 9px;
      height: 9px;
      border-radius: var(--radius-xs);
      flex-shrink: 0
    }

    .tx-info {
      flex: 1;
      min-width: 0
    }

    .tx-desc {
      font-size: 13px;
      font-weight: 600;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .tx-meta {
      font-size: 10.5px;
      color: var(--text3);
      margin-top: 3px;
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap
    }

    .tx-amount {
      font-size: 13px;
      font-weight: 700;
      white-space: nowrap;
      font-variant-numeric: tabular-nums
    }

    .tx-empty {
      text-align: center;
      padding: 48px 20px;
      color: var(--text3)
    }

    .tx-empty-icon {
      margin-bottom: 12px;
      opacity: .4;
      display: flex;
      justify-content: center;
      font-size: 40px
    }

    .tx-empty-title {
      font-weight: 600;
      color: var(--text2);
      margin-bottom: 4px;
      font-size: 14px
    }

    /* LEGEND */
    .legend {
      display: flex !important;
      flex-direction: column;
      gap: 6px;
      margin-top: 14px;
    }

    .legend-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 10px;
      border-radius: var(--radius-sm);
      background: var(--bg3);
      border: 1px solid var(--border);
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: default;
    }

    .legend-item:hover {
      transform: translateX(3px);
      border-color: var(--brand);
      background: var(--brand-light);
    }

    .legend-dot {
      width: 8px;
      height: 8px;
      border-radius: var(--radius-full);
      flex-shrink: 0;
    }

    .legend-name {
      flex: 1;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--text2);
      margin-left: 8px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .legend-val {
      font-weight: 700;
      font-size: 11.5px;
      color: var(--text);
      margin-left: 8px;
    }

    /* MERCHANTS */
    .merch-list {
      display: flex;
      flex-direction: column;
      gap: 12px
    }

    .merch-item {
      display: flex;
      align-items: center;
      gap: 10px
    }

    .merch-rank {
      font-size: 10px;
      color: var(--text3);
      width: 16px;
      text-align: right;
      flex-shrink: 0
    }

    .merch-info {
      flex: 1;
      min-width: 0
    }

    .merch-name {
      font-size: 12px;
      font-weight: 600;
      margin-bottom: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .merch-track {
      background: var(--bg5);
      border-radius: var(--radius-xs);
      height: 4px
    }

    .merch-fill {
      height: 100%;
      border-radius: var(--radius-xs);
      transition: width .5s ease
    }

    .merch-amount {
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
      min-width: 90px;
      text-align: right
    }

    /* INSIGHTS */
    .insight-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 10px 0;
      border-bottom: 1px solid rgba(30, 45, 78, .5)
    }

    .insight-item:last-child {
      border-bottom: none
    }

    .insight-text {
      font-size: 12px;
      line-height: 1.6;
      color: var(--text2)
    }

    .insight-text strong {
      color: var(--text);
      font-weight: 600
    }

    /* DROP ZONE */
    .drop-zone {
      border: 2px dashed var(--border2);
      border-radius: var(--radius);
      padding: 36px 24px;
      text-align: center;
      cursor: pointer;
      transition: .2s;
      background: var(--bg4)
    }

    .drop-zone:hover,
    .drop-zone.drag-over {
      border-color: var(--brand);
      background: var(--brand-light)
    }

    .import-preview-list {
      max-height: 200px;
      overflow-y: auto;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm)
    }

    .import-preview-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 12px;
      border-bottom: 1px solid rgba(30, 45, 78, .4);
      font-size: 11.5px
    }

    .import-preview-row:last-child {
      border-bottom: none
    }

    .imp-date {
      color: var(--text3);
      min-width: 62px;
      flex-shrink: 0
    }

    .imp-desc {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .imp-cat {
      color: var(--text3);
      font-size: 10.5px;
      min-width: 90px;
      text-align: right
    }

    .imp-amt {
      font-weight: 700;
      min-width: 80px;
      text-align: right
    }

    .import-stats {
      display: flex;
      gap: 10px;
      margin: 14px 0;
      flex-wrap: wrap
    }

    .import-stat {
      background: var(--bg4);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 14px 18px;
      flex: 1;
      min-width: 70px;
      text-align: center
    }

    .import-stat strong {
      display: block;
      font-size: 22px;
      font-weight: 800;
      margin-bottom: 3px
    }

    .import-stat span {
      font-size: 10.5px;
      color: var(--text3)
    }

    .file-queue-item {
      background: var(--bg4);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 12px 14px;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap
    }

    .file-queue-item.has-error {
      border-color: rgba(239, 68, 68, .3);
      background: var(--red-light)
    }

    .file-queue-item.ready {
      border-color: rgba(16, 185, 129, .3)
    }

    .file-info {
      flex: 1;
      min-width: 140px
    }

    .file-name {
      font-size: 12.5px;
      font-weight: 600;
      margin-bottom: 2px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 240px
    }

    .file-meta {
      font-size: 10.5px;
      color: var(--text3)
    }

    .file-meta.loading {
      color: var(--brand2)
    }

    .file-meta.error {
      color: var(--red2)
    }

    .file-meta.ready {
      color: var(--green2)
    }

    .file-account-sel {
      flex: 1;
      min-width: 160px
    }

    .file-remove {
      width: 26px;
      height: 26px;
      border-radius: var(--radius-sm);
      background: none;
      border: 1px solid var(--border);
      cursor: pointer;
      font-size: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text3);
      transition: .15s;
      flex-shrink: 0
    }

    .file-remove:hover {
      background: var(--red-light);
      border-color: rgba(239, 68, 68, .3);
      color: var(--red2)
    }

    /* DRE */
    .dre-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12.5px
    }

    .dre-table th {
      text-align: right;
      padding: 10px 14px;
      font-size: 10px;
      color: var(--text3);
      font-weight: 700;
      border-bottom: 2px solid var(--border2);
      background: var(--bg4)
    }

    .dre-table th:first-child {
      text-align: left
    }

    .dre-table td {
      padding: 8px 14px;
      border-bottom: 1px solid rgba(30, 45, 78, .4);
      text-align: right
    }

    .dre-table td:first-child {
      text-align: left
    }

    .dre-table tr:hover td {
      background: var(--bg4)
    }

    .dre-section-row td {
      font-size: 9.5px;
      font-weight: 700;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: .06em;
      background: var(--bg3);
      padding-top: 16px;
      padding-bottom: 6px
    }

    .dre-subtotal td {
      font-weight: 600;
      background: rgba(30, 41, 59, .4)
    }

    .dre-total td {
      font-weight: 800;
      font-size: 14px;
      background: var(--brand-light);
      color: var(--brand2)
    }

    .dre-indicator td {
      font-weight: 600;
      font-size: 12px
    }

    .dre-indent {
      padding-left: 26px !important
    }

    .val-pos {
      color: var(--green2)
    }

    .val-neg {
      color: var(--red2)
    }

    .overflow-x {
      overflow-x: auto
    }

    /* ACCOUNTS */
    .account-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px;
      display: flex;
      align-items: center;
      gap: 14px;
      transition: .15s
    }

    .account-card:hover {
      border-color: var(--border3);
      box-shadow: var(--shadow-lg)
    }

    .account-icon-wrap {
      width: 48px;
      height: 48px;
      border-radius: var(--radius);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      flex-shrink: 0
    }

    .account-balance {
      font-size: 18px;
      font-weight: 800;
      margin-top: 6px
    }

    /* MODAL */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .6);
      backdrop-filter: blur(6px);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      animation: fadeUp .15s ease
    }

    .modal {
      background: var(--bg3);
      border: 1px solid var(--border2);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      width: 100%;
      max-width: 520px;
      padding: 28px;
      animation: slideUp .2s ease;
      max-height: 92vh;
      overflow-y: auto
    }

    .modal-wide {
      max-width: 780px
    }

    @keyframes slideUp {
      from {
        transform: translateY(14px);
        opacity: 0
      }

      to {
        transform: none;
        opacity: 1
      }
    }

    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 22px
    }

    .modal-title {
      font-size: 17px;
      font-weight: 700;
      letter-spacing: -.3px
    }

    .modal-close {
      width: 30px;
      height: 30px;
      border-radius: var(--radius-xs);
      background: var(--bg5);
      border: none;
      cursor: pointer;
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text2);
      transition: .15s
    }

    .modal-close:hover {
      background: var(--bg4);
      color: var(--text)
    }

    .modal-footer {
      display: flex;
      gap: 10px;
      justify-content: flex-end;
      margin-top: 22px;
      padding-top: 18px;
      border-top: 1px solid var(--border)
    }

    /* COLOR SWATCHES */
    .color-swatches {
      display: flex;
      gap: 8px;
      flex-wrap: wrap
    }

    .color-swatch {
      width: 30px;
      height: 30px;
      border-radius: var(--radius-xs);
      cursor: pointer;
      border: 2px solid transparent;
      transition: .15s
    }

    .color-swatch:hover {
      transform: scale(1.1)
    }

    .color-swatch.selected {
      border-color: #fff;
      box-shadow: 0 0 0 1px rgba(255, 255, 255, .3)
    }

    /* PREDICT */
    .action-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 10px 0;
      border-bottom: 1px solid rgba(30, 45, 78, .4)
    }

    .action-item:last-child {
      border-bottom: none
    }

    .action-rank {
      width: 24px;
      height: 24px;
      border-radius: var(--radius-sm);
      background: var(--brand-light);
      color: var(--brand2);
      font-size: 11px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      margin-top: 1px
    }

    .tag {
      display: inline-flex;
      align-items: center;
      font-size: 10px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: var(--radius-xs);
      white-space: nowrap
    }

    .tag-debit {
      background: var(--brand-light);
      color: var(--brand2)
    }

    .tag-credit {
      background: var(--purple-light);
      color: var(--purple2)
    }

    /* AI */
    .ai-workspace {
      display: grid;
      grid-template-columns: 1.6fr 1fr;
      gap: 14px
    }

    .ai-chat-card {
      display: flex;
      flex-direction: column;
      min-height: 620px
    }

    .ai-chat-history {
      flex: 1;
      overflow-y: auto;
      padding: 16px;
      background: var(--bg3);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      margin-bottom: 12px
    }

    .ai-msg-wrap {
      display: flex;
      margin-bottom: 12px
    }

    .ai-msg-wrap.user {
      justify-content: flex-end
    }

    .ai-msg-bubble {
      max-width: 88%;
      padding: 12px 14px;
      border-radius: var(--radius);
      border: 1px solid var(--border);
      background: var(--bg4);
      font-size: 13px;
      line-height: 1.6;
      white-space: pre-wrap
    }

    .ai-msg-wrap.user .ai-msg-bubble {
      background: var(--brand-light);
      border-color: rgba(12, 79, 65, .2)
    }

    .ai-msg-body p {
      margin: 0 0 8px
    }

    .ai-msg-body p:last-child {
      margin: 0
    }

    .ai-msg-body h4 {
      margin: 10px 0 8px;
      font-size: 12px
    }

    .ai-msg-body ul {
      margin: 0 0 8px 16px;
      padding: 0
    }

    .ai-msg-body li {
      margin: 0 0 4px
    }

    .ai-table-wrap {
      width: 100%;
      overflow-x: auto;
      margin: 8px 0;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--bg4)
    }

    .ai-rich-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
      min-width: 480px
    }

    .ai-rich-table th,
    .ai-rich-table td {
      padding: 8px 10px;
      border-bottom: 1px solid rgba(30, 45, 78, .4);
      text-align: left;
      vertical-align: top
    }

    .ai-rich-table th {
      background: var(--bg5);
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: .05em;
      color: var(--text3);
      font-weight: 700
    }

    .ai-rich-table tr:last-child td {
      border-bottom: none
    }

    .ai-msg-meta {
      margin-top: 6px;
      font-size: 10px;
      color: var(--text3)
    }

    .ai-status-chip {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .05em;
      text-transform: uppercase;
      padding: 5px 10px;
      border-radius: var(--radius-full);
      border: 1px solid rgba(245, 158, 11, .3);
      color: var(--amber2);
      background: var(--amber-light)
    }

    .ai-input-row {
      display: flex;
      gap: 8px
    }

    .ai-input {
      flex: 1;
      border: 1px solid var(--border2);
      border-radius: var(--radius-sm);
      padding: 11px 14px;
      font-size: 13px;
      outline: none;
      background: var(--bg4);
      color: var(--text)
    }

    .ai-input:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px var(--brand-light)
    }

    .ai-input::placeholder {
      color: var(--text3)
    }

    .ai-quick {
      margin-top: 10px;
      display: flex;
      gap: 6px;
      flex-wrap: wrap
    }

    .ai-quick-btn {
      font-size: 11px;
      padding: 6px 11px;
      border-radius: var(--radius-xs);
      border: 1px solid var(--border);
      background: var(--bg4);
      color: var(--text2);
      cursor: pointer;
      transition: .15s
    }

    .ai-quick-btn:hover {
      background: var(--bg5);
      color: var(--text)
    }

    .ai-side-card {
      min-height: 620px;
      display: flex;
      flex-direction: column;
      gap: 10px
    }

    .ai-side-block {
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--bg4);
      padding: 12px 14px
    }

    .ai-side-title {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .07em;
      color: var(--text3);
      margin-bottom: 10px
    }

    .ai-kpi-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px
    }

    .ai-kpi {
      border: 1px solid var(--border);
      border-radius: var(--radius-xs);
      padding: 10px;
      background: var(--bg5)
    }

    .ai-kpi-lbl {
      font-size: 10px;
      color: var(--text3)
    }

    .ai-kpi-val {
      font-size: 15px;
      font-weight: 700;
      margin-top: 3px
    }

    .ai-list-item {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      padding: 7px 0;
      border-bottom: 1px solid rgba(30, 45, 78, .4);
      font-size: 12px
    }

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

    #chatHistory table {
      width: 100%;
      border-collapse: collapse;
      margin: 8px 0;
      font-size: 12px;
      background: var(--bg4)
    }

    #chatHistory th,
    #chatHistory td {
      border: 1px solid var(--border);
      padding: 6px 8px;
      text-align: left
    }

    #chatHistory th {
      background: var(--bg5)
    }

    /* BULK RECATEGORIZE */
    .bulk-select-bar {
      background: var(--brand-light);
      border: 1px solid rgba(12, 79, 65, .3);
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      display: none;
      align-items: center;
      gap: 12px;
      margin-bottom: 10px;
      flex-wrap: wrap
    }

    .bulk-select-bar.show {
      display: flex
    }

    .bulk-count {
      font-size: 13px;
      font-weight: 600;
      color: var(--brand2)
    }

    .tx-checkbox {
      width: 15px;
      height: 15px;
      accent-color: var(--brand);
      cursor: pointer;
      flex-shrink: 0
    }

    /* MISC */
    .empty-state {
      text-align: center;
      padding: 60px 24px;
      color: var(--text3)
    }

    .empty-icon {
      margin-bottom: 14px;
      opacity: .3;
      display: flex;
      justify-content: center;
      font-size: 48px
    }

    .empty-title {
      font-size: 16px;
      font-weight: 700;
      color: var(--text2);
      margin-bottom: 6px
    }

    .empty-sub {
      font-size: 13px;
      margin-bottom: 20px
    }

    .section-title {
      font-size: 15px;
      font-weight: 700;
      letter-spacing: -.3px;
      margin-bottom: 4px
    }

    .section-sub {
      font-size: 12px;
      color: var(--text3);
      margin-bottom: 18px
    }

    @media(max-width:1024px) {
      .grid-4 {
        grid-template-columns: 1fr 1fr
      }

      .grid-2 {
        grid-template-columns: 1fr
      }

      .ai-workspace {
        grid-template-columns: 1fr
      }
    }

    @media(max-width:768px) {
      :root {
        --sidebar-w: 0px
      }

      .sidebar {
        display: none
      }

      .grid-3,
      .grid-2-equal {
        grid-template-columns: 1fr
      }

      .grid-4 {
        grid-template-columns: 1fr
      }

      .landing-shell {
        grid-template-columns: 1fr
      }
    }

    /* ═══════════════════════════════════════════════
   FIFLOW DESIGN REFRESH — Melhorias visuais
═══════════════════════════════════════════════ */

    /* Sidebar aprimorada */
    .sidebar {
      background: linear-gradient(180deg, #0D1326 0%, #090D1C 100%)
    }

    .sidebar-logo {
      transition: .2s
    }

    .sidebar-logo:hover {
      background: rgba(255, 255, 255, .03)
    }

    .logo-mark {
      box-shadow: 0 4px 24px rgba(12, 79, 65, .5)
    }

    .nav-section {
      padding: 22px 18px 7px;
      font-size: 9px;
      letter-spacing: .15em
    }

    .nav-item {
      padding: 9px 14px;
      margin: 2px 8px;
      border-radius: var(--radius-sm);
      font-size: 12.5px
    }

    .nav-item:hover {
      background: rgba(255, 255, 255, .05)
    }

    .nav-item.active {
      background: rgba(12, 79, 65, .13)
    }

    .nav-item.active::before {
      background: linear-gradient(180deg, var(--brand2), var(--brand));
      left: -8px;
      border-radius: 0 4px 4px 0;
      top: 18%;
      height: 64%
    }

    .sidebar-footer {
      padding: 16px 8px
    }

    .btn-ai-cfg {
      border-radius: var(--radius-sm);
      background: rgba(255, 255, 255, .03)
    }

    .btn-reset {
      border-radius: var(--radius-sm)
    }

    /* Header aprimorado */
    .header {
      background: rgba(8, 13, 28, .9);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px)
    }

    .header-title {
      font-size: 17px;
      letter-spacing: -.5px
    }

    /* User chip no header */
    .header-divider {
      width: 1px;
      height: 22px;
      background: rgba(30, 50, 80, .9);
      margin: 0 2px;
      flex-shrink: 0
    }

    .header-user {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 4px 14px 4px 5px;
      border-radius: var(--radius-full);
      background: var(--bg4);
      border: 1px solid var(--border2);
      cursor: pointer;
      transition: .15s
    }

    .header-user:hover {
      background: var(--bg5);
      border-color: var(--border3)
    }

    .user-avatar {
      width: 30px;
      height: 30px;
      border-radius: var(--radius-full);
      background: linear-gradient(135deg, var(--brand), var(--purple));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 800;
      color: #fff;
      flex-shrink: 0;
      text-transform: uppercase;
      box-shadow: 0 2px 10px rgba(12, 79, 65, .45);
      letter-spacing: 0
    }

    .user-name-display {
      font-size: 12px;
      font-weight: 600;
      color: var(--text);
      max-width: 120px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    /* Cards com cantos mais arredondados e bordas melhores */
    .card {
      border-radius: var(--radius-lg);
      padding: 22px;
      border-color: rgba(25, 42, 78, .95)
    }

    .kpi-card {
      border-radius: var(--radius-lg);
      padding: 20px;
      border-color: rgba(25, 42, 78, .95)
    }

    .kpi-card:hover {
      border-color: rgba(55, 85, 140, .9)
    }

    .kpi-icon {
      width: 44px;
      height: 44px;
      border-radius: var(--radius-sm);
      font-size: 20px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, .35)
    }

    .kpi-value {
      font-size: 24px;
      letter-spacing: -.6px
    }

    .account-card {
      border-radius: var(--radius)
    }

    .account-card:hover {
      transform: translateY(-2px)
    }

    .modal {
      border-radius: var(--radius-lg)
    }

    .modal-close {
      border-radius: var(--radius-xs)
    }

    .alert {
      border-radius: var(--radius-sm)
    }

    .badge {
      border-radius: var(--radius-xs)
    }

    .tx-row {
      border-radius: var(--radius-sm);
      margin-bottom: 2px
    }

    .drop-zone {
      border-radius: var(--radius)
    }

    .ai-msg-bubble {
      border-radius: var(--radius)
    }

    .ai-side-block {
      border-radius: var(--radius-sm)
    }

    /* Botões */
    .btn {
      border-radius: var(--radius-sm);
      font-size: 12.5px
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--brand), var(--brand3))
    }

    .btn-icon {
      border-radius: var(--radius-sm);
      background: var(--bg4);
      border: 1px solid var(--border2)
    }

    .btn-icon:hover {
      background: var(--bg5);
      border-color: var(--border3)
    }

    .ms-button {
      border-radius: var(--radius-sm)
    }

    .ms-menu {
      border-radius: var(--radius)
    }

    /* Inputs */
    .form-input {
      background: rgba(255, 255, 255, .04);
      border-radius: var(--radius-sm)
    }

    .form-input:focus {
      background: rgba(255, 255, 255, .06)
    }

    .tx-search,
    .tx-select {
      border-radius: var(--radius-sm)
    }

    .lf-input {
      border-radius: var(--radius-sm)
    }

    .lf-btn {
      border-radius: var(--radius-sm)
    }

    .landing-logo {
      border-radius: var(--radius)
    }

    .landing-shell {
      border-radius: var(--radius-lg)
    }

    /* Scrollbar */
    ::-webkit-scrollbar-thumb {
      background: rgba(12, 79, 65, .22)
    }

    ::-webkit-scrollbar-thumb:hover {
      background: rgba(12, 79, 65, .4)
    }

    /* ── BALANCE HERO CARD ── */
    .balance-hero {
      background: linear-gradient(135deg, #141D35 0%, #0F1628 50%, #141D35 100%);
      border: 1px solid rgba(12, 79, 65, .22);
      border-radius: var(--radius-lg);
      padding: 28px 32px;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative;
      overflow: hidden;
      box-shadow: 0 8px 40px rgba(0, 0, 0, .35), 0 0 0 1px rgba(12, 79, 65, .08);
    }

    .balance-hero::before {
      content: '';
      position: absolute;
      top: -90px;
      right: -90px;
      width: 300px;
      height: 300px;
      border-radius: var(--radius-full);
      background: radial-gradient(circle, rgba(12, 79, 65, .14), transparent 65%);
      pointer-events: none;
    }

    .balance-hero::after {
      content: '';
      position: absolute;
      bottom: -60px;
      left: 38%;
      width: 180px;
      height: 180px;
      border-radius: var(--radius-full);
      background: radial-gradient(circle, rgba(16, 185, 129, .07), transparent 65%);
      pointer-events: none;
    }

    .balance-hero-content {
      position: relative;
      z-index: 1
    }

    .balance-hero-greeting {
      font-size: 11px;
      font-weight: 700;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: .12em;
      margin-bottom: 8px
    }

    .balance-hero-value {
      font-size: 40px;
      font-weight: 800;
      letter-spacing: -2px;
      color: var(--text);
      line-height: 1;
      margin-bottom: 8px;
      font-variant-numeric: tabular-nums
    }

    .balance-hero-sub {
      font-size: 12px;
      color: var(--text3)
    }

    .balance-hero-actions {
      display: flex;
      gap: 10px;
      position: relative;
      z-index: 1
    }

    .hero-action-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 7px;
      padding: 14px 18px;
      background: rgba(255, 255, 255, .05);
      border: 1px solid rgba(255, 255, 255, .07);
      border-radius: var(--radius);
      cursor: pointer;
      transition: .2s;
      font-family: inherit;
      min-width: 76px;
    }

    .hero-action-btn:hover {
      background: rgba(255, 255, 255, .1);
      border-color: rgba(255, 255, 255, .13);
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    }

    .hero-action-icon {
      font-size: 22px;
      line-height: 1
    }

    .hero-action-label {
      font-size: 10px;
      font-weight: 600;
      color: var(--text2);
      white-space: nowrap
    }

    @media(max-width:900px) {
      .balance-hero {
        flex-direction: column;
        gap: 18px;
        align-items: flex-start
      }

      .balance-hero-actions {
        flex-wrap: wrap
      }

      .balance-hero-value {
        font-size: 28px
      }
    }

    /* Bloco "TEMA PROFISSIONAL" removido: era cópia de professional.css e sempre sobrescrito pelo bloco V2 abaixo, design-system.css e v3.css. */
    /* ═══════════════════════════════════════════════
   FIFLOW V2 — Oripio-inspired Professional UI
   Somente design, cores, layout e visual dos graficos
═══════════════════════════════════════════════ */
    /* :root legado morto — "Oripio-inspired" (fonte original do design-system.css
       atual), sempre sobrescrito por design-system.css e v3.css. Mantido comentado
       por histórico. */

    body {
      background: var(--bg);
      color: var(--text);
      font-size: 13px
    }

    #app-dashboard {
      background: var(--bg);
      padding: 18px
    }

    .sidebar {
      top: 18px;
      left: 18px;
      height: calc(100vh - 36px);
      background: #FFFFFF;
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: 4px 0;
      overflow: hidden;
    }

    .sidebar-logo {
      height: 58px;
      padding: 0 14px;
      border-bottom: none
    }

    .sidebar-logo:hover {
      background: transparent
    }

    .logo-mark,
    .landing-logo {
      width: 34px;
      height: 34px;
      border-radius: var(--radius-xs);
      background: linear-gradient(135deg, var(--brand), var(--brand2));
      box-shadow: 0 10px 20px rgba(55, 166, 134, .22);
    }

    .logo-text {
      font-size: 17px;
      color: var(--text);
      background: none;
      -webkit-text-fill-color: initial;
      letter-spacing: -.3px
    }

    .logo-sub {
      display: none
    }

    .nav-section {
      padding: 18px 12px 6px;
      font-size: 10px;
      letter-spacing: .06em;
      color: var(--text3)
    }

    .nav-item {
      width: calc(100% - 22px);
      margin: 2px 11px;
      padding: 9px 12px;
      border-radius: var(--radius-sm);
      color: var(--text2);
      font-size: 12.5px;
      font-weight: 500;
    }

    .nav-item:hover {
      background: var(--bg4);
      color: var(--text)
    }

    .nav-item.active {
      background: var(--brand-light);
      color: var(--brand2);
      font-weight: 700
    }

    .nav-item.active::before {
      display: none
    }

    .nav-icon {
      width: 18px;
      color: currentColor;
      opacity: .85
    }

    .sidebar-footer {
      padding: 12px 11px 10px;
      border-top: none
    }

    .btn-ai-cfg,
    .btn-reset {
      border-radius: var(--radius-sm);
      padding: 9px 11px;
      font-size: 11.5px
    }

    .btn-ai-cfg {
      background: var(--bg4);
      border-color: var(--border);
      color: var(--text2)
    }

    .btn-ai-cfg:hover {
      background: var(--brand-light);
      color: var(--brand2)
    }

    .btn-reset {
      color: var(--red)
    }

    .btn-reset:hover {
      background: rgba(224, 82, 82, .08)
    }

    .main {
      margin-left: calc(var(--sidebar-w) + 18px);
      height: calc(100vh - 36px);
      border-radius: var(--radius-lg);
      background: var(--bg4);
      overflow: hidden;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75);
      display: flex;
      flex-direction: column;
    }

    .header {
      height: 66px;
      background: var(--bg4);
      border-bottom: 1px solid rgba(231, 233, 228, .72);
      box-shadow: none;
      padding: 0 18px 0 22px;
    }

    .header-title {
      font-size: 21px;
      font-weight: 800;
      letter-spacing: -.4px;
      color: var(--text)
    }

    .header-subtitle {
      font-size: 11.5px;
      color: var(--text3)
    }

    .header-right {
      gap: 7px
    }

    .ms-button,
    .btn-icon,
    .btn-icon-sm,
    .header-user {
      background: #FFFFFF;
      border-color: var(--border);
      box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
    }

    .ms-button {
      height: 36px;
      border-radius: var(--radius-full);
      padding: 7px 12px;
      font-size: 11.5px
    }

    .ms-button:hover,
    .btn-icon:hover,
    .btn-icon-sm:hover,
    .header-user:hover {
      background: #F6FAF7;
      border-color: var(--border);
      color: var(--text)
    }

    .ms-btn-label {
      color: var(--text3)
    }

    .btn-icon {
      width: 36px;
      height: 36px;
      border-radius: var(--radius-full)
    }

    .header-user {
      border-radius: var(--radius-full);
      padding: 4px 10px 4px 4px
    }

    .user-avatar {
      background: linear-gradient(135deg, var(--brand), var(--brand2));
      box-shadow: none
    }

    .user-name-display {
      color: var(--text)
    }

    .content {
      padding: 18px 20px 22px
    }

    .grid-4 {
      grid-template-columns: repeat(5, minmax(150px, 1fr));
      gap: 12px;
      margin-bottom: 14px
    }

    .grid-2 {
      grid-template-columns: 1.08fr .92fr;
      gap: 14px;
      margin-bottom: 14px
    }

    .grid-2-equal {
      gap: 14px;
      margin-bottom: 14px
    }

    .card,
    .kpi-card,
    .account-card {
      background: #FFFFFF;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .card {
      padding: 16px
    }

    .card-header {
      margin-bottom: 12px
    }

    .card-title {
      font-size: 15px;
      text-transform: none;
      letter-spacing: -.2px;
      color: var(--text);
      font-weight: 750
    }

    .card-badge {
      border-radius: var(--radius-full);
      background: var(--bg4);
      color: var(--text2);
      border-color: var(--border);
      font-size: 10.5px
    }

    .card-action {
      color: var(--brand2)
    }

    .kpi-card {
      padding: 15px;
      gap: 10px;
      min-height: 132px
    }

    .kpi-card:hover {
      transform: translateY(-2px);
      border-color: var(--border);
      box-shadow: var(--shadow-lg)
    }

    .kpi-icon {
      width: 34px;
      height: 34px;
      border-radius: var(--radius-sm);
      background: var(--brand-light) !important;
      box-shadow: none;
      color: var(--brand2);
    }

    .kpi-icon svg {
      width: 16px;
      height: 16px;
      stroke: var(--brand2)
    }

    .kpi-label {
      text-transform: none;
      letter-spacing: 0;
      color: var(--text2);
      font-size: 13px;
      font-weight: 650;
      margin-bottom: 6px
    }

    .kpi-value {
      font-size: 24px;
      line-height: 1.08;
      letter-spacing: -.4px;
      color: var(--text) !important
    }

    .kpi-footer {
      font-size: 10.8px;
      color: var(--text3);
      line-height: 1.35
    }

    .kpi-bar {
      height: 5px;
      background: var(--bg5);
      border-radius: var(--radius-full)
    }

    .kpi-bar-fill {
      border-radius: var(--radius-full)
    }

    .balance-hero {
      background: #FFFFFF;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 14px;
    }

    .balance-hero::before,
    .balance-hero::after {
      display: none
    }

    .balance-hero-greeting {
      color: var(--text);
      text-transform: none;
      letter-spacing: -.45px;
      font-size: 22px;
      font-weight: 800;
      margin: 0;
    }

    .balance-hero-sub {
      color: var(--text3)
    }

    .balance-hero-actions {
      gap: 8px;
      align-items: center
    }

    .hero-action-btn {
      background: #F7F9F6;
      border: 1px solid var(--border);
      border-radius: var(--radius-full);
      min-width: 0;
      padding: 9px 12px;
      flex-direction: row;
      gap: 6px;
      color: var(--text2);
    }

    .hero-action-btn:hover {
      background: #EAF6EF;
      border-color: #CFE6D9;
      box-shadow: none;
      transform: translateY(-1px)
    }

    .hero-action-icon svg {
      width: 16px;
      height: 16px;
      color: var(--brand2)
    }

    .hero-action-label {
      font-size: 11px;
      color: var(--text2)
    }

    .btn {
      border-radius: var(--radius-full);
      font-size: 12px;
      padding: 8px 14px
    }

    .btn-primary,
    .btn-success {
      background: var(--brand);
      color: #fff;
      box-shadow: 0 8px 18px rgba(55, 166, 134, .2);
    }

    .btn-primary:hover {
      box-shadow: 0 10px 24px rgba(55, 166, 134, .28)
    }

    .btn-secondary,
    .btn-ghost {
      background: #FFFFFF;
      color: var(--text2);
      border-color: var(--border)
    }

    .btn-secondary:hover,
    .btn-ghost:hover {
      background: #F6FAF7;
      border-color: var(--border)
    }

    .btn-danger {
      background: var(--red2)
    }

    .alert {
      border-radius: var(--radius);
      padding: 12px 14px
    }

    .alert-green {
      background: #F1FAF5;
      border-color: rgba(55, 166, 134, .18)
    }

    .alert-brand {
      background: #F1FAF5;
      border-color: rgba(55, 166, 134, .18)
    }

    .alert-brand .alert-title {
      color: var(--brand2)
    }

    .alert-amber {
      background: rgba(250, 132, 1, .08);
      border-color: rgba(250, 132, 1, .18)
    }

    .alert-red {
      background: rgba(224, 82, 82, .08);
      border-color: rgba(224, 82, 82, .18)
    }

    .alert-text {
      color: var(--text2)
    }

    .badge {
      border-radius: var(--radius-full);
      font-weight: 650
    }

    .badge-income {
      background: var(--brand-light);
      color: var(--brand2);
      border-color: rgba(55, 166, 134, .18)
    }

    .badge-expense {
      background: rgba(224, 82, 82, .08);
      color: var(--red2);
      border-color: rgba(224, 82, 82, .18)
    }

    .badge-transfer,
    .badge-brand,
    .tag-debit {
      background: var(--brand-light);
      color: var(--brand2);
      border-color: rgba(55, 166, 134, .18)
    }

    .badge-neutral {
      background: var(--bg4);
      color: var(--text2);
      border-color: var(--border)
    }

    .badge-amber {
      background: rgba(250, 132, 1, .08);
      color: var(--amber2);
      border-color: rgba(250, 132, 1, .18)
    }

    .form-input,
    .tx-search,
    .tx-select,
    .ai-input {
      border-radius: var(--radius-sm);
      background: #FFFFFF;
      border-color: var(--border);
      color: var(--text);
    }

    .form-input:focus,
    .tx-search:focus,
    .tx-select:focus,
    .ai-input:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 4px rgba(55, 166, 134, .10);
    }

    .tx-row {
      border-bottom-color: var(--bg5);
      border-radius: var(--radius-sm);
      padding: 10px 8px
    }

    .tx-row:hover {
      background: var(--bg4)
    }

    .tx-desc,
    .merch-name {
      color: var(--text)
    }

    .tx-meta,
    .merch-rank,
    .section-sub {
      color: var(--text3)
    }

    .tx-list {
      max-height: 500px
    }

    .legend {
      grid-template-columns: 1fr;
      gap: 5px;
      margin-top: 12px
    }

    .legend-item {
      font-size: 11.5px
    }

    .legend-dot {
      border-radius: var(--radius-full)
    }

    .legend-name {
      color: var(--text2)
    }

    .legend-val {
      color: var(--text)
    }

    .merch-track {
      height: 6px;
      border-radius: var(--radius-full);
      background: var(--bg5)
    }

    .merch-fill {
      border-radius: var(--radius-full)
    }

    .insight-item,
    .action-item,
    .ai-list-item {
      border-bottom-color: var(--bg5)
    }

    .insight-text {
      color: var(--text2)
    }

    .insight-text strong {
      color: var(--text)
    }

    .dre-table th {
      background: var(--bg4);
      color: var(--text2);
      border-bottom-color: var(--border)
    }

    .dre-table td {
      border-bottom-color: var(--bg5)
    }

    .dre-table tr:hover td {
      background: var(--bg4)
    }

    .dre-section-row td {
      background: var(--bg5);
      color: var(--text2);
      transition: background-color .15s ease
    }

    .dre-section-row:hover td {
      background: rgba(55, 166, 134, .12) !important
    }

    .dre-total td {
      background: var(--brand-light);
      color: var(--brand2)
    }

    .val-pos {
      color: var(--brand2)
    }

    .val-neg {
      color: var(--red2)
    }

    .modal {
      border-radius: var(--radius-lg)
    }

    .modal-backdrop {
      background: rgba(20, 24, 31, .34)
    }

    .drop-zone,
    .import-stat,
    .file-queue-item,
    .ai-chat-history,
    .ai-side-block,
    .ai-kpi {
      background: #FFFFFF;
      border-color: var(--border);
      border-radius: var(--radius);
    }

    .drop-zone {
      background: var(--bg4)
    }

    .drop-zone:hover,
    .drop-zone.drag-over {
      background: var(--brand-light);
      border-color: var(--brand)
    }

    .ai-msg-bubble {
      border-radius: var(--radius)
    }

    .ai-msg-wrap.user .ai-msg-bubble {
      background: var(--brand-light);
      border-color: rgba(55, 166, 134, .18)
    }

    .ai-chat-history {
      background: var(--bg4)
    }

    /* ── Premium Redesigned Overview Grid ── */
    .overview-layout {
      display: grid;
      grid-template-columns: 295px 1fr 295px;
      gap: 16px;
      margin-top: 12px;
      align-items: start;
    }

    @media(max-width: 1200px) {
      .overview-layout {
        grid-template-columns: 295px 1fr;
      }

      .overview-col-right {
        grid-column: 1 / -1;
      }
    }

    @media(max-width: 768px) {
      .overview-layout {
        grid-template-columns: 1fr;
      }

      .overview-col-right,
      .overview-col-left,
      .overview-col-center {
        grid-column: auto;
      }
    }

    .overview-col-left,
    .overview-col-center,
    .overview-col-right {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    /* Premium Glassmorphic Card */
    .premium-credit-card {
      background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 50%, var(--brand3) 100%);
      border-radius: var(--radius-lg);
      padding: 22px;
      color: #FFFFFF;
      position: relative;
      overflow: hidden;
      box-shadow: 0 8px 30px rgba(55, 166, 134, 0.22);
      border: 1px solid rgba(255, 255, 255, 0.12);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 180px;
    }

    .premium-credit-card::before {
      content: "";
      position: absolute;
      top: -30px;
      right: -30px;
      width: 120px;
      height: 120px;
      background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
      border-radius: var(--radius-full);
      pointer-events: none;
    }

    .premium-credit-card-chip {
      width: 32px;
      height: 24px;
      background: linear-gradient(135deg, #ECC94B, #D69E2E);
      border-radius: var(--radius-xs);
      position: relative;
      opacity: 0.95;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }

    .premium-credit-card-num {
      font-family: monospace;
      font-size: 16px;
      letter-spacing: 2px;
      margin: 18px 0 8px 0;
      opacity: 0.9;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    .premium-credit-card-bal-lbl {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 1px;
      opacity: 0.75;
    }

    .premium-credit-card-bal-val {
      font-size: 22px;
      font-weight: 700;
      letter-spacing: -0.5px;
    }

    .premium-credit-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      font-size: 10px;
      opacity: 0.8;
      margin-top: 10px;
      text-transform: uppercase;
    }



    /* Daily Spend Limit Card */
    .daily-limit-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 16px;
    }

    .daily-limit-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 8px;
    }

    .daily-limit-bar {
      height: 8px;
      background: var(--bg4);
      border-radius: var(--radius-xs);
      overflow: hidden;
      margin: 10px 0;
      position: relative;
    }

    .daily-limit-fill {
      height: 100%;
      border-radius: var(--radius-xs);
      transition: width 0.5s ease;
    }

    .daily-limit-info {
      font-size: 11px;
      color: var(--text3);
      display: flex;
      justify-content: space-between;
    }

    /* Savings Plans Meta Component */
    .savings-plans-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 16px;
    }

    .savings-plans-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }

    .savings-plans-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
    }

    .savings-plans-add {
      font-size: 11px;
      color: var(--brand);
      cursor: pointer;
      font-weight: 600;
      background: none;
      border: none;
      padding: 0;
    }

    .savings-plans-add:hover {
      text-decoration: underline;
    }

    .saving-plan-item {
      display: flex;
      gap: 10px;
      align-items: center;
      margin-bottom: 12px;
    }

    .saving-plan-item:last-child {
      margin-bottom: 0;
    }

    .saving-plan-icon {
      width: 32px;
      height: 32px;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
    }

    .saving-plan-details {
      flex: 1;
    }

    .saving-plan-meta {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 4px;
    }

    .saving-plan-name {
      color: var(--text2);
    }

    .saving-plan-bar {
      height: 6px;
      background: var(--bg4);
      border-radius: var(--radius-xs);
      overflow: hidden;
    }

    .saving-plan-fill {
      height: 100%;
      border-radius: var(--radius-xs);
    }

    /* Overview KPIs Column */
    .overview-kpis {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }

    .overview-kpi-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 16px;
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .overview-kpi-lbl {
      font-size: 10px;
      font-weight: 700;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .overview-kpi-val {
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
    }

    .overview-kpi-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: var(--radius-xs);
      width: fit-content;
      margin-top: 4px;
      display: flex;
      align-items: center;
      gap: 2px;
    }

    .badge-green {
      background: var(--bg5);
      color: var(--green2);
    }

    .badge-red {
      background: #FDF2F2;
      color: var(--red2);
    }

    .badge-teal {
      background: #E6FFFA;
      color: #0D9488;
    }

    .badge-amber {
      background: #FFFBEB;
      color: var(--amber2);
    }

    /* Money Statistics Chart Container */
    .money-stats-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 18px;
      display: flex;
      flex-direction: column;
    }

    .money-stats-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }

    .money-stats-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
    }

    .money-stats-meta {
      display: flex;
      align-items: flex-end;
      gap: 12px;
      margin-bottom: 10px;
    }

    .money-stats-bal-lbl {
      font-size: 11px;
      color: var(--text3);
    }

    .money-stats-bal-val {
      font-size: 20px;
      font-weight: 700;
      color: var(--text);
    }

    /* Recent Lançamentos Card */
    .recent-txs-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 16px;
    }

    .recent-txs-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }

    .recent-txs-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
    }

    .recent-tx-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
    }

    .recent-tx-row:last-child {
      border-bottom: none;
    }

    .recent-tx-left {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .recent-tx-icon-bg {
      width: 32px;
      height: 32px;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
    }

    .recent-tx-desc {
      font-size: 12px;
      font-weight: 600;
      color: var(--text);
    }

    .recent-tx-cat-pill {
      font-size: 9px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: var(--radius-xs);
      margin-top: 2px;
      width: fit-content;
    }

    .recent-tx-mid {
      text-align: right;
      font-size: 11px;
      color: var(--text3);
    }

    .recent-tx-right {
      text-align: right;
    }

    .recent-tx-val {
      font-size: 12px;
      font-weight: 700;
    }

    .recent-tx-status {
      font-size: 9px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: var(--radius-xs);
      display: inline-block;
      margin-top: 2px;
    }

    .status-success {
      background: #ECFDF5;
      color: #047857;
    }

    .status-failed {
      background: #FEF2F2;
      color: #B91C1C;
    }

    .status-pending {
      background: #FFFBEB;
      color: #B45309;
    }

    /* Donut Category Chart Card Centered Text Overlay */
    .donut-wrapper {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .donut-center-overlay {
      position: absolute;
      text-align: center;
      pointer-events: none;
    }

    .donut-center-lbl {
      font-size: 10px;
      font-weight: 700;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      display: block;
    }

    .donut-center-val {
      font-size: 16px;
      font-weight: 800;
      color: var(--text);
      margin-top: 2px;
      display: block;
    }

    /* Activity Timeline */
    .activity-timeline {
      position: relative;
      padding-left: 20px;
      margin-top: 6px;
    }

    .activity-timeline::before {
      content: "";
      position: absolute;
      left: 6px;
      top: 6px;
      bottom: 6px;
      width: 2px;
      background: var(--border);
    }

    .activity-item {
      position: relative;
      margin-bottom: 14px;
    }

    .activity-item:last-child {
      margin-bottom: 0;
    }

    .activity-dot {
      position: absolute;
      left: -20px;
      top: 4px;
      width: 8px;
      height: 8px;
      border-radius: var(--radius-full);
      background: var(--brand);
      border: 2px solid var(--bg2);
    }

    .activity-body {
      font-size: 11px;
    }

    .activity-title {
      font-weight: 600;
      color: var(--text);
    }

    .activity-time {
      font-size: 9px;
      color: var(--text3);
      margin-top: 2px;
    }

    #pane-predict .card>div[style*="height:260px"] {
      height: 292px !important
    }

    /* AI Workspace premium theme alignments */
    .ai-workspace {
      display: grid;
      grid-template-columns: 1.6fr 1fr;
      gap: 16px;
      height: calc(100vh - 164px);
      min-height: 500px;
    }

    .ai-chat-card,
    .ai-side-card {
      height: 100% !important;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      border-radius: var(--radius-lg) !important;
    }

    .ai-chat-history {
      flex: 1;
      overflow-y: auto;
      padding: 16px;
      background: #FFFFFF;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      margin-bottom: 12px;
    }

    .ai-side-card {
      overflow-y: auto;
      gap: 10px;
    }

    .ai-input-row {
      display: flex;
      gap: 8px;
      margin-bottom: 4px;
    }

    .ai-input {
      flex: 1;
      border: 1px solid var(--border2);
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      font-size: 12.5px;
      outline: none;
      background: #FFFFFF;
      color: var(--text);
      transition: border-color .15s ease;
    }

    .ai-input:focus {
      border-color: var(--brand2);
      box-shadow: 0 0 0 3px rgba(55, 166, 134, .12);
    }

    ::-webkit-scrollbar-thumb {
      background: var(--border2)
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--border3)
    }

    @media(max-width:1120px) {
      .grid-4 {
        grid-template-columns: repeat(2, minmax(180px, 1fr))
      }

      .grid-2 {
        grid-template-columns: 1fr
      }

      .ai-workspace {
        grid-template-columns: 1fr;
        height: auto
      }

      .ai-chat-card,
      .ai-side-card {
        height: auto !important
      }
    }

    @media(max-width:768px) {
      #app-dashboard {
        padding: 0
      }

      .main {
        margin-left: 0;
        height: 100vh;
        border-radius: 0
      }

      .header {
        height: auto;
        min-height: 66px;
        align-items: flex-start;
        padding: 14px;
        flex-direction: column
      }

      .header-right {
        flex-wrap: wrap
      }

      .content {
        padding: 14px
      }

      .grid-4 {
        grid-template-columns: 1fr
      }

      .balance-hero {
        align-items: flex-start
      }

      .balance-hero-actions {
        flex-wrap: wrap
      }

      .ai-workspace {
        grid-template-columns: 1fr;
        height: auto
      }

      .ai-chat-card,
      .ai-side-card {
        height: auto !important
      }
    }

    /* Metas & Orçamento */
    .budget-goal-card {
      background: var(--bg3);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      transition: all 0.2s ease;
    }
    .budget-goal-card:hover {
      border-color: var(--brand);
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.05);
    }
    .budget-row {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 14px;
      background: var(--bg3);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      border-left: 4px solid transparent;
    }
    .budget-row-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .budget-bar-outer {
      height: 8px;
      background: var(--bg2);
      border-radius: var(--radius-xs);
      overflow: hidden;
      position: relative;
    }
    .budget-bar-inner {
      height: 100%;
      border-radius: var(--radius-xs);
      transition: width 0.3s ease;
    }
    .budget-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: var(--radius-lg);
      text-transform: uppercase;
    }
    .budget-badge.green {
      background: rgba(16, 185, 129, 0.1);
      color: var(--green2);
    }
    .budget-badge.yellow {
      background: rgba(245, 158, 11, 0.1);
      color: var(--amber2);
    }
    .budget-badge.red {
      background: rgba(239, 68, 68, 0.1);
      color: var(--red2);
    }

/* ══════════════════════════════════════════════════════════════
   FIFLOW FINAL UI NORMALIZATION
   Ajustes finais de layout, espacamento, alinhamento, bordas,
   sombras e responsividade - sem alterar logicas ou IDs.
   ══════════════════════════════════════════════════════════════ */

/* ── RESETS & HELPERS ── */
*, *::before, *::after { box-sizing: border-box }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale }

/* ── ALERTS ZONE ── */
#alertsZone:empty { display: none; margin: 0 }
#alertsZone { transition: all .2s ease }

/* ── OVERVIEW LAYOUT ── */
.overview-layout {
  gap: 14px;
  margin-top: 8px;
  align-items: stretch !important;
}
.overview-col-left,
.overview-col-center,
.overview-col-right {
  gap: 14px;
  height: 100%;
}

/* Right column cards - override inline styles */
.overview-col-right .card[style*="margin:0"],
.overview-col-right .card[style*="margin: 0"] {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 18px 18px 20px !important;
}
.overview-col-right .card-header[style*="margin-bottom:12px"] {
  margin-bottom: 14px !important;
}
.overview-col-right .card-title[style*="font-size:13px"] {
  font-size: 13px !important;
  letter-spacing: -0.1px !important;
}

/* Let cards in side columns stretch to fill vertical space */
.savings-plans-card {
  flex: 1;
  min-height: 80px;
}
.overview-col-right .card:last-child {
  flex: 1;
  min-height: 60px;
}

/* ── PREMIUM CREDIT CARD ── */
.premium-credit-card {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 45%, var(--brand3) 100%);
  height: 174px;
  padding: 20px 22px;
}
.premium-credit-card::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: -20px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
  border-radius: var(--radius-full);
  pointer-events: none;
}
.premium-credit-card-num {
  font-size: 17px;
  margin: 14px 0 6px;
}

/* ── DAILY LIMIT CARD ── */
.daily-limit-card { padding: 14px 16px }
.daily-limit-header { margin-bottom: 6px }

/* ── SAVINGS PLANS CARD ── */
.savings-plans-card { padding: 14px 16px }
.saving-plan-item { margin-bottom: 10px }
.saving-plan-item:last-child { margin-bottom: 0 }
.saving-plan-icon { width: 30px; height: 30px; border-radius: var(--radius-xs); font-size: 13px }

/* ── DONUT CHART (DISTRIBUICAO DE GASTOS) ── */
.overview-col-right .donut-wrapper > div:first-child {
  width: 186px !important;
  height: 186px !important;
}
.donut-center-val { font-size: 18px; margin-top: 3px }
.donut-center-lbl { font-size: 9px; letter-spacing: 0.8px }

/* Legend items alignment */
#pieLegend { margin-top: 16px !important; gap: 7px !important }
#pieLegend .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background .15s ease;
}
#pieLegend .legend-item:hover { background: var(--bg4) }
#pieLegend .legend-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}
#pieLegend .legend-name {
  flex: 1;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#pieLegend .legend-val {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  min-width: 38px;
  text-align: right;
}

/* ── OVERVIEW KPIs ── */
.overview-kpis { gap: 10px }
.overview-kpi-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  gap: 3px;
}
.overview-kpi-val { font-size: 20px; letter-spacing: -0.3px }
.overview-kpi-badge {
  font-size: 9.5px;
  padding: 2px 7px;
  margin-top: 5px;
}

/* ── MONEY STATISTICS / BAR CHART ── */
.money-stats-card { padding: 18px 18px 14px }
.money-stats-meta { margin-bottom: 6px }
.money-stats-bal-val { font-size: 21px }
.money-stats-card > div:last-child { margin-top: 6px !important; height: 232px !important }

/* ── RECENT TRANSACTIONS ── */
.recent-txs-card { padding: 14px 16px }
.recent-txs-header { margin-bottom: 10px }
.recent-tx-row {
  padding: 9px 0;
  gap: 8px;
}
.recent-tx-icon-bg { width: 30px; height: 30px; border-radius: var(--radius-xs); font-size: 13px }
.recent-tx-desc { font-size: 11.5px }
.recent-tx-cat-pill { font-size: 8.5px; padding: 1px 5px }
.recent-tx-mid { font-size: 10px }
.recent-tx-val { font-size: 11.5px }
.recent-tx-status { font-size: 8.5px; padding: 1px 6px }

/* ── ACTIVITY TIMELINE ── */
.activity-timeline { padding-left: 18px; margin-top: 4px }
.activity-item { margin-bottom: 12px }
.activity-dot { width: 7px; height: 7px; left: -18px; top: 3px; border-width: 1.5px }
.activity-title { font-size: 11.5px }
.activity-time { font-size: 9px }
.activity-body { font-size: 10.5px }

/* ══════════════════════════════════════════════════
   DRE PESSOAL
   ══════════════════════════════════════════════════ */
#dreAlerts:empty { display: none }
.dre-table { font-size: 12px }
.dre-table th {
  padding: 9px 14px;
  font-size: 9.5px;
}
.dre-table td { padding: 7px 14px }
.dre-section-row td {
  font-size: 9px;
  padding-top: 14px;
  padding-bottom: 5px;
}
.dre-subtotal td { font-size: 12px }
.dre-total td { font-size: 14px }
.dre-indent { padding-left: 28px !important }
.overflow-x { margin-top: 2px }

/* ══════════════════════════════════════════════════
   LANCAMENTOS (TRANSACTIONS)
   ══════════════════════════════════════════════════ */
.tx-filters { gap: 7px; margin-bottom: 12px }
.tx-search { font-size: 12px; padding: 8px 12px }
.tx-select {
  font-size: 12px;
  padding: 8px 30px 8px 12px;
  background-size: 12px;
  border-radius: var(--radius-sm);
}
.tx-list { max-height: 520px }
.tx-row {
  padding: 8px 8px;
  gap: 8px;
  border-radius: var(--radius-sm);
}
.tx-row:first-child { margin-top: 0 }
.tx-dot { width: 8px; height: 8px; border-radius: var(--radius-xs) }
.tx-desc { font-size: 12.5px }
.tx-meta { font-size: 10px; margin-top: 2px; gap: 5px }
.tx-amount { font-size: 12.5px }
.tx-empty { padding: 36px 20px }
.tx-empty-icon { font-size: 36px }
.tx-empty-title { font-size: 13px }

/* Bulk recategorize bar — só ocupa espaço quando há seleção (toggle via .show em updateBulkBar()). */
.bulk-select-bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.bulk-select-bar.show { display: flex; }
.bulk-count { font-size: 12px; font-weight: 700; color: var(--text2); white-space: nowrap }

/* Transaction Quick Insights */
#txQuickInsights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

/* Summary KPIs */
#txSummaryGrid .kpi-card {
  padding: 13px 15px;
  min-height: auto;
  border-radius: var(--radius-sm);
}
#txSummaryGrid .kpi-icon { width: 30px; height: 30px; border-radius: var(--radius-xs); font-size: 15px }
#txSummaryGrid .kpi-label { font-size: 11px; margin-bottom: 4px }
#txSummaryGrid .kpi-value { font-size: 20px }

/* ══════════════════════════════════════════════════
   IMPORTACAO
   ══════════════════════════════════════════════════ */
.drop-zone {
  padding: 32px 20px;
  border-radius: var(--radius);
  border-width: 2px;
  transition: all .2s ease;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--brand2);
  background: var(--brand-light);
}
.file-queue-item {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  gap: 10px;
}
.file-queue-item:last-child { margin-bottom: 0 }
.file-name { font-size: 12px; max-width: 200px }
.file-meta { font-size: 10px }
.file-remove { width: 24px; height: 24px; border-radius: var(--radius-xs); font-size: 11px }
.import-preview-list { max-height: 220px; border-radius: var(--radius-sm) }
.import-preview-row {
  padding: 8px 12px;
  font-size: 11px;
}
.import-stats { gap: 8px; margin: 10px 0 }
.import-stat {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  flex: 1;
  min-width: 70px;
}
.import-stat strong { font-size: 20px }
.import-stat span { font-size: 10px }
.imp-date { min-width: 58px; font-size: 10px }
.imp-desc { font-size: 11px }
.imp-cat { font-size: 10px; min-width: 80px }
.imp-amt { font-size: 11px; min-width: 74px }

/* ── BACKUP / MIGRACAO ── */
#pane-import .card[style*="margin-top:14px"] { border-radius: var(--radius) !important }

/* ══════════════════════════════════════════════════
   PREDICAO
   ══════════════════════════════════════════════════ */
#pane-predict .card { border-radius: var(--radius) }
#pane-predict .card-header { margin-bottom: 14px }
#pane-predict .card[style*="margin-bottom:14px"] .card-title {
  font-size: 13px;
}
#pane-predict .kpi-card {
  min-height: auto;
  padding: 14px 16px;
}
#pane-predict .kpi-icon { width: 32px; height: 32px; border-radius: var(--radius-xs); font-size: 16px }
#pane-predict .kpi-label { font-size: 11px; margin-bottom: 4px }
#pane-predict .kpi-value { font-size: 20px }

.action-item {
  gap: 10px;
  padding: 9px 0;
}
.action-item:last-child { border-bottom: none }
.action-rank { width: 22px; height: 22px; border-radius: var(--radius-xs); font-size: 10px }
.tag { font-size: 9.5px; padding: 2px 7px; border-radius: var(--radius-xs) }

/* ══════════════════════════════════════════════════
   AGENTE IA
   ══════════════════════════════════════════════════ */
.ai-msg-bubble { font-size: 12.5px; padding: 11px 14px; border-radius: var(--radius-sm) }
.ai-msg-wrap { margin-bottom: 10px }
.ai-msg-meta { font-size: 9px }
.ai-quick-btn {
  font-size: 10.5px;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
}
.ai-status-chip { font-size: 9px; padding: 4px 9px }
.ai-kpi-lbl { font-size: 9.5px }
.ai-kpi-val { font-size: 14px; margin-top: 2px }
.ai-kpi { padding: 8px 10px; border-radius: var(--radius-xs) }
.ai-side-block { padding: 11px 13px; border-radius: var(--radius-sm) }
.ai-side-title { font-size: 9.5px; margin-bottom: 8px }
.ai-list-item { font-size: 11.5px; padding: 6px 0 }

/* ══════════════════════════════════════════════════
   MODAIS
   ══════════════════════════════════════════════════ */
.modal-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal {
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  border: 1px solid var(--border2);
  background: var(--bg2);
  box-shadow: 0 24px 64px rgba(16, 24, 40, .18);
  max-height: 90vh;
}
.modal-header { margin-bottom: 20px }
.modal-title { font-size: 16px; color: var(--text) }
.modal-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: var(--bg4);
  color: var(--text3);
  font-size: 14px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.modal-close:hover { background: var(--bg5); color: var(--text2) }
.modal-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.modal-wide { max-width: 760px }

/* ── GOALS MODAL ── */
#goalsModal .modal { max-width: 550px }
#goalsModalList { gap: 8px; max-height: 240px }

/* ── CATEGORY BUDGET MODAL ── */
#categoryBudgetModal .modal { max-width: 500px }
#categoryBudgetModalList { gap: 10px; max-height: 280px }

/* ── RESET MODAL ── */
#resetModal .modal { max-width: 400px }

/* ══════════════════════════════════════════════════
   FORMULARIOS & INPUTS
   ══════════════════════════════════════════════════ */
.form-group { margin-bottom: 14px }
.form-label { font-size: 11px; margin-bottom: 6px }
.form-input {
  font-size: 12.5px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg4);
  border: 1px solid var(--border2);
  color: var(--text);
}
.form-input:focus {
  background: var(--bg2);
  border-color: var(--brand2);
  box-shadow: 0 0 0 3px rgba(55, 166, 134, .10);
}
.form-select {
  background-size: 13px;
  padding-right: 32px;
}
.form-hint { font-size: 10.5px; margin-top: 4px }
.color-swatches { gap: 7px }
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
}
.color-swatch.selected { border-color: var(--text); transform: scale(1.12); box-shadow: 0 0 0 2px var(--bg2) }
.color-swatch:hover { transform: scale(1.08) }

/* ══════════════════════════════════════════════════
   BOTOES
   ══════════════════════════════════════════════════ */
.btn {
  border-radius: var(--radius-full);
  font-size: 12px;
  padding: 8px 14px;
  gap: 6px;
  font-weight: 650;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%);
  box-shadow: 0 6px 16px rgba(55, 166, 134, .18);
}
.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(55, 166, 134, .26);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
}
.btn-secondary:hover {
  background: var(--bg4);
  border-color: var(--border3);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
}
.btn-ghost:hover {
  background: var(--bg4);
  border-color: var(--border3);
  color: var(--text);
}
.btn-danger {
  background: linear-gradient(135deg, var(--red), var(--red2));
  box-shadow: 0 4px 12px rgba(224, 82, 82, .2);
}
.btn-success {
  background: linear-gradient(135deg, #37A686, #2C403A);
  box-shadow: 0 4px 12px rgba(55, 166, 134, .18);
}
.btn-sm {
  font-size: 11px;
  padding: 6px 11px;
  border-radius: var(--radius-full);
}
.btn-block { width: 100%; justify-content: center }
.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--bg2);
  border: 1px solid var(--border);
}
.btn-icon-sm {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg2);
  border: 1px solid var(--border);
  font-size: 12px;
}
.btn-icon-sm.danger:hover {
  background: var(--red-light);
  border-color: rgba(224, 82, 82, .25);
  color: var(--red2);
}

/* ══════════════════════════════════════════════════
   METAS & ORCAMENTO (BUDGET)
   ══════════════════════════════════════════════════ */
#pane-budget .overview-kpis { gap: 12px; margin-bottom: 16px }
#pane-budget .overview-kpi-val { font-size: 18px }
#pane-budget .overview-kpi-trend { font-size: 10.5px; margin-top: 2px }
#pane-budget .grid-2-equal { gap: 14px; align-items: stretch }
#pane-budget .card { padding: 18px }
#pane-budget .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
#pane-budget .card-title { font-size: 14px; font-weight: 750; color: var(--text) }
.budget-goal-card {
  padding: 16px;
  gap: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg4);
}
.budget-goal-card:hover {
  border-color: var(--brand2);
  box-shadow: 0 4px 16px rgba(55, 166, 134, .06);
}
.budget-row {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg4);
}
.budget-row-header { font-size: 11.5px }
.budget-bar-outer { height: 7px; border-radius: var(--radius-xs) }
.budget-bar-inner { border-radius: var(--radius-xs) }
.budget-badge { font-size: 9px; padding: 2px 7px; border-radius: var(--radius-full) }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px }
::-webkit-scrollbar-track { background: transparent }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: var(--radius-full) }
::-webkit-scrollbar-thumb:hover { background: var(--border3) }

/* ══════════════════════════════════════════════════
   RESPONSIVIDADE - OVERVIEW
   ══════════════════════════════════════════════════ */
@media(max-width: 1200px) {
  .overview-layout { grid-template-columns: 280px 1fr }
  .overview-col-right { grid-column: 1 / -1 }
}
@media(max-width: 768px) {
  .overview-layout { grid-template-columns: 1fr }
  .overview-col-right,
  .overview-col-left,
  .overview-col-center { grid-column: auto }
  .overview-kpis { grid-template-columns: repeat(2, 1fr) }
  .money-stats-card > div:last-child { height: 200px !important }
}
@media(max-width: 480px) {
  .overview-kpis { grid-template-columns: 1fr }
}

/* ══════════════════════════════════════════════════
   RESPONSIVIDADE - DEMAIS PAGINAS
   ══════════════════════════════════════════════════ */
@media(max-width: 1200px) {
  #txQuickInsights { grid-template-columns: 1fr 1fr }
}
@media(max-width: 768px) {
  #txQuickInsights { grid-template-columns: 1fr }
  .tx-filters { flex-direction: column }
  .tx-filters .tx-search,
  .tx-filters .tx-select { width: 100% }
  .bulk-select-bar { flex-direction: column; align-items: flex-start }
  .drop-zone { padding: 24px 16px }
  .import-stat { min-width: 100% }
  #pane-budget .overview-kpis { grid-template-columns: 1fr }
}
