/* VLabs Loyalty Points - portal design system */
:root {
	--vlplp-primary: #0b1830;
	--vlplp-secondary: #101c33;
	--vlplp-accent: #d4af37;
	--vlplp-radius: 10px;
	--vlplp-text: #1f2937;
	--vlplp-muted: #6b7280;
}

html, body.vlplp-portal-body {
	margin: 0 !important;
	padding: 0 !important;
	background: #f2f4f8 !important;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	color: var(--vlplp-text);
	overflow-x: hidden;
}
#vlplp-app-shell * { box-sizing: border-box; }
#vlplp-app-shell img { max-width: 100%; }

.vlplp-app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Top bar ---------- */
.vlplp-topbar {
	background: linear-gradient(135deg, var(--vlplp-primary), var(--vlplp-secondary));
	color: #fff;
	padding: 14px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: sticky;
	top: 0;
	z-index: 20;
	box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.vlplp-topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
.vlplp-topbar-brand img { height: 30px; width: 30px; border-radius: 8px; object-fit: cover; }
.vlplp-topbar-actions { display: flex; align-items: center; gap: 10px; }
.vlplp-pill { background: rgba(255,255,255,.12); padding: 5px 12px; border-radius: 999px; font-size: 12px; }

/* ---------- Main / screens ---------- */
.vlplp-main { flex: 1; padding: 20px; max-width: 900px; margin: 0 auto; width: 100%; }
.vlplp-main-scroll { overflow-y: auto; }
.vlplp-screen-title { font-size: 22px; font-weight: 700; margin: 6px 0 20px; color: var(--vlplp-primary); }
.vlplp-screen { animation: vlplp-fade-in .2s ease; }
@keyframes vlplp-fade-in { from { opacity: 0; } to { opacity: 1; } }
.vlplp-back {
	background: none; border: none; color: var(--vlplp-primary); font-weight: 600; font-size: 14px;
	padding: 8px 0; cursor: pointer; margin-bottom: 6px;
}

/* ---------- Action grid (touch-friendly home buttons) ---------- */
.vlplp-action-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 14px;
}
.vlplp-action-btn {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	padding: 26px 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 14px;
	color: var(--vlplp-text);
	cursor: pointer;
	min-height: 110px;
	transition: transform .15s ease, box-shadow .15s ease;
}
.vlplp-action-btn:active { transform: scale(.97); }
.vlplp-action-btn:hover { box-shadow: 0 8px 20px rgba(11,24,48,.12); border-color: var(--vlplp-accent); }
.vlplp-action-icon { font-size: 28px; }

