:root {
  --bg-page: #faf8f7;
  --bg-surface: #ffffff;
  --bg-subtle: #f5f0ee;
  --text-main: #1e1b18;
  --text-secondary: #4a433e;
  --text-muted: #786f68;
  --border-color: #eadfd9;
  --border-focus: #c57b72;

  --brand-primary: #c57b72;
  --brand-primary-dark: #a85d54;
  --brand-primary-soft: #fdf4f3;
  --brand-dark: #1e1b18;

  --success: #10b981;
  --success-soft: #ecfdf5;
  --success-text: #065f46;

  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --warning-text: #92400e;

  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --danger-text: #991b1b;

  --info: #c57b72;
  --info-soft: #fdf4f3;
  --info-text: #8c4840;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 6px rgba(30, 27, 24, 0.05);
  --shadow-md: 0 8px 24px -4px rgba(30, 27, 24, 0.08);
  --shadow-lg: 0 20px 40px -10px rgba(30, 27, 24, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

/* Auth Lock Screen (PIN 4 Dígitos + Impressão Digital) */
.auth-lock-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: linear-gradient(160deg, #1e1b18 0%, #2c2521 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-logo-wrap {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 8px 28px rgba(197, 123, 114, 0.45);
  margin-bottom: 14px;
  overflow: hidden;
}

.auth-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: #d6c7c2;
  margin-top: 4px;
  margin-bottom: 22px;
}

.pin-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #c57b72;
  background: transparent;
  transition: all 0.15s ease;
}

.pin-dot.filled {
  background: #c57b72;
  box-shadow: 0 0 12px rgba(197, 123, 114, 0.7);
  transform: scale(1.1);
}

.pin-dots.shake {
  animation: pinShake 0.35s ease;
}

@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.auth-error-msg {
  font-size: 0.82rem;
  color: #fca5a5;
  font-weight: 600;
  margin-bottom: 14px;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 280px;
  margin-top: 4px;
}

.pin-key {
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, transform 0.1s ease;
}

.pin-key:active {
  background: rgba(197, 123, 114, 0.45);
  transform: scale(0.94);
}

.pin-key svg {
  width: 26px;
  height: 26px;
}

.pin-key-bio {
  color: #f3c6c0;
  border-color: rgba(197, 123, 114, 0.4);
  background: rgba(197, 123, 114, 0.14);
}

.pin-key-back {
  color: #d6c7c2;
}

.btn-bio-prompt {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(197, 123, 114, 0.2);
  color: #f3c6c0;
  border: 1px solid rgba(197, 123, 114, 0.45);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-bio-prompt svg {
  width: 18px;
  height: 18px;
}

.btn-install-header.bio-active {
  border-color: #6ee7b7;
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}

#dashboard-recent-list .sale-avatar {
  display: none !important;
}

/* App Shell */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(30, 27, 24, 0.96);
  backdrop-filter: blur(12px);
  color: #ffffff;
  border-bottom: 3px solid var(--brand-primary);
  box-shadow: 0 4px 16px rgba(30, 27, 24, 0.14);
}

.header-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(197, 123, 114, 0.4);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.brand-text-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #d6c7c2;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-header-icon svg {
  width: 19px;
  height: 19px;
  color: #f3c6c0;
}

.btn-header-icon:hover,
.btn-header-icon:active {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0.96);
}

