:root {
  --safe-top: env(safe-area-inset-top, 44px);
  --safe-bottom: env(safe-area-inset-bottom, 34px);
  --tabbar-h: 56px;
  --blue: #0079bf;
  --blue-dark: #0052cc;
}

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

html,
body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: #0079bf;
  color: #172b4d;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
  user-select: none;
}

/* ===== VIEWS ===== */
.view {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
}

.view.active {
  display: flex;
}

/* ===== LOGIN ===== */
#login-view {
  background: linear-gradient(160deg, #0052cc 0%, #0079bf 60%, #00aecc 100%);
  justify-content: flex-end;
}

.login-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--safe-top);
  color: white;
  gap: 10px;
}

.login-hero-logo {
  font-size: 64px;
  line-height: 1;
}

.login-hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.login-hero p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 0 40px;
}

.login-panel {
  background: white;
  border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(var(--safe-bottom) + 24px);
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.18);
}

.panel-handle {
  width: 36px;
  height: 4px;
  background: #dfe1e6;
  border-radius: 2px;
  margin: 10px auto 20px;
}

.login-panel input {
  width: 100%;
  padding: 15px 16px;
  border: 2px solid #dfe1e6;
  border-radius: 12px;
  font-size: 17px;
  color: #172b4d;
  outline: none;
  margin-bottom: 14px;
  -webkit-appearance: none;
  user-select: text;
  transition: border-color 0.2s;
}

.login-panel input:focus {
  border-color: #0079bf;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: #0079bf;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  min-height: 52px;
  -webkit-appearance: none;
  transition: background 0.15s;
}

.btn-primary:active {
  background: #0052cc;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 16px;
  color: #b3bac5;
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #dfe1e6;
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #dfe1e6;
  background: #f4f5f7;
  cursor: pointer;
  width: 100%;
  text-align: left;
  min-height: 56px;
}

.user-item:active {
  background: #e8f4fd;
  border-color: #0079bf;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.user-name {
  font-size: 15px;
  font-weight: 600;
  color: #172b4d;
  flex: 1;
}

.user-item-arrow {
  color: #b3bac5;
  font-size: 20px;
}

.user-delete-btn {
  background: none;
  border: none;
  color: #b3bac5;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  min-width: 34px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-delete-btn:active {
  color: #de350b;
  background: #ffebe6;
}

/* ===== APP HEADER ===== */
.app-header {
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: calc(var(--safe-top) + 6px) 14px 12px;
  min-height: calc(var(--safe-top) + 54px);
}

