/* Manila Water App - Modern UI Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --primary: #009BB0;
  --primary-gradient: linear-gradient(180deg, #00A8B5 0%, #00879E 100%);
  --header-gradient: linear-gradient(180deg, #01A3BA 0%, #17BEBB 50%, #30CFD0 100%);
  --cyan-bright: #00c0ce;
  --btn-blue: #409ed0;
  --btn-blue-hover: #338bbb;
  --btn-teal: #2ea8ba;
  --accent-blue: #0288d1;
  --bg-page: #e8f7f7;
  --bg-card: #ffffff;
  --text-dark: #1e293b;
  --text-gray: #64748b;
  --text-muted: #94a3b8;
  --border-light: #e2e8f0;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 155, 176, 0.08);
  --shadow-card: 0 8px 24px rgba(23, 190, 187, 0.09);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 50px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f1f5f9;
  color: var(--text-dark);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid #00A8B5;
  outline-offset: 2px;
}

/* Top Navigation Bar */
.desktop-controls {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: max(10px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  gap: 10px;
}
.desktop-controls .brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.view-mode-toggle {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-weight: 600;
  min-height: 38px;
}
.view-mode-toggle:hover {
  background: #e2e8f0;
}
.view-mode-toggle:active {
  transform: scale(0.98);
}

/* Language Switcher Pill */
.lang-switcher-group {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}
.lang-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-height: 28px;
}
.lang-btn:hover {
  color: #0f172a;
}
.lang-btn.active-lang {
  background: #00A8B5;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 168, 181, 0.35);
}

