/**
 * Ventura Service Portal — frontend styling.
 *
 * Clean B2B aesthetic, theme-agnostic, mobile-friendly tablet/laptop responsive.
 */

.vsp-portal *,
.vsp-portal *::before,
.vsp-portal *::after { box-sizing: border-box; }

.vsp-portal {
	/* Ventura brand colors. */
	--vsp-primary: #01A499;
	--vsp-primary-hover: #018A80;
	--vsp-primary-light: #E5F6F4;
	--vsp-accent: #FF671F;
	--vsp-accent-hover: #E55816;
	--vsp-accent-light: #FFF1E8;
	--vsp-text: #1f2937;
	--vsp-text-muted: #6b7280;
	--vsp-border: #e5e7eb;
	--vsp-border-strong: #d1d5db;
	--vsp-card-bg: #ffffff;
	--vsp-bg: #f6f7fb;
	--vsp-danger: #dc2626;
	--vsp-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
	--vsp-shadow: 0 4px 12px rgba(15, 23, 42, .06);
	--vsp-radius: 10px;
	--vsp-radius-sm: 6px;

	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
	color: var(--vsp-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
}

/* ===== Header ============================================================ */
.vsp-portal__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	flex-wrap: wrap;
	padding: 28px 0 20px;
	border-bottom: 1px solid var(--vsp-border);
	margin-bottom: 28px;
}

.vsp-portal__title {
	margin: 0;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--vsp-text);
}

.vsp-portal__subtitle {
	margin: 6px 0 0 0;
	color: var(--vsp-text-muted);
	font-size: 14px;
}

.vsp-portal__search {
	display: flex;
	gap: 8px;
	min-width: 320px;
}

/* ===== Sections ========================================================== */
.vsp-portal__section {
	margin-bottom: 36px;
}

.vsp-portal__section-title {
	margin: 0 0 16px 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--vsp-text-muted);
	text-transform: uppercase;
	letter-spacing: .06em;
}

.vsp-portal__empty {
	color: var(--vsp-text-muted);
	background: #fafbfd;
	padding: 20px;
	border-radius: var(--vsp-radius);
	border: 1px dashed var(--vsp-border-strong);
	text-align: center;
	margin: 0;
}

.vsp-portal__empty-state {
	text-align: center;
	padding: 60px 20px;
	color: var(--vsp-text-muted);
}
.vsp-portal__empty-state svg { width: 48px; height: 48px; opacity: .4; margin-bottom: 16px; }
.vsp-portal__empty-state h3 { font-size: 18px; color: var(--vsp-text); margin: 0 0 8px 0; }
.vsp-portal__empty-state p { margin: 0; }

/* ===== Tiles ============================================================= */
.vsp-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}

.vsp-tile {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	background: var(--vsp-card-bg);
	border: 1px solid var(--vsp-border);
	border-radius: var(--vsp-radius);
	text-decoration: none;
	color: var(--vsp-text);
	transition: transform .15s, box-shadow .15s, border-color .15s;
}

.vsp-tile:hover {
	transform: translateY(-2px);
	box-shadow: var(--vsp-shadow);
	border-color: var(--vsp-primary);
	text-decoration: none;
}

.vsp-tile__icon {
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	border-radius: var(--vsp-radius-sm);
	background: var(--vsp-primary-light);
	color: var(--vsp-primary);
	display: flex;
	align-items: center;
	justify-content: center;
}
.vsp-tile__icon svg { width: 24px; height: 24px; }

.vsp-tile--type .vsp-tile__icon {
	background: var(--vsp-accent-light);
	color: var(--vsp-accent);
}

.vsp-tile__name {
	font-weight: 600;
	color: var(--vsp-text);
	font-size: 15px;
	line-height: 1.3;
}

.vsp-tile__count {
	color: var(--vsp-text-muted);
	font-size: 13px;
	margin-top: 4px;
}

