/* ==========================================================================
   Private Storage Shipping – Secure Vault Portal
   All selectors are scoped under .pss-vault to avoid leaking into the
   rest of the WordPress site's styling.
   ========================================================================== */

.pss-vault {
	--pss-primary: #d4af37;
	--pss-primary-soft: rgba(212, 175, 55, 0.15);
	--pss-background: #0a0e17;
	--pss-surface: #121826;
	--pss-surface-2: #182135;
	--pss-border: rgba(255, 255, 255, 0.08);
	--pss-text: #eef1f7;
	--pss-muted: #93a0b8;
	--pss-success: #34c78e;
	--pss-danger: #ef5a6f;
	--pss-warning: #f0b429;
	--pss-radius: 14px;
	--pss-radius-sm: 8px;
	--pss-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
	--pss-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	all: initial;
	font-family: var(--pss-font);
	color: var(--pss-text);
	display: block;
	background: var(--pss-background);
	min-height: 100vh;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

.pss-vault, .pss-vault * { box-sizing: border-box; }
.pss-vault a { color: var(--pss-primary); text-decoration: none; cursor: pointer; }
.pss-vault button { font-family: inherit; cursor: pointer; }
.pss-vault h1, .pss-vault h2, .pss-vault h3, .pss-vault p, .pss-vault dl, .pss-vault dd, .pss-vault dt, .pss-vault ul { margin: 0; padding: 0; }
.pss-vault ul { list-style: none; }
.pss-vault input, .pss-vault textarea, .pss-vault select {
	font-family: inherit;
	color: var(--pss-text);
	background: var(--pss-surface-2);
	border: 1px solid var(--pss-border);
	border-radius: var(--pss-radius-sm);
	padding: 12px 14px;
	font-size: 14px;
	width: 100%;
	display: block;
	margin-bottom: 16px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.pss-vault input:focus, .pss-vault textarea:focus, .pss-vault select:focus {
	outline: none;
	border-color: var(--pss-primary);
	box-shadow: 0 0 0 3px var(--pss-primary-soft);
}
.pss-vault label { display: block; font-size: 13px; color: var(--pss-muted); margin-bottom: 6px; font-weight: 500; }
.pss-muted { color: var(--pss-muted); }

/* ---------- Buttons ---------- */
.pss-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 20px; border-radius: var(--pss-radius-sm); border: 1px solid var(--pss-border);
	background: var(--pss-surface-2); color: var(--pss-text); font-size: 14px; font-weight: 600;
	transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
	min-height: 44px;
}
.pss-btn:hover { transform: translateY(-1px); }
.pss-btn:active { transform: translateY(0); }
.pss-btn-primary { background: linear-gradient(135deg, var(--pss-primary), #b9922a); color: #16130a; border: none; }
.pss-btn-primary:hover { box-shadow: 0 6px 18px rgba(212,175,55,.35); }
.pss-btn-ghost { background: transparent; }
.pss-btn-block { width: 100%; }
.pss-btn-small { padding: 7px 14px; min-height: 36px; font-size: 13px; }
.pss-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Login screen ---------- */
.pss-login-shell {
	display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh;
}
.pss-login-brand {
	background: radial-gradient(circle at 20% 20%, #16213a 0%, #0a0e17 70%);
	display: flex; align-items: center; padding: 60px;
	border-right: 1px solid var(--pss-border);
}
.pss-login-brand-inner { max-width: 420px; }
.pss-brand-mark { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .12em; font-size: 13px; color: var(--pss-muted); margin-bottom: 28px; }
.pss-brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pss-success); box-shadow: 0 0 8px var(--pss-success); display: inline-block; }
.pss-login-brand-inner h1 { font-size: 40px; font-weight: 700; margin-bottom: 14px; line-height: 1.15; }
.pss-login-brand-inner p { color: var(--pss-muted); font-size: 16px; margin-bottom: 30px; }
.pss-brand-points { display: flex; flex-direction: column; gap: 14px; }
.pss-brand-points li { padding-left: 26px; position: relative; color: var(--pss-text); font-size: 14px; }
.pss-brand-points li::before { content: "✓"; position: absolute; left: 0; color: var(--pss-primary); font-weight: 700; }

.pss-login-card-wrap { display: flex; align-items: center; justify-content: center; padding: 40px; }
.pss-login-card {
	width: 100%; max-width: 380px; background: var(--pss-surface); border: 1px solid var(--pss-border);
	border-radius: var(--pss-radius); padding: 36px 32px; box-shadow: var(--pss-shadow);
}
.pss-login-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.pss-login-sub { color: var(--pss-muted); font-size: 13px; margin-bottom: 26px; }
.pss-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: -6px 0 20px; }
.pss-remember input { width: auto; margin: 0; }
.pss-login-footer { text-align: center; margin-top: 18px; font-size: 13px; }
.pss-forgot-message { margin-top: 12px; color: var(--pss-muted); font-size: 13px; background: var(--pss-surface-2); padding: 12px; border-radius: var(--pss-radius-sm); }

.pss-alert { padding: 10px 14px; border-radius: var(--pss-radius-sm); font-size: 13px; margin-bottom: 16px; }
.pss-alert-error { background: rgba(239,90,111,.12); color: #ff8d9c; border: 1px solid rgba(239,90,111,.3); }
.pss-alert-success { background: rgba(52,199,142,.12); color: #6fe3b4; border: 1px solid rgba(52,199,142,.3); }

/* ---------- Header / Nav ---------- */
.pss-header {
	display: flex; align-items: center; gap: 28px; padding: 16px 32px;
	background: var(--pss-surface); border-bottom: 1px solid var(--pss-border);
	position: sticky; top: 0; z-index: 20;
}
.pss-header-brand { font-weight: 700; letter-spacing: .1em; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.pss-nav { display: flex; gap: 6px; flex: 1; }
.pss-nav-link { padding: 9px 14px; border-radius: 8px; font-size: 14px; color: var(--pss-muted); font-weight: 500; }
.pss-nav-link.is-active, .pss-nav-link:hover { background: var(--pss-surface-2); color: var(--pss-text); }
.pss-header-right { display: flex; align-items: center; gap: 14px; }
.pss-owner-chip { text-align: right; line-height: 1.3; }
.pss-owner-chip strong { display: block; font-size: 13px; }
.pss-owner-chip span { font-size: 12px; color: var(--pss-muted); }
.pss-hamburger { display: none; background: none; border: none; color: var(--pss-text); font-size: 22px; }
.pss-mobile-nav { display: none; flex-direction: column; background: var(--pss-surface); border-bottom: 1px solid var(--pss-border); padding: 8px; }
.pss-mobile-nav a, .pss-mobile-nav button { padding: 12px 14px; color: var(--pss-text); text-align: left; background: none; border: none; font-size: 15px; }

/* ---------- Main / Tabs ---------- */
.pss-main { max-width: 1120px; margin: 0 auto; padding: 32px 24px 80px; }
.pss-tab-panel { display: none; }
.pss-tab-panel.is-active { display: block; animation: pss-fade .2s ease; }
@keyframes pss-fade { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: none; } }

.pss-welcome { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.pss-welcome h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.pss-secure-indicator { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pss-success); background: rgba(52,199,142,.1); padding: 8px 14px; border-radius: 20px; border: 1px solid rgba(52,199,142,.25); }
.pss-dot-green { width: 7px; height: 7px; border-radius: 50%; background: var(--pss-success); box-shadow: 0 0 6px var(--pss-success); }

.pss-section-title { font-size: 16px; font-weight: 700; margin: 30px 0 14px; }
.pss-panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.pss-panel-heading h2 { font-size: 20px; font-weight: 700; }
.pss-panel-heading input[type=search] { max-width: 260px; margin-bottom: 0; }

/* ---------- Stat cards ---------- */
.pss-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pss-stat-card {
	background: var(--pss-surface); border: 1px solid var(--pss-border); border-radius: var(--pss-radius);
	padding: 20px; transition: transform .15s ease, border-color .15s ease;
}
.pss-stat-card:hover { transform: translateY(-2px); border-color: rgba(212,175,55,.4); }
.pss-stat-card strong { display: block; font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.pss-stat-card span { font-size: 13px; color: var(--pss-muted); }

/* ---------- Item cards ---------- */
.pss-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.pss-item-card {
	background: var(--pss-surface); border: 1px solid var(--pss-border); border-radius: var(--pss-radius);
	padding: 20px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pss-item-card:hover { transform: translateY(-3px); box-shadow: var(--pss-shadow); border-color: rgba(212,175,55,.35); }
.pss-item-card-top { display: flex; align-items: center; justify-content: space-between; }
.pss-item-icon { font-size: 22px; }
.pss-item-type { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--pss-muted); font-weight: 700; }
.pss-item-title { font-size: 16px; font-weight: 700; }
.pss-item-desc { font-size: 13px; color: var(--pss-muted); line-height: 1.5; }
.pss-item-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--pss-muted); }
.pss-item-card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--pss-border); }