.app-header-back {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-header-back:active {
  background: rgba(255, 255, 255, 0.35);
}

.app-header-board-title {
  flex: 1;
  color: white;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.app-header-title {
  color: white;
  font-size: 16px;
  font-weight: 700;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.app-avatar:active {
  border-color: white;
}

.app-avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.app-hamburger {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: white;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-hamburger:active {
  background: rgba(255, 255, 255, 0.35);
}

/* Menu sheet */
.menu-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.menu-avatar-large {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.menu-greeting {
  font-size: 12px;
  color: #5e6c84;
  line-height: 1;
  margin-bottom: 2px;
}

.menu-username {
  font-size: 16px;
  font-weight: 700;
  color: #172b4d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  padding: 14px 4px;
  font-size: 16px;
  font-weight: 500;
  color: #172b4d;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid #f0f1f3;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:active {
  background: #f4f5f7;
  border-radius: 8px;
}

.menu-item-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.menu-divider {
  height: 8px;
}

.menu-item-danger {
  color: #de350b;
}

/* ===== BOARDS VIEW ===== */
#boards-view {
  background: linear-gradient(160deg, #0052cc 0%, #0079bf 60%, #00aecc 100%);
}

.boards-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  -webkit-overflow-scrolling: touch;
}

.boards-heading {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 16px;
}

.boards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.board-item {
  background: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  min-height: 68px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.board-item:active {
  opacity: 0.88;
}

.board-item-stripe {
  width: 6px;
  align-self: stretch;
  flex-shrink: 0;
}

.board-item-body {
  flex: 1;
  padding: 14px 12px;
}

.board-item-name {
  font-size: 16px;
  font-weight: 700;
  color: #172b4d;
  margin-bottom: 3px;
}

.board-item-meta {
  font-size: 13px;
  color: #97a0af;
}

.board-item-delete {
  background: none;
  border: none;
  color: #c1c7d0;
  padding: 0 14px;
  font-size: 16px;
  cursor: pointer;
  min-height: 68px;
  display: flex;
  align-items: center;
}

.board-item-delete:active {
  color: #de350b;
}

.board-item-arrow {
  color: #c1c7d0;
  font-size: 20px;
  padding-right: 14px;
}

.board-new-btn {
  background: rgba(255, 255, 255, 0.16);
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  font-weight: 600;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 60px;
}

.board-new-btn:active {
  background: rgba(255, 255, 255, 0.26);
}

.boards-footer {
  height: calc(var(--safe-bottom) + 20px);
  flex-shrink: 0;
}

/* ===== BOARD VIEW ===== */
#board-view {
  background: #0079bf;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* .board-title-bar removed — title now lives inside .app-header as .app-header-board-title */

.col-summary {
  flex-shrink: 0;
  padding: 14px 16px 12px;
  background: rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.col-summary-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 3px;
}

.col-summary-total {
  font-size: 30px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.8px;
  line-height: 1;
}

.col-budget {
  margin-top: 12px;
}

/* ===== TAB CONTENT ===== */
#tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 0;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--safe-bottom) + var(--tabbar-h) + 76px);
}

/* ===== CARDS ===== */
.mob-card {
  background: transparent;
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  overflow: hidden;
}

.mob-card-stripe {
  width: 4px;
  flex-shrink: 0;
}

.mob-card-body {
  flex: 1;
  min-width: 0;
  padding: 11px 12px 12px;
}

.mob-card-row-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.mob-card-title {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.45;
  word-break: break-word;
  user-select: text;
}

.mob-card-icon-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  margin-top: -1px;
}

.mob-card-row-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mob-card-amount {
  font-size: 15px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mob-card-pct {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  flex-shrink: 0;
}

.mob-card-move {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 32px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mob-card-move:active {
  background: rgba(255, 255, 255, 0.22);
}

.mob-card-delete,
.mob-card-edit {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mob-card-delete:active {
  color: #ff5630;
  background: rgba(255, 255, 255, 0.1);
}

.mob-card-edit:active {
  color: #4fc3f7;
  background: rgba(255, 255, 255, 0.1);
}

/* Priority */
.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.priority-badge.vital {
  background: #ffebe6;
  color: #de350b;
}

.priority-badge.gusto {
  background: #e8f4fd;
  color: #0052cc;
}

.priority-badge.capricho {
  background: #f0ebff;
  color: #6554c0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: rgba(255, 255, 255, 0.55);
}

.empty-state-icon {
  font-size: 52px;
  margin-bottom: 14px;
}

.empty-state-text {
  font-size: 16px;
  font-weight: 600;
}

.empty-state-sub {
  font-size: 14px;
  margin-top: 6px;
  opacity: 0.75;
}

/* ===== TAB BAR ===== */
.tab-bar {
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  padding-bottom: var(--safe-bottom);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  cursor: pointer;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  gap: 3px;
  min-height: var(--tabbar-h);
  position: relative;
  transition: color 0.15s;
}

.tab-item.active {
  color: white;
}

.tab-item-icon {
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: white;
  border-radius: 0 0 2px 2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.tab-item.active::after {
  opacity: 1;
}

/* ===== FAB ===== */
#fab {
  position: absolute;
  right: 18px;
  bottom: calc(var(--safe-bottom) + var(--tabbar-h) + 14px);
  width: 58px;
  height: 58px;
  background: white;
  color: #0079bf;
  border: none;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 300;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28), 0 1px 4px rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.12s, box-shadow 0.12s;
}

#fab:active {
  transform: scale(0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ===== BUDGET ===== */
.budget-empty {
  border: 1.5px dashed rgba(255, 255, 255, 0.32);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.budget-empty:active {
  background: rgba(255, 255, 255, 0.08);
}

.budget-empty-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.budget-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.budget-empty-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
  margin-top: 2px;
}

.budget-bar-wrap {
  cursor: pointer;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1);
}

.budget-bar-wrap:active {
  background: rgba(255, 255, 255, 0.17);
}

.budget-bar-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.budget-bar-label-left {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.budget-bar-label-right {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.budget-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  overflow: hidden;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease, background 0.4s ease;
}

.budget-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 7px;
}

.budget-remaining {
  font-size: 15px;
  font-weight: 700;
}

.budget-edit-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* ===== ANALYTICS ===== */
.analytics-block {
  margin-bottom: 8px;
}

.analytics-block-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.charts-row {
  display: flex;
  gap: 6px;
}

.charts-row .analytics-canvas {
  flex: 1;
  min-width: 0;
}

.analytics-canvas {
  display: block;
  width: 100%;
}

.chart-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  margin: 18px 0;
}

.priority-guide {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.priority-guide-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.priority-guide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.priority-guide-name {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.priority-guide-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
  line-height: 1.4;
}

/* ===== BOTTOM SHEETS ===== */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 30, 66, 0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
}

.sheet-overlay.active {
  display: flex;
}

.sheet {
  background: white;
  border-radius: 22px 22px 0 0;
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--safe-bottom);
  animation: sheetUp 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
}

@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: #dfe1e6;
  border-radius: 2px;
  margin: 12px auto 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid #f0f1f3;
}

.sheet-title {
  font-size: 17px;
  font-weight: 700;
  color: #172b4d;
}

.sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f0f1f3;
  border: none;
  color: #5e6c84;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet-close:active {
  background: #dfe1e6;
}

.sheet-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #5e6c84;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 15px 16px;
  border: 2px solid #dfe1e6;
  border-radius: 12px;
  font-size: 17px;
  color: #172b4d;
  outline: none;
  -webkit-appearance: none;
  user-select: text;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #0079bf;
}