/* ===== Breadcrumb ======================================================== */
.vsp-breadcrumb {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 20px;
	font-size: 14px;
	color: var(--vsp-text-muted);
	padding-top: 20px;
}
.vsp-breadcrumb a { color: var(--vsp-primary); text-decoration: none; }
.vsp-breadcrumb a:hover { text-decoration: underline; }
.vsp-breadcrumb__sep { color: #cbd5e1; }

/* ===== Filters ========================================================== */
.vsp-doclist__filters {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	padding: 14px 16px;
	background: var(--vsp-card-bg);
	border: 1px solid var(--vsp-border);
	border-radius: var(--vsp-radius);
}

/* ===== Document list ==================================================== */
.vsp-doclist {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vsp-doc {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 16px 20px;
	background: var(--vsp-card-bg);
	border: 1px solid var(--vsp-border);
	border-radius: var(--vsp-radius);
	transition: border-color .15s, box-shadow .15s;
}

.vsp-doc:hover {
	border-color: var(--vsp-primary);
	box-shadow: var(--vsp-shadow-sm);
}

.vsp-doc__icon {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	border-radius: var(--vsp-radius-sm);
	background: var(--vsp-primary-light);
	color: var(--vsp-primary);
	display: flex;
	align-items: center;
	justify-content: center;
}
.vsp-doc__icon svg { width: 22px; height: 22px; }

.vsp-doc__body {
	flex: 1;
	min-width: 0;
}

.vsp-doc__title {
	margin: 0 0 6px 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--vsp-text);
	line-height: 1.3;
}

.vsp-doc__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 12px;
	color: var(--vsp-text-muted);
	margin-bottom: 6px;
}
.vsp-doc__meta-item strong { color: var(--vsp-text); font-weight: 500; }

.vsp-doc__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.vsp-doc__actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.vsp-doc { flex-wrap: wrap; }
	.vsp-doc__actions { width: 100%; }
	.vsp-doc__actions .vsp-btn { flex: 1; }
}

