/* ================================================================
   SERVICE CENTER PAYMENT PORTAL
   DGOE - Digital Services
   Brand Primary: #3371e7 | Design System v1.0
   ================================================================ */


/* ── Skip Navigation Link ──────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--primary, #004b8d);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm, 4px) var(--radius-sm, 4px);
  z-index: 9999;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ── Theme Tokens (portalThemeColor / portalThemeOnColor) ────────
   Defined once in ct-theme-tokens.css and provided at runtime by
   the platform-generated ct-theme.css. No duplication here.
   ──────────────────────────────────────────────────────────────── */
@import url("https://gov.content.powerapps.us/resource/powerappsportal/fonts/poppins/v20/400.css");
@import url("https://gov.content.powerapps.us/resource/powerappsportal/fonts/poppins/v20/400-italic.css");

/* ── CSS Custom Properties ─────────────────────────────────────── */
:root {


  /* ── Surface + Action Colors ────────────────────────────────── */
  --portalThemeColor1: #3371e7;
  /* Primary Blue  */
  --portalThemeColor2: #003d9c;
  /* Dark Blue     */
  --portalThemeColor3: #00214d;
  /* Deepest Blue  */
  --portalThemeColor4: #F27124;
  /* Orange        */
  --portalThemeColor5: #7094f5;
  /* Light Blue    */
  --portalThemeColor6: #c6d4fb;
  /* Blue Tint     */
  --portalThemeColor7: #FFFFFF;
  /* White         */
  --portalThemeColor8: #2A2C2E;
  /* Dark Gray     */
  --portalThemeColor9: #faaa19;
  /* Gold / Amber  */
  --portalThemeColor10: #D8343E;
  /* Red           */
  --portalThemeColor11: #94343E;
  /* Dark Red      */
  --portalThemeColor12: #f8f8f8;
  /* Light Gray    */

  /* ── On-Color (foreground to pair with each surface) ────────── */
  --portalThemeOnColor1: #FFFFFF;
  --portalThemeOnColor2: #FFFFFF;
  --portalThemeOnColor3: #FFFFFF;
  --portalThemeOnColor4: #2A2C2E;
  --portalThemeOnColor5: #2A2C2E;
  --portalThemeOnColor6: #2A2C2E;
  --portalThemeOnColor7: #2A2C2E;
  --portalThemeOnColor8: #FFFFFF;
  --portalThemeOnColor9: #2A2C2E;
  --portalThemeOnColor10: #FFFFFF;
  --portalThemeOnColor11: #FFFFFF;
  --portalThemeOnColor12: #2A2C2E;


  /* Brand Colors */
  --primary: var(--portalThemeColor1);
  /* #3371e7 */
  --primary-dark: var(--portalThemeColor2);
  /* #003d9c */
  --primary-light: var(--portalThemeColor5);
  /* #7094f5 */
  --primary-hover: var(--portalThemeColor2);
  /* #003d9c */
  --primary-muted: var(--portalThemeColor6);
  /* #c6d4fb */
  --primary-subtle: #eef1fe;

  /* Semantic Colors */
  --success: #2d8653;
  --success-bg: #e6f4ec;
  --success-text: #1b5e36;
  --success-border: #a3d4b5;

  --danger: var(--portalThemeColor10);
  /* #D8343E */
  --danger-bg: #fde8e9;
  --danger-text: var(--portalThemeColor11);
  /* #94343E */
  --danger-border: #f4a4a8;

  --warning: var(--portalThemeColor4);
  /* #F27124 */
  --warning-bg: #fef0e6;
  --warning-text: #7a3800;
  --warning-border: #f7c4a0;

  --info: #006fa6;
  --info-bg: #e3f3fc;
  --info-text: #004d74;
  --info-border: #9fd6f0;

  /* Backgrounds */
  --bg-page: var(--portalThemeColor12);
  /* #f8f8f8 */
  --bg-card: var(--portalThemeColor7);
  /* #FFFFFF */
  --bg-sidebar: #f5f5f5;
  --bg-header: var(--portalThemeColor1);
  /* #3371e7 */
  --bg-nav: var(--portalThemeColor7);
  /* #FFFFFF */
  --bg-footer: var(--portalThemeColor1);
  /* #3371e7 */
  --bg-table-head: var(--portalThemeColor12);
  /* #f8f8f8 */

  /* Typography */
  --text-heading: var(--portalThemeColor8);
  /* #2A2C2E */
  --text-body: var(--portalThemeColor8);
  /* #2A2C2E */
  --text-secondary: #5c6068;
  --text-muted: #8d9aab;
  --text-white: var(--portalThemeColor7);
  /* #FFFFFF */
  --text-link: var(--portalThemeColor1);
  /* #3371e7 */

  /* Borders */
  --border: #dde2ea;
  --border-light: #eef0f5;
  --border-focus: var(--portalThemeColor1);
  /* #3371e7 */
  --border-input: #c8d0db;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 40, 80, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 40, 80, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 40, 80, 0.10);
  --shadow-lg: 0 8px 32px rgba(0, 40, 80, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 40, 80, 0.14);
  --shadow-card: 0 2px 8px rgba(0, 40, 80, 0.07), 0 0 0 1px rgba(0, 40, 80, 0.04);

  /* Border Radius */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 50rem;

  /* Typography Scale */
  --font: 'Poppins', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  /* 12px */
  --font-size-sm: 0.8125rem;
  /* 13px */
  --font-size-base: 0.875rem;
  /* 14px */
  --font-size-md: 0.9375rem;
  /* 15px */
  --font-size-lg: 1rem;
  /* 16px */
  --font-size-xl: 1.125rem;
  /* 18px */
  --font-size-2xl: 1.25rem;
  /* 20px */
  --font-size-3xl: 1.5rem;
  /* 24px */
  --font-size-4xl: 1.875rem;
  /* 30px */
  --font-size-5xl: 2.25rem;
  /* 36px */

  /* Transitions */
  --transition-fast: 0.12s ease;
  --transition: 0.20s ease;
  --transition-slow: 0.32s ease;

  /* Layout */
  --header-height: 64px;
  --nav-height: 48px;
}

/* ── Base Reset ────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font);
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a {
  color: var(--text-link);
  text-decoration: none;
}

a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}


/* ── Portal Header ─────────────────────────────────────────────── */
.portal-header {
  background: var(--bg-header);
  height: var(--header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
}

.portal-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 24px;
}

.portal-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
}

.ct-gov-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}

.portal-logo-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.portal-logo-text {
  display: flex;
  flex-direction: column;
}

.portal-logo-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.portal-logo-subtitle {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Header Right Utilities */
.header-utils {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  transition: all var(--transition-fast);
  position: relative;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.badge-notif {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid #fff;
}

.badge-notif.has-count {
  width: auto;
  height: 16px;
  min-width: 16px;
  padding: 0 4px;
  top: 3px;
  right: 3px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  height: 40px;
}

.user-avatar-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.55);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  flex-shrink: 0;
}

.user-name {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #fff;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.3);
  margin: 0 4px;
}

/* ── User Dropdown Menu ────────────────────────────────────────── */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 2000;
  overflow: hidden;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.user-dropdown-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
}

.user-dropdown-email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-body);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
}

.user-dropdown-item:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  text-decoration: none;
}

.user-dropdown-item i {
  width: 16px;
  color: var(--text-muted);
}

.user-dropdown-item:hover i {
  color: var(--primary);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

/* ── Notification Dropdown Panel ──────────────────────────────── */
.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 2000;
}

.notification-panel.show {
  display: block;
}