.form-group input.error {
  border-color: #de350b;
}

.priority-selector {
  display: flex;
  gap: 8px;
}

.priority-opt {
  flex: 1;
  padding: 13px 4px;
  border: 2px solid #dfe1e6;
  border-radius: 10px;
  background: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #5e6c84;
  min-height: 48px;
  transition: all 0.15s;
}

.priority-opt:active {
  background: #f4f5f7;
}

.priority-opt[data-priority="vital"].active {
  border-color: #de350b;
  background: #ffebe6;
  color: #de350b;
}

.priority-opt[data-priority="gusto"].active {
  border-color: #0079bf;
  background: #e8f4fd;
  color: #0052cc;
}

.priority-opt[data-priority="capricho"].active {
  border-color: #6554c0;
  background: #f0ebff;
  color: #6554c0;
}

.sheet-context {
  font-size: 14px;
  color: #5e6c84;
  margin-bottom: 18px;
  line-height: 1.5;
}

.sbtn {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  min-height: 52px;
  margin-bottom: 10px;
  -webkit-appearance: none;
  transition: opacity 0.15s;
}

.sbtn:active {
  opacity: 0.8;
}

.sbtn-primary {
  background: #0079bf;
  color: white;
}

.sbtn-secondary {
  background: #f0f1f3;
  color: #5e6c84;
}

.sbtn-danger {
  background: #ffebe6;
  color: #de350b;
}

/* Move sheet */
.move-info {
  font-size: 14px;
  color: #5e6c84;
  margin-bottom: 18px;
  line-height: 1.4;
}