/* ---------- Cards / lists ---------- */
.vlplp-card-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.vlplp-list-row {
	background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px;
	display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.vlplp-contact-avatar {
	width: 38px; height: 38px; min-width: 38px; border-radius: 50%;
	background: linear-gradient(160deg, var(--vlplp-primary), var(--vlplp-secondary));
	color: #fff; display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 15px;
}
.vlplp-contact-info { flex: 1; }
.vlplp-muted { color: var(--vlplp-muted); font-size: 12px; }

/* ---------- Badges ---------- */
.vlplp-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.vlplp-badge-success { background: #e6f6ec; color: #16794a; }
.vlplp-badge-warning { background: #fdf0dc; color: #9a5b0b; }
.vlplp-badge-neutral { background: #eef0f3; color: #4b5563; }

/* ---------- Forms ---------- */
.vlplp-form-portal { display: flex; flex-direction: column; gap: 16px; margin-top: 10px; }
.vlplp-form-portal .vlplp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vlplp-form-portal label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.vlplp-form-portal input, .vlplp-form-portal select, .vlplp-form-portal textarea {
	font-weight: 400; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: var(--vlplp-radius); font-size: 15px; min-height: 46px;
	background: #fff;
}
.vlplp-form-portal textarea { min-height: 80px; }
.vlplp-span-2 { grid-column: span 2; }
@media (max-width: 640px) {
	.vlplp-form-portal .vlplp-grid-2 { grid-template-columns: 1fr; }
	.vlplp-span-2 { grid-column: span 1; }
}
.vlplp-consent { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; font-size: 13px; }

.vlplp-search-box {
	width: 100%; padding: 14px 16px; font-size: 16px; border: 1px solid #d1d5db; border-radius: var(--vlplp-radius);
	margin-bottom: 12px; min-height: 50px;
}

/* ---------- Buttons ---------- */
.vlplp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	background: #eef0f3; color: var(--vlplp-text); border: none; border-radius: var(--vlplp-radius);
	padding: 12px 18px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 46px;
	text-decoration: none;
}
.vlplp-btn-primary { background: var(--vlplp-primary); color: #fff; }
.vlplp-btn-primary:hover { background: var(--vlplp-secondary); }
.vlplp-btn-ghost { background: rgba(255,255,255,.12); color: #fff; }
.vlplp-btn-small { padding: 8px 14px; min-height: 34px; font-size: 12px; }
.vlplp-btn-block { width: 100%; }
.vlplp-btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }

/* ---------- Login screen ---------- */
.vlplp-login-screen {
	min-height: 100vh; display: flex; align-items: center; justify-content: center;
	background: radial-gradient(circle at 20% 20%, var(--vlplp-secondary), var(--vlplp-primary) 70%);
	padding: 20px;
}
.vlplp-login-card {
	background: #fff; border-radius: 20px; padding: 40px 32px; width: 380px; max-width: 100%;
	box-shadow: 0 30px 60px rgba(0,0,0,.3);
}
.vlplp-login-logo { height: 48px; margin-bottom: 14px; }
.vlplp-login-logo-text { font-weight: 800; font-size: 20px; color: var(--vlplp-primary); margin-bottom: 14px; }
.vlplp-login-card h1 { font-size: 20px; margin: 0 0 20px; color: var(--vlplp-primary); }
.vlplp-login-card form { display: flex; flex-direction: column; gap: 16px; }
.vlplp-login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.vlplp-login-card input[type="text"], .vlplp-login-card input[type="password"] {
	padding: 13px 14px; border: 1px solid #d1d5db; border-radius: var(--vlplp-radius); font-size: 15px;
}
.vlplp-password-wrap { position: relative; display: flex; }
.vlplp-toggle-password { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; }
.vlplp-remember { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; }
.vlplp-login-error { color: #b3261e; font-size: 13px; background: #fdecea; padding: 10px 12px; border-radius: 8px; }
.vlplp-login-forgot { text-align: center; font-size: 13px; }
.vlplp-login-forgot a { color: var(--vlplp-primary); }
.vlplp-spinner {
	width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%;
	animation: vlplp-spin 0.7s linear infinite;
}
@keyframes vlplp-spin { to { transform: rotate(360deg); } }

.vlplp-portal-denied { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 40px; text-align: center; font-size: 16px; }

/* ---------- Loyalty card visual ---------- */
.vlplp-card-preview { display: flex; justify-content: center; margin: 20px 0; }
.vlplp-loyalty-card {
	width: 360px; max-width: 100%; aspect-ratio: 1.586/1; border-radius: 20px; position: relative; overflow: hidden;
	background: linear-gradient(135deg, var(--vlplp-primary) 0%, #050b18 100%);
	color: #fff; padding: 16px 20px; display: flex; flex-direction: column; justify-content: space-between;
	box-shadow: 0 20px 40px rgba(0,0,0,.25);
}
.vlplp-lc-waves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.vlplp-lc-row-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.vlplp-lc-monogram {
	width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--vlplp-accent);
	display: flex; align-items: center; justify-content: center; font-family: Georgia, 'Playfair Display', serif;
	font-size: 12px; color: var(--vlplp-accent); overflow: hidden; flex-shrink: 0;
}
.vlplp-lc-monogram.has-logo { background: #fff; }
.vlplp-lc-monogram img { width: 100%; height: 100%; object-fit: cover; }
.vlplp-lc-vendor { font-size: 9px; letter-spacing: .12em; font-weight: 700; color: var(--vlplp-accent); text-align: right; max-width: 60%; }
.vlplp-lc-hero { position: relative; z-index: 1; margin-top: 3px; }
.vlplp-lc-brand { font-family: Georgia, 'Playfair Display', serif; font-size: 19px; color: var(--vlplp-accent); line-height: 1.1; }
.vlplp-lc-subtitle { font-size: 7px; letter-spacing: .18em; color: rgba(255,255,255,.75); margin-top: 2px; }
.vlplp-lc-divider { border-top: 1px solid rgba(255,255,255,.18); margin: 5px 0; position: relative; z-index: 1; }
.vlplp-lc-label { font-size: 6px; letter-spacing: .12em; color: rgba(255,255,255,.55); display: block; text-transform: uppercase; }
.vlplp-lc-member { position: relative; z-index: 1; }
.vlplp-lc-name { font-size: 12px; font-weight: 700; margin-top: 1px; display: block; }
.vlplp-lc-number { font-family: 'Courier New', monospace; font-size: 15px; letter-spacing: .1em; color: var(--vlplp-accent); margin-top: 5px; position: relative; z-index: 1; }
.vlplp-lc-footer { display: flex; justify-content: space-between; align-items: flex-end; position: relative; z-index: 1; margin-top: 5px; }
.vlplp-lc-expires { font-size: 11px; font-weight: 700; display: block; margin-top: 1px; }
.vlplp-lc-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vlplp-lc-qr-wrap canvas { background: #fff; border-radius: 5px; padding: 3px; border: 1px solid var(--vlplp-accent); }
.vlplp-lc-qr-caption { font-size: 5px; letter-spacing: .1em; color: var(--vlplp-accent); text-transform: uppercase; }

/* ---------- Confirm / success boxes ---------- */
.vlplp-confirm-box, .vlplp-success-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 22px; margin: 16px 0; }
.vlplp-confirm-box table { width: 100%; border-collapse: collapse; }
.vlplp-confirm-box td { padding: 8px 0; border-bottom: 1px solid #f0f1f3; }
.vlplp-confirm-box td:first-child { color: var(--vlplp-muted); }
.vlplp-success-box { text-align: center; }
.vlplp-success-icon { font-size: 42px; color: #16794a; }

/* ---------- Stat cards (vendor dashboard overview) ---------- */
.vlplp-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px;
	margin-bottom: 20px;
}
.vlplp-stat-card {
	background: linear-gradient(160deg, var(--vlplp-primary) 0%, var(--vlplp-secondary) 100%);
	color: #fff;
	border-radius: 14px;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	box-shadow: 0 6px 18px rgba(11,24,48,.15);
}
.vlplp-stat-card.vlplp-stat-accent {
	background: linear-gradient(160deg, #8a6a1a 0%, #4a3b0f 100%);
}
.vlplp-stat-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .08em;
	opacity: .75;
}
.vlplp-stat-value {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

/* ---------- Tab navigation (vendor dashboard) ---------- */
.vlplp-tabs {
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	display: flex;
	gap: 4px;
	padding: 0 16px;
	overflow-x: auto;
	position: sticky;
	top: 61px;
	z-index: 15;
}
.vlplp-tab {
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	padding: 14px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--vlplp-muted);
	cursor: pointer;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 6px;
}
.vlplp-tab:hover { color: var(--vlplp-primary); }
.vlplp-tab.active { color: var(--vlplp-primary); border-bottom-color: var(--vlplp-accent); }
.vlplp-tab-count {
	background: #eef0f3; color: var(--vlplp-text); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700;
}
.vlplp-tab.active .vlplp-tab-count { background: var(--vlplp-primary); color: #fff; }

/* ---------- Employee management (vendor dashboard) ---------- */
.vlplp-list-row-wrap { flex-direction: column; align-items: stretch; gap: 10px; }
.vlplp-emp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.vlplp-emp-link-result input {
	width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; background: #f9fafb;
}

/* ---------- Labeled info grid (company details tab) ---------- */
.vlplp-info-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px 24px;
	margin-top: 8px;
}
.vlplp-info-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-bottom: 14px;
	border-bottom: 1px solid #f0f1f3;
}
.vlplp-info-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--vlplp-muted);
	font-weight: 600;
}
.vlplp-info-value {
	font-size: 15px;
	color: var(--vlplp-text);
	line-height: 1.5;
}
.vlplp-info-value code {
	background: #f3f4f6;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 13px;
}
@media (max-width: 640px) {
	.vlplp-info-grid { grid-template-columns: 1fr; }
}

/* ---------- Panels used in vendor dashboard ---------- */
.vlplp-panel-portal { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 20px; margin-bottom: 18px; }
.vlplp-panel-portal h2 { margin-top: 0; font-size: 16px; color: var(--vlplp-primary); }
.vlplp-table-scroll { overflow-x: auto; }
.vlplp-table-portal { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.vlplp-table-portal th { text-align: left; padding: 8px 10px; background: #f9fafb; font-weight: 600; }
.vlplp-table-portal td { padding: 8px 10px; border-bottom: 1px solid #f0f1f3; }
.vlplp-pagination { display: flex; gap: 6px; margin-top: 14px; }
.vlplp-pagination a { padding: 6px 12px; border-radius: 8px; background: #f3f4f6; text-decoration: none; color: var(--vlplp-text); }
.vlplp-pagination a.current { background: var(--vlplp-primary); color: #fff; }

.vlplp-alert { padding: 12px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 4px; }
.vlplp-alert-warning { background: #fdf0dc; color: #7a4b0a; }

.vlplp-scan-wrap { display: flex; flex-direction: column; gap: 12px; align-items: center; }
#vlplp-scan-video { width: 100%; max-width: 420px; border-radius: 16px; background: #000; aspect-ratio: 1/1; object-fit: cover; }

.vlplp-customer-summary { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.vlplp-customer-summary .name { font-size: 18px; font-weight: 700; }
.vlplp-customer-summary .balance { font-size: 26px; font-weight: 800; color: var(--vlplp-primary); margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.vlplp-main { padding: 14px; }
	.vlplp-topbar { padding: 12px 14px; }
	.vlplp-action-grid { grid-template-columns: repeat(2, 1fr); }
}