.notif-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-heading);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.notif-item:hover {
  background: var(--primary-subtle);
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.notif-dot.danger {
  background: var(--danger);
}

.notif-dot.warning {
  background: var(--warning);
}

.notif-dot.info {
  background: var(--info);
}

.notif-text {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.4;
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.notif-footer {
  padding: 10px 16px;
  text-align: center;
}

/* ── Main Navigation Bar ───────────────────────────────────────── */
.portal-nav {
  background: var(--bg-nav);
  height: var(--nav-height);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
}

.portal-nav .nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  gap: 0;
  width: 100%;
}

.portal-nav .nav-inner::-webkit-scrollbar {
  display: none;
}

/* Power Pages nav structure: nav.portal-nav > div.nav-inner > ul.nav-links > li > a.nav-link */
.portal-nav ul,
.portal-nav ul.nav-links,
.portal-nav .nav-inner ul {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 2px !important;
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  border: none !important;
  background: none !important;
}

.portal-nav li,
.portal-nav ul.nav-links>li,
.portal-nav .nav-inner li {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  float: none !important;
}

.portal-nav li::marker,
.portal-nav ul.nav-links>li::marker {
  content: none !important;
}

/* Power Pages uses .nav-link class on anchor — apply nav-item-link styles to it too */
.portal-nav a.nav-link,
.portal-nav .nav-links a {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 0 14px !important;
  height: var(--nav-height) !important;
  font-size: var(--font-size-sm) !important;
  position: relative !important;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  border-bottom: 2px solid transparent !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  transition: all var(--transition-fast) !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.portal-nav a.nav-link:hover,
.portal-nav .nav-links a:hover {
  color: var(--primary) !important;
  background: var(--primary-subtle) !important;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0 !important;
  text-decoration: none !important;
}

.portal-nav a.nav-link.active,
.portal-nav .nav-links a.active {
  color: var(--primary) !important;
  font-weight: 600 !important;
  border-bottom-color: var(--primary) !important;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  height: var(--nav-height);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none !important;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-item-link:hover {
  color: var(--primary);
  background: var(--primary-subtle);
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
}

.nav-item-link.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

.nav-item-link i {
  font-size: 14px;
}

.nav-badge {
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 16px;
  vertical-align: middle;
}

.nav-spacer {
  flex: 1;
}

/* Session timer pushed to far right — nav-inner must NOT have overflow-x: auto for this to work */
.portal-nav .nav-utilities {
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

/* Allow nav links to scroll on narrow screens without affecting the utilities */
.portal-nav ul.nav-links {
  overflow-x: auto !important;
  scrollbar-width: none !important;
  flex-shrink: 1 !important;
}

.portal-nav ul.nav-links::-webkit-scrollbar {
  display: none !important;
}

.nav-session,
.session-timer {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  white-space: nowrap;
}

.nav-session i {
  font-size: 11px;
  color: var(--warning);
}

/* ── Page Layout ───────────────────────────────────────────────── */
.portal-main {
  min-height: calc(100vh - var(--header-height) - var(--nav-height) - 60px);
  padding: 0 24px 28px;
}

.page-header {
  margin: 0 0 24px !important;
  padding-top: 24px;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: 8px;
}

.page-breadcrumb a {
  color: var(--text-muted);
}

.page-breadcrumb a:hover {
  color: var(--primary);
  text-decoration: none;
}

.page-breadcrumb>i {
  font-size: 8px;
}

.page-title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.page-subtitle {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 400;
}

/* ── Dashboard Layout ──────────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.dashboard-layout>* {
  min-width: 0;
}

.bills-filter-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 1100px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .bills-filter-controls {
    flex-wrap: wrap;
  }

  .bills-filter-controls .search-bar {
    width: 100% !important;
    flex: 1 1 100%;
  }

  .bills-filter-controls .form-select {
    flex: 1 1 auto;
    width: auto !important;
  }
}

@media (max-width: 480px) {
  .bills-filter-controls .search-bar {
    display: none;
  }
}

/* ── KPI / Summary Cards ───────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
}

.kpi-card.kpi-danger::before {
  background: var(--danger);
}

.kpi-card.kpi-warning::before {
  background: var(--warning);
}

.kpi-card.kpi-success::before {
  background: var(--success);
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.kpi-card.kpi-danger .kpi-icon {
  background: var(--danger-bg);
  color: var(--danger);
}

.kpi-card.kpi-warning .kpi-icon {
  background: var(--warning-bg);
  color: var(--warning);
}

.kpi-card.kpi-success .kpi-icon {
  background: var(--success-bg);
  color: var(--success);
}

.kpi-value {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1;
  letter-spacing: -0.03em;
}

.kpi-meta {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.kpi-meta .trend-up {
  color: var(--danger);
}

.kpi-meta .trend-down {
  color: var(--success);
}

/* ── Card Component ────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-header {
  padding: 16px 22px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header-title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header-title i {
  color: var(--primary);
  font-size: 15px;
}

.card-body {
  padding: 20px 22px;
  background: var(--bg-card);
  font-size: var(--font-size-sm);
  /* 13px — prevents portal base from inflating card content */
}

.card-body p,
.card-body span,
.card-body li {
  font-size: inherit;
}

.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-table-head);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Data Tables ───────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  min-width: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.table-wrapper-flush {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  background: var(--bg-card);
}

.portal-table thead th {
  background: var(--bg-table-head);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-align: left;
}

.portal-table thead th:first-child {
  border-radius: var(--radius-md) 0 0 0;
}

.portal-table thead th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

.portal-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
  vertical-align: middle;
}

.portal-table tbody tr:last-child td {
  border-bottom: none;
}

.portal-table tbody tr {
  transition: background var(--transition-fast);
}

.portal-table tbody tr:hover {
  background: var(--primary-subtle);
}

.portal-table tbody tr.selected {
  background: var(--primary-muted);
}

.portal-table .col-check {
  width: 44px;
  text-align: center;
}

.portal-table .col-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.portal-table .col-actions {
  text-align: right;
  white-space: nowrap;
}

.bill-number {
  font-weight: 600;
  color: var(--primary);
  font-size: var(--font-size-sm);
}

.service-name {
  font-weight: 500;
  color: var(--text-heading);
}

.service-desc {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.amount-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-heading);
}

/* ── Status Badges ─────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-badge::before {
  content: none;
}

.badge-paid {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.badge-overdue {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-pending {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.badge-inprogress {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.badge-scheduled {
  background: var(--primary-muted);
  color: var(--primary-dark);
  border: 1px solid #c0d8ef;
}

.badge-refunded {
  background: #f5f0ff;
  color: #6b21a8;
  border: 1px solid #d8b4fe;
}

.badge-active {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none !important;
  white-space: nowrap;
  vertical-align: middle;
  -webkit-user-select: none;
  user-select: none;
}

.btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:disabled,
.btn[disabled],
.btn[aria-disabled="true"],
.btn.is-disabled {
  background: #c8cdd6 !important;
  color: #5a6270 !important;
  border-color: #c8cdd6 !important;
  box-shadow: none !important;
  pointer-events: none;
  cursor: default;
  opacity: 1;
}

.btn i {
  font-size: 13px;
}

/* Primary */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 75, 141, 0.30);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Secondary / Outline */
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-muted);
  color: var(--primary);
}

/* Danger */
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #a93226;
  border-color: #a93226;
  color: #fff;
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  padding-left: 10px;
  padding-right: 10px;
}

.btn-ghost:hover {
  background: var(--bg-page);
  color: var(--text-heading);
}

/* Success */
.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-success:hover {
  background: #236b42;
  color: #fff;
}

/* Sizes */
.btn-sm {
  padding: 5px 12px;
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: 11px 26px;
  font-size: var(--font-size-md);
  border-radius: var(--radius-sm);
}

.btn-xl {
  padding: 14px 32px;
  font-size: var(--font-size-lg);
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

.btn-icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
}

/* ── Form Controls ─────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--danger);
  margin-left: 3px;
}

.form-label-note {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.form-label-optional {
  display: none;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 4px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 9px 13px;
  font-family: var(--font);
  font-size: var(--font-size-base);
  color: var(--text-body);
  background: var(--bg-card);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  line-height: 1.5;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 75, 141, 0.12);
}

.form-control.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.10);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6a7e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 5px;
}

.form-error {
  font-size: var(--font-size-xs);
  color: var(--danger);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-group {
  margin-bottom: 18px;
}

/* Checkbox / Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-check-input {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-input);
  border-radius: 3px;
  appearance: none;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--bg-card);
  transition: all var(--transition-fast);
  position: relative;
}

.form-check-input:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.form-check-input:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-check-input[type="radio"]:checked::after {
  width: 6px;
  height: 6px;
  top: 3px;
  left: 3px;
  border: none;
  background: #fff;
  border-radius: 50%;
}

.form-check-label {
  font-size: var(--font-size-sm);
  color: var(--text-body);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* Search bar */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 14px;
  z-index: 1;
  pointer-events: none;
}