/* ---------- Badges ---------- */
.pss-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .03em; background: var(--pss-surface-2); color: var(--pss-text); border: 1px solid var(--pss-border); }
.pss-badge-active, .pss-badge-approved { color: var(--pss-success); border-color: rgba(52,199,142,.35); background: rgba(52,199,142,.1); }
.pss-badge-suspended, .pss-badge-rejected, .pss-badge-expired { color: var(--pss-danger); border-color: rgba(239,90,111,.35); background: rgba(239,90,111,.1); }
.pss-badge-pending { color: var(--pss-warning); border-color: rgba(240,180,41,.35); background: rgba(240,180,41,.12); }

/* ---------- Empty states ---------- */
.pss-empty-state { text-align: center; padding: 60px 20px; color: var(--pss-muted); background: var(--pss-surface); border: 1px dashed var(--pss-border); border-radius: var(--pss-radius); }
.pss-empty-state p:first-child { color: var(--pss-text); font-weight: 600; margin-bottom: 6px; }

/* ---------- File list ---------- */
.pss-file-list { display: flex; flex-direction: column; gap: 10px; }
.pss-file-row { display: flex; align-items: center; justify-content: space-between; background: var(--pss-surface); border: 1px solid var(--pss-border); border-radius: var(--pss-radius-sm); padding: 14px 16px; gap: 12px; flex-wrap: wrap; }
.pss-file-info { display: flex; align-items: center; gap: 12px; }
.pss-file-icon { font-size: 20px; }
.pss-file-meta { display: block; font-size: 12px; color: var(--pss-muted); }
.pss-file-actions { display: flex; gap: 8px; }

