@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: #F5F6F8;
	font-family: Inter, system-ui, -apple-system, sans-serif;
	color: #1B1F27;
}

a { text-decoration: none; }

.customer-portal-footer {
	margin-top: auto;
	padding: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 12px;
	color: #667085;
}
.customer-portal-footer a,
.terms-link { color: #2F6FED; }

.auth-nav {
	background: #132242;
	color: #fff;
	padding: 14px 28px;
}
.auth-nav-inner {
	max-width: 760px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
}
.csr-banner {
	background: #fff4d6;
	border-bottom: 1px solid #e0c98a;
	color: #5a4412;
	padding: 10px 28px;
	font-size: 14px;
	text-align: center;
}
.csr-banner a {
	color: #5a4412;
	font-weight: 600;
	margin-left: 10px;
}
.auth-nav .brand-mark {
	height: 34px;
	display: flex;
	align-items: center;
}
.auth-nav .brand-mark img {
	height: 100%;
	width: auto;
}
.auth-nav .brand-name {
	font-weight: 700;
	font-size: 17px;
}
.auth-nav .nav-links {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 22px;
}
.auth-nav .nav-links a,
.auth-nav .nav-tab {
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	color: #C7D0E6;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 0;
	font-family: inherit;
}
.auth-nav .nav-links a:hover,
.auth-nav .nav-tab:hover { color: #fff; }
.auth-nav .nav-tab.active {
	color: #fff;
	border-bottom-color: #2F6FED;
}
.auth-nav .nav-links a.sign-out { color: #F87171; }
.auth-nav .nav-links a.sign-out:hover { color: #FCA5A5; }

.auth-wrap {
	max-width: 420px;
	margin: 64px auto;
	padding: 0 20px;
}
.auth-wrap.wide {
	max-width: 480px;
	margin: 40px auto;
}
.auth-wrap.sign-in { max-width: 450px; }

/* Keep the header's left edge aligned with the form card at every screen size. */
.auth-page { --auth-width: 420px; }
.auth-page-signup { --auth-width: 480px; }
.auth-page-login { --auth-width: 450px; }
.auth-page .auth-nav { padding-left: 20px; padding-right: 20px; }
.auth-page .auth-nav-inner { max-width: calc(var(--auth-width) - 40px); }
.auth-page .auth-wrap { width: 100%; max-width: var(--auth-width); }

.card {
	background: #fff;
	border: 1px solid #E2E5EA;
	border-radius: 14px;
	padding: 32px;
	box-shadow: 0 1px 2px rgba(20, 30, 60, 0.04);
}

.page-title {
	margin: 0 0 6px;
	font-size: 24px;
	font-weight: 800;
}
.page-subtitle {
	margin: 0 0 24px;
	font-size: 14px;
	color: #667085;
}

.page-wrap {
	max-width: 640px;
	margin: 36px auto;
	padding: 0 20px;
}
.page-wrap.wide {
	max-width: 760px;
	padding: 0 20px 20px;
}
.page-wrap .page-title { margin: 0 0 4px; }
.page-wrap .page-subtitle { margin: 0 0 20px; }

.page-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 12px;
}
.page-header-row .page-title { margin: 0; }

.form-group { margin: 0; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1 1 0; min-width: 0; }

.form-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
}
.required { color: #C0342C; }

.form-input, .form-select, .form-textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #D7DBE2;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
}
.form-textarea { resize: vertical; }
.form-select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 34px;
	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"><path d="M1 1l5 5 5-5" fill="none" stroke="%2398A2B3" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>');
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.form-hint {
	font-size: 12px;
	color: #98A2B3;
	margin-top: 4px;
}
.form-hint.hint-error { color: #C0342C; }
.form-input.input-error {
	border-color: #C0342C;
	color: #C0342C;
}

.password-requirements {
	background: #F8F9FB;
	border: 1px solid #E2E5EA;
	border-radius: 10px;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-size: 13px;
	color: #414A5A;
}

.checkbox-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	cursor: pointer;
}
.checkbox-row input { margin-top: 2px; }

.checkbox-inline-row {
	display: flex;
	gap: 24px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.checkbox-inline-row label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	cursor: pointer;
}

.submit-btn {
	margin-top: 6px;
	background: #2F6FED;
	color: #fff;
	border: none;
	border-radius: 9px;
	padding: 12px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	width: 100%;
}
.submit-btn.compact {
	width: auto;
	align-self: flex-start;
	padding: 11px 24px;
	font-size: 14px;
}
.submit-btn.small {
	width: auto;
	padding: 10px 20px;
	font-size: 13px;
	margin-top: 0;
}
.submit-btn:disabled {
	background: #AFC3EC;
	cursor: not-allowed;
}

.secondary-btn {
	background: #fff;
	color: #414A5A;
	border: 1px solid #D7DBE2;
	border-radius: 9px;
	padding: 10px 22px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.dark-btn {
	background: #132242;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 8px 16px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.mode-toggle-row { display: flex; gap: 8px; margin-bottom: 16px; }
.mode-btn {
	background: #fff;
	color: #414A5A;
	border: 1px solid #D7DBE2;
	border-radius: 8px;
	padding: 8px 16px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}
.mode-btn.active {
	background: #132242;
	color: #fff;
	border-color: #132242;
}

.alert-banner {
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 16px;
}
.alert-banner.error {
	background: #FDECEA;
	border: 1px solid #F3B9B3;
	color: #C0342C;
}
.alert-banner.success {
	background: #EAF7EE;
	border: 1px solid #B7E4C7;
	color: #1E7B3D;
}

.link-row {
	text-align: center;
	font-size: 13px;
	color: #667085;
	margin-top: 18px;
}
.link-row a, .between-row a {
	color: #2F6FED;
	font-weight: 600;
	cursor: pointer;
}
.between-row {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	margin-top: 18px;
	color: #667085;
}

.help-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1px solid #D7DBE2;
	color: #98A2B3;
	font-size: 12px;
	font-weight: 700;
	cursor: help;
	flex-shrink: 0;
	position: relative;
}
.help-popover {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 220px;
	max-width: calc(100vw - 40px);
	background: #132242;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	text-align: left;
	padding: 8px 10px;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(20, 30, 60, 0.15);
	z-index: 30;
	cursor: default;
}

.toggle-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; cursor: pointer; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-switch .track {
	display: inline-block;
	width: 44px;
	height: 24px;
	border-radius: 12px;
	background: #D7DBE2;
	position: relative;
	cursor: pointer;
	transition: background 0.15s;
	flex-shrink: 0;
}
.toggle-switch .track::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0,0,0,0.25);
	transition: left 0.15s;
}
.toggle-switch input:checked + .track { background: #34C76F; }
.toggle-switch input:checked + .track::after { left: 22px; }

.deliver-panel {
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #FAFBFC;
	border: 1px solid #E4E7EC;
	border-radius: 10px;
	padding: 10px 14px;
}
.deliver-panel-title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: #667085;
}
.deliver-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.deliver-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.deliver-row .toggle-switch { font-size: 13px; }
.deliver-off { opacity: 0.6; cursor: default; }
.deliver-dest { font-size: 12px; color: #667085; }
.deliver-dest a { color: #2F6FED; font-weight: 600; white-space: nowrap; }
.deliver-fixed { font-size: 13px; font-weight: 600; color: #414A5A; }

.toggle-switch.row .track { width: 36px; height: 20px; }
.toggle-switch.row .track::after { width: 16px; height: 16px; }
.toggle-switch.row input:checked + .track::after { left: 18px; }

.multiselect { position: relative; }
.multiselect-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	border: 1px solid #D7DBE2;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	color: #1B1F27;
	cursor: pointer;
}
.multiselect-caret { color: #98A2B3; font-size: 11px; margin-left: 8px; }
.multiselect-panel {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 20;
	background: #fff;
	border: 1px solid #E2E5EA;
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(20, 30, 60, 0.1);
	max-height: 220px;
	overflow-y: auto;
}
.multiselect-panel.open { display: block; }
.multiselect-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	font-size: 14px;
	cursor: pointer;
}
.multiselect-option:hover { background: #F8F9FB; }
.multiselect-option.selected { background: #F5F8FF; }
.multiselect-check { color: #2F6FED; font-weight: 700; }
.multiselect-empty { padding: 10px 16px; font-size: 13px; color: #98A2B3; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #EEF2FF;
	color: #2F6FED;
	border-radius: 20px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
}
.chip-remove { cursor: pointer; font-weight: 700; line-height: 1; }

.days-pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.day-pill {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 34px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	border: 1px solid #D7DBE2;
	background: #fff;
	color: #414A5A;
}
.day-pill input { display: none; }
.day-pill.selected {
	background: #132242;
	color: #fff;
	border-color: #132242;
}

.stop-verify-row { display: flex; gap: 8px; }
.stop-verify-row input { flex: 1 1 0; }
.stop-verify-row button {
	padding: 0 16px;
}

.add-alert-panel {
	border: 1px solid #CFD9F7;
	background: #F5F8FF;
	border-radius: 12px;
	padding: 20px;
	flex-direction: column;
	gap: 14px;
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 64px);
	overflow: hidden;
}
.add-alert-panel[open] { display: flex; }
.add-alert-panel::backdrop {
	background: rgba(20, 30, 60, 0.45);
}
.add-alert-panel .form-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}
.add-alert-panel .form-title {
	font-size: 19px;
	font-weight: 700;
}
.add-alert-panel form {
	min-height: 0;
	overflow: hidden;
}
.add-alert-panel .modal-scroll-body {
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 0;
	padding: 2px 14px 2px 2px;
}
.add-alert-panel .modal-footer {
	flex-shrink: 0;
}
.add-alert-panel .modal-close-btn {
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	color: #98A2B3;
	cursor: pointer;
	padding: 0;
}

.section-card {
	background: #fff;
	border: 1px solid #E2E5EA;
	border-radius: 14px;
	padding: 24px;
	box-shadow: 0 1px 2px rgba(20, 30, 60, 0.04);
	margin-bottom: 20px;
}
.section-card.tight { padding: 28px; margin-bottom: 0; }
.section-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 4px;
	flex-wrap: wrap;
	gap: 10px;
}
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.section-desc { font-size: 13px; color: #667085; margin-bottom: 16px; }

.subsection-divider {
	border-top: 1px solid #E2E5EA;
	margin-top: 6px;
	padding-top: 18px;
}
.subsection-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.subsection-desc { font-size: 12px; color: #98A2B3; margin-bottom: 14px; }

.stop-list { display: flex; flex-direction: column; gap: 10px; }
.stop-row {
	display: grid;
	grid-template-columns: 1fr auto auto auto;
	align-items: center;
	gap: 14px;
	border: 1px solid #E2E5EA;
	border-radius: 10px;
	padding: 14px 16px;
}
.stop-row-title { font-size: 14px; font-weight: 700; }
.stop-row-dir { font-weight: 500; color: #667085; }
.stop-row-meta { font-size: 12px; color: #667085; margin-top: 2px; }
.stop-row-delivery { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #667085; margin-top: 2px; }

.channel-icons { display: inline-flex; align-items: center; gap: 6px; }
.ch-icon { width: 15px; height: 15px; }
.ch-icon.email { color: #2F6FED; }
.ch-icon.sms { color: #34C76F; }
.ch-none { color: #C0392B; }

.icon-btn {
	background: #fff;
	border-radius: 8px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 1px solid;
}
.icon-btn.edit { color: #2F6FED; border-color: #CFD9F7; }
.icon-btn.delete { color: #C0342C; border-color: #F3B9B3; }

.empty-state { font-size: 13px; color: #667085; padding: 8px 0; }

@media (max-width: 640px) {
	.auth-nav { padding: 12px 16px; }
	.auth-nav-inner { flex-wrap: wrap; row-gap: 10px; }
	.auth-nav .brand-name { font-size: 15px; }
	.auth-nav .nav-links {
		margin-left: 0;
		width: 100%;
		justify-content: space-between;
		gap: 12px;
	}

	.stop-row {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
		row-gap: 10px;
	}
	.stop-row > div:first-child { flex: 1 1 100%; }

	.add-alert-panel { padding: 16px; }
	.form-row { flex-direction: column; gap: 14px; }
	.mode-toggle-row { flex-wrap: wrap; }
	.mode-btn { flex: 1 1 auto; }
}