.move-col-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: white;
  border: 1.5px solid #dfe1e6;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #172b4d;
  text-align: left;
  min-height: 56px;
}

.move-col-btn:active {
  background: #f4f5f7;
}

.move-col-btn.current {
  opacity: 0.38;
  pointer-events: none;
}

.move-col-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.move-col-current-tag {
  margin-left: auto;
  font-size: 12px;
  color: #97a0af;
  font-weight: 400;
}

/* Import */
.import-divider {
  height: 1px;
  background: #f0f1f3;
  margin: 4px 0 18px;
}

.import-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #5e6c84;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
  margin-bottom: 12px;
}

.import-board-group {
  margin-bottom: 14px;
}

.import-board-name {
  font-size: 11px;
  font-weight: 700;
  color: #97a0af;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.import-expense-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.import-expense-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1.5px solid #dfe1e6;
  cursor: pointer;
  min-height: 52px;
  transition: all 0.15s;
}

.import-expense-item:active {
  background: #f4f5f7;
}

.import-expense-item.selected {
  border-color: #0079bf;
  background: #e8f4fd;
}

.import-expense-item input[type="checkbox"] {
  accent-color: #0079bf;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.import-expense-name {
  font-size: 14px;
  color: #172b4d;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-expense-amount {
  font-size: 13px;
  font-weight: 700;
  color: #5e6c84;
  flex-shrink: 0;
}

/* ===== FEEDBACK ===== */
.app-feedback-btn {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  border: none;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
}

.app-feedback-btn:active {
  background: rgba(255, 255, 255, 0.32);
}

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

.fb-row-label {
  font-size: 14px;
  font-weight: 600;
  color: #344563;
}

.fb-stars {
  display: flex;
  gap: 4px;
}

.fb-star {
  font-size: 28px;
  cursor: pointer;
  color: #dfe1e6;
  line-height: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.fb-star.active {
  color: #f5a623;
}

.fb-textarea {
  width: 100%;
  padding: 15px 16px;
  border: 2px solid #dfe1e6;
  border-radius: 12px;
  font-size: 16px;
  color: #172b4d;
  outline: none;
  resize: none;
  height: 88px;
  font-family: inherit;
  -webkit-appearance: none;
  transition: border-color 0.2s;
}

.fb-textarea:focus {
  border-color: #0079bf;
}

.fb-char-count {
  font-size: 12px;
  color: #97a0af;
  text-align: right;
  margin-top: 5px;
  margin-bottom: 20px;
}

/* ===== SHARE / IMPORT ===== */
.share-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  background: #f4f5f7;
  border-radius: 10px;
  padding: 4px;
}

.share-tab-btn {
  flex: 1;
  padding: 9px 4px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #5e6c84;
  background: transparent;
  transition: all 0.15s;
}

.share-tab-btn.active {
  background: white;
  color: #172b4d;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.share-code-area {
  width: 100%;
  min-height: 100px;
  padding: 14px;
  border: 2px solid #dfe1e6;
  border-radius: 12px;
  font-size: 13px;
  font-family: 'SF Mono', 'Menlo', monospace;
  color: #172b4d;
  resize: none;
  outline: none;
  word-break: break-all;
  user-select: text;
  -webkit-user-select: text;
  transition: border-color 0.2s;
  margin-bottom: 14px;
}

.share-code-area:focus {
  border-color: #0079bf;
}

.share-qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}

.share-qr-box {
  background: white;
  border-radius: 12px;
  padding: 12px;
  border: 2px solid #dfe1e6;
  display: inline-block;
}

.share-url-text {
  font-size: 11px;
  color: #97a0af;
  text-align: center;
  word-break: break-all;
  padding: 0 4px;
  line-height: 1.5;
}

.import-status {
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 12px;
  text-align: center;
}

/* ===== INSTALL PROMPT ===== */
.install-hero {
  text-align: center;
  padding: 8px 0 20px;
}

