/* Mosdos Tosh Partner Portal — matches Figma "Partner portal - Desktop" */

:root {
	/* Exact tokens sampled from the Figma "Partner portal - Desktop" frame. */
	--portal-bg:          #F5F5F8;
	--portal-surface:     #FFFFFF;
	--portal-border:      #D6D9DF;
	--portal-divider:     #D9D9D9;
	--portal-text:        #080808;
	--portal-muted:       #69534B;
	--portal-primary:     #EB685F;
	--portal-primary-hi:  #DA5147;
	--portal-sidebar-bg:  #6D6965;
	--portal-sidebar-fg:  #FFFFFF;
	--portal-sidebar-mut: rgba(255,255,255,.82);
	--portal-nav-active:  #EB685F;
	--portal-badge-paid-bg:  #D3F3D6;
	--portal-badge-paid-fg:  #05450E;
	--portal-badge-warn-bg:  #FCE7BA;
	--portal-badge-warn-fg:  #7A5B0A;
	--portal-badge-warn-brd: #FCE4A5;
	--portal-badge-info-bg:  #C7D9E8;
	--portal-badge-info-fg:  #244A6B;
	--portal-toggle-bg:      #F5F5F8;
	--portal-toggle-active:  #0C3BB3;
	--portal-link:           #0B39B4;
	--portal-danger:      #C3423F;
	--portal-radius:      14px;
	--portal-radius-sm:   10px;
	--portal-shadow:      0 1px 2px rgba(8,8,8,.04);
}

* { box-sizing: border-box; }