/* Application Container (Fully Responsive across Desktop, Tablet & Mobile) */
.device-wrapper {
  width: 100%;
  max-width: 680px;
  margin: 16px auto 24px;
  height: min(880px, calc(100vh - 80px));
  min-height: 580px;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(0, 135, 158, 0.12), 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid #cbd5e1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

/* Large Desktop screens (> 1440px) */
@media (min-width: 1440px) {
  .device-wrapper {
    max-width: 720px;
    margin: 24px auto 36px;
    height: min(920px, calc(100vh - 100px));
  }
}

/* Tablets (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .device-wrapper {
    max-width: 640px;
    margin: 14px auto 20px;
    height: min(860px, calc(100vh - 70px));
  }
}

/* Mobile Screens (< 768px) - Full Edge-to-Edge */
@media (max-width: 767px) {
  .desktop-controls {
    padding: max(8px, env(safe-area-inset-top, 0px)) 12px 8px;
  }
  .device-wrapper {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    flex: 1 1 0;
    height: auto;
    min-height: 0;
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background: #ffffff !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12) !important;
    border-top: 1px solid #e2e8f0 !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .tab-screen {
    min-height: calc(100vh - 150px) !important;
  }
}

/* Small Mobile Screens (< 480px) */
@media (max-width: 480px) {
  .desktop-controls {
    padding: max(6px, env(safe-area-inset-top, 0px)) 10px 6px;
    gap: 6px;
  }
  .desktop-controls .brand-badge div {
    display: none;
  }
  .user-badge {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  .view-mode-toggle {
    padding: 5px 9px;
    font-size: 11.5px;
  }
  .btn-text-hide-xs {
    display: none;
  }
}

/* Ultra-compact screens (< 360px) */
@media (max-width: 359px) {
  .desktop-controls {
    padding: max(4px, env(safe-area-inset-top, 0px)) 6px 4px;
    gap: 4px;
  }
  .desktop-controls .brand-badge img {
    height: 24px !important;
    width: 24px !important;
  }
  .lang-btn {
    padding: 3px 6px;
    font-size: 10px;
  }
  .user-badge span:not(:first-child) {
    display: none;
  }
}

/* Mobile Screen Container */
.mobile-screen {
  flex: 1 1 0;
  min-height: 0; /* Crucial for internal scrolling in flex child */
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #b8eff2 0%, #ddf7f7 18%, #f2fbfb 35%, #ffffff 100%);
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
.mobile-screen::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Mobile Status Bar (Hidden in production) */
.status-bar {
  display: none !important;
}

/* Top App Bar with back navigation */
.app-header {
  padding: 6px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 40;
}
.app-header .back-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background 0.2s;
}
.app-header .back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
.app-header .header-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex: 1;
  text-align: center;
  margin-right: 36px; /* offset back button */
}

/* Manila Water Logo Header on Dashboard */
.logo-header {
  text-align: center;
  padding: 10px 20px 14px;
  background: #ffffff;
}
.logo-header img, .logo-header svg {
  height: 70px;
  max-width: 220px;
  object-fit: contain;
}

/* CAN Selector Pill */
.can-selector-container {
  display: flex;
  justify-content: flex-end;
  padding: 0 20px 12px;
}
.can-pill-btn {
  background: #ffffff;
  color: #00879E;
  border: 1px solid #c9ecf0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 155, 176, 0.1);
  transition: all 0.2s;
}
.can-pill-btn:hover {
  background: #f0fbfc;
  box-shadow: 0 4px 12px rgba(0, 155, 176, 0.2);
}
.can-pill-btn svg {
  width: 14px;
  height: 14px;
  fill: #00879E;
  transition: transform 0.2s;
}

/* Dashboard Hero Header Gradient */
.dashboard-hero {
  background: linear-gradient(180deg, #00A6B8 0%, #00BFB2 55%, #63DCD2 90%, #A5EFEA 100%);
  padding: 15px 22px 24px;
  color: #ffffff;
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 174, 187, 0.25);
  margin-bottom: 14px;
}
.dashboard-hero .hero-greeting {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2px;
  letter-spacing: -0.5px;
}
.dashboard-hero .hero-sub {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 16px;
}
.dashboard-hero .balance-card-mini {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 10px;
  flex-wrap: wrap;
}
.dashboard-hero .balance-label {
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1.3;
}
.dashboard-hero .balance-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 2px;
}
.dashboard-hero .can-select-box {
  background: #ffffff;
  color: #0284c7;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: none;
}
.dashboard-hero .pay-bill-btn {
  width: 100%;
  background: #4495c7;
  background: linear-gradient(180deg, #4da4d8 0%, #3a8cc0 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 13px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(45, 120, 170, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.dashboard-hero .pay-bill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(45, 120, 170, 0.45);
}
.dashboard-hero .pay-bill-btn:active {
  transform: translateY(1px);
}

/* Top Hero for Sub-Screens (Billing History, Profile, Transactions) */
.subpage-hero {
  background: linear-gradient(180deg, #00A6B8 0%, #00BFB2 100%);
  padding: 6px 20px 18px;
  color: #ffffff;
  position: relative;
}
.subpage-hero .can-selector-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.subpage-hero .can-label {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
}

/* Card Components */
.app-content {
  padding: 4px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 4px 18px rgba(0, 155, 176, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
}
.content-card.compact {
  padding: 14px 18px;
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00A8B5;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}
.card-view-link {
  font-size: 13px;
  font-weight: 600;
  color: #009BB0;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
}
.card-view-link:hover {
  text-decoration: underline;
}

/* News & Updates Items */
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s;
}
.news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.news-item:first-child {
  padding-top: 0;
}
.news-item-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #0288d1;
  margin-top: 1px;
}
.news-item-icon.teal {
  color: #00A8B5;
}
.news-item-text {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  line-height: 1.4;
}

/* Chart Styles */
.chart-container {
  position: relative;
  width: 100%;
  height: 175px;
  margin-top: 4px;
}

/* Month Filter Selector in Billing History */
.month-filter-dropdown {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0284c7;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
}

/* Bill Information Rows */
.bill-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.bill-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  gap: 8px;
  flex-wrap: wrap;
}
.bill-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  font-weight: 500;
  flex-shrink: 0;
}
.bill-info-left svg {
  width: 18px;
  height: 18px;
  color: #00A8B5;
}
.bill-info-right {
  font-weight: 700;
  color: #1e293b;
  text-align: right;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.bill-info-row.due-date .bill-info-left svg {
  color: var(--danger);
}
.bill-info-row.due-date .bill-info-right {
  color: var(--danger);
  font-weight: 800;
}

/* Action Buttons (Download E-Bill, Edit Account, Manage) */
.action-btn-pill {
  width: 100%;
  background: #449ec9;
  background: linear-gradient(180deg, #4aa7d4 0%, #3992be 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(45, 120, 170, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  transition: all 0.2s;
}
.action-btn-pill:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}
.action-btn-pill svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Profile List Rows */
.profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 13.5px;
  color: #334155;
  font-weight: 500;
}
.profile-row svg {
  width: 18px;
  height: 18px;
  color: #00A8B5;
  flex-shrink: 0;
}
.profile-row .status-pending {
  color: #d97706;
  font-weight: 700;
}
.profile-row .status-paid {
  color: #10b981;
  font-weight: 700;
}