/* ---------- Timeline ---------- */
.pss-timeline { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 24px; }
.pss-timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--pss-border); }
.pss-timeline-item { position: relative; padding: 14px 0; }
.pss-timeline-dot { position: absolute; left: -24px; top: 18px; width: 9px; height: 9px; border-radius: 50%; background: var(--pss-primary); }
.pss-timeline-time { font-size: 12px; color: var(--pss-muted); margin-top: 2px; }

/* ---------- Profile ---------- */
.pss-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pss-panel-card { background: var(--pss-surface); border: 1px solid var(--pss-border); border-radius: var(--pss-radius); padding: 24px; }
.pss-panel-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 18px; }
.pss-def-list dt { font-size: 12px; color: var(--pss-muted); margin-top: 12px; }
.pss-def-list dt:first-child { margin-top: 0; }
.pss-def-list dd { font-size: 14px; font-weight: 600; margin: 2px 0 0; }

/* ---------- Modals ---------- */
.pss-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pss-modal[hidden] { display: none; }
.pss-modal-backdrop { position: absolute; inset: 0; background: rgba(4,6,12,.7); backdrop-filter: blur(2px); }
.pss-modal-content { position: relative; background: var(--pss-surface); border: 1px solid var(--pss-border); border-radius: var(--pss-radius); padding: 28px; max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto; box-shadow: var(--pss-shadow); }
.pss-modal-narrow { max-width: 440px; }
.pss-modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; color: var(--pss-muted); font-size: 22px; line-height: 1; }

