:root {
  --ink: #17231f;
  --muted: #6c7772;
  --line: #e7e9e5;
  --paper: #f7f7f3;
  --white: #fff;
  --green: #235f49;
  --green-dark: #112820;
  --green-soft: #e7f0ea;
  --lime: #b7d34b;
  --amber: #d4932c;
  --amber-soft: #fff2d9;
  --red: #b74c45;
  --red-soft: #fbe8e5;
  --blue: #426c88;
  --shadow: 0 12px 34px rgba(21, 37, 31, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--green-dark); color: #dfe9e4; padding: 28px 18px 18px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--lime); color: var(--green-dark); font-family: Manrope, sans-serif; font-weight: 800; font-size: 20px; }
.brand strong, .brand small, .profile strong, .profile small { display: block; }
.brand strong { font: 700 17px Manrope, sans-serif; color: white; }
.brand small { color: #91a69d; margin-top: 2px; font-size: 11px; }
.nav { display: grid; gap: 4px; }
.nav a, .nav-bottom > a { text-decoration: none; color: #b9c8c2; padding: 11px 12px; border-radius: 10px; display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 500; }
.nav a span, .nav-bottom > a span { width: 20px; text-align: center; font-size: 17px; }
.nav a:hover, .nav a.active, .nav-bottom > a:hover, .nav-bottom > a.active { background: #1c3a2f; color: white; }
.nav a.active { box-shadow: inset 3px 0 var(--lime); }
.nav-bottom { margin-top: auto; display: grid; gap: 14px; }
.profile { border-top: 1px solid #2b453b; padding: 18px 8px 4px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--green-dark); background: #cfdbd5; font-size: 11px; font-weight: 700; }
.profile strong { color: white; font-size: 13px; }
.profile small { color: #82998f; font-size: 10px; margin-top: 2px; }

.main { min-width: 0; }
.topbar { height: 78px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(247,247,243,.92); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 15; }
.period-switcher { display: flex; align-items: center; gap: 14px; }
.period-switcher button { border: 0; background: transparent; color: var(--muted); font-size: 25px; padding: 5px; }
.period-switcher strong { font: 700 15px Manrope, sans-serif; min-width: 125px; text-align: center; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.icon-button { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: white; color: var(--ink); }
.primary-button, .secondary-button { min-height: 42px; border-radius: 11px; padding: 0 17px; border: 1px solid transparent; font-weight: 700; font-size: 13px; }
.primary-button { background: var(--green); color: white; }
.primary-button:hover { background: #194b39; }
.primary-button span { font-size: 18px; margin-right: 6px; }
.secondary-button { background: white; border-color: var(--line); color: var(--ink); }
.menu-button { display: none; }
.view { padding: 34px; max-width: 1500px; margin: 0 auto; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 26px; }
.eyebrow { color: var(--green); font-size: 10px; letter-spacing: .16em; font-weight: 800; }
h1, h2, h3 { font-family: Manrope, sans-serif; margin: 0; }
h1 { margin-top: 7px; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.04em; }
h2 { font-size: 21px; letter-spacing: -.03em; }
h3 { font-size: 14px; }
.page-head p { color: var(--muted); margin: 7px 0 0; font-size: 14px; }
.status-chip { border-radius: 30px; padding: 8px 12px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 700; white-space: nowrap; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-height: 138px; position: relative; overflow: hidden; }
.metric.primary { background: var(--green-dark); color: white; border-color: var(--green-dark); }
.metric small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.metric.primary small { color: #9db3a9; }
.metric strong { display: block; font: 700 clamp(21px, 2.1vw, 29px) Manrope, sans-serif; margin-top: 13px; letter-spacing: -.04em; }
.metric .trend { display: inline-flex; margin-top: 10px; color: var(--green); font-size: 11px; font-weight: 700; }
.metric.primary .trend { color: var(--lime); }
.metric .metric-icon { position: absolute; right: 18px; top: 18px; color: #aab4af; font-size: 20px; }
.metric.primary::after { content:""; position:absolute; width:90px; height:90px; right:-18px; bottom:-32px; border-radius:50%; background:rgba(183,211,75,.16); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr); gap: 18px; }
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 0 rgba(20,30,25,.01); }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }
.card-header p { color: var(--muted); font-size: 11px; margin: 4px 0 0; }
.text-button { border: 0; background: transparent; color: var(--green); font-weight: 700; font-size: 12px; }
.chart-wrap { min-height: 205px; display: flex; align-items: flex-end; gap: 11px; padding-top: 20px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 49px, #f0f1ee 50px); }
.bar-group { flex: 1; min-width: 35px; display: flex; justify-content: center; align-items: flex-end; gap: 4px; height: 185px; position: relative; }
.bar { width: min(22px, 38%); border-radius: 5px 5px 0 0; min-height: 4px; transition: .35s ease; }
.bar.income { background: #9db8ab; }
.bar.expense { background: var(--green); }
.bar-group.current .bar.expense { background: var(--lime); }
.bar-group label { position: absolute; bottom: -25px; font-size: 10px; color: var(--muted); }
.chart-legend { display:flex; gap:20px; margin-top:32px; color:var(--muted); font-size:10px; }
.chart-legend span::before { content:""; display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:6px; background:#9db8ab; }
.chart-legend span:last-child::before { background:var(--green); }

.right-stack { display: grid; gap: 18px; }
.commitment { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.commitment:last-child { border-bottom: 0; padding-bottom: 0; }
.date-box { border-radius: 10px; background: var(--paper); text-align: center; padding: 7px 4px; }
.date-box b, .date-box small { display: block; }
.date-box b { font-size: 15px; }
.date-box small { font-size: 8px; color:var(--muted); font-weight:700; }
.commitment strong, .commitment small { display:block; }
.commitment strong { font-size: 12px; }
.commitment small { color:var(--muted); font-size:10px; margin-top:3px; }
.commitment .money { font-size: 12px; }
.alert { border-radius: 14px; padding: 14px; display: flex; gap: 11px; margin-top: 10px; }
.alert.warning { background: var(--amber-soft); color: #74531b; }
.alert.danger { background: var(--red-soft); color: #7b3732; }
.alert.good { background: var(--green-soft); color: var(--green); }
.alert span { font-size:18px; }
.alert strong, .alert small { display:block; }
.alert strong { font-size:11px; }
.alert small { font-size:10px; margin-top:3px; line-height:1.4; }

.toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.filters { display:flex; gap:8px; flex-wrap:wrap; }
.search { min-width:260px; position:relative; }
.search input, .filter-select { width:100%; height:40px; border:1px solid var(--line); border-radius:10px; background:white; padding:0 12px; color:var(--ink); outline:none; }
.filter-select { width:auto; min-width:135px; }
.search input:focus, .filter-select:focus, .field input:focus, .field select:focus { border-color:#77a08f; box-shadow:0 0 0 3px rgba(35,95,73,.09); }
.table-card { background:white; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
table { border-collapse:collapse; width:100%; }
th { padding:13px 16px; color:var(--muted); background:#fafaf7; font-size:10px; letter-spacing:.05em; text-transform:uppercase; text-align:left; }
td { padding:15px 16px; border-top:1px solid var(--line); font-size:12px; }
.transaction-name { display:flex; align-items:center; gap:10px; }
.category-dot { width:9px; height:9px; border-radius:50%; background:var(--green); flex:0 0 auto; }
.transaction-name strong, .transaction-name small { display:block; }
.transaction-name small { color:var(--muted); margin-top:3px; font-size:10px; }
.money.income { color:var(--green); font-weight:700; }
.money.expense { color:var(--ink); font-weight:700; }
.badge { display:inline-block; padding:5px 8px; border-radius:20px; background:var(--paper); color:var(--muted); font-size:9px; font-weight:700; }
.empty-state { padding:50px 20px; text-align:center; color:var(--muted); }

.entity-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.entity-card { background:white; border:1px solid var(--line); border-radius:var(--radius); padding:20px; }
.entity-card .entity-top { display:flex; justify-content:space-between; gap:10px; }
.entity-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:11px; background:var(--green-soft); color:var(--green); font-weight:700; }
.entity-card h3 { margin-top:18px; }
.entity-card p { color:var(--muted); font-size:11px; margin:5px 0 18px; }
.entity-card .amount { font:700 21px Manrope,sans-serif; }
.entity-meta { display:flex; justify-content:space-between; margin-top:17px; padding-top:14px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; }
.progress { height:7px; background:#edf0ec; border-radius:5px; overflow:hidden; margin-top:13px; }
.progress span { display:block; height:100%; border-radius:5px; background:var(--green); }

.projection-table .positive { background:var(--green-soft); }
.projection-table .negative { background:var(--red-soft); }
.projection-summary { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:18px; }
.projection-hero { background:var(--green-dark); color:white; border-radius:var(--radius); padding:25px; display:flex; align-items:center; justify-content:space-between; }
.projection-hero small { color:#a8bbb3; }
.projection-hero strong { display:block; font:700 28px Manrope,sans-serif; margin-top:8px; }
.ring { width:78px; height:78px; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--lime) 0 68%, #2b483d 68%); position:relative; }
.ring::before { content:""; width:58px; height:58px; background:var(--green-dark); border-radius:50%; position:absolute; }
.ring b { z-index:1; font-size:12px; }
.analysis-grid { display:grid; grid-template-columns:1.2fr .8fr; gap:18px; }
.donut-wrap { display:flex; align-items:center; gap:28px; min-height:230px; }
.donut { width:170px; height:170px; border-radius:50%; background:conic-gradient(#235f49 0 31%,#b7d34b 31% 53%,#d4932c 53% 70%,#426c88 70% 86%,#b8c2bd 86%); position:relative; flex:0 0 auto; }
.donut::after { content:""; position:absolute; inset:38px; background:white; border-radius:50%; }
.legend-list { display:grid; gap:12px; width:100%; }
.legend-item { display:grid; grid-template-columns:10px 1fr auto; gap:9px; align-items:center; font-size:11px; }
.legend-item i { width:8px; height:8px; border-radius:50%; }
.legend-item span { color:var(--muted); }
.config-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.config-list { display:grid; gap:8px; }
.config-item { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px; background:var(--paper); border-radius:11px; font-size:12px; }
.config-item span:first-child { display:flex; align-items:center; gap:9px; }
.config-item i { width:9px; height:9px; border-radius:50%; background:var(--green); }

.modal-backdrop { position:fixed; inset:0; background:rgba(11,23,18,.62); display:grid; place-items:center; z-index:50; padding:20px; backdrop-filter:blur(3px); }
.modal-backdrop[hidden] { display:none; }
.modal { background:white; border-radius:21px; width:min(610px, 100%); box-shadow:var(--shadow); padding:25px; max-height:92vh; overflow:auto; }
.modal > header { display:flex; justify-content:space-between; margin-bottom:22px; }
.modal h2 { margin-top:4px; }
.type-selector { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:17px; }
.type-selector input { position:absolute; opacity:0; }
.type-selector span { display:block; border:1px solid var(--line); border-radius:10px; padding:10px; text-align:center; font-weight:700; font-size:12px; }
.type-selector input:checked + span { background:var(--green-soft); border-color:#8eb09f; color:var(--green); }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.field { display:grid; gap:6px; margin-bottom:13px; }
.field > span { color:var(--muted); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.field input, .field select { min-width:0; width:100%; height:42px; border:1px solid var(--line); border-radius:10px; padding:0 12px; background:white; outline:none; }
.amount-field > div { display:flex; align-items:center; border:1px solid var(--line); border-radius:12px; padding:0 14px; }
.amount-field > div:focus-within { border-color:#77a08f; box-shadow:0 0 0 3px rgba(35,95,73,.09); }
.amount-field input { border:0; font:700 28px Manrope,sans-serif; padding-left:10px; }
.check-field { color:var(--muted); font-size:11px; display:flex; align-items:center; gap:8px; }
.modal footer { display:flex; justify-content:flex-end; gap:9px; margin-top:23px; }
.toast { position:fixed; right:24px; bottom:24px; background:var(--green-dark); color:white; border-radius:11px; padding:13px 17px; font-size:12px; opacity:0; transform:translateY(12px); transition:.25s; z-index:70; pointer-events:none; }
.toast.show { opacity:1; transform:translateY(0); }
.privacy .money-value { filter:blur(7px); user-select:none; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns:1fr 1fr; }
  .dashboard-grid, .analysis-grid { grid-template-columns:1fr; }
  .entity-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 760px) {
  .app-shell { display:block; }
  .sidebar { position:fixed; left:-255px; transition:.25s; width:242px; }
  .sidebar.open { left:0; box-shadow:var(--shadow); }
  .menu-button { display:block; }
  .topbar { height:68px; padding:0 16px; }
  .period-switcher { gap:3px; }
  .period-switcher strong { min-width:100px; font-size:13px; }
  .top-actions .icon-button { display:none; }
  .primary-button { padding:0 12px; }
  #newMovementButton { font-size:0; width:42px; }
  #newMovementButton span { font-size:20px; margin:0; }
  .view { padding:24px 16px; }
  .page-head { align-items:flex-start; }
  .status-chip { display:none; }
  .metrics { grid-template-columns:1fr 1fr; gap:10px; }
  .metric { padding:16px; min-height:120px; }
  .metric strong { font-size:20px; }
  .dashboard-grid { grid-template-columns:1fr; }
  .toolbar { align-items:stretch; flex-direction:column; }
  .search { min-width:0; }
  .filters { display:grid; grid-template-columns:1fr 1fr; }
  .filter-select { width:100%; min-width:0; }
  .table-card { overflow-x:auto; }
  table { min-width:680px; }
  .entity-grid, .config-grid, .projection-summary { grid-template-columns:1fr; }
  .donut-wrap { flex-direction:column; }
  .form-grid { grid-template-columns:1fr; }
}
@media (max-width: 430px) {
  .metrics { grid-template-columns:1fr; }
  .metric { min-height:110px; }
}

/* Rediseño 2026: superficies continuas, listas densas y color contemporáneo */
:root {
  --ink:#17181d;
  --muted:#747782;
  --line:#e4e5ea;
  --paper:#f4f5f8;
  --white:#fff;
  --green:#6c5ce7;
  --green-dark:#121318;
  --green-soft:#efedff;
  --lime:#8b7cf6;
  --amber:#f59e0b;
  --amber-soft:#fff7e7;
  --red:#ff6b6b;
  --red-soft:#fff0f0;
  --blue:#3b82f6;
  --radius:12px;
  --shadow:none;
}
body { background:var(--paper); }
.sidebar { background:#111217; padding-inline:14px; }
.brand-mark { background:#6c5ce7; color:#fff; border-radius:9px; }
.brand small,.profile small { color:#777b87; }
.nav a,.nav-bottom>a { color:#9fa2ad; border-radius:7px; }
.nav a:hover,.nav a.active,.nav-bottom>a:hover,.nav-bottom>a.active { background:#24252c; }
.nav a.active { box-shadow:inset 2px 0 #8b7cf6; }
.profile { border-color:#292a31; }
.topbar { background:rgba(244,245,248,.9); }
.primary-button { background:#17181d; }
.primary-button:hover { background:#6c5ce7; }
.eyebrow,.text-button { color:#6c5ce7; }
.status-chip { background:#eceafc; color:#5949ca; }
.view { max-width:1540px; padding-top:28px; }
.page-head { margin-bottom:22px; }
.page-head h1 { font-size:clamp(28px,3vw,40px); }

.balance-band { min-height:164px; background:linear-gradient(112deg,#17181d 0%,#23232c 62%,#4d3eb7 150%); color:#fff; padding:28px 32px; display:flex; align-items:center; justify-content:space-between; margin-bottom:0; border-radius:14px 14px 0 0; overflow:hidden; position:relative; }
.balance-band::after { content:""; position:absolute; width:270px; height:270px; border:1px solid rgba(255,255,255,.08); border-radius:50%; right:16%; top:-135px; box-shadow:0 0 0 46px rgba(255,255,255,.025),0 0 0 92px rgba(255,255,255,.018); }
.balance-band>div { position:relative; z-index:1; }
.balance-band span,.balance-band small { display:block; color:#a9abb5; }
.balance-band>div>span { font-size:10px; letter-spacing:.14em; font-weight:700; }
.balance-band strong { display:block; font:800 clamp(32px,4vw,48px) Manrope,sans-serif; letter-spacing:-.05em; margin:8px 0 5px; }
.balance-band small { font-size:11px; }
.balance-ratio { text-align:right; max-width:135px; }
.balance-ratio b { display:block; font:700 28px Manrope,sans-serif; color:#a99dfb; }
.balance-ratio span { font-size:10px; line-height:1.35; }

.metrics-inline { background:#fff; border:1px solid var(--line); border-top:0; border-radius:0 0 14px 14px; gap:0; margin-bottom:20px; }
.metrics-inline .metric { border:0; border-right:1px solid var(--line); border-radius:0; min-height:112px; padding:20px 22px; background:transparent; }
.metrics-inline .metric:last-child { border-right:0; }
.metrics-inline .metric strong { font-size:21px; margin-top:10px; }
.metrics-inline .metric small { color:#8a8d96; }
.metrics-inline .metric .trend { color:#777a84; margin-top:7px; }
.metrics-inline .metric-icon { color:#6c5ce7; font-size:17px; }

.dashboard-layout,.analysis-grid-modern { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.panel { min-width:0; padding:24px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); background:#fff; }
.dashboard-layout .panel:nth-child(3),.dashboard-layout .panel:nth-child(4),.dashboard-layout .panel:last-child { border-bottom:0; }
.span-2 { grid-column:span 2; }
.span-3 { grid-column:span 3; }
.chart-canvas { width:100%; display:block; }
.card-header h2 { font-size:16px; }
.card-header p { font-size:10px; }

.rank-list,.budget-list { display:grid; }
.rank-row { display:grid; grid-template-columns:28px 1fr; gap:8px; padding:11px 0; border-bottom:1px solid #efeff2; }
.rank-row:last-child,.budget-row:last-child { border-bottom:0; }
.rank-index { color:#a7a9b1; font:600 10px Manrope,sans-serif; padding-top:2px; }
.rank-row>div>span { display:flex; justify-content:space-between; gap:8px; font-size:10px; }
.rank-row b { font-weight:600; }
.rank-row strong { font-size:10px; }
.rank-row i,.budget-row i,.row-progress i { display:block; height:4px; background:#efeff3; border-radius:4px; margin-top:8px; overflow:hidden; }
.rank-row em,.budget-row em,.row-progress em { display:block; height:100%; background:#6c5ce7; border-radius:4px; }
.budget-row { display:grid; grid-template-columns:1fr auto; gap:6px 12px; padding:10px 0; border-bottom:1px solid #efeff2; }
.budget-row>span b,.budget-row>span small { display:block; }
.budget-row>span b { font-size:11px; }
.budget-row>span small { color:var(--muted); font-size:9px; margin-top:3px; }
.budget-row>strong { font-size:11px; }
.budget-row>strong.over { color:var(--red); }
.budget-row i { grid-column:1/-1; margin-top:2px; }
.budget-row .over~i em { background:var(--red); }
.dense-list .commitment { padding:10px 0; grid-template-columns:38px 1fr auto; }
.date-box { background:#f2f1fd; color:#5b4ccb; border-radius:7px; }
.alerts-list { display:grid; grid-template-columns:repeat(3,1fr); gap:0; border:1px solid var(--line); }
.alerts-list .alert { margin:0; border-radius:0; background:#fff; border-right:1px solid var(--line); color:var(--ink); padding:15px; }
.alerts-list .alert:last-child { border-right:0; }
.alerts-list .alert>span { color:#6c5ce7; }

.list-panel { background:#fff; border:1px solid var(--line); border-radius:12px; overflow:auto; }
.list-head,.list-row { min-width:850px; display:grid; grid-template-columns:1.35fr 1.1fr .8fr .75fr 1fr .8fr; gap:18px; align-items:center; padding:0 20px; }
.list-head.five,.list-row.five { grid-template-columns:1.4fr 1.2fr 1fr .8fr 1fr; }
.list-head { min-height:42px; background:#f8f8fa; border-bottom:1px solid var(--line); color:#8b8e98; font-size:9px; text-transform:uppercase; letter-spacing:.06em; font-weight:700; }
.list-row { min-height:68px; border-bottom:1px solid #ededf0; font-size:11px; }
.list-row:last-child { border-bottom:0; }
.list-row:hover { background:#fafaff; }
.row-title { display:flex; align-items:center; gap:11px; }
.row-title strong { font-size:12px; }
.entity-icon { width:32px; height:32px; border-radius:7px; background:#efedff; color:#6c5ce7; font-size:12px; flex:0 0 auto; }
.badge { background:#f0f0f4; color:#666976; }
.row-progress { display:grid; grid-template-columns:1fr 28px; gap:7px; align-items:center; }
.row-progress i { margin:0; }
.row-progress small { color:var(--muted); }
.helper-text { color:var(--muted); font-size:11px; }

.table-card,.card,.entity-card { box-shadow:none; }
.table-card { border-radius:12px; }
.card { border-radius:0; }
.config-grid { background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden; gap:0; }
.config-grid .card { border:0; border-right:1px solid var(--line); }
.config-grid .card:last-child { border-right:0; }
.config-item { background:transparent; border-bottom:1px solid #efeff2; border-radius:0; }
.projection-summary { gap:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.projection-hero { border-radius:0; background:#17181d; }
.projection-summary .card { border:0; }
.ring { background:conic-gradient(#8b7cf6 0 68%,#34353d 68%); }
.ring::before { background:#17181d; }
.donut { background:conic-gradient(#6c5ce7 0 31%,#ff6b6b 31% 53%,#f59e0b 53% 70%,#3b82f6 70% 86%,#b7bac4 86%); }
.analysis-grid-modern .panel:nth-child(2),.analysis-grid-modern .panel:last-child { border-right:0; }
.analysis-grid-modern .panel:nth-child(3),.analysis-grid-modern .panel:last-child { border-bottom:0; }
.variance-list>div { display:grid; grid-template-columns:1fr auto 58px; gap:14px; padding:12px 0; border-bottom:1px solid #efeff2; font-size:11px; }
.variance-list>div:last-child { border-bottom:0; }
.variance-list em { text-align:right; font-style:normal; font-weight:700; }
.variance-list .up { color:#ff6b6b; }
.variance-list .down { color:#00a878; }
.money.income { color:#00a878; }

@media (max-width:1100px) {
  .dashboard-layout,.analysis-grid-modern { grid-template-columns:1fr 1fr; }
  .span-3 { grid-column:span 2; }
  .dashboard-layout .panel { border-bottom:1px solid var(--line); }
  .alerts-list { grid-template-columns:1fr; }
  .alerts-list .alert { border-right:0; border-bottom:1px solid var(--line); }
}
@media (max-width:760px) {
  .balance-band { min-height:150px; padding:23px 20px; }
  .balance-ratio { display:none; }
  .metrics-inline { grid-template-columns:1fr 1fr; }
  .metrics-inline .metric:nth-child(2) { border-right:0; }
  .metrics-inline .metric:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .dashboard-layout,.analysis-grid-modern { grid-template-columns:1fr; }
  .span-2,.span-3 { grid-column:span 1; }
  .panel { border-right:0; }
  .dashboard-layout .panel,.analysis-grid-modern .panel { border-bottom:1px solid var(--line); }
  .alerts-list { grid-template-columns:1fr; }
  .toolbar .helper-text { max-width:55%; }
}

/* Acceso familiar, permisos y restauración */
.logout-button { margin-left:auto; width:28px; height:28px; border:0; border-radius:6px; background:#272830; color:#aeb0ba; cursor:pointer; }
.auth-gate { position:fixed; inset:0; z-index:200; display:grid; place-items:center; padding:20px; background:radial-gradient(circle at 70% 20%,#332b70 0,transparent 30%),#111217; }
.auth-gate[hidden] { display:none; }
.auth-panel { width:min(420px,100%); padding:34px; background:#fff; border-radius:16px; box-shadow:0 30px 80px rgba(0,0,0,.35); }
.auth-panel>.brand-mark { margin-bottom:28px; }
.auth-panel h1 { margin:7px 0 8px; }
.auth-panel>p { color:var(--muted); font-size:11px; line-height:1.5; margin:0 0 24px; }
.auth-panel form { display:grid; }
.auth-panel form>.primary-button { width:100%; margin-top:7px; }
.auth-panel form>small { min-height:18px; color:var(--red); text-align:center; margin-top:12px; font-size:10px; }
.restore-panel { display:grid; grid-template-columns:1.2fr 1fr auto; gap:18px; align-items:center; margin-top:18px; padding:22px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.restore-panel>div:first-child { display:grid; grid-template-columns:44px 1fr; align-items:center; column-gap:12px; }
.restore-panel .tool-icon { grid-row:1/3; margin:0; }
.restore-panel h2 { font-size:15px; }
.restore-panel p { color:var(--muted); font-size:9px; margin:3px 0 0; }
.restore-panel .file-drop { min-height:54px; margin:0; }
.restore-panel .import-summary { grid-column:1/-1; margin:0; }
.restore-panel .import-summary strong,.restore-panel .import-summary span,.restore-panel .import-summary small { display:block; }
.restore-panel .import-summary span { margin-top:4px; }
.restore-panel .import-summary small { margin-top:3px; color:#008f68; }
.restore-confirm { grid-column:1/-1; display:grid; grid-template-columns:1fr minmax(250px,.8fr) auto; gap:16px; align-items:end; padding:18px; border:1px solid #f0c8cb; border-radius:9px; background:#fff7f7; }
.restore-confirm[hidden] { display:none; }
.restore-confirm>div strong,.restore-confirm>div small { display:block; }
.restore-confirm>div small { margin-top:5px; color:var(--muted); font-size:9px; }
.restore-confirm .field { margin:0; }
.danger-button { min-height:38px; padding:0 15px; border:1px solid #d94954; border-radius:7px; background:#d94954; color:#fff; font-size:10px; font-weight:700; cursor:pointer; }
.danger-button:disabled { opacity:.45; cursor:not-allowed; }
.system-check-panel { display:grid; grid-template-columns:1fr auto; gap:18px; align-items:center; margin-top:18px; padding:22px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.system-check-panel>div:first-child { display:grid; grid-template-columns:44px 1fr; align-items:center; column-gap:12px; }
.system-check-panel .tool-icon { grid-row:1/3; margin:0; }
.system-check-panel h2 { font-size:15px; }
.system-check-panel p { margin:3px 0 0; color:var(--muted); font-size:9px; }
.system-check-list { grid-column:1/-1; display:grid; border-top:1px solid var(--line); }
.system-check-list>span { padding-top:14px; color:var(--muted); font-size:9px; }
.system-check-head { display:flex; justify-content:space-between; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); }
.system-check-head.ready strong { color:#008f68; }
.system-check-head.blocked strong { color:#d94954; }
.system-check-head small { color:var(--muted); }
.system-check-row { display:grid; grid-template-columns:26px 1fr; gap:10px; align-items:center; min-height:55px; border-bottom:1px solid var(--line); }
.system-check-row>span { width:23px; height:23px; display:grid; place-items:center; border-radius:50%; background:#eff0f3; color:#8d8f98; font-weight:800; }
.system-check-row.pass>span { background:#e7f8f1; color:#008f68; }
.system-check-row.warning>span { background:#fff4dd; color:#b87709; }
.system-check-row.fail>span { background:#fff0f1; color:#d94954; }
.system-check-row strong,.system-check-row small { display:block; }
.system-check-row small { margin-top:3px; color:var(--muted); font-size:9px; }
.user-panel { margin-top:18px; padding:22px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.user-list { display:grid; }
.user-row { display:grid; grid-template-columns:38px 1fr auto auto; gap:12px; align-items:center; min-height:60px; border-top:1px solid var(--line); }
.user-row>div strong,.user-row>div small { display:block; }
.user-row>div small { color:var(--muted); font-size:9px; margin-top:3px; }
button:disabled { opacity:.45; cursor:not-allowed; }

@media (max-width:760px) {
  .auth-panel { padding:25px; }
  .restore-panel { grid-template-columns:1fr; }
  .restore-panel .import-summary { grid-column:auto; }
  .user-row { grid-template-columns:36px 1fr auto; }
  .user-row>.badge:last-child { display:none; }
  .restore-confirm,.system-check-panel { grid-template-columns:1fr; }
  .restore-confirm { grid-column:auto; }
  .system-check-list { grid-column:auto; }
}

/* Control mensual, presupuestos e importación */
.closed-banner { display:flex; align-items:center; min-height:42px; padding:0 14px; margin:-8px 0 16px; border:1px solid #cfcaf5; background:#f1efff; color:#5548b8; border-radius:8px; font-size:10px; font-weight:700; }
.row-actions { display:flex; align-items:center; gap:5px; }
.budget-editor { background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.budget-head,.budget-edit-row { display:grid; grid-template-columns:1.4fr 1fr 1fr 1.1fr; gap:20px; align-items:center; padding:0 20px; }
.budget-head { min-height:42px; background:#f8f8fa; color:#8b8e98; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.budget-edit-row { min-height:66px; border-top:1px solid var(--line); font-size:11px; }
.budget-edit-row label { display:flex; align-items:center; border:1px solid var(--line); border-radius:7px; padding:0 10px; background:#fff; }
.budget-edit-row label span { color:var(--muted); }
.budget-edit-row input { width:100%; height:34px; border:0; outline:0; padding-left:7px; }
.budget-usage { display:grid; grid-template-columns:35px 1fr; gap:9px; align-items:center; }
.budget-usage b { font-size:10px; }
.budget-usage b.over { color:var(--red); }
.budget-usage i { display:block; height:6px; background:#eeeef3; border-radius:5px; overflow:hidden; }
.budget-usage em { display:block; height:100%; background:#6c5ce7; }
.budget-editor footer { display:flex; justify-content:space-between; align-items:center; gap:15px; min-height:68px; padding:12px 20px; border-top:1px solid var(--line); background:#fafafd; }
.budget-editor footer span { color:var(--muted); font-size:10px; }
.closure-strip { display:grid; grid-template-columns:repeat(3,1fr) auto; align-items:center; background:#17181d; color:#fff; border-radius:12px; padding:20px; gap:0; margin-bottom:18px; }
.closure-strip>div { padding:0 20px; border-right:1px solid #363740; }
.closure-strip>div:first-child { padding-left:0; }
.closure-strip span,.closure-strip strong { display:block; }
.closure-strip span { color:#a5a7b1; font-size:9px; }
.closure-strip strong { font:700 19px Manrope,sans-serif; margin-top:7px; }
.closure-strip button { margin-left:20px; }
.checklist { margin-top:18px; background:#fff; border:1px solid var(--line); border-radius:12px; padding:20px; }
.checklist h2 { font-size:15px; margin-bottom:14px; }
.checklist>div { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--line); border:1px solid var(--line); }
.checklist span { padding:14px; background:#fff; color:#a2a4ac; font-size:10px; }
.checklist span.done { color:#008f68; background:#f0fbf7; }
.tools-grid { display:grid; grid-template-columns:1.2fr .8fr; background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.tool-panel { padding:26px; border-right:1px solid var(--line); }
.tool-panel:last-child { border-right:0; }
.tool-icon { width:42px; height:42px; display:grid; place-items:center; background:#eceafd; color:#6c5ce7; border-radius:9px; font-size:19px; margin-bottom:15px; }
.tool-panel h2 { font-size:17px; }
.tool-panel>p { color:var(--muted); font-size:10px; line-height:1.5; min-height:30px; }
.tool-actions { display:flex; gap:8px; }
.tool-actions button { flex:1; }
.import-summary { margin-top:14px; padding:10px; background:#f6f6f8; color:var(--muted); font-size:10px; }
.backup-status { display:grid; grid-template-columns:1fr auto; gap:0; margin:18px 0; border-top:1px solid var(--line); }
.backup-status span,.backup-status strong { padding:11px 0; border-bottom:1px solid var(--line); font-size:10px; }
.backup-status span { color:var(--muted); }
.backup-status strong { text-align:right; }
.tool-panel>small { display:block; color:var(--muted); font-size:9px; margin-top:10px; }
.import-preview { margin-top:22px; }

@media (max-width:900px) {
  .closure-strip { grid-template-columns:1fr 1fr; gap:18px; }
  .closure-strip>div { border:0; padding:0; }
  .closure-strip button { margin:0; }
  .checklist>div { grid-template-columns:1fr 1fr; }
}
@media (max-width:760px) {
  .budget-head { display:none; }
  .budget-edit-row { grid-template-columns:1fr 1fr; padding:14px; gap:10px; }
  .budget-editor footer { align-items:stretch; flex-direction:column; }
  .tools-grid { grid-template-columns:1fr; }
  .tool-panel { border-right:0; border-bottom:1px solid var(--line); }
  .checklist>div { grid-template-columns:1fr; }
}

/* Módulos patrimoniales y documentales */
.sidebar { overflow:hidden; }
.sidebar .nav { overflow-y:auto; padding-right:4px; scrollbar-width:thin; scrollbar-color:#353640 transparent; }
.sidebar .nav a { flex:0 0 auto; }
.currency-strip { display:grid; grid-template-columns:1fr 1fr 1.2fr; background:#17181d; color:#fff; border-radius:14px; overflow:hidden; margin-bottom:18px; }
.currency-strip>div { padding:24px; border-right:1px solid #303139; }
.currency-strip>div:last-child { border-right:0; }
.currency-strip span,.currency-strip small { display:block; color:#a7a9b2; font-size:10px; }
.currency-strip strong { display:block; font:700 24px Manrope,sans-serif; margin:8px 0 3px; }
.currency-strip>div:nth-child(2) strong { color:#a99dfb; }
.currency-badge { display:inline-flex; align-items:center; min-width:42px; justify-content:center; padding:5px 8px; border-radius:6px; background:#eceafd; color:#5949ca; font-size:9px; font-weight:800; }
.subline { display:block; color:var(--muted); font-size:9px; font-weight:500; margin-top:4px; }
.section-title { display:flex; justify-content:space-between; align-items:end; margin:28px 0 12px; }
.section-title h2 { font-size:17px; }
.section-title p { margin:4px 0 0; color:var(--muted); font-size:10px; }
.positive-text { color:#00a878; font-weight:700; }
.negative-text { color:#ff6b6b; font-weight:700; }

.goal-list { background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.goal-row { display:grid; grid-template-columns:1.45fr .6fr 1fr 1.1fr; gap:22px; align-items:center; min-height:88px; padding:14px 20px; border-bottom:1px solid var(--line); }
.goal-row:last-child { border-bottom:0; }
.goal-main { display:flex; align-items:center; gap:12px; }
.goal-main strong,.goal-main small,.goal-value strong,.goal-value small { display:block; }
.goal-main small,.goal-value small { color:var(--muted); font-size:9px; margin-top:5px; }
.goal-value { text-align:right; }
.goal-progress { display:grid; grid-template-columns:38px 1fr; align-items:center; gap:10px; }
.goal-progress span { font-weight:700; font-size:11px; }
.goal-progress i,.structure-row i { display:block; height:7px; background:#eeeef3; border-radius:5px; overflow:hidden; }
.goal-progress em,.structure-row em { display:block; height:100%; background:#6c5ce7; border-radius:5px; }

.net-worth { display:flex; justify-content:space-between; align-items:center; gap:30px; background:linear-gradient(110deg,#17181d,#252632); color:#fff; border-radius:14px 14px 0 0; padding:30px; }
.net-worth>div>span,.net-worth>div>small { display:block; color:#a5a7b1; font-size:10px; letter-spacing:.08em; }
.net-worth>div>strong { display:block; font:800 40px Manrope,sans-serif; margin:8px 0 4px; }
.net-stats { display:flex; gap:42px; }
.net-stats span small,.net-stats span b { display:block; }
.net-stats span b { font-size:16px; margin-top:5px; }
.patrimony-grid { display:grid; grid-template-columns:repeat(3,1fr); background:#fff; border:1px solid var(--line); border-top:0; border-radius:0 0 14px 14px; overflow:hidden; }
.patrimony-grid .panel { border-bottom:0; }
.structure-bars { display:grid; gap:20px; }
.structure-row>span { display:flex; justify-content:space-between; gap:12px; font-size:11px; }
.structure-row i { margin-top:9px; }
.structure-row>small { display:block; color:var(--muted); font-size:9px; margin-top:5px; }
.exchange-note { background:#f6f6fa; padding:10px; color:var(--muted); font-size:9px; }
.indicator-list { display:grid; }
.indicator-list>div { display:flex; justify-content:space-between; gap:12px; padding:15px 0; border-bottom:1px solid var(--line); font-size:11px; }
.indicator-list>div:last-child { border-bottom:0; }
.indicator-list strong { color:#6c5ce7; }

.document-layout { display:grid; grid-template-columns:360px minmax(0,1fr); background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden; min-height:590px; }
.upload-panel { padding:26px; background:#fafafd; border-right:1px solid var(--line); }
.upload-icon { width:42px; height:42px; display:grid; place-items:center; background:#eceafd; color:#6c5ce7; border-radius:9px; font-size:20px; margin-bottom:16px; }
.upload-panel h2 { font-size:17px; }
.upload-panel>p { color:var(--muted); font-size:10px; line-height:1.5; margin:6px 0 16px; }
.file-drop { display:grid; place-items:center; min-height:92px; border:1px dashed #b9b4e8; background:#f5f3ff; border-radius:9px; margin-bottom:18px; cursor:pointer; text-align:center; padding:10px; }
.file-drop input { position:absolute; opacity:0; width:1px; height:1px; }
.file-drop span { color:#5c4fca; font-size:11px; font-weight:700; overflow-wrap:anywhere; }
.upload-panel .form-grid { grid-template-columns:1fr; gap:0; }
.upload-panel>.field { margin-top:12px; }
.upload-panel>.primary-button { width:100%; }
.upload-status { display:block; text-align:center; color:var(--muted); margin-top:10px; font-size:9px; }
.document-library { min-width:0; padding:26px; }
.compact-search { width:180px; height:34px; border:1px solid var(--line); border-radius:7px; padding:0 10px; outline:none; }
.document-list { border-top:1px solid var(--line); }
.document-row { display:grid; grid-template-columns:42px 1fr 70px 70px; gap:12px; align-items:center; min-height:68px; border-bottom:1px solid var(--line); font-size:10px; }
.document-row>div>strong,.document-row>div>small { display:block; }
.document-row>div>small { color:var(--muted); margin-top:4px; }
.doc-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:7px; background:#fff0f0; color:#e55353; font-size:9px; font-weight:800; }
.doc-size { color:var(--muted); }


@media (max-width:1100px) {
  .patrimony-grid { grid-template-columns:1fr 1fr; }
  .patrimony-grid .panel:last-child { grid-column:1/-1; }
  .document-layout { grid-template-columns:320px minmax(0,1fr); }
  .goal-row { grid-template-columns:1.2fr .6fr 1fr; }
  .goal-progress { grid-column:1/-1; }
}
@media (max-width:760px) {
  .currency-strip { grid-template-columns:1fr; }
  .currency-strip>div { border-right:0; border-bottom:1px solid #303139; }
  .goal-row { grid-template-columns:1fr 1fr; gap:14px; }
  .goal-main,.goal-progress { grid-column:1/-1; }
  .net-worth { align-items:flex-start; flex-direction:column; }
  .net-stats { gap:20px; }
  .patrimony-grid { grid-template-columns:1fr; }
  .patrimony-grid .panel:last-child { grid-column:auto; }
  .document-layout { grid-template-columns:1fr; }
  .upload-panel { border-right:0; border-bottom:1px solid var(--line); }
  .document-library { padding:18px; }
}

/* Alertas, calidad de datos y auditoría */
.alert-button { position:relative; width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--line); border-radius:8px; background:#fff; color:#555761; cursor:pointer; }
.alert-button span { position:absolute; top:-6px; right:-6px; min-width:17px; height:17px; display:grid; place-items:center; padding:0 4px; border:2px solid #fff; border-radius:10px; background:#ff5f68; color:#fff; font-size:8px; font-weight:800; }
.alerts-list .alert { width:100%; text-align:left; font:inherit; cursor:pointer; }
.quality-band { display:grid; grid-template-columns:1fr 1.5fr; align-items:center; gap:34px; padding:25px 28px; margin-bottom:18px; border-radius:14px; background:linear-gradient(110deg,#17181d,#282936); color:#fff; }
.quality-band span,.quality-band small { display:block; color:#aeb0ba; font-size:9px; letter-spacing:.07em; }
.quality-band strong { display:block; margin:5px 0 2px; font:800 34px Manrope,sans-serif; }
.quality-track i { display:block; height:8px; overflow:hidden; border-radius:6px; background:#3b3c46; }
.quality-track em { display:block; height:100%; border-radius:6px; background:linear-gradient(90deg,#8b7cf6,#b7d34b); }
.quality-track p { margin:8px 0 0; color:#b7b9c2; font-size:9px; }
.activity-grid { display:grid; grid-template-columns:1fr 1fr; background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.activity-grid .panel { border-bottom:1px solid var(--line); }
.activity-grid .span-2 { grid-column:1/-1; border-bottom:0; }
.action-alerts,.quality-list,.audit-list { display:grid; }
.action-alert { display:grid; grid-template-columns:32px 1fr auto; align-items:center; gap:11px; width:100%; min-height:65px; padding:10px 0; border:0; border-bottom:1px solid var(--line); background:transparent; color:inherit; text-align:left; cursor:pointer; }
.action-alert:last-child { border-bottom:0; }
.action-alert>span { width:27px; height:27px; display:grid; place-items:center; border-radius:7px; background:#f1f1f4; color:#71737d; font-weight:800; }
.action-alert.warning>span { background:#fff4dd; color:#bc7500; }
.action-alert.danger>span { background:#fff0f1; color:#d94853; }
.action-alert strong,.action-alert small,.quality-list strong,.quality-list small,.audit-row strong,.audit-row small { display:block; }
.action-alert small,.quality-list small,.audit-row small { margin-top:4px; color:var(--muted); font-size:9px; }
.action-alert>b { color:#a5a7b0; }
.quality-list>div { display:grid; grid-template-columns:28px 1fr; align-items:center; gap:10px; min-height:65px; border-bottom:1px solid var(--line); }
.quality-list>div:last-child { border-bottom:0; }
.quality-list>div>span { width:25px; height:25px; display:grid; place-items:center; border-radius:50%; background:#f2f2f5; color:#9a9ca5; font-weight:800; }
.quality-list>div.ok>span { background:#e8f8f2; color:#008f68; }
.audit-row { display:grid; grid-template-columns:10px 1fr auto; align-items:center; gap:12px; min-height:60px; border-bottom:1px solid var(--line); }
.audit-row:last-child { border-bottom:0; }
.audit-dot { width:8px; height:8px; border-radius:50%; background:#8b7cf6; }
.audit-dot.delete { background:#ff5f68; }
.audit-dot.update,.audit-dot.reconcile { background:#e89a25; }
.audit-dot.export,.audit-dot.import { background:#3b82f6; }

@media (max-width:760px) {
  .quality-band,.activity-grid { grid-template-columns:1fr; }
  .activity-grid .span-2 { grid-column:auto; }
  .quality-band { gap:18px; }
  .activity-grid .panel { border-right:0; }
}

/* Integraciones y automatizaciones */
.integration-band { display:flex; justify-content:space-between; align-items:center; gap:24px; min-height:122px; padding:24px 28px; margin-bottom:18px; border-radius:14px; background:linear-gradient(110deg,#17181d,#292a36); color:#fff; }
.integration-band span,.integration-band small { display:block; color:#adafb9; font-size:9px; }
.integration-band strong { display:block; margin:7px 0 3px; font:800 30px Manrope,sans-serif; }
.integration-actions { display:flex; gap:8px; }
.channel-grid { display:grid; grid-template-columns:repeat(3,1fr); margin-bottom:18px; background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.channel-item { display:grid; grid-template-columns:10px 1fr auto; align-items:start; gap:11px; min-height:112px; padding:21px; border-right:1px solid var(--line); }
.channel-item:last-child { border-right:0; }
.channel-item strong,.channel-item small { display:block; }
.channel-item small { margin-top:4px; color:var(--muted); font-size:9px; }
.channel-item p { margin:12px 0 0; color:#777984; font-size:9px; line-height:1.45; }
.integration-dot { width:8px; height:8px; margin-top:4px; border-radius:50%; background:#c7c8cf; box-shadow:0 0 0 4px #f1f1f4; }
.integration-dot.active { background:#00a878; box-shadow:0 0 0 4px #e6f8f2; }
.integration-layout { display:grid; grid-template-columns:1fr 1fr; background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.integration-layout .panel { border-bottom:0; }
.queue-summary { display:grid; grid-template-columns:repeat(3,1fr); margin-bottom:18px; border:1px solid var(--line); border-radius:9px; overflow:hidden; }
.queue-summary>div { padding:14px; border-right:1px solid var(--line); }
.queue-summary>div:last-child { border-right:0; }
.queue-summary span,.queue-summary strong { display:block; }
.queue-summary span { color:var(--muted); font-size:9px; }
.queue-summary strong { margin-top:5px; font-size:18px; }
.rule-list>div,.run-row { display:grid; grid-template-columns:10px 1fr auto; align-items:center; gap:11px; min-height:59px; border-bottom:1px solid var(--line); }
.rule-list>div:last-child,.run-row:last-child { border-bottom:0; }
.rule-list strong,.rule-list small,.run-row strong,.run-row small { display:block; }
.rule-list small,.run-row small { margin-top:4px; color:var(--muted); font-size:9px; }
.run-status { width:8px; height:8px; border-radius:50%; background:#ff5f68; }
.run-status.success { background:#00a878; }
.run-status.warning { background:#e89a25; }
.automation-note { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-top:18px; padding:18px 22px; border:1px solid #d9d6f5; border-radius:11px; background:#f6f4ff; }
.automation-note strong { font-size:11px; }
.automation-note p { margin:4px 0 0; color:var(--muted); font-size:9px; }
.automation-note>span { color:#5c4fca; font-size:9px; font-weight:700; white-space:nowrap; }

@media (max-width:900px) {
  .channel-grid { grid-template-columns:1fr; }
  .channel-item { border-right:0; border-bottom:1px solid var(--line); }
  .channel-item:last-child { border-bottom:0; }
  .integration-layout { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .integration-band,.automation-note { align-items:stretch; flex-direction:column; }
  .integration-actions { flex-direction:column; }
  .automation-note>span { white-space:normal; }
}