/* Settings Toggle Rows */
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}
.setting-row:last-child {
  border-bottom: none;
}
.setting-label-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #334155;
}
.setting-label-group svg {
  width: 18px;
  height: 18px;
  color: #00A8B5;
}

/* Custom iOS Style Toggles */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 34px;
  display: flex;
  align-items: center;
  padding: 0 4px;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
input:checked + .toggle-slider {
  background-color: #38bdf8;
}
input:checked + .toggle-slider:before {
  transform: translateX(22px);
}
/* Email badge inside toggle */
.toggle-slider .toggle-icon {
  position: absolute;
  right: 8px;
  font-size: 10px;
  color: #ffffff;
  font-weight: 700;
}
.toggle-slider .toggle-text {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
  margin-left: 26px;
}
input:checked + .toggle-slider .toggle-text {
  display: none;
}

/* Logout link */
.logout-btn-container {
  text-align: center;
  padding: 12px 0 4px;
}
.logout-link {
  color: #00A8B5;
  font-weight: 700;
  font-size: 15px;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
}
.logout-link:hover {
  color: #00879E;
}

/* Transactions List */
.txn-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.txn-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.txn-item:last-child {
  border-bottom: none;
}
.txn-ref {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}
.txn-status-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #94a3b8;
}
.txn-status-badge.pending {
  color: #64748b;
}
.txn-status-badge.paid {
  color: #10b981;
}
.txn-amount {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  text-align: right;
  margin-bottom: 2px;
}
.txn-date {
  font-size: 11.5px;
  color: #64748b;
  text-align: right;
}

/* Bottom Navigation Bar (Permanently pinned at bottom of device container) */
.bottom-nav {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.07);
  border-top: 1px solid #e2e8f0;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  height: 100%;
  min-height: 48px;
  min-width: 44px;
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  border: none;
  padding: 4px 2px;
}
.nav-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.nav-item span {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.2px;
}
.nav-item.active {
  color: #00A8B5;
}
.nav-item.active svg {
  transform: scale(1.1);
}
.nav-item:active {
  transform: scale(0.95);
}

@media (max-width: 359px) {
  .nav-item svg {
    width: 20px;
    height: 20px;
  }
  .nav-item span {
    font-size: 9px;
  }
}

/* Home Indicator Bar (iOS Home Bar) */
.home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 4px;
  background: #0f172a;
  border-radius: 4px;
  z-index: 70;
  pointer-events: none;
}

/* Screens / Tab Display logic */
.tab-screen {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}
.tab-screen.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 30, 40, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: clamp(16px, 4vw, 24px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  position: relative;
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #00879E;
  margin-bottom: 14px;
  padding-right: 32px;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f1f5f9;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s;
}
.modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.modal-close:active {
  transform: scale(0.95);
}

/* Forms inside modal */
.form-group {
  margin-bottom: 14px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  min-height: 44px;
}
.form-input:focus {
  border-color: #00A8B5;
  box-shadow: 0 0 0 3px rgba(0, 168, 181, 0.15);
}

/* Mobile font-size protection against iOS auto-zoom */
@media (max-width: 768px) {
  .form-input, 
  .form-select, 
  .input-field,
  input[type="text"], 
  input[type="password"], 
  input[type="number"], 
  input[type="email"], 
  input[type="tel"], 
  select {
    font-size: 16px !important;
  }
}

/* Payment Methods Grid */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}
@media (max-width: 360px) {
  .payment-grid {
    gap: 6px;
  }
}
.payment-method-card {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 64px;
  justify-content: center;
}
.payment-method-card:hover {
  border-color: #38bdf8;
  background: #f0f9ff;
}
.payment-method-card.selected {
  border-color: #00A8B5;
  background: #e6f7f8;
}
.payment-method-card:active {
  transform: scale(0.98);
}
.pm-icon {
  font-size: 24px;
  font-weight: 800;
}
.pm-name {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

/* Toast Notifications */
.toast-msg {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 200;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