.install-hero-icon {
  font-size: 60px;
  margin-bottom: 10px;
}

.install-hero-name {
  font-size: 20px;
  font-weight: 800;
  color: #172b4d;
}

.install-hero-desc {
  font-size: 14px;
  color: #5e6c84;
  margin-top: 6px;
  line-height: 1.5;
}

.install-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #344563;
  line-height: 1.45;
}

.install-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0079bf;
  color: white;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.install-step-icon {
  font-size: 18px;
}

@keyframes fbNudgeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Budget empty override for white summary card */
.summary-budget-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  overflow: hidden;
}

.summary-budget-card .budget-empty {
  border-color: #dfe1e6;
  margin: 10px;
}

.summary-budget-card .budget-empty-icon {
  color: #0052cc;
}

.summary-budget-card .budget-empty-title {
  color: #172b4d;
}

.summary-budget-card .budget-empty-sub {
  color: #5e6c84;
}

.summary-budget-card .budget-empty:active {
  background: #f4f5f7;
}

.summary-budget-card .budget-bar-wrap {
  padding: 14px 16px;
}

.summary-budget-card .budget-bar-label-left,
.summary-budget-card .budget-bar-label-right {
  color: #5e6c84;
}

.summary-budget-card .budget-bar-track {
  background: #e8edf2;
}

.summary-budget-card .budget-edit-hint {
  color: #5e6c84;
}

/* ===== SUMMARY TAB ===== */

.summary-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 100px;
}

.summary-budget-card {
  cursor: pointer;
}

.summary-col-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
}

.summary-col-card:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.summary-col-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-col-body {
  flex: 1;
  min-width: 0;
}

.summary-col-title {
  font-size: 15px;
  font-weight: 700;
  color: #172b4d;
  margin-bottom: 2px;
}

.summary-col-meta {
  font-size: 12px;
  color: #5e6c84;
}

.summary-col-total {
  font-size: 17px;
  font-weight: 800;
  color: #172b4d;
  flex-shrink: 0;
}

.summary-col-chevron {
  color: #b3bac5;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.summary-pri-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 16px;
}

.summary-pri-title {
  font-size: 11px;
  font-weight: 700;
  color: #5e6c84;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.summary-pri-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.summary-pri-row:last-child {
  margin-bottom: 0;
}

.summary-pri-label {
  font-size: 12px;
  font-weight: 600;
  color: #172b4d;
  width: 58px;
  flex-shrink: 0;
}

.summary-pri-track {
  flex: 1;
  background: #f0f1f3;
  border-radius: 99px;
  height: 8px;
}

.summary-pri-fill {
  border-radius: 99px;
  height: 8px;
  min-width: 4px;
  transition: width 0.4s ease;
}

.summary-pri-val {
  font-size: 12px;
  font-weight: 700;
  color: #5e6c84;
  width: 64px;
  text-align: right;
  flex-shrink: 0;
}

/* ===== ONBOARDING ===== */

@keyframes onbPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(0,82,204,0.35), 0 0 0 0 rgba(0,82,204,0.55); }
  50%       { box-shadow: 0 4px 16px rgba(0,82,204,0.35), 0 0 0 14px rgba(0,82,204,0); }
}

@keyframes onbPulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(54,179,126,0.7); }
  50%       { box-shadow: 0 0 0 10px rgba(54,179,126,0); }
}

#fab.onb-pulse {
  animation: onbPulse 1.5s ease-in-out infinite;
}

.onb-pulse-green {
  animation: onbPulseGreen 1.5s ease-in-out infinite;
  position: relative;
}

.onb-pulse-green::after {
  content: '¡Compartir!';
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #36b37e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

.onb-tab-hint {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #0052cc;
  background: #e8f0fe;
  border-top: 1.5px solid #c7d8f8;
  padding: 7px 0;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.onb-tab-hint.onb-fade-out {
  opacity: 0;
}