.search-bar .form-control {
  padding-left: 38px;
}

.search-bar .btn-search {
  position: absolute;
  right: 5px;
}

/* ── Find Services Layout ───────────────────────────────────────── */
.services-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

.services-layout>* {
  min-width: 0;
}

@media (max-width: 1100px) {
  .services-layout {
    grid-template-columns: 1fr;
  }
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Cart Summary Panel (Find Services) ────────────────────────── */
.cart-panel {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 20px;
  overflow: hidden;
}

.cart-panel-header {
  padding: 14px 18px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-panel-body {
  padding: 16px 18px;
  min-height: 120px;
  background: var(--bg-card);
}

.cart-panel-footer {
  padding: 14px 18px;
  background: var(--bg-table-head);
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.cart-item-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.cart-item-line:last-of-type {
  border-bottom: none;
}

.cart-item-name {
  color: var(--text-body);
  font-weight: 500;
  max-width: 160px;
}

.cart-item-price {
  font-weight: 700;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
}

/* ── Sidebar Payment Panel ─────────────────────────────────────── */
.sidebar-panel {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--header-height) + var(--nav-height) + 20px);
}

.sidebar-panel .panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-panel .panel-header i {
  color: var(--primary);
}

.sidebar-panel .panel-body {
  padding: 20px;
}

.sidebar-panel .panel-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-table-head);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.panel-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: var(--font-size-sm);
}

.panel-summary-row+.panel-summary-row {
  border-top: 1px solid var(--border-light);
}

.panel-summary-row .row-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.panel-summary-row .row-value {
  font-weight: 700;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
}

.panel-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 2px solid var(--border);
  margin-top: 4px;
}

.panel-total-row .total-label {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-heading);
}

.panel-total-row .total-value {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.panel-empty {
  text-align: center;
  padding: 28px 16px;
}

.panel-empty i {
  font-size: 36px;
  color: var(--border);
  margin-bottom: 10px;
}

.panel-empty p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.selected-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--primary-muted);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 700;
  margin-bottom: 12px;
}

/* ── Category Filter Pills ─────────────────────────────────────── */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
}

.filter-pill:hover {
  border-color: var(--primary-muted);
  background: var(--primary-subtle);
  color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.filter-pill i {
  font-size: 12px;
}

/* ── Service Cards (Find Services) ────────────────────────────── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-muted);
  transform: translateY(-2px);
}

.service-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.service-card-name {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.3;
}

.service-card-desc {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.service-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.service-price {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.service-price small {
  font-size: var(--font-size-xs);
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

/* ── Cart Table ────────────────────────────────────────────────── */
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--bg-table-head);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.qty-btn:hover {
  background: var(--primary-muted);
  color: var(--primary);
}

.qty-input {
  width: 40px;
  border: none;
  border-left: 1.5px solid var(--border-input);
  border-right: 1.5px solid var(--border-input);
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: 0;
  height: 30px;
  color: var(--text-heading);
  font-family: var(--font);
}

.qty-input:focus {
  outline: none;
  background: var(--primary-subtle);
}

.remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
  font-size: 14px;
}

.remove-btn:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* ── Order Summary ─────────────────────────────────────────────── */
.order-summary {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  padding: 22px;
}

.order-summary-title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
}

.order-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--border-light);
}

.order-line:last-of-type {
  border-bottom: none;
}

.order-line .line-label {
  color: var(--text-secondary);
}

.order-line .line-value {
  font-weight: 600;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
}

.order-line.total-line {
  border-top: 2px solid var(--border);
  border-bottom: none;
  margin-top: 4px;
  padding-top: 14px;
}

.order-line.total-line .line-label {
  font-weight: 700;
  color: var(--text-heading);
  font-size: var(--font-size-md);
}

.order-line.total-line .line-value {
  font-weight: 800;
  color: var(--primary);
  font-size: var(--font-size-2xl);
}

/* ── Checkout Wizard ───────────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 32px;
  padding: 0;
}

.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: var(--border);
}

.wizard-step.completed:not(:last-child)::after {
  background: var(--primary);
}

.wizard-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

.wizard-step.active .wizard-step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--primary-muted);
}

.wizard-step.completed .wizard-step-circle {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.wizard-step-label {
  margin-top: 8px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}

.wizard-step.active .wizard-step-label {
  color: var(--primary);
}

.wizard-step.completed .wizard-step-label {
  color: var(--success);
}

/* ── Payment Method Cards ──────────────────────────────────────── */
.payment-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.payment-card:hover {
  border-color: var(--primary-muted);
  background: var(--primary-subtle);
}

.payment-card.selected {
  border-color: var(--primary);
  background: var(--primary-subtle);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

.payment-card.add-new {
  border-style: dashed;
  border-color: var(--border);
  justify-content: center;
  color: var(--text-secondary);
}

.payment-card.add-new:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-subtle);
}

.card-brand-icon {
  width: 52px;
  height: 34px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  background: #f9f9f9;
}

.card-details {
  flex: 1;
}

.card-brand-name {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-heading);
}

.card-number {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
}

.card-expiry {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 1px;
}

.card-default-badge {
  background: var(--primary-muted);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
}

.payment-card .selected-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: transparent;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.payment-card.selected .selected-indicator {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ── Secure Payment Indicator ──────────────────────────────────── */
.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  padding: 8px;
}

.secure-badge i {
  color: var(--success);
}

.secure-badges-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
  margin-top: 12px;
}

.secure-badge-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}

.secure-badge-item i {
  font-size: 13px;
  color: var(--success);
}

/* ── Success Page ──────────────────────────────────────────────── */
.success-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 0;
}

.success-icon-wrap {
  width: 96px;
  height: 96px;
  background: var(--success-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 44px;
  color: var(--success);
  box-shadow: 0 0 0 12px rgba(45, 134, 83, 0.08);
  animation: successPulse 1s ease forwards;
}

@keyframes successPulse {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }

  70% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.success-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.confirmation-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 28px;
  text-align: left;
  margin-bottom: 24px;
}

.confirmation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.confirmation-row+.confirmation-row {
  border-top: 1px solid var(--border-light);
}

.confirmation-row .conf-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.confirmation-row .conf-value {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-heading);
}

.confirmation-number {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.05em;
}

/* ── Payment Success page ──────────────────────────────────────── */
.success-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.confirmation-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 12px;
}

.conf-label-sm {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.conf-amount {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--primary) !important;
}

.conf-services {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.conf-services-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.conf-service-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-body);
  padding: 4px 0;
}

.conf-service-row span:last-child {
  font-weight: 600;
}

.conf-fee-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
  margin-top: 4px;
  border-top: 1px solid var(--border-light);
}

.success-action-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ── Next Steps grid ───────────────────────────────────────────── */
.next-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

@media (max-width: 640px) {
  .next-steps {
    grid-template-columns: 1fr;
  }
}

.next-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.next-step-card:hover {
  border-color: var(--primary-muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.next-step-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.next-step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.next-step-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Status Timeline ───────────────────────────────────────────── */
.status-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0;
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.timeline-item:not(:last-child) .timeline-line::after {
  content: '';
  position: absolute;
  top: 28px;
  left: 14px;
  width: 2px;
  height: calc(100% - 12px);
  background: var(--border);
}

.timeline-item.completed .timeline-line::after {
  background: var(--success);
}

.timeline-line {
  flex-shrink: 0;
  width: 30px;
  position: relative;
}

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.timeline-item.completed .timeline-dot {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.timeline-item.active .timeline-dot {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px var(--primary-muted);
}

.timeline-content {
  padding-bottom: 24px;
  flex: 1;
}

.timeline-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 2px;
}

.timeline-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.timeline-desc {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Installment Schedule Preview ──────────────────────────────── */
.installment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.installment-table th {
  background: var(--bg-table-head);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.installment-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
}

.installment-table tr:last-child td {
  border-bottom: none;
}

.installment-table tr:hover td {
  background: var(--primary-subtle);
}

/* ── Plan Card ─────────────────────────────────────────────────── */
.plan-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  padding: 22px;
  transition: all var(--transition);
}

.plan-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-muted);
}

.plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.plan-title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--text-heading);
}

.plan-subtitle {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

.plan-amount {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.plan-amount small {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  font-weight: 400;
}

.progress-bar-wrap {
  background: var(--border-light);
  border-radius: var(--radius-pill);
  height: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width var(--transition-slow);
}

.plan-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.plan-meta-item {
  text-align: center;
}

.plan-meta-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.plan-meta-value {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-heading);
}

/* ── Filter Bar ────────────────────────────────────────────────── */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-bar .filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-bar .filter-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.filter-bar .divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

.filter-bar-spacer {
  flex: 1;
}

/* ── Pagination ────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.page-btn:hover {
  border-color: var(--primary-muted);
  color: var(--primary);
  background: var(--primary-subtle);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ── Toggle Switch ─────────────────────────────────────────────── */
.toggle-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.toggle-track {
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: var(--radius-pill);
  position: relative;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.toggle-track.on {
  background: var(--primary);
}

.toggle-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-track.on .toggle-thumb {
  transform: translateX(18px);
}

.toggle-label {
  font-size: var(--font-size-sm);
  color: var(--text-body);
  font-weight: 500;
}

/* ── Alert / Info Box ──────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  border: 1px solid;
}

.alert i {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-info {
  background: var(--info-bg);
  color: var(--info-text);
  border-color: var(--info-border);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-border);
}

.alert-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-color: var(--warning-border);
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

/* ── Divider with Text ─────────────────────────────────────────── */
.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 16px 0;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Empty State ───────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-state-icon {
  font-size: 52px;
  color: var(--border);
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  max-width: 380px;
  margin: 0 auto 24px;
}

/* ── Split Payment ─────────────────────────────────────────────── */
.split-section {
  background: var(--bg-sidebar);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 12px;
}

.split-method-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.split-method-row .form-control {
  flex: 1;
}

/* ── Settings Drawer ────────────────────────────────────────────── */
.settings-wrap {
  position: relative;
}

.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 20, 50, 0.35);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 2998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.settings-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.settings-drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  z-index: 2999;
  display: flex;
  flex-direction: column;
  transition: right var(--transition);
  overflow: hidden;
}

.settings-drawer.open {
  right: 0;
}

.settings-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-header);
  flex-shrink: 0;
}

.settings-drawer-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-drawer-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.settings-drawer-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.settings-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.settings-section {
  padding: 16px 20px 8px;
}

.settings-section+.settings-section {
  border-top: 1px solid var(--border-light);
  margin-top: 8px;
}

.settings-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item-info {
  flex: 1;
  min-width: 0;
}

.settings-item-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 2px;
}

.settings-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.settings-item-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 3px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(18px);
}

/* Flat UI override */
body.flat-ui {
  --radius-xs: 0px;
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;
  --radius-pill: 2px;
}

/* Dark Mode override */
body.dark-mode {
  /* Backgrounds */
  --bg-page: #0f1117;
  --bg-card: #1a1d27;
  --bg-sidebar: #141720;
  --bg-nav: #1a1d27;
  --bg-table-head: #1f2232;

  /* Typography */
  --text-heading: #e8ecf4;
  --text-body: #c5cdd8;
  --text-secondary: #8b95a6;
  --text-muted: #5c6676;
  --text-link: var(--portalThemeColor5);
  /* #7094f5 — light blue on dark bg */

  /* Borders */
  --border: #2a2f3e;
  --border-light: #222535;
  --border-input: #343847;

  /* Semantic backgrounds */
  --success-bg: #0f2419;
  --success-text: #6fcf97;
  --success-border: #1e4d32;

  --danger-bg: #2a0f0d;
  --danger-text: #eb8a82;
  --danger-border: #4d1e1a;

  --warning-bg: #261900;
  --warning-text: #f0b55a;
  --warning-border: #4d3400;

  --info-bg: #071e2e;
  --info-text: #63c0e8;
  --info-border: #0e3a52;

  /* Muted primary tint */
  --primary-muted: #1a2540;
  --primary-subtle: #131c32;

  /* Shadows (lighter in dark) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Dark mode: invert logo brightness slightly */
body.dark-mode .header-logo {
  filter: brightness(1.15);
}

/* Dark mode: table row hover */
body.dark-mode .bills-table tbody tr:hover {
  background: #1f2232;
}

body.dark-mode .bills-table tbody tr.selected {
  background: #1a2540;
}

/* Dark mode: inputs */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #1f2232;
  color: var(--text-body);
  border-color: var(--border-input);
}

body.dark-mode input::placeholder {
  color: var(--text-muted);
}

/* Dark mode: nav active */
body.dark-mode .nav-item-link.active {
  background: rgba(255, 255, 255, 0.08);
}