/* Inline SVG icons — inherit color from parent via currentColor */
.portal-icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.portal-icon--sm { width: 16px; height: 16px; }
.portal-icon--xs { width: 12px; height: 12px; }
/* RTL — flip only horizontally-directional arrows (chevron-right / chevron-left) */
.portal-body.rtl .portal-quick__arrow .portal-icon { transform: scaleX(-1); }
/* Sidebar icons take the link's currentColor (white / white when active) */
.portal-sidebar__link { color: var(--portal-sidebar-mut); }
.portal-sidebar__link:hover, .portal-sidebar__link.is-active { color: #fff; }
.portal-sidebar__link .portal-icon { color: inherit; }
/* Top nav icon colors */
.portal-topnav__phone .portal-icon  { color: var(--portal-muted); }
.portal-topnav__avatar .portal-icon { color: var(--portal-muted); width: 22px; height: 22px; }
.portal-topnav__caret .portal-icon  { color: var(--portal-muted); }
/* Quick action tile icons */
.portal-quick__icon .portal-icon { color: var(--portal-primary); }
.portal-quick__arrow .portal-icon { color: var(--portal-muted); }
.portal-secured .portal-icon { color: var(--portal-muted); }

html, body { margin: 0; padding: 0; }

.portal-body {
	font-family: 'Inter', 'Noto Sans Hebrew', -apple-system, BlinkMacSystemFont, sans-serif;
	background: var(--portal-bg);
	color: var(--portal-text);
	font-size: 14px;
	line-height: 1.5;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

.portal-body.rtl { direction: rtl; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--portal-primary); }
button { font-family: inherit; cursor: pointer; }

/* Top nav */

.portal-topnav {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; justify-content: space-between;
	height: 80px; padding: 0 50px;
	background: var(--portal-surface);
	border-bottom: 1px solid var(--portal-border);
}
.portal-topnav__logo img { height: 60px; display: block; }
.portal-topnav__right { display: flex; align-items: center; gap: 24px; color: var(--portal-muted); }
.portal-topnav__phone {
	display: inline-flex; align-items: center; gap: 10px;
	font-size: 15px; color: var(--portal-muted); font-weight: 500;
}
.portal-topnav__divider { width: 1px; height: 24px; background: var(--portal-border); }
.portal-topnav__user { display: inline-flex; align-items: center; gap: 10px; color: var(--portal-text); font-weight: 500; font-size: 15px; }
.portal-topnav__avatar { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.portal-topnav__caret { display: inline-flex; align-items: center; justify-content: center; }

/* Shell layout */

.portal-shell {
	display: grid;
	grid-template-columns: 199px 1fr;
	min-height: calc(100vh - 81px);
}
/* In RTL, the browser lays grid tracks right-to-left automatically —
   the DOM-order sidebar naturally ends up on the right. Don't double-flip. */

/* Sidebar */

.portal-sidebar {
	background: var(--portal-sidebar-bg);
	color: var(--portal-sidebar-fg);
	display: flex; flex-direction: column; justify-content: space-between;
	padding: 25px;
	position: sticky;
	top: 80px;
	align-self: start;
	height: calc(100vh - 80px);
	overflow-y: auto;
}
.portal-sidebar__nav { display: flex; flex-direction: column; gap: 15px; }
.portal-sidebar__link {
	display: flex; align-items: center; gap: 10px;
	padding: 15px;
	border-radius: 10px;
	color: var(--portal-sidebar-mut);
	font-weight: 500;
	font-size: 14px;
	line-height: 1.4;
	transition: background .15s, color .15s;
}
.portal-sidebar__link:hover { background: rgba(255,255,255,.08); color: var(--portal-sidebar-fg); }
.portal-sidebar__link.is-active {
	background: var(--portal-primary);
	color: #fff;
}
.portal-sidebar__link.is-active:hover { color: #fff; background: var(--portal-primary); }
.portal-sidebar__icon {
	width: 24px; height: 24px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 16px;
}
.portal-sidebar__label { flex: 1; }
.portal-sidebar__bottom { display: flex; flex-direction: column; gap: 16px; }
.portal-sidebar__divider { height: 1px; background: rgba(255,255,255,.15); }

/* Main */

.portal-main { padding: 20px 50px 60px; min-width: 0; }

/* Page header */

.portal-page-header {
	display: flex; align-items: flex-start; justify-content: space-between;
	gap: 24px; margin-bottom: 20px;
	min-height: 91px;
}
.portal-page-header__title { margin: 0 0 8px; font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -0.5px; }
.portal-page-header__subtitle { margin: 0; font-size: 16px; color: var(--portal-text); font-weight: 700; }
.portal-page-header__intro { margin: 4px 0 0; color: var(--portal-muted); font-size: 14px; }
.portal-lang-switch {
	display: inline-flex;
	background: #fff;
	border: 1px solid var(--portal-border);
	border-radius: 999px;
	padding: 4px;
	gap: 4px;
}
.portal-lang-switch__btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 52px; height: 36px; padding: 0 18px;
	border-radius: 999px;
	font-weight: 700; font-size: 14px;
	color: var(--portal-text);
	transition: background .15s, color .15s;
}
.portal-lang-switch__btn.is-active {
	background: var(--portal-toggle-active);
	color: #fff;
}

/* Cards */

.portal-card {
	background: var(--portal-surface);
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius);
	box-shadow: var(--portal-shadow);
	padding: 26px;
}
.portal-card + .portal-card { margin-top: 20px; }
.portal-card__title { margin: 0 0 20px; font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.portal-card__hint { color: var(--portal-muted); font-size: 13px; }

/* Dashboard grid */

.portal-dash {
	display: grid; grid-template-columns: 1fr 316px; gap: 20px; align-items: start;
}
@media (max-width: 1100px) { .portal-dash { grid-template-columns: 1fr; } }

/* This-month card */

.pm-this-month__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pm-this-month__title  { font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -0.4px; }
.pm-this-month__date   { color: var(--portal-muted); font-size: 14px; margin-top: 8px; }
.pm-this-month__date-he { font-family: 'Noto Sans Hebrew', sans-serif; }
.pm-this-month__stats  { display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; gap: 40px; margin: 24px 0; padding-top: 24px; border-top: 1px solid var(--portal-border); align-items: start; }
.pm-this-month__vdivider { background: var(--portal-border); height: 76px; width: 1px; }
.pm-stat__label { font-size: 13px; color: var(--portal-muted); font-weight: 500; }
.pm-stat__value { font-size: 24px; font-weight: 700; margin: 6px 0; letter-spacing: -0.3px; }
.pm-stat__hint  { font-size: 13px; color: var(--portal-muted); }
.pm-stat__optional { font-size: 13px; color: var(--portal-muted); font-weight: 400; margin-left: 4px; }
.pm-this-month__cta { text-align: center; margin-top: 4px; }
.pm-this-month__cta .portal-btn { min-width: 260px; height: 46px; }
.pm-this-month__note { font-size: 14px; color: var(--portal-text); margin-top: 16px; }

/* Buttons + pills */

.portal-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 12px 24px; border-radius: 10px;
	background: var(--portal-primary); color: #fff !important; border: 0;
	font-weight: 600; font-size: 14px;
	transition: background .15s ease;
	line-height: 1;
}
.portal-btn:hover { background: var(--portal-primary-hi); color: #fff !important; }
.portal-btn--ghost {
	background: var(--portal-surface); color: var(--portal-text) !important;
	border: 1px solid var(--portal-border);
	font-weight: 600;
}
.portal-btn--ghost:hover { background: var(--portal-bg); color: var(--portal-text) !important; }
.portal-btn--ghost .fa { color: var(--portal-muted); }
.portal-btn--block { width: 100%; }

.portal-pill {
	display: inline-flex; align-items: center;
	padding: 4px 15px; border-radius: 999px;
	font-size: 12px; font-weight: 600;
	line-height: 1.4;
}
.portal-pill--paid    { background: var(--portal-badge-paid-bg);  color: var(--portal-badge-paid-fg); }
.portal-pill--warn    { background: var(--portal-badge-warn-bg);  color: var(--portal-badge-warn-fg); border: 1px solid var(--portal-badge-warn-brd); }
.portal-pill--info    { background: var(--portal-badge-info-bg);  color: var(--portal-badge-info-fg); }
.portal-pill--neutral { background: #ECE9E1; color: #4A4A4A; }

/* Side cards (Next Payment, YTD) */

.pm-side-card__row { margin-bottom: 20px; }
.pm-side-card__row:last-of-type { margin-bottom: 0; }
.pm-side-card__label { font-size: 13px; color: var(--portal-muted); font-weight: 500; }
.pm-side-card__value { font-size: 16px; font-weight: 600; margin-top: 4px; }
.pm-side-card__big { font-size: 22px; }
.pm-side-card__note { font-size: 13px; color: var(--portal-muted); margin-top: 4px; }
.pm-side-card__cta { margin-top: 8px; }

/* Tables */

.portal-table { width: 100%; border-collapse: collapse; }
.portal-table th {
	text-align: left; font-size: 12px; font-weight: 600;
	color: var(--portal-muted); text-transform: none;
	padding: 0 10px 14px; border-bottom: 1px solid var(--portal-border);
	white-space: nowrap;
}
.portal-table td {
	padding: 16px 10px; border-bottom: 1px solid var(--portal-border);
	font-size: 14px; vertical-align: middle;
}
.portal-table tr:last-child td { border-bottom: 0; }
.portal-table__link { color: var(--portal-link); font-weight: 500; text-decoration: underline; }
.portal-table__link:hover { color: var(--portal-primary); }
.portal-table__he { font-family: 'Noto Sans Hebrew', sans-serif; }
.portal-table__icon-btn {
	display: inline-flex; width: 30px; height: 30px; border-radius: 50%;
	align-items: center; justify-content: center; color: var(--portal-muted);
}
.portal-table__icon-btn:hover { background: var(--portal-bg); color: var(--portal-toggle-active); }

/* Quick actions row */

.portal-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; }
@media (max-width: 900px) { .portal-quick { grid-template-columns: repeat(2, 1fr); } }
.portal-quick__item {
	display: flex; align-items: center; gap: 14px;
	padding: 18px;
	background: var(--portal-surface);
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius);
	box-shadow: var(--portal-shadow);
	color: var(--portal-text);
	transition: box-shadow .15s;
}
.portal-quick__item:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); color: var(--portal-text); }
.portal-quick__icon {
	width: 36px; height: 36px; border-radius: 8px;
	background: rgba(235,104,95,.15); color: var(--portal-primary);
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 16px; flex-shrink: 0;
}
.portal-quick__text { flex: 1; min-width: 0; }
.portal-quick__title { font-weight: 600; font-size: 14px; }
.portal-quick__desc  { font-size: 12px; color: var(--portal-muted); margin-top: 2px; }
.portal-quick__arrow { color: var(--portal-muted); font-size: 14px; }