/* ===== Pills (frontend) ================================================= */
.vsp-portal .vsp-pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 500;
	background: #f3f4f6;
	color: #374151;
}
.vsp-pill--system { background: #dbeafe; color: #1e40af; }
.vsp-pill--type   { background: #f3e8ff; color: #6b21a8; }
.vsp-pill--lang   { background: #ecfdf5; color: #047857; }
.vsp-pill--amber  { background: #fef3c7; color: #92400e; }

/* ===== Buttons (frontend) =============================================== */
.vsp-portal .vsp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 16px;
	border-radius: var(--vsp-radius-sm);
	border: 1px solid transparent;
	background: transparent;
	color: var(--vsp-text);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	font-family: inherit;
	transition: background .15s, border-color .15s, color .15s;
	white-space: nowrap;
}

.vsp-portal .vsp-btn--primary {
	background: var(--vsp-primary);
	color: #fff;
	border-color: var(--vsp-primary);
}
.vsp-portal .vsp-btn--primary:hover {
	background: var(--vsp-primary-hover);
	border-color: var(--vsp-primary-hover);
	color: #fff;
	text-decoration: none;
}

.vsp-portal .vsp-btn--ghost {
	background: #fff;
	border-color: var(--vsp-border-strong);
	color: var(--vsp-text);
}
.vsp-portal .vsp-btn--ghost:hover { background: #f3f4f6; text-decoration: none; }

.vsp-portal .vsp-btn--link {
	color: var(--vsp-text-muted);
	padding: 9px 4px;
}
.vsp-portal .vsp-btn--link:hover { color: var(--vsp-primary); text-decoration: none; }

.vsp-portal .vsp-btn--disabled {
	background: #f3f4f6;
	color: var(--vsp-text-muted);
	cursor: not-allowed;
	border-color: var(--vsp-border);
}

.vsp-portal .vsp-btn--sm { padding: 6px 12px; font-size: 13px; }
.vsp-portal .vsp-btn--lg { padding: 12px 24px; font-size: 16px; }
.vsp-portal .vsp-btn--block { display: flex; width: 100%; }

/* ===== Cards (frontend) ================================================= */
.vsp-portal .vsp-card {
	background: var(--vsp-card-bg);
	border: 1px solid var(--vsp-border);
	border-radius: var(--vsp-radius);
	padding: 24px;
	box-shadow: var(--vsp-shadow-sm);
}
.vsp-portal .vsp-card--centered { text-align: center; padding: 32px; }
.vsp-portal .vsp-card--muted { background: #fafbfd; }
.vsp-portal .vsp-card__title { margin: 0 0 12px 0; font-size: 16px; font-weight: 600; }

/* ===== Forms (frontend) ================================================= */
.vsp-portal .vsp-input,
.vsp-portal .vsp-select,
.vsp-portal .vsp-textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--vsp-border-strong);
	border-radius: var(--vsp-radius-sm);
	font-size: 15px;
	background: #fff;
	color: var(--vsp-text);
	font-family: inherit;
	transition: border-color .15s, box-shadow .15s;
}

.vsp-portal .vsp-input:focus,
.vsp-portal .vsp-select:focus,
.vsp-portal .vsp-textarea:focus {
	outline: none;
	border-color: var(--vsp-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.vsp-portal .vsp-textarea { resize: vertical; min-height: 90px; }

.vsp-portal .vsp-field { margin-bottom: 16px; }
.vsp-portal .vsp-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	color: var(--vsp-text);
	font-size: 14px;
}
.vsp-portal .vsp-field__help { margin-top: 6px; font-size: 13px; color: var(--vsp-text-muted); }
.vsp-portal .vsp-required { color: var(--vsp-danger); }

.vsp-portal .vsp-grid { display: grid; gap: 16px; }
.vsp-portal .vsp-grid--2col { grid-template-columns: 1fr 1fr; }
.vsp-portal .vsp-grid--3col { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.vsp-portal .vsp-field--full { grid-column: 1 / -1; }
@media (max-width: 700px) {
	.vsp-portal .vsp-grid--2col { grid-template-columns: 1fr; }
}

.vsp-portal .vsp-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
}
.vsp-portal .vsp-checkbox input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }

.vsp-portal .vsp-actions { margin-top: 8px; }

/* Honeypot — visually hidden but accessible. */
.vsp-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ===== Notices (frontend) =============================================== */
.vsp-portal .vsp-notice {
	padding: 14px 18px;
	border-radius: var(--vsp-radius-sm);
	margin-bottom: 18px;
	border-left: 4px solid;
	background: #fff;
	font-size: 14px;
}
.vsp-portal .vsp-notice--success { border-color: #10b981; background: #ecfdf5; color: #065f46; }
.vsp-portal .vsp-notice--error   { border-color: #dc2626; background: #fef2f2; color: #991b1b; }

/* ===== Request page ==================================================== */
.vsp-portal--request {
	max-width: 800px;
}
.vsp-request__intro {
	text-align: center;
	margin: 40px 0 24px 0;
}
.vsp-request__intro h1 {
	margin: 0 0 12px 0;
	font-size: 28px;
	font-weight: 700;
}
.vsp-request__intro p {
	margin: 0;
	color: var(--vsp-text-muted);
	font-size: 16px;
}

/* ===== Login card ====================================================== */
.vsp-portal--login {
	max-width: 440px;
	padding-top: 40px;
}

.vsp-login-card {
	background: var(--vsp-card-bg);
	border: 1px solid var(--vsp-border);
	border-radius: var(--vsp-radius);
	padding: 36px 32px;
	box-shadow: var(--vsp-shadow);
}

.vsp-login-card__brand { text-align: center; margin-bottom: 28px; }

.vsp-login-card__logo {
	display: inline-block;
	max-width: 240px;
	margin-bottom: 16px;
	line-height: 0;
}
.vsp-login-card__logo svg,
.vsp-login-card__logo img {
	width: 100%;
	height: auto;
}

.vsp-login-card h1 {
	margin: 0 0 8px 0;
	font-size: 22px;
}
.vsp-login-card p {
	margin: 0;
	color: var(--vsp-text-muted);
	font-size: 14px;
}

.vsp-login-card .login-username,
.vsp-login-card .login-password {
	margin-bottom: 14px;
}
.vsp-login-card .login-username label,
.vsp-login-card .login-password label,
.vsp-login-card .login-remember label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	font-size: 14px;
	color: var(--vsp-text);
}
.vsp-login-card .login-username input,
.vsp-login-card .login-password input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--vsp-border-strong);
	border-radius: var(--vsp-radius-sm);
	font-size: 15px;
	background: #fff;
}
.vsp-login-card .login-remember {
	font-size: 13px;
	margin-bottom: 14px;
}
.vsp-login-card .login-remember label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.vsp-login-card .login-submit input[type="submit"],
.vsp-login-card .login-submit .button {
	width: 100%;
	padding: 11px 16px;
	background: var(--vsp-primary);
	color: #fff;
	border: 1px solid var(--vsp-primary);
	border-radius: var(--vsp-radius-sm);
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}
.vsp-login-card .login-submit input[type="submit"]:hover { background: var(--vsp-primary-hover); }

.vsp-login-card__links { text-align: center; margin: 12px 0 0; font-size: 13px; }
.vsp-login-card__links a { color: var(--vsp-text-muted); text-decoration: none; }
.vsp-login-card__links a:hover { color: var(--vsp-primary); }

.vsp-login-card__footer {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--vsp-border);
	text-align: center;
}
.vsp-login-card__footer p { margin: 0 0 10px 0; font-size: 13px; }

/* ===== Support page ==================================================== */
.vsp-contact-card { text-align: center; }
.vsp-contact-card__icon {
	width: 52px;
	height: 52px;
	border-radius: var(--vsp-radius);
	background: var(--vsp-primary-light);
	color: var(--vsp-primary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
}
.vsp-contact-card__icon svg { width: 26px; height: 26px; }
.vsp-contact-card h3 { margin: 0 0 12px 0; font-size: 17px; }
.vsp-contact-card p { margin: 6px 0; }
.vsp-contact-card a { color: var(--vsp-primary); text-decoration: none; }
.vsp-contact-card a:hover { text-decoration: underline; }

.vsp-legal-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.vsp-legal-links a { color: var(--vsp-primary); text-decoration: none; }
.vsp-legal-links a:hover { text-decoration: underline; }

/* ===== Pagination (frontend) =========================================== */
.vsp-portal .vsp-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 20px 0;
	gap: 12px;
	flex-wrap: wrap;
}
.vsp-portal .vsp-pagination__info { color: var(--vsp-text-muted); font-size: 13px; }

/* ===== Button row, generic card ======================================== */
.vsp-portal .vsp-button-row {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-top: 16px;
	flex-wrap: wrap;
}

/* ===== Mobile responsive =============================================== */
@media (max-width: 600px) {
	.vsp-portal { font-size: 14px; }
	.vsp-portal__header { flex-direction: column; align-items: stretch; }
	.vsp-portal__search { min-width: 0; }
	.vsp-portal__title { font-size: 22px; }
	.vsp-tiles { grid-template-columns: 1fr; }
	.vsp-doclist__filters { flex-direction: column; }
	.vsp-doclist__filters > * { width: 100%; }
}

/* ===== Portal brand header ============================================== */
.vsp-portal__brand {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 8px;
}
.vsp-portal__brand-logo {
	display: inline-block;
	max-width: 180px;
	line-height: 0;
}
.vsp-portal__brand-logo svg,
.vsp-portal__brand-logo img { width: 100%; height: auto; display: block; }

.vsp-portal__brand-divider {
	width: 1px;
	height: 36px;
	background: var(--vsp-border);
}