/* ── Portal Footer ─────────────────────────────────────────────── */
.portal-footer {
  background: var(--bg-footer);
  color: rgba(255, 255, 255, 0.7);
  padding: 20px 24px;
  font-size: var(--font-size-xs);
  border-top: 3px solid rgba(255, 255, 255, 0.2);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-secure {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-secure i {
  color: #4ade80;
  font-size: 11px;
}

/* ── Mobile Navigation Overlay ─────────────────────────────────── */
.mobile-nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
}

.mobile-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Utility Classes ───────────────────────────────────────────── */
.text-primary {
  color: var(--primary) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-heading {
  color: var(--text-heading) !important;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.font-mono {
  font-family: 'Courier New', monospace;
}

.fw-500 {
  font-weight: 500;
}

.fw-600 {
  font-weight: 600;
}

.fw-700 {
  font-weight: 700;
}

.fw-800 {
  font-weight: 800;
}

.gap-4 {
  gap: 4px;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-1 {
  flex: 1;
}

.mt-0 {
  margin-top: 0 !important;
}

.mt-4 {
  margin-top: 4px !important;
}

.mt-8 {
  margin-top: 8px !important;
}

.mt-12 {
  margin-top: 12px !important;
}

.mt-16 {
  margin-top: 16px !important;
}

.mt-24 {
  margin-top: 24px !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-8 {
  margin-bottom: 8px !important;
}

.mb-12 {
  margin-bottom: 12px !important;
}

.mb-16 {
  margin-bottom: 16px !important;
}

.mb-24 {
  margin-bottom: 24px !important;
}

/* ── Responsive 2-column form grid (checkout, refund, etc.) ─────── */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Responsive Breakpoints ────────────────────────────────────── */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .portal-main {
    padding: 20px 16px;
  }

  .portal-logo-text {
    display: none;
  }

  .portal-logo-divider {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
    --nav-height: 44px;
  }

  /* Header */
  .portal-header .header-inner {
    padding: 0 14px;
  }

  .user-name {
    display: none;
  }

  .header-divider {
    display: none;
  }

  /* Nav */
  .portal-nav .nav-inner {
    gap: 0;
    padding: 0 8px;
  }

  .nav-item-link {
    padding: 0 10px;
    font-size: 11px;
  }

  .nav-item-link span {
    display: none;
  }

  .nav-item-link i {
    font-size: 16px;
  }

  .nav-session,
  .session-timer {
    display: none;
  }

  /* Tables */
  .col-hide-mobile {
    display: none;
  }

  /* Layout & spacing */
  .portal-main {
    padding: 16px 12px;
  }

  .sidebar-panel {
    position: static;
    margin-top: 20px;
  }

  .page-title {
    font-size: var(--font-size-xl);
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .kpi-value {
    font-size: var(--font-size-3xl);
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  /* Forms */
  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  /* Components */
  .wizard-step-label {
    display: none;
  }

  .plan-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-pills {
    flex-wrap: wrap;
  }

  /* Dropdowns: prevent overflow on narrow screens */
  .notification-panel {
    width: min(340px, calc(100vw - 20px));
  }

  .user-dropdown {
    width: min(220px, calc(100vw - 20px));
  }

  /* Card header wrapping for long titles + badges/buttons */
  .card-header {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {

  /* Header */
  .portal-header .header-inner {
    padding: 0 10px;
  }

  .header-utils {
    gap: 4px;
  }

  .btn-icon {
    width: 34px;
    height: 34px;
  }

  /* Layout */
  .portal-main {
    padding: 10px 10px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: var(--font-size-lg);
  }

  /* Tables */
  .portal-table {
    font-size: var(--font-size-xs);
  }

  .portal-table thead th,
  .portal-table tbody td {
    padding: 8px 8px;
  }

  /* Cart table: shrink qty control so table fits in viewport */
  .qty-btn {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .qty-input {
    width: 28px;
    height: 24px;
  }

  /* Allow long service/bill names to wrap so they don't blow out table width */
  .service-name {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
  }

  .service-desc {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
  }

  /* Dropdowns — use fixed positioning so panel aligns to viewport, not the small button wrapper */
  .notification-panel {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    left: 8px;
    right: 8px;
    width: auto;
  }

  .user-dropdown {
    width: calc(100vw - 32px);
  }

  /* Saved payment cards — wrap on very narrow screens */
  .saved-card {
    flex-wrap: wrap;
  }

  .card-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
}

/* ══ Payment Methods Page ════════════════════════════════════════════ */

/* Two-column layout: method list + info sidebar */
.methods-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.methods-layout>* {
  min-width: 0;
}

@media (max-width: 1000px) {
  .methods-layout {
    grid-template-columns: 1fr;
  }
}

/* Saved payment method card */
.saved-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  position: relative;
}

.saved-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-muted);
}

.saved-card.default-card {
  border-color: var(--primary);
  border-left: 4px solid var(--primary);
}

/* Brand icon box */
.bank-icon {
  width: 56px;
  height: 44px;
  background: #f0f4f8;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

/* Action buttons — always stay on right, never wrap */
.card-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: nowrap;
}

/* Status badges */
.card-expiring {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.pm-default-badge {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ── Modals (Add / Edit / Delete) ────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  overflow: hidden;
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-heading);
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-heading);
  background: var(--bg-page);
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Delete modal specifics */
.delete-modal-box {
  max-width: 420px;
}

.delete-modal-icon {
  color: var(--danger);
  margin-right: 8px;
}

.delete-modal-msg {
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 8px;
}

.delete-modal-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Add/Edit form — tab switcher ────────────────────────────────── */
.tab-row {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.tab-btn:not(.active):hover {
  background: var(--primary-subtle);
  color: var(--primary);
}

/* Two-column input rows inside modal */
.card-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 480px) {
  .card-input-row {
    grid-template-columns: 1fr;
  }
}

/* Virtual card preview */
.card-field-visual {
  background: linear-gradient(135deg, var(--primary) 0%, #1565c0 100%);
  border-radius: var(--radius-md);
  padding: 20px;
  color: #fff;
  margin-bottom: 20px;
  min-height: 100px;
}

.card-preview-chip {
  width: 32px;
  height: 22px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  margin-bottom: 14px;
}

.card-preview-num {
  font-size: 15px;
  letter-spacing: .2em;
  font-weight: 500;
  margin-bottom: 12px;
  font-family: 'Courier New', monospace;
}

.card-preview-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  opacity: .85;
}

.card-preview-brand {
  font-size: 28px;
  opacity: .9;
}

/* ── Toast Notification ──────────────────────────────────────────── */
#pm-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.pm-toast-success {
  background: var(--success);
  color: #fff;
}

.pm-toast-error {
  background: var(--danger);
  color: #fff;
}

/* ── Utility ────────────────────────────────────────────────────── */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
}

.is-hidden {
  display: none !important;
}

.text-primary {
  color: var(--primary);
}

.text-warning {
  color: var(--warning);
}

.text-muted {
  color: var(--text-muted);
}

.text-body {
  color: var(--text-body);
}

/* ── Invoice Auth Page ─────────────────────────────────────────── */
.auth-page-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 8px 0 40px;
}

/* Invoice summary strip */
.inv-summary-strip {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
  box-sizing: border-box;
}

.inv-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-subtle, #eef1fe);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.inv-strip-info { flex: 1; min-width: 0; }

.inv-strip-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
}

.inv-strip-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.inv-strip-amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.inv-strip-back {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.inv-strip-back:hover { color: var(--primary); }

/* Auth card */
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  box-sizing: border-box;
}

.auth-card-header {
  padding: 28px 32px 22px;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.auth-lock-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.auth-card-header h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.auth-card-header p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-card-body { padding: 28px 32px; }

/* Auth option buttons */
.auth-options { display: flex; flex-direction: column; gap: 12px; }

.auth-option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  width: 100%;
  text-decoration: none;
}

.auth-option-btn:hover {
  border-color: var(--primary);
  background: var(--primary-subtle, #eef1fe);
  box-shadow: 0 2px 12px rgba(0, 75, 141, 0.12);
}

.auth-option-btn.primary-opt {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-color: transparent;
  color: #fff;
}

.auth-option-btn.primary-opt:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 18px rgba(0, 75, 141, 0.35);
  transform: translateY(-1px);
}

.auth-option-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.primary-opt .auth-option-icon {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.secondary-opt .auth-option-icon {
  background: var(--primary-subtle, #eef1fe);
  color: var(--primary);
}

.auth-option-text { flex: 1; min-width: 0; }

.opt-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 2px;
}

.primary-opt .opt-title { color: #fff; }

.opt-sub {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.85;
}

.primary-opt .opt-sub { color: rgba(255, 255, 255, 0.8); opacity: 1; }

.auth-option-arrow {
  margin-left: auto;
  font-size: 13px;
  opacity: 0.6;
  flex-shrink: 0;
  color: var(--text-muted);
}

.primary-opt .auth-option-arrow { color: #fff; opacity: 0.8; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.form-note {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.form-note i { margin-top: 1px; flex-shrink: 0; }
.form-note--spaced { margin-top: 20px; }
.otp-phone-group-hidden { display: none !important; }

/* OTP panel */
.otp-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.otp-panel.visible { display: flex; }

.otp-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin-bottom: 4px;
  font-family: inherit;
}

.otp-back-btn:hover { color: var(--primary); }

.otp-step { display: none; flex-direction: column; gap: 14px; }
.otp-step.active { display: flex; }

.otp-step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label { font-size: 12px; font-weight: 700; color: var(--text-heading); }

.form-input {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-heading);
  background: var(--bg-card);
  transition: border-color 0.15s;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 75, 141, 0.12);
}

.btn-full-otp {
  width: 100%;
  padding: 12px;
  justify-content: center;
}

/* OTP digit boxes */
.otp-digits {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.otp-digit {
  width: 52px;
  height: 58px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--text-heading);
  background: var(--bg-card);
  transition: border-color 0.15s;
  font-family: 'Courier New', monospace;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 75, 141, 0.12);
}

.otp-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.otp-resend {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.otp-resend:hover { text-decoration: underline; }

.otp-success-msg {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--success-bg, #e6f4ec);
  border: 1px solid var(--success-border, #a3d4b5);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--success-text, #1b5e36);
}

.auth-error {
  font-size: 12px;
  color: var(--danger);
}

.auth-hidden { display: none !important; }

/* Progress dots */
.auth-progress {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}

.progress-dot.active { background: var(--primary); }

@media (max-width: 560px) {
  .auth-card-header { padding: 22px 20px 18px; }
  .auth-card-body { padding: 20px; }
  .inv-summary-strip { padding: 12px 16px; }
  .otp-digit { width: 42px; height: 50px; font-size: 18px; }
}

/* ── Invoice View Page ─────────────────────────────────────────── */
.inv-view-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.inv-view-layout > * {
  min-width: 0;
}

@media (max-width: 1050px) {
  .inv-view-layout {
    grid-template-columns: 1fr;
  }
}

.inv-header-band {
  background: linear-gradient(135deg, var(--primary-dark, #003d9c) 0%, var(--primary) 100%);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 24px 24px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.inv-header-band .inv-band-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

.inv-header-band .inv-band-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.inv-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

@media (max-width: 640px) {
  .inv-fields-grid {
    grid-template-columns: 1fr;
  }
}

.inv-fields-grid .full-width {
  grid-column: 1 / -1;
}

.inv-meta-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 24px;
}

.inv-meta-strip > div {
  min-width: 0;
}

@media (max-width: 640px) {
  .inv-meta-strip {
    grid-template-columns: 1fr 1fr;
  }
}


.inv-header-card {
  overflow: hidden;
}

.inv-empty-body {
  text-align: center;
  padding: 52px 32px;
}

.inv-empty-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
  color: var(--text-muted);
}

.inv-empty-icon--danger {
  color: var(--danger);
}

/* ── Invoice Payment v2 (iframe embed) ────────────────────────── */
.inv-payment-v2-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.inv-payment-v2-layout > * { min-width: 0; }

@media (max-width: 1050px) {
  .inv-payment-v2-layout { grid-template-columns: 1fr; }
  .inv-payment-v2-sidebar { order: -1; }
}

.inv-payment-v2-card { overflow: hidden; padding: 0; }

.inv-payment-v2-iframe-wrap {
  position: relative;
  width: 100%;
  min-height: 500px;
  overflow-x: hidden;
  overflow-y: visible;
}

.inv-payment-v2-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-card);
}

.inv-payment-v2-loading i { font-size: 28px; color: var(--primary); }

#payment-iframe {
  width: 100%;
  height: 1400px;
  border: none;
  display: none;
}
#payment-iframe.is-loaded {
  display: block;
}

