body{min-height:100vh}.card{border:0}.stat-card .display-6{font-size:1.8rem}.table td,.table th{vertical-align:middle}.money{white-space:nowrap}.photo-protected{background:repeating-linear-gradient(45deg,#f1f3f5,#f1f3f5 10px,#e9ecef 10px,#e9ecef 20px);min-height:140px}.form-label{font-weight:600}@media(max-width:768px){.table-responsive{font-size:.9rem}.btn{margin-bottom:.2rem}}
.mode-card { cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.mode-card:hover { background: rgba(13,110,253,.05); border-color: rgba(13,110,253,.5) !important; }
.mode-card:has(input:checked) { background: rgba(13,110,253,.08); border-color: #0d6efd !important; }

/* Dashboard moderno */
:root {
  --dashboard-navy: #0f172a;
  --dashboard-slate: #64748b;
  --dashboard-line: #e8edf4;
  --dashboard-surface: #ffffff;
  --dashboard-green: #10b981;
  --dashboard-red: #ef4444;
  --dashboard-amber: #f59e0b;
  --dashboard-blue: #3b82f6;
  --dashboard-violet: #7c3aed;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 184px;
  padding: 2rem 2.1rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 10%, rgba(59, 130, 246, .35), transparent 28%),
    radial-gradient(circle at 66% 120%, rgba(16, 185, 129, .22), transparent 34%),
    linear-gradient(125deg, #0f172a 0%, #172554 58%, #1e3a8a 100%);
  color: #fff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, .14);
}

.dashboard-hero::after {
  content: '';
  position: absolute;
  width: 250px;
  height: 250px;
  right: -115px;
  top: -120px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255,255,255,.035), 0 0 0 72px rgba(255,255,255,.025);
}

.dashboard-hero__content,
.dashboard-hero__actions { position: relative; z-index: 1; }
.dashboard-hero__content { max-width: 650px; }
.dashboard-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .65rem;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #bfdbfe;
}
.dashboard-hero h1 { margin: 0 0 .45rem; font-size: clamp(1.8rem, 3vw, 2.7rem); font-weight: 800; letter-spacing: -.035em; }
.dashboard-hero p { margin: 0; max-width: 600px; color: rgba(255,255,255,.75); font-size: 1rem; }
.dashboard-hero p strong { color: #fff; }
.dashboard-hero__actions { display: grid; grid-template-columns: repeat(3, minmax(116px, 1fr)); gap: .75rem; min-width: min(100%, 430px); }
.dashboard-action {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 68px;
  padding: .8rem .9rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 15px;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(8px);
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}
.dashboard-action:hover { transform: translateY(-2px); color: #fff; background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.26); }
.dashboard-action i { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; font-size: 1rem; background: rgba(255,255,255,.13); }
.dashboard-action span { display: flex; flex-direction: column; font-size: .84rem; font-weight: 700; line-height: 1.12; }
.dashboard-action small { margin-bottom: .18rem; color: rgba(255,255,255,.62); font-size: .66rem; font-weight: 600; }
.dashboard-action--income i { background: rgba(16,185,129,.22); color: #a7f3d0; }
.dashboard-action--expense i { background: rgba(248,113,113,.18); color: #fecaca; }

.dashboard-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.metric-card {
  position: relative;
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--dashboard-line);
  border-radius: 18px;
  background: var(--dashboard-surface);
  box-shadow: 0 9px 28px rgba(15, 23, 42, .045);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.metric-card:hover { transform: translateY(-2px); border-color: #d9e1ec; box-shadow: 0 14px 32px rgba(15, 23, 42, .075); }
.metric-card--balance { background: linear-gradient(145deg, #eff6ff, #ffffff 70%); border-color: #dbeafe; }
.metric-card--alert { background: linear-gradient(145deg, #fff7ed, #ffffff 72%); border-color: #fed7aa; }
.metric-card__top { display: flex; align-items: center; gap: .65rem; margin-bottom: 1rem; }
.metric-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: #dbeafe; color: #2563eb; }
.metric-icon--income { background: #d1fae5; color: #059669; }
.metric-icon--expense { background: #fee2e2; color: #dc2626; }
.metric-icon--open { background: #ede9fe; color: #7c3aed; }
.metric-icon--overdue { background: #ffedd5; color: #ea580c; }
.metric-label { min-width: 0; color: var(--dashboard-slate); font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-value { display: block; margin-bottom: .55rem; color: var(--dashboard-navy); font-size: clamp(1.24rem, 2vw, 1.65rem); font-weight: 800; letter-spacing: -.025em; white-space: nowrap; }
.metric-caption, .metric-trend { display: inline-flex; align-items: center; gap: .25rem; color: #94a3b8; font-size: .7rem; line-height: 1.3; }
.metric-trend.is-positive { color: #059669; }
.metric-trend.is-negative { color: #dc2626; }
.metric-trend.is-neutral { color: #64748b; }

.dashboard-panel {
  padding: 1.35rem;
  border: 1px solid var(--dashboard-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .045);
}
.dashboard-panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.dashboard-panel__eyebrow { display: block; margin-bottom: .18rem; color: #94a3b8; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-panel h2 { margin: 0; color: var(--dashboard-navy); font-size: 1.08rem; font-weight: 800; letter-spacing: -.012em; }
.dashboard-link { display: inline-flex; align-items: center; gap: .35rem; flex: 0 0 auto; color: #2563eb; font-size: .78rem; font-weight: 700; text-decoration: none; }
.dashboard-link:hover { color: #1d4ed8; }
.dashboard-chart--line { height: 310px; }

.health-percentage { display: grid; place-items: center; min-width: 52px; min-height: 36px; padding: 0 .6rem; border-radius: 11px; background: #eff6ff; color: #2563eb; font-size: .92rem; font-weight: 800; }
.health-progress { height: 11px; overflow: hidden; margin: .35rem 0 1rem; border-radius: 999px; background: #edf2f7; }
.health-progress span { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b82f6, #8b5cf6); transition: width .5s ease; }
.health-description { min-height: 44px; margin: 0 0 1rem; color: #64748b; font-size: .83rem; line-height: 1.55; }
.health-summary { display: grid; gap: .72rem; padding: 1rem 0; border-top: 1px solid var(--dashboard-line); border-bottom: 1px solid var(--dashboard-line); }
.health-summary > div { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.health-summary span { color: #64748b; font-size: .78rem; }
.health-summary span i { width: 18px; margin-right: .3rem; color: #3b82f6; }
.health-summary strong { color: var(--dashboard-navy); font-size: .86rem; }
.dashboard-secondary-action { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; padding: .78rem .9rem; border-radius: 12px; background: #f8fafc; color: #334155; font-size: .78rem; font-weight: 700; text-decoration: none; }
.dashboard-secondary-action:hover { background: #f1f5f9; color: #0f172a; }

.financial-agenda { display: grid; }
.agenda-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid #eef2f7; }
.agenda-item:first-child { padding-top: .2rem; }
.agenda-item:last-child { padding-bottom: 0; border-bottom: 0; }
.agenda-date { display: grid; place-items: center; align-content: center; width: 46px; height: 52px; border-radius: 13px; background: #f1f5f9; color: #334155; line-height: 1; }
.agenda-date span { font-size: 1rem; font-weight: 800; }
.agenda-date small { margin-top: .25rem; color: #94a3b8; font-size: .58rem; font-weight: 800; }
.agenda-date.is-danger { background: #fef2f2; color: #dc2626; }
.agenda-date.is-danger small { color: #f87171; }
.agenda-main { min-width: 0; }
.agenda-title { display: block; color: var(--dashboard-navy); font-size: .86rem; font-weight: 750; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-title:hover { color: #2563eb; }
.agenda-meta { display: flex; align-items: center; gap: .35rem; margin-top: .2rem; color: #94a3b8; font-size: .68rem; }
.agenda-due { display: flex; flex-direction: column; align-items: flex-end; gap: .28rem; }
.agenda-due strong { color: var(--dashboard-navy); font-size: .82rem; white-space: nowrap; }
.due-chip { display: inline-flex; align-items: center; min-height: 22px; padding: .2rem .45rem; border-radius: 999px; font-size: .61rem; font-weight: 750; white-space: nowrap; }
.due-chip--danger { background: #fef2f2; color: #dc2626; }
.due-chip--warning { background: #fffbeb; color: #b45309; }
.due-chip--info { background: #eff6ff; color: #2563eb; }
.due-chip--neutral { background: #f8fafc; color: #64748b; }
.btn-quick-pay { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-width: 80px; padding: .55rem .72rem; border: 0; border-radius: 11px; background: #0f172a; color: #fff; font-size: .72rem; font-weight: 750; transition: transform .15s ease, background-color .15s ease; }
.btn-quick-pay:hover { transform: translateY(-1px); background: #1e293b; }

.category-chart-wrap { display: grid; grid-template-columns: minmax(170px, .85fr) minmax(190px, 1.15fr); align-items: center; gap: 1.25rem; min-height: 275px; }
.dashboard-chart--doughnut { position: relative; height: 205px; }
.category-chart-center { pointer-events: none; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.category-chart-center small { color: #94a3b8; font-size: .65rem; }
.category-chart-center strong { max-width: 108px; color: var(--dashboard-navy); font-size: .88rem; font-weight: 800; line-height: 1.2; }
.category-legend { display: grid; gap: .66rem; }
.category-legend__item { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: .55rem; }
.category-dot { width: 8px; height: 8px; border-radius: 50%; }
.category-name { color: #64748b; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-legend__item strong { color: #334155; font-size: .72rem; white-space: nowrap; }

.recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.recent-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: .7rem; min-width: 0; padding: .85rem; border: 1px solid #edf1f6; border-radius: 14px; color: inherit; text-decoration: none; transition: border-color .15s ease, background-color .15s ease, transform .15s ease; }
.recent-card:hover { transform: translateY(-1px); border-color: #dbe3ed; background: #fbfdff; color: inherit; }
.recent-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #fee2e2; color: #dc2626; }
.recent-icon.is-income { background: #d1fae5; color: #059669; }
.recent-content { display: flex; flex-direction: column; min-width: 0; }
.recent-content strong { color: #1e293b; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-content small { margin-top: .18rem; color: #94a3b8; font-size: .63rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-value { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.recent-value strong { color: #dc2626; font-size: .73rem; white-space: nowrap; }
.recent-value strong.is-income { color: #059669; }
.status-text { margin-top: .18rem; font-size: .6rem; font-weight: 750; }
.status-text--success { color: #059669; }
.status-text--warning { color: #b45309; }
.status-text--info { color: #2563eb; }
.status-text--danger { color: #dc2626; }

.dashboard-empty-state { display: flex; min-height: 260px; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; text-align: center; color: #94a3b8; }
.dashboard-empty-state i { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: .9rem; border-radius: 18px; background: #f1f5f9; color: #64748b; font-size: 1.35rem; }
.dashboard-empty-state h3 { margin: 0 0 .35rem; color: #334155; font-size: .92rem; font-weight: 800; }
.dashboard-empty-state p { max-width: 310px; margin: 0; font-size: .76rem; line-height: 1.5; }
.dashboard-empty-state--compact { min-height: 170px; }

@media (max-width: 1199.98px) {
  .dashboard-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .dashboard-hero__actions { width: 100%; }
  .recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .dashboard-hero { min-height: auto; padding: 1.35rem; border-radius: 19px; }
  .dashboard-hero__actions { grid-template-columns: 1fr; gap: .55rem; }
  .dashboard-action { min-height: 56px; }
  .dashboard-metrics { display: flex; overflow-x: auto; margin-right: -.75rem; padding-right: .75rem; padding-bottom: .35rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .dashboard-metrics::-webkit-scrollbar { display: none; }
  .metric-card { flex: 0 0 78vw; max-width: 285px; scroll-snap-align: start; }
  .dashboard-panel { padding: 1.05rem; border-radius: 17px; }
  .dashboard-chart--line { height: 270px; }
  .agenda-item { grid-template-columns: 44px minmax(0, 1fr) auto; gap: .65rem; }
  .agenda-due { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .agenda-action { grid-column: 3; grid-row: 1 / span 2; }
  .btn-quick-pay { min-width: 45px; width: 45px; height: 42px; padding: 0; font-size: 0; }
  .btn-quick-pay i { font-size: .95rem; }
  .category-chart-wrap { grid-template-columns: 1fr; }
  .dashboard-chart--doughnut { height: 190px; }
  .recent-grid { grid-template-columns: 1fr; }
}

@media (max-width: 419.98px) {
  .dashboard-panel__header { align-items: flex-start; flex-direction: column; }
  .dashboard-link { align-self: flex-start; }
  .metric-card { flex-basis: 84vw; }
  .agenda-item { grid-template-columns: 42px minmax(0, 1fr) 42px; }
  .agenda-date { width: 42px; }
  .agenda-meta { max-width: 180px; }
}

/* Ajustes gerais para iPhone e Safari móvel */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body.app-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

img,
svg,
canvas {
  max-width: 100%;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

.brand-mobile,
.mobile-bottom-nav {
  display: none;
}

@supports (padding: max(0px)) {
  .app-navbar {
    padding-left: max(.25rem, env(safe-area-inset-left));
    padding-right: max(.25rem, env(safe-area-inset-right));
  }
}

@media (max-width: 767.98px) {
  body.app-shell {
    background: #f5f7fb !important;
  }

  body.has-mobile-bottom-nav {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .app-navbar {
    padding-top: max(.45rem, env(safe-area-inset-top));
    box-shadow: 0 6px 22px rgba(15, 23, 42, .14);
  }

  .app-navbar .container-fluid {
    padding-left: .8rem;
    padding-right: .8rem;
  }

  .brand-full {
    display: none;
  }

  .brand-mobile {
    display: inline;
    font-size: 1rem;
  }

  .navbar-toggler {
    width: 44px;
    height: 44px;
    padding: .45rem;
    border-color: rgba(255, 255, 255, .24);
  }

  .navbar-collapse {
    margin: .7rem -.8rem -.45rem;
    padding: .55rem .8rem .9rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
    background: #111827;
  }

  .navbar-nav .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: .65rem .75rem;
    border-radius: 10px;
  }

  .navbar-nav .nav-link:active {
    background: rgba(255, 255, 255, .08);
  }

  .nav-user-area {
    align-items: stretch !important;
    flex-direction: column;
    margin-top: .45rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
  }

  .nav-user-area > a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .nav-user-area form,
  .nav-user-area .btn {
    width: 100%;
  }

  .app-main {
    width: 100%;
    max-width: 100% !important;
    overflow: hidden;
    padding: 1rem .75rem 1.25rem !important;
  }

  .alert {
    padding-right: 2.75rem;
    border-radius: 14px;
    font-size: .88rem;
  }

  .form-control,
  .form-select,
  textarea.form-control {
    min-height: 46px;
    font-size: 16px;
    border-radius: 12px;
  }

  textarea.form-control {
    min-height: 105px;
  }

  .btn:not(.btn-close):not(.navbar-toggler) {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
  }

  .card {
    border-radius: 16px;
  }

  .table-responsive {
    max-width: 100%;
    border-radius: inherit;
    -webkit-overflow-scrolling: touch;
  }

  .modal-dialog {
    margin: .5rem;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 1045;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: .35rem max(.35rem, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(.35rem, env(safe-area-inset-left));
    border-top: 1px solid rgba(148, 163, 184, .25);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -10px 30px rgba(15, 23, 42, .11);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav__item {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 58px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    border-radius: 12px;
    color: #7b8798;
    font-size: .62rem;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-bottom-nav__item > i {
    font-size: 1.2rem;
    line-height: 1;
  }

  .mobile-bottom-nav__item.is-active {
    color: #2563eb;
  }

  .mobile-bottom-nav__item:active {
    background: #eff6ff;
  }

  .mobile-bottom-nav__item--add {
    color: #0f172a;
  }

  .mobile-bottom-nav__add-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-top: -18px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .3);
    font-size: 1.2rem;
  }

  /* Dashboard sem rolagem lateral */
  .dashboard-hero {
    min-height: auto;
    gap: 1rem;
    padding: 1.15rem;
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .13);
  }

  .dashboard-hero::after {
    width: 180px;
    height: 180px;
    right: -95px;
    top: -90px;
  }

  .dashboard-eyebrow {
    margin-bottom: .45rem;
    font-size: .62rem;
  }

  .dashboard-hero h1 {
    margin-bottom: .35rem;
    font-size: clamp(1.45rem, 7vw, 1.85rem);
  }

  .dashboard-hero p {
    font-size: .82rem;
    line-height: 1.45;
  }

  .dashboard-hero__actions {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .45rem;
  }

  .dashboard-action {
    min-width: 0;
    min-height: 72px;
    flex-direction: column;
    justify-content: center;
    gap: .35rem;
    padding: .55rem .25rem;
    border-radius: 13px;
    text-align: center;
  }

  .dashboard-action i {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .dashboard-action span {
    min-width: 0;
    font-size: .67rem;
    line-height: 1.12;
  }

  .dashboard-action small {
    display: none;
  }

  .dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    overflow: visible;
    margin-right: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .metric-card {
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 142px;
    padding: .85rem;
    border-radius: 15px;
    scroll-snap-align: none;
  }

  .metric-card--balance {
    grid-column: 1 / -1;
    min-height: 128px;
  }

  .metric-card__top {
    gap: .5rem;
    margin-bottom: .65rem;
  }

  .metric-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 10px;
    font-size: .88rem;
  }

  .metric-label {
    font-size: .69rem;
  }

  .metric-value {
    margin-bottom: .4rem;
    font-size: clamp(1.02rem, 5vw, 1.28rem);
    line-height: 1.12;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .metric-caption,
  .metric-trend {
    align-items: flex-start;
    font-size: .61rem;
    line-height: 1.35;
  }

  .row.g-4 {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .75rem;
  }

  .dashboard-panel {
    padding: .95rem;
    border-radius: 16px;
  }

  .dashboard-panel__header {
    align-items: center;
    flex-direction: row;
    gap: .6rem;
    margin-bottom: .9rem;
  }

  .dashboard-panel h2 {
    font-size: .98rem;
  }

  .dashboard-panel__eyebrow {
    font-size: .59rem;
  }

  .dashboard-link {
    max-width: 45%;
    justify-content: flex-end;
    font-size: .68rem;
    text-align: right;
  }

  .dashboard-chart--line {
    height: 225px;
  }

  .health-description {
    min-height: auto;
  }

  .financial-agenda {
    gap: .65rem;
  }

  .agenda-item {
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas:
      "date main"
      "date due"
      "action action";
    gap: .45rem .65rem;
    padding: .75rem;
    border: 1px solid #e8edf4;
    border-radius: 14px;
    background: #fff;
  }

  .agenda-item:first-child,
  .agenda-item:last-child {
    padding: .75rem;
    border-bottom: 1px solid #e8edf4;
  }

  .agenda-date {
    grid-area: date;
    width: 42px;
    height: 50px;
    border-radius: 12px;
  }

  .agenda-main {
    grid-area: main;
  }

  .agenda-title {
    font-size: .82rem;
  }

  .agenda-meta {
    max-width: none;
    font-size: .63rem;
  }

  .agenda-due {
    grid-area: due;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    gap: .45rem;
  }

  .agenda-due strong {
    font-size: .76rem;
  }

  .agenda-action {
    grid-area: action;
    width: 100%;
  }

  .btn-quick-pay {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: .6rem .8rem;
    border-radius: 11px;
    font-size: .76rem;
  }

  .btn-quick-pay i {
    font-size: .9rem;
  }

  .category-chart-wrap {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: .7rem;
  }

  .dashboard-chart--doughnut {
    height: 180px;
  }

  .category-legend {
    gap: .55rem;
  }

  .category-legend__item {
    padding: .25rem 0;
  }

  .recent-grid {
    grid-template-columns: 1fr;
    gap: .55rem;
  }

  .recent-card {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: .55rem;
    padding: .75rem;
    border-radius: 13px;
  }

  .recent-value strong {
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Tabelas principais viram cartões no iPhone */
  .mobile-card-table,
  .mobile-card-table tbody,
  .mobile-card-table tr,
  .mobile-card-table td {
    display: block;
    width: 100%;
  }

  .mobile-card-table thead {
    display: none;
  }

  .mobile-card-table tbody {
    padding: .65rem;
    background: #f5f7fb;
  }

  .mobile-card-table tbody tr {
    overflow: hidden;
    margin-bottom: .7rem;
    padding: .45rem .8rem;
    border: 1px solid #e3e9f1;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
  }

  .mobile-card-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .mobile-card-table td {
    display: grid;
    grid-template-columns: minmax(86px, 34%) minmax(0, 1fr);
    align-items: center;
    gap: .65rem;
    padding: .55rem 0;
    border: 0;
    border-bottom: 1px solid #edf1f6;
    font-size: .82rem;
    text-align: right;
    white-space: normal !important;
  }

  .mobile-card-table td:last-child {
    border-bottom: 0;
  }

  .mobile-card-table td::before {
    content: attr(data-label);
    color: #8290a3;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-align: left;
    text-transform: uppercase;
  }

  .mobile-card-table td[data-label="Conta"],
  .mobile-card-table td[data-label="Tipo/Título"] {
    display: block;
    padding-top: .7rem;
    text-align: left;
  }

  .mobile-card-table td[data-label="Conta"]::before,
  .mobile-card-table td[data-label="Tipo/Título"]::before {
    display: none;
  }

  .mobile-card-table td[data-label="Ações"] > .d-flex,
  .mobile-card-table td[data-label="Ações"] form,
  .mobile-card-table td[data-label="Ações"] .btn {
    width: 100%;
  }

  .mobile-card-table td[data-label="Ações"] > .d-flex {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-card-table td[data-label="Ações"] {
    display: block;
    padding-top: .7rem;
  }

  .mobile-card-table td[data-label="Ações"]::before {
    display: none;
  }
}

@media (max-width: 374.98px) {
  .app-main {
    padding-right: .6rem !important;
    padding-left: .6rem !important;
  }

  .dashboard-hero {
    padding: 1rem;
  }

  .dashboard-action span {
    font-size: .62rem;
  }

  .metric-card {
    min-height: 136px;
    padding: .75rem;
  }

  .metric-value {
    font-size: 1rem;
  }

  .dashboard-panel__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-link {
    max-width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .mobile-bottom-nav__item {
    font-size: .57rem;
  }
}

@media (max-width: 767.98px) {
  .mobile-page-header {
    align-items: stretch !important;
    flex-direction: column;
  }

  .mobile-page-header h1 {
    font-size: 1.45rem;
  }

  .mobile-page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    width: 100%;
  }

  .mobile-page-actions .btn,
  .mobile-page-header > .btn {
    width: 100%;
  }

  .mobile-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    width: 100%;
  }

  .mobile-action-grid form,
  .mobile-action-grid .btn {
    width: 100%;
  }

  .mobile-card-table__empty {
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .mobile-card-table__empty td {
    display: block !important;
    padding: 2rem 1rem !important;
    text-align: center !important;
  }

  .mobile-card-table__empty td::before {
    display: none !important;
  }
}