/* Secured footer */

/* Agreement page — two-column summary + aside */
.portal-agreement { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .portal-agreement { grid-template-columns: 1fr; } }
.portal-agreement__aside { display: flex; flex-direction: column; gap: 16px; }
.portal-agreement__box {
	background: var(--portal-bg);
	border: 1px solid var(--portal-border);
	border-radius: 12px;
	padding: 20px;
}
.portal-agreement__box h4 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.portal-agreement__box p  { margin: 0; color: var(--portal-muted); font-size: 14px; line-height: 1.55; }

/* Definition list — label / value grid used by the agreement summary */
.portal-def { display: grid; grid-template-columns: 200px 1fr; gap: 16px 24px; margin: 0; }
.portal-def dt { color: var(--portal-muted); font-size: 14px; font-weight: 500; }
.portal-def dd { margin: 0; color: var(--portal-text); font-size: 15px; font-weight: 600; }

.portal-secured {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	margin-top: 32px;
	color: var(--portal-muted); font-size: 14px;
}
.portal-secured .fa { color: var(--portal-muted); }

/* Auth pages */

.portal-auth {
	min-height: 100vh;
	display: flex; align-items: center; justify-content: center;
	background: var(--portal-bg);
	padding: 40px 20px;
}
.portal-auth__card {
	width: 100%; max-width: 420px;
	background: var(--portal-surface);
	border: 1px solid var(--portal-border);
	border-radius: 16px;
	box-shadow: var(--portal-shadow);
	padding: 32px;
}
.portal-auth__logo { text-align: center; margin-bottom: 24px; }
.portal-auth__logo img { height: 56px; }
.portal-auth__title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.portal-auth__intro { color: var(--portal-muted); margin: 0 0 20px; font-size: 14px; }
.portal-auth__footer { text-align: center; margin-top: 18px; font-size: 13px; color: var(--portal-muted); }