/* ── Refund Page ───────────────────────────────────────────────── */
.refund-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.refund-layout>* {
  min-width: 0;
}

@media (max-width: 1050px) {
  .refund-layout {
    grid-template-columns: 1fr;
  }
}

.amount-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #1565c0 100%);
  border-radius: var(--radius-md);
  padding: 22px;
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
}

.amount-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .75;
  margin-bottom: 4px;
}

.amount-big {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.amount-sub {
  font-size: 12px;
  opacity: .7;
  margin-top: 4px;
}

.refund-amount-input {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.refund-amount-input .currency {
  padding: 0 12px;
  background: var(--bg-table-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  height: 44px;
  display: flex;
  align-items: center;
  border-right: 1.5px solid var(--border-input);
}

.refund-amount-input input {
  border: none !important;
  border-radius: 0 !important;
  font-size: 18px;
  font-weight: 700;
  height: 44px;
  flex: 1;
}

.refund-amount-input input:focus {
  box-shadow: none !important;
}

.max-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
  padding: 0 12px;
  background: var(--primary-muted);
  border-left: 1.5px solid var(--border-input);
  height: 44px;
  display: flex;
  align-items: center;
}

.max-link:hover {
  background: var(--primary);
  color: #fff;
}

.policy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.policy-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-secondary);
}

.policy-list li i {
  width: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.policy-list li.allowed i {
  color: var(--success);
}

.policy-list li.not-allowed i {
  color: var(--danger);
}

.policy-list li.info-item i {
  color: var(--primary);
}

.refund-meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.refund-meta-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
}

.refund-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.refund-item-row:last-child {
  border-bottom: none;
}

.refund-item-row:hover {
  background: var(--primary-subtle);
}

.refund-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
}

.refund-item-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.refund-item-price {
  font-weight: 700;
  color: var(--text-heading);
  white-space: nowrap;
}

.refund-meta-services {
  font-size: 13px;
  color: var(--text-body);
}

.refund-meta-deadline {
  font-size: 14px;
  font-weight: 600;
  color: var(--warning);
}

.refund-items-box {
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.refund-dropzone-icon {
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.refund-dropzone-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.refund-dropzone-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.refund-dropzone-browse {
  color: var(--primary);
  cursor: pointer;
}

.refund-timeline-empty {
  padding: 16px 0;
}

.refund-timeline-empty-icon {
  font-size: 32px;
  color: var(--border);
}

.refund-timeline-empty-msg {
  margin-top: 8px;
}

.refund-ref-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.refund-ref-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

textarea.form-control {
  resize: vertical;
}

.alert--sm {
  font-size: 12px;
}

.refund-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.refund-dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-subtle);
}

/* ── Cart Page ─────────────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.cart-layout>* {
  min-width: 0;
}

@media (max-width: 1100px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.service-cell {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.service-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.service-tag {
  margin-top: 6px;
}

.service-tag-pill {
  font-size: 11px;
  background: var(--primary-muted);
  color: var(--primary);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-weight: 600;
}

.col-center {
  text-align: center;
}

.col-right {
  text-align: right;
}

.col-center .qty-control {
  margin: 0 auto;
}

.cart-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-text-danger {
  color: var(--danger) !important;
}

.cart-fee-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-fee-info {
  font-size: 10px;
  color: var(--text-muted);
}

.cart-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

.cart-note a {
  color: var(--primary);
}

.payment-accepts-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.payment-accepts-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.payment-accepts-row .fab {
  font-size: 28px;
}

.payment-accepts-row .fa-cc-visa {
  color: #1a1f71;
}

.payment-accepts-row .fa-cc-mastercard {
  color: #eb001b;
}

.payment-accepts-row .fa-cc-amex {
  color: #007bc1;
}

.payment-accepts-row .fa-cc-discover {
  color: #ff6600;
}

.payment-badge {
  font-size: 12px;
  font-weight: 700;
  border-radius: 3px;
  padding: 3px 7px;
}

.payment-badge--ach {
  color: var(--primary);
  border: 1.5px solid var(--primary-muted);
}

.payment-badge--echeck {
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.card-body--compact {
  padding: 14px 18px !important;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.cart-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--border);
}

/* ── Checkout Page ─────────────────────────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.checkout-layout>* {
  min-width: 0;
}

@media (max-width: 1100px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

.wizard-panel {
  display: none;
}

.wizard-panel.active {
  display: block;
}

.checkout-ssl-icon {
  color: var(--success);
  margin-right: 4px;
}

/* Sticky wrapper holds sidebar-panel + help card together so they never overlap */
.checkout-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--nav-height) + 20px);
}

.checkout-sidebar .sidebar-panel {
  position: static;
}

.review-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.review-item:last-child {
  border-bottom: none;
}

.review-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-muted);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.review-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
}

.review-item-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.review-item-price {
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
}

.payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.badge-no-fee {
  font-size: 11px;
  background: var(--success-bg);
  color: var(--success);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-weight: 700;
  border: 1px solid rgba(45, 134, 83, 0.25);
  white-space: nowrap;
}

.confirm-panel {
  background: var(--bg-table-head);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.confirm-panel-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.confirm-row .cr-label {
  color: var(--text-secondary);
}

.confirm-row .cr-value {
  font-weight: 600;
}

.confirm-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 800;
  padding-top: 10px;
  border-top: 2px solid var(--border);
  margin-top: 6px;
}

.confirm-total .ct-label {
  color: var(--text-heading);
}

.confirm-total .ct-value {
  color: var(--primary);
}

.confirm-method-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.confirm-method-icon {
  font-size: 28px;
}

.confirm-method-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
}

.confirm-method-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.checkout-step-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
}

.checkout-step-btns--end {
  justify-content: flex-end;
}

.btn-pay {
  font-size: 18px !important;
  font-weight: 800 !important;
  padding: 16px 24px !important;
  letter-spacing: 0.01em;
}