/* Mobile Install Banner */
.install-banner {
  background: linear-gradient(135deg, #ffffff 0%, #fdf4f3 100%);
  border: 1.5px solid #e6c6c1;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.install-banner-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.install-banner-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: #ffffff;
  flex-shrink: 0;
}

.install-banner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.install-banner-text strong {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
}

.install-banner-text span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-install-now {
  background: var(--brand-dark);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-install-dismiss {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-install-dismiss svg {
  width: 16px;
  height: 16px;
}

/* Install Guide Modal Steps */
.install-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.install-step-card {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.step-badge {
  align-self: flex-start;
  background: var(--brand-primary-soft);
  color: var(--brand-primary-dark);
  font-weight: 800;
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 2px;
}

/* Desktop Nav */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 5px;
  border-radius: 14px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #e2d9d5;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn svg {
  width: 18px;
  height: 18px;
}

.nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(197, 123, 114, 0.35);
}

.btn-header-cta {
  display: none !important;
}

/* Main Content */
.app-main {
  flex: 1;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 16px 14px 32px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.section-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, #c57b72 0%, #a85d54 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(168, 93, 84, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-primary svg {
  width: 18px;
  height: 18px;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--danger);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--brand-primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-link svg {
  width: 16px;
  height: 16px;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:active {
  transform: scale(0.98);
}

.kpi-card-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #1e1b18 0%, #332c27 100%);
  border-color: #332c27;
  color: #ffffff;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}

.kpi-card-featured .kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(197, 123, 114, 0.25);
  color: #f3c6c0;
  flex-shrink: 0;
}

.kpi-card-featured .kpi-label {
  color: #d6c7c2;
}

.kpi-card-featured .kpi-value {
  color: #ffffff;
  font-size: 1.65rem;
}

.kpi-card-featured .kpi-meta {
  color: #b5a69f;
}

.kpi-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-wrap svg {
  width: 21px;
  height: 21px;
}

.kpi-total-sales .kpi-icon-wrap {
  background: var(--brand-primary-soft);
  color: var(--brand-primary-dark);
}

.kpi-pending-count .kpi-icon-wrap {
  background: var(--warning-soft);
  color: var(--warning);
}

.kpi-pending-amount .kpi-icon-wrap {
  background: var(--danger-soft);
  color: var(--danger);
}

.kpi-paid-amount .kpi-icon-wrap {
  background: var(--success-soft);
  color: var(--success);
}

.kpi-content {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.kpi-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin: 2px 0;
  word-break: break-word;
}

.kpi-paid-amount .kpi-value {
  color: var(--success-text);
}

.kpi-pending-amount .kpi-value {
  color: var(--danger-text);
}

.kpi-meta {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* Dashboard Recent Sales Card */
.dashboard-recent-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

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

.card-subtitle {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Filter Pills Bar */
.filters-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 11px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  border: 1px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.filter-pill.active {
  background: var(--brand-dark);
  color: #ffffff;
  border-color: var(--brand-dark);
  box-shadow: 0 2px 8px rgba(30, 27, 24, 0.18);
}

.filter-pill-pending.active {
  background: var(--warning);
  border-color: var(--warning);
  color: #ffffff;
}

.period-selector-bar {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.period-input-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.period-input-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.period-input {
  max-width: 200px;
  padding: 8px 12px !important;
  font-size: 0.88rem !important;
}

.period-range-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
  background: var(--brand-primary-soft);
  padding: 5px 10px;
  border-radius: 999px;
}

/* Filtered Summary Strip */
.filtered-summary-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding: 0 4px;
}

.summary-dot {
  color: #cbd5e1;
}

/* Sales List & Items */
.sales-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sale-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: var(--shadow-sm);
  text-align: left;
  width: 100%;
}

.sale-item:active {
  transform: scale(0.99);
}

.sale-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

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

.sale-client-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sale-date-text {
  font-size: 0.79rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.sale-notes-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 5px;
  background: var(--bg-page);
  padding: 4px 10px;
  border-radius: 7px;
  border-left: 2.5px solid var(--brand-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.sale-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.sale-amount-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-paid {
  background: var(--success-soft);
  color: var(--success-text);
}

.status-paid::before {
  background: var(--success);
}

.status-unpaid {
  background: var(--warning-soft);
  color: var(--warning-text);
}

.status-unpaid::before {
  background: var(--warning);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 32px 18px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.empty-state-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.empty-state-icon svg {
  width: 22px;
  height: 22px;
}

.empty-state h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 0.82rem;
}

/* Clients Section */
.client-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.client-input-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.clients-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.client-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.client-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.client-avatar.is-vinted {
  background: var(--brand-primary-soft);
  color: var(--brand-primary-dark);
}

.client-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.client-stats {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.client-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-action {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-page);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-icon-action svg {
  width: 16px;
  height: 16px;
}

.badge-default {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary-dark);
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(197, 123, 114, 0.18);
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.45;
}

.input-currency-wrap {
  position: relative;
}

.input-currency {
  padding-right: 40px;
  font-weight: 700;
  font-size: 1.1rem;
}

.currency-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  color: var(--text-muted);
  pointer-events: none;
}

/* Payment Status Toggle Card */
.sr-only-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.payment-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  cursor: pointer;
  user-select: none;
}

.payment-toggle-card.is-paid {
  background: var(--success-soft);
  border-color: #6ee7b7;
}

.payment-toggle-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
}

.payment-toggle-card.is-paid .payment-status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.payment-status-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.payment-status-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.toggle-switch {
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  padding: 3px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-knob {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.payment-toggle-card.is-paid .toggle-switch {
  background: var(--success);
}

.payment-toggle-card.is-paid .toggle-knob {
  transform: translateX(22px);
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 20px rgba(30, 27, 24, 0.06);
}

.mobile-nav-item {
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
}

.mobile-nav-item.active {
  color: var(--brand-primary-dark);
  font-weight: 800;
}

.nav-icon-badge-wrap {
  position: relative;
  display: inline-flex;
}

.nav-badge {
  position: absolute;
  top: -5px;
  right: -9px;
  background: var(--warning);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

/* Modals / Bottom Sheets */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 27, 24, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-sheet {
  background: var(--bg-surface);
  width: 100%;
  max-width: 500px;
  border-radius: 24px 24px 0 0;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-lg);
  max-height: 92dvh;
  overflow-y: auto;
}

.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #d6c7c2;
  margin: 0 auto 14px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-icon-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-icon-close svg {
  width: 18px;
  height: 18px;
}

.modal-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

/* Action Menu List */
.action-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  text-align: left;
  cursor: pointer;
}

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

.action-icon svg {
  width: 20px;
  height: 20px;
}

.action-icon-edit {
  background: var(--brand-primary-soft);
  color: var(--brand-primary-dark);
}

.action-icon-status {
  background: var(--success-soft);
  color: var(--success);
}

.action-icon-status.is-unpay {
  background: var(--warning-soft);
  color: var(--warning);
}

.action-icon-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.action-text {
  display: flex;
  flex-direction: column;
}

.action-text strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.action-text span {
  font-size: 0.79rem;
  color: var(--text-muted);
}

.action-menu-danger .action-text strong {
  color: var(--danger);
}

/* Confirm Delete Modal */
.modal-sheet-confirm {
  text-align: center;
}

.modal-sheet-confirm .modal-header {
  text-align: left;
}

.confirm-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--danger-soft);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto 14px;
}

.confirm-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.confirm-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.confirm-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}

.toast {
  background: var(--brand-dark);
  color: #ffffff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

/* Settings Modal */
.settings-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-section-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.settings-card {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-row-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.settings-row-info strong {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
}

.settings-status-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.settings-status-badge.is-active {
  color: var(--success-text);
  font-weight: 700;
}

.settings-pin-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-pin-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-pin-input {
  flex: 1;
  padding: 10px 12px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.25em;
  text-align: center;
}

.btn-sm {
  padding: 10px 14px !important;
  font-size: 0.85rem !important;
  border-radius: 10px !important;
  white-space: nowrap;
}

.form-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Responsive Tablet & Desktop */
@media (min-width: 768px) {
  .app-shell {
    padding-bottom: 0;
  }

  .desktop-nav {
    display: flex;
  }

  .btn-header-cta {
    display: inline-flex !important;
  }

  .mobile-only-cta {
    display: none;
  }

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

  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .kpi-value {
    font-size: 1.6rem;
  }

  .clients-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }

  .modal-sheet {
    border-radius: 22px;
    padding: 24px;
  }

  .modal-handle {
    display: none;
  }

  .toast-container {
    bottom: 28px;
  }
}