/* Form */

.portal-field { margin-bottom: 16px; }
.portal-field__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.portal-field__input, .portal-field__select {
	width: 100%;
	height: 44px;
	padding: 10px 14px;
	line-height: 1.4;
	border: 1px solid var(--portal-border);
	border-radius: 10px;
	background: #fff; font-size: 14px; font-family: inherit;
	color: var(--portal-text);
	box-sizing: border-box;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.portal-field__select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2369534B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
}
.portal-body.rtl .portal-field__select {
	padding-right: 14px;
	padding-left: 36px;
	background-position: left 14px center;
}
.portal-field__input[type="date"], .portal-field__input[type="number"] { padding-right: 10px; }
.portal-field__input:focus, .portal-field__select:focus {
	outline: none;
	border-color: var(--portal-primary);
	box-shadow: 0 0 0 3px rgba(235,104,95,.15);
}
.portal-field__hint { font-size: 12px; color: var(--portal-muted); margin-top: 4px; }
.portal-field__error { font-size: 12px; color: var(--portal-danger); margin-top: 4px; }

.portal-alert {
	padding: 12px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px;
	border: 1px solid transparent;
}
.portal-alert--error   { background: #FDECEC; color: #8B1E1E; border-color: #F5C6C6; }
.portal-alert--info    { background: #E7F0F7; color: #234A6B; border-color: #C8DBEA; }
.portal-alert--success { background: #E9F5EC; color: #1D5A2E; border-color: #BFE3C7; }

/* ============================================================
   Hamburger button (top nav) — hidden on desktop, shown on mobile
   ============================================================ */
.portal-topnav__hamburger {
	display: none;
	width: 40px; height: 40px;
	background: none; border: 0; padding: 8px;
	cursor: pointer;
	flex-direction: column; justify-content: space-between;
	margin-right: 4px;
}
.portal-topnav__hamburger span {
	display: block; height: 2px; width: 100%;
	background: var(--portal-text); border-radius: 2px;
	transition: transform .2s, opacity .2s;
}

/* ============================================================
   Tablet — 900px and below
   ============================================================ */
@media (max-width: 900px) {
	.portal-topnav { padding: 0 20px; }
	.portal-main   { padding: 20px 24px 60px; }
	.portal-topnav__name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ============================================================
   Phone — 640px and below
   ============================================================ */
@media (max-width: 640px) {
	.portal-topnav__hamburger { display: inline-flex; }
	.portal-topnav { padding: 0 14px; height: 64px; }
	.portal-topnav__logo img { height: 40px; }
	.portal-topnav__right { gap: 8px; font-size: 13px; }
	.portal-topnav__phone span { display: none; } /* icon-only phone on small screens */
	.portal-topnav__divider { display: none; }
	.portal-topnav__name { display: none; }
	.portal-topnav__caret { display: none; }

	/* Sidebar becomes a slide-in drawer, hidden by default on mobile.
	   minmax(0, 1fr) forces the track to shrink below its content min-size —
	   otherwise a wide child (long button, wide table) grows the track and
	   pushes past the viewport. */
	.portal-shell { grid-template-columns: minmax(0, 1fr); min-height: calc(100vh - 65px); }
	.portal-body.rtl .portal-shell { grid-template-columns: minmax(0, 1fr); }
	.portal-main { min-width: 0; overflow-x: hidden; }
	.portal-card { min-width: 0; max-width: 100%; overflow: hidden; }
	.portal-sidebar {
		position: fixed; top: 64px; left: 0;
		width: 240px; height: calc(100vh - 64px);
		z-index: 100;
		transform: translateX(-100%);
		transition: transform .25s ease;
		box-shadow: none; /* only shown when open */
	}
	.portal-body.rtl .portal-sidebar { left: auto; right: 0; transform: translateX(100%); }
	.portal-body.portal-sidebar-open .portal-sidebar {
		transform: translateX(0);
		box-shadow: 4px 0 20px rgba(0,0,0,.25);
	}
	.portal-body.portal-sidebar-open::after {
		content: ""; position: fixed; inset: 64px 0 0 0;
		background: rgba(0,0,0,.35); z-index: 90;
	}

	.portal-main { padding: 16px 16px 48px; }

	/* Page header — stack title above lang toggle */
	.portal-page-header { flex-direction: column; align-items: flex-start; gap: 12px; min-height: 0; margin-bottom: 16px; }
	.portal-page-header__title { font-size: 24px; }

	/* Cards — reduce padding */
	.portal-card { padding: 18px; border-radius: 12px; }
	.portal-card__title { font-size: 18px; margin-bottom: 14px; }

	/* Auth pages (login/reset) — card fills available width */
	.portal-auth { padding: 24px 14px; }
	.portal-auth__card { max-width: 100%; padding: 24px; }

	/* Dashboard grid — single column. minmax(0,1fr) so children can shrink. */
	.portal-dash { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.portal-dash > * { min-width: 0; }
	.pm-this-month__stats > * { min-width: 0; }
	.pm-this-month__header > * { min-width: 0; }

	/* This-month stats — stack the 3 stats vertically */
	.pm-this-month__stats {
		grid-template-columns: 1fr;
		gap: 20px;
		padding-top: 18px; margin: 18px 0;
	}
	.pm-this-month__vdivider { display: none; }
	.pm-this-month__title { font-size: 20px; }
	.pm-stat__value { font-size: 22px; }
	.pm-this-month__cta .portal-btn { min-width: 0; width: 100%; }

	/* Quick actions — 1 column */
	.portal-quick { grid-template-columns: 1fr; gap: 12px; }
	.portal-quick__item { padding: 14px; }
	.portal-quick__desc { display: none; } /* title-only on mobile */

	/* Tables — horizontal scroll so long rows aren't cut off */
	.portal-table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
	.portal-table th, .portal-table td { padding: 12px 8px; font-size: 13px; }

	/* Any inline grid using 1fr 1fr → stack on mobile */
	main [style*="grid-template-columns:1fr 1fr"],
	main [style*="grid-template-columns: 1fr 1fr"],
	main [style*="grid-template-columns:1fr 1fr 1fr"],
	main [style*="grid-template-columns: 1fr 1fr 1fr"],
	main [style*="grid-template-columns:2fr 1fr"],
	main [style*="grid-template-columns: 2fr 1fr"] {
		grid-template-columns: 1fr !important;
	}

	/* Agreement page — stack summary + aside; def list becomes label-over-value */
	.portal-agreement { grid-template-columns: 1fr !important; gap: 16px; }
	.portal-def { grid-template-columns: 1fr; gap: 4px 0; }
	.portal-def dt { margin-top: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
	.portal-def dd { font-size: 15px; }

	/* Sidebar link tap targets */
	.portal-sidebar__link { padding: 14px 12px; }

	/* Language switch — smaller pills */
	.portal-lang-switch__btn { min-width: 44px; padding: 0 12px; }

	/* Form fields — full width, prevent iOS zoom by using 16px+ font size */
	.portal-field__input, .portal-field__select { font-size: 16px; }

	/* Alerts a bit tighter */
	.portal-alert { padding: 10px 12px; font-size: 13px; }
}

/* Extra small — 380px and below */
@media (max-width: 380px) {
	.portal-topnav { padding: 0 10px; }
	.portal-topnav__logo img { height: 34px; }
	.portal-main { padding: 12px 12px 40px; }
	.portal-card { padding: 14px; }
	.portal-page-header__title { font-size: 22px; }
}

/* ============================================================
   Hardening — prevent horizontal overflow on mobile
   ============================================================ */
@media (max-width: 640px) {
	html, body { overflow-x: hidden; max-width: 100vw; }
	.portal-main, .portal-card, .portal-quick, .portal-dash { max-width: 100%; box-sizing: border-box; min-width: 0; }
	.portal-main > * { max-width: 100%; }
	.portal-main img, .portal-main table { max-width: 100%; }
	/* Kill any inline min-width on the CTA button */
	.pm-this-month__cta .portal-btn { min-width: 0 !important; width: 100% !important; box-sizing: border-box; }
	.portal-btn { max-width: 100%; box-sizing: border-box; white-space: normal; word-break: keep-all; }
	/* Grid children must be shrinkable */
	.portal-shell > * { min-width: 0; }
	.pm-this-month__header { flex-wrap: wrap; }
	/* Recent Activity table — force horizontal scroll inside its card */
	.portal-card .portal-table { display: block; overflow-x: auto; }
}

@media (max-width: 640px) {
	/* Long button labels should wrap instead of overflowing */
	.portal-btn { white-space: normal; text-align: center; line-height: 1.3; padding: 12px 16px; }
	.pm-side-card__cta { min-height: 46px; }
	/* Amounts in tables — tighter for narrow screens */
	.portal-table td, .portal-table th { padding: 10px 6px; font-size: 12px; }
	/* Cards must never poke past viewport */
	.portal-main > .portal-card { margin-left: 0 !important; margin-right: 0 !important; }
}

.portal-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
@media (max-width: 640px) {
	.portal-table-wrap { margin: 0 -6px; }
}