.panel-secure {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-secure i {
  color: var(--success);
}

.panel-secure-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.panel-secure-icons .fab {
  font-size: 22px;
}

.panel-secure-icons .fa-cc-visa {
  color: #1a1f71;
}

.panel-secure-icons .fa-cc-mastercard {
  color: #eb001b;
}

.panel-secure-icons .fa-cc-amex {
  color: #007bc1;
}

.panel-secure-icons .fa-cc-discover {
  color: #ff6600;
}

.panel-secure-ach {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  border: 1.5px solid var(--primary-muted);
  border-radius: 3px;
  padding: 2px 5px;
}

.checkout-help-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.checkout-help-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.checkout-help-phone {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.split-toggle-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.split-amount-sep {
  font-size: 13px;
  color: var(--text-secondary);
  padding-bottom: 10px;
}

.review-totals {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid var(--border);
}

.review-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.review-total-row.grand {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 8px;
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
}

.review-total-row.grand .rt-label {
  color: var(--text-heading);
}

/* ── Print Styles ──────────────────────────────────────────────── */
@media print {

  .portal-header,
  .portal-nav,
  .portal-footer,
  .sidebar-panel,
  .btn,
  .filter-bar,
  .filter-pills {
    display: none !important;
  }

  .portal-main {
    padding: 0;
  }

  body {
    font-size: 12px;
  }

  .portal-table tbody tr:hover {
    background: none;
  }
}

/* ================================================================
   INLINE STYLE EXTRACTIONS — Web Template Pages
   Moved from page-level inline styles / <style> blocks
   ================================================================ */

/* ── payment-dashboard.html ──────────────────────────────────── */

/* Page header top row: title+subtitle left, actions right */
.page-header-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Right-side cluster of buttons + last-updated label */
.page-header-utils {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Small "Last updated" label in header */
.last-updated-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Open Bills section header row */
.bills-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

/* Left part of bills header (title + count badge) */
.bills-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Bills section H2 */
.bills-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
}

/* Small count badge font override */
.bills-count-badge {
  font-size: 11px;
}

/* Search input size overrides in bills toolbar */
.bills-search-input {
  height: 34px;
  font-size: 13px;
}

/* Status filter select size overrides in bills toolbar */
.bills-status-select {
  width: 140px;
  height: 34px;
  font-size: 13px;
  padding: 6px 30px 6px 10px;
}

/* Search bar width constraint in bills toolbar */
.bills-search-bar {
  width: 220px;
}

/* Table footer row: showing-label left, pagination right */
.table-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

/* "Showing X bills" label */
.table-showing-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Pagination chevron icon size */
.page-chevron-icon {
  font-size: 10px;
}

/* Recent Activity section wrapper */
.recent-activity-section {
  margin-top: 28px;
}

/* Recent Activity H2 */
.recent-activity-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 12px;
}

/* Card body flush padding override */
.card-body--flush {
  padding: 0;
}

/* Card footer right-aligned */
.card-footer--end {
  justify-content: flex-end;
}

/* Panel empty state check icon */
.panel-empty-icon {
  font-size: 40px;
  color: var(--border);
}

/* Panel empty state text */
.panel-empty-text {
  margin-top: 10px;
}

/* Secure badges row separator */
.secure-badges-separator {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

/* Quick Actions card body padding */
.quick-actions-body {
  padding: 10px 14px;
}

/* Quick Action link row */
.quick-action-link {
  padding: 9px 6px;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text-body);
  font-size: 13px;
  font-weight: 500;
}

.quick-action-link:last-child {
  border-bottom: none;
}

.quick-action-link:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Quick action icon */
.quick-action-icon {
  color: var(--primary);
  width: 16px;
}

/* Account Info card body */
.account-info-body {
  padding: 12px 16px;
  font-size: 13px;
}

/* Account info field block */
.account-info-field {
  margin-bottom: 8px;
}

.account-info-field:last-child {
  margin-bottom: 0;
}

/* Account info label (uppercase small caps) */
.account-field-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Account info value */
.account-field-value {
  color: var(--text-heading);
  word-break: break-word;
}

/* Active badge inline display */
.badge-active-inline {
  margin-top: 4px;
  display: inline-flex;
}

/* KPI next-date value smaller font */
.kpi-value--date {
  font-size: 1.6rem;
}

/* ── payment-methods.html ─────────────────────────────────────── */

/* Methods section H2 (Credit Cards / Bank Accounts headings) */
.methods-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 14px;
}

/* Methods section title icon */
.methods-section-icon {
  color: var(--primary);
  margin-right: 8px;
}

/* Methods list column layout */
.methods-list-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

/* Bank accounts list (no bottom margin needed) */
.methods-list-col--last {
  margin-bottom: 0;
}

/* Info panel card body */
.info-panel-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Info panel intro paragraph */
.info-panel-intro {
  margin-bottom: 12px;
}

/* Info feature list */
.info-feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Info feature list item */
.info-feature-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* Info feature icon — primary color */
.info-icon--primary {
  color: var(--primary);
  margin-top: 2px;
  width: 14px;
}

/* Info feature icon — success color */
.info-icon--success {
  color: var(--success);
  margin-top: 2px;
  width: 14px;
}

/* PCI / Security card body centered */
.security-card-body {
  padding: 16px;
  text-align: center;
}

/* Security certifications section label */
.security-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Security badge row */
.security-badge-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Individual security cert item */
.security-cert-item {
  text-align: center;
}

/* Security cert icon container */
.security-cert-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
}

.security-cert-icon--primary {
  background: var(--primary-muted);
}

.security-cert-icon--success {
  background: var(--success-bg);
}

.security-cert-icon--info {
  background: var(--info-bg);
}

/* Security cert icon size */
.security-cert-icon i {
  font-size: 22px;
}

.security-cert-icon--primary i {
  color: var(--primary);
}

.security-cert-icon--success i {
  color: var(--success);
}

.security-cert-icon--info i {
  color: var(--info);
}

/* Security cert label text */
.security-cert-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Accepted Cards card body */
.accepted-cards-body {
  padding: 14px 16px;
}

/* Accepted Cards section label */
.accepted-cards-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Accepted Cards icon row */
.accepted-cards-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Card brand icon sizing */
.card-brand-icon {
  font-size: 28px;
}

.card-brand-icon--visa {
  color: #1a1f71;
}

.card-brand-icon--mastercard {
  color: #eb001b;
}

.card-brand-icon--amex {
  color: #007bc1;
}

.card-brand-icon--discover {
  color: #ff6600;
}

/* Modal title icon */
.modal-title-icon {
  color: var(--primary);
  margin-right: 8px;
}

/* Card preview sub-label */
.card-preview-sublabel {
  font-size: 9px;
  opacity: .65;
  margin-bottom: 1px;
}

/* Card preview expiry alignment */
.card-preview-expiry-col {
  text-align: right;
}

/* ACH account type radio group */
.ach-type-row {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

/* PM form error block */
.pm-form-error {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--danger-bg, #fdf0ef);
  color: var(--danger);
  border: 1px solid var(--danger-border, #f5c6c2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}

/* ── payment-plans.html <style> block ────────────────────────── */

.plans-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.plans-layout>* {
  min-width: 0;
}

@media (max-width: 1100px) {
  .plans-layout {
    grid-template-columns: 1fr;
  }
}

.plan-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
}

.plan-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
}

.plan-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.plan-tab:hover:not(.active) {
  color: var(--primary);
  background: var(--primary-subtle);
}

.new-plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.installment-preview {
  background: var(--bg-table-head);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 20px;
  display: none;
}

.installment-preview-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.summary-tile {
  background: var(--bg-table-head);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.summary-tile-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.summary-tile-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-heading);
}

/* payment-plans additional inline styles */

/* New plan card header section */
.new-plan-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

/* New plan card title row */
.new-plan-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* New plan card title icon */
.new-plan-icon {
  color: var(--primary);
}

/* New plan card subtitle */
.new-plan-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* New plan card body */
.new-plan-card-body {
  padding: 20px;
}

/* Plan total amount display */
.plan-total-display {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  padding: 8px 0;
  font-variant-numeric: tabular-nums;
}

/* Plan total hint */
.plan-total-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Down payment input currency prefix wrapper */
.input-currency-wrap {
  position: relative;
}

/* Down payment "$" prefix */
.input-currency-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Down payment input with prefix indent */
.input-with-prefix {
  padding-left: 26px;
}

/* Active plans flex column list */
.plans-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Installment preview overflow wrapper */
.installment-preview-scroll {
  overflow-x: auto;
}

/* Installment preview "First 6 shown" note */
.installment-preview-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

/* Installment preview calendar icon */
.installment-preview-icon {
  color: var(--primary);
  margin-right: 6px;
}

/* Plan alert font override */
.alert--xs {
  font-size: 12px;
}