/* ---------- Toast ---------- */
.pss-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--pss-surface-2); border: 1px solid var(--pss-border); padding: 14px 22px; border-radius: 10px; font-size: 14px; box-shadow: var(--pss-shadow); z-index: 200; }
.pss-toast[hidden] { display: none; }

.pss-security-note { text-align: center; font-size: 12px; color: var(--pss-muted); margin-top: 34px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.pss-login-shell { grid-template-columns: 1fr; }
	.pss-login-brand { display: none; }
	.pss-stat-grid { grid-template-columns: repeat(2, 1fr); }
	.pss-profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
	.pss-nav, .pss-header-right { display: none; }
	.pss-hamburger { display: block; margin-left: auto; }
	.pss-mobile-nav.is-open { display: flex; }
	.pss-main { padding: 22px 16px 60px; }
	.pss-item-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.pss-stat-grid { grid-template-columns: 1fr 1fr; }
	.pss-login-card { padding: 26px 20px; }
}

.pss-stat-grid-small { grid-template-columns: repeat(3, 1fr); max-width: 500px; margin: 16px 0 24px; }

/* ---------- Admin-side reuse of a few tokens (wp-admin pages) ---------- */
.pss-admin-wrap .pss-stat-grid { grid-template-columns: repeat(6, 1fr); margin: 20px 0; }
.pss-admin-wrap .pss-stat-card { background: #fff; border: 1px solid #dcdcde; border-radius: 8px; padding: 16px; display: flex; align-items: center; gap: 12px; }
.pss-admin-wrap .pss-stat-card strong { font-size: 22px; color: #1d2327; }
.pss-admin-wrap .pss-stat-card span { color: #646970; font-size: 12px; }
.pss-admin-wrap .pss-stat-good strong { color: #1e8a5f; }
.pss-admin-wrap .pss-stat-warn strong { color: #b32d2e; }
.pss-admin-wrap .pss-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.pss-admin-wrap .pss-col h2 { margin-bottom: 10px; }
.pss-admin-wrap .pss-panel { background: #fff; border: 1px solid #dcdcde; border-radius: 8px; padding: 22px; margin-top: 18px; max-width: 900px; }
.pss-admin-wrap .pss-panel-success { border-left: 4px solid #1e8a5f; }
.pss-admin-wrap .pss-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; background: #f0f0f1; }
.pss-admin-wrap .pss-badge-active { background: #d8f3e6; color: #1e8a5f; }
.pss-admin-wrap .pss-badge-suspended, .pss-admin-wrap .pss-badge-expired { background: #fbe1e2; color: #b32d2e; }
.pss-admin-wrap .pss-badge-pending { background: #fdf0d5; color: #966b12; }
.pss-admin-wrap .pss-badge-approved { background: #d8f3e6; color: #1e8a5f; }
.pss-admin-wrap .pss-badge-rejected { background: #fbe1e2; color: #b32d2e; }
.pss-admin-wrap .pss-filter-bar { margin: 16px 0; display: flex; gap: 8px; align-items: center; }
.pss-admin-wrap .pss-pagination { margin-top: 14px; display: flex; gap: 6px; }
.pss-admin-wrap .pss-pagination a { padding: 6px 12px; border: 1px solid #dcdcde; border-radius: 4px; background: #fff; }
.pss-admin-wrap .pss-pagination a.current { background: #2271b1; color: #fff; border-color: #2271b1; }
.pss-admin-wrap .pss-link-delete, .pss-admin-wrap .button-link-delete { color: #b32d2e; }
.pss-admin-wrap .pss-truncate { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
	.pss-admin-wrap .pss-stat-grid { grid-template-columns: repeat(2, 1fr); }
	.pss-admin-wrap .pss-columns { grid-template-columns: 1fr; }
}