/* Plan agree label font */
.plan-agree-label {
  font-size: 12px;
}

/* Preview schedule button spacing */
.btn--mt10 {
  margin-top: 10px;
}

/* Plan eligibility info list */
.plan-eligibility-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Plan eligibility list item */
.plan-eligibility-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* Plan eligibility icon variants */
.elig-icon--ok {
  color: var(--success);
  margin-top: 2px;
  width: 14px;
}

.elig-icon--no {
  color: var(--danger);
  margin-top: 2px;
  width: 14px;
}

/* ── payment-transactions.html <style> block ─────────────────── */

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.strip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
}

.strip-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.strip-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
  font-variant-numeric: tabular-nums;
}

.strip-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.filter-date {
  height: 32px;
  font-size: 13px;
  flex: 1;
  min-width: 0;
}

.filter-select {
  height: 32px;
  font-size: 13px;
  width: 130px;
  padding: 4px 28px 4px 10px;
}

.filter-search {
  flex: 1;
  min-width: 0;
}

.filter-apply {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .filter-bar .divider {
    display: none;
  }

  .filter-bar-spacer {
    display: none;
  }

  .filter-bar .filter-group {
    width: 100%;
  }

  .filter-date,
  .filter-select,
  .filter-search {
    width: 100%;
  }

  .filter-apply {
    width: 100%;
    justify-content: center;
  }
}

/* Transactions page inline styles */

/* Strip card "Last Payment" value — smaller font */
.strip-value--md {
  font-size: 15px;
  line-height: 1.3;
}

/* Strip value warning color (Pending Refunds) */
.strip-value--warning {
  color: var(--warning);
}

/* Strip value danger color (Failed Transactions) */
.strip-value--danger {
  color: var(--danger);
}

/* Date separator ("to") label */
.filter-date-sep {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Transactions search input size */
.tx-search-input {
  height: 32px;
  font-size: 13px;
}

/* Table footer row for transactions page */
.tx-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

/* Rows-per-page select */
.tx-rows-select {
  height: 28px;
  font-size: 12px;
  width: 70px;
  padding: 3px 22px 3px 8px;
}

/* Transaction table empty / loading state */
/* Transaction receipt modal */
.tx-receipt-header {
  text-align: center;
  padding: 20px 0 16px;
}

.tx-receipt-check {
  font-size: 40px;
  color: var(--success);
  margin-bottom: 8px;
}

.tx-receipt-amount {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.tx-empty-cell {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.tx-empty-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 12px;
  color: var(--border);
}

.tx-empty-text {
  font-size: 13px;
  margin: 0;
  color: var(--text-muted);
}

.tx-date-cell {
  white-space: nowrap;
}

/* Right side of table footer */
.tx-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* "Rows per page" text label */
.tx-rows-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── payment-services.html ────────────────────────────────────── */

/* Service search bar max-width wrapper */
.services-search-wrap {
  max-width: 640px;
  margin-bottom: 24px;
}

/* Service search input size */
.services-search-input {
  height: 46px;
  font-size: 15px;
  padding-left: 42px;
  border-radius: var(--radius-sm);
}

/* Service search button position */
.services-search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  height: 36px;
}

/* Popular Services section wrapper */
.popular-services-section {
  margin-bottom: 20px;
}

/* Popular services header row */
.popular-services-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* Popular services title */
.popular-services-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
}

/* Popular services subtitle */
.popular-services-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Quick Pay banner */
.quick-pay-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1565c0 100%);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

/* Quick Pay banner eyebrow label */
.quick-pay-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 4px;
}

/* Quick Pay banner heading */
.quick-pay-heading {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

/* Quick Pay banner sub-text */
.quick-pay-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

/* Quick Pay banner right side */
.quick-pay-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* Quick Pay input */
.quick-pay-input {
  padding: 9px 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  width: 240px;
  font-family: var(--font);
}

/* Quick Pay go button */
.quick-pay-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Cart panel empty state */
.cart-panel-empty {
  padding: 24px 0;
}

/* Cart panel empty icon */
.cart-panel-empty-icon {
  font-size: 36px;
  color: var(--border);
}

/* Cart panel empty text */
.cart-panel-empty-text {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Cart panel subtotal row */
.cart-panel-subtotal-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
}

/* Cart panel subtotal label */
.cart-panel-subtotal-label {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Cart panel subtotal value */
.cart-panel-subtotal-value {
  color: var(--text-heading);
}

/* Cart panel fee note */
.cart-panel-fee-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* Help card body text */
.help-card-body-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* ── payment-checkout.html ────────────────────────────────────── */

/* Wizard steps wrapper — centered with max-width */
.wizard-steps-wrap {
  max-width: 480px;
  margin: 0 auto 36px;
}

/* Split section inner content */
.split-section-inner {
  margin: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: none;
  border-top: 1px solid var(--border-light);
}

/* Split section descriptive text */
.split-section-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* Split amount row */
.split-amount-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

/* Split amount input/remainder cols */
.split-amount-col {
  flex: 1;
}

/* Split amount label override */
.split-field-label {
  font-size: 12px;
}

/* Split amount input size */
.split-amount-input {
  font-size: 14px;
}

/* Split second method select size */
.split-second-select {
  font-size: 13px;
}

/* Confirm billing address text */
.confirm-billing-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-body);
}

/* Authorization checkbox alignment */
.auth-check-wrap {
  align-items: flex-start;
}

/* Authorization checkbox top offset */
.auth-check-input {
  margin-top: 2px;
}

/* Authorization label */
.auth-label {
  font-size: 13px;
  line-height: 1.5;
}

/* ── payment-success.html ─────────────────────────────────────── */

/* View transaction history link row */
.success-tx-link-row {
  text-align: center;
  margin-bottom: 28px;
}

/* View transaction link */
.success-tx-link {
  font-size: 13px;
  color: var(--primary);
}

/* Next step icon — primary */
.next-step-icon--primary {
  background: var(--primary-muted);
  color: var(--primary);
}

/* Next step icon — success */
.next-step-icon--success {
  background: var(--success-bg);
  color: var(--success);
}

/* Next step icon — warning */
.next-step-icon--warning {
  background: var(--warning-bg);
  color: var(--warning);
}

/* Processing notice alert text */
.processing-notice-text {
  font-size: 13px;
}

/* Print confirmation row */
.print-row {
  margin-top: 20px;
  text-align: center;
}

/* ── Invoice receipt card (invoice-payment.html — paid state) ─────────── */
.inv-receipt-card {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.inv-receipt-header {
  background: linear-gradient(135deg, #1a56e8 0%, #1a56e8 100%);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.inv-receipt-header-logo {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.inv-receipt-header-logo svg { width: 28px; height: 28px; fill: #fff; }
.inv-receipt-header-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}
.inv-receipt-body {
  padding: 36px 56px;
}
.inv-receipt-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  font-size: 14px;
}
.inv-receipt-label {
  flex: 0 0 180px;
  text-align: right;
  font-weight: 700;
  color: var(--text-heading);
}
.inv-receipt-value {
  flex: 1;
  color: var(--text-body, #374151);
}
.inv-receipt-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 20px 0;
}
.inv-receipt-footer {
  text-align: center;
  padding-bottom: 8px;
}
.inv-receipt-print-btn {
  background: none;
  border: none;
  color: var(--primary, #3371e7);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
  transition: background 0.15s;
}
.inv-receipt-print-btn:hover { background: var(--primary-subtle, #eef1fe); }
.inv-receipt-print-icon { font-size: 11px; }
@media print {
  .page-header, .portal-nav, .portal-footer { display: none !important; }
  .inv-receipt-card { box-shadow: none; border: none; max-width: 100%; }
  .inv-receipt-print-btn { display: none; }
}
@media (max-width: 600px) {
  .inv-receipt-body { padding: 24px 20px; }
  .inv-receipt-label { flex: 0 0 140px; font-size: 13px; }
  .inv-receipt-value { font-size: 13px; }
}

/* ── Invoice Payment — Redirect Button ────────────────────────── */
.inv-payment-redirect {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}
.inv-payment-redirect--hidden { display: none; }