/* ============================================================
   CualityX Password Manager - Premium Dark Theme
   All selectors scoped under #win-passwords
   ============================================================ */

/* --- CSS Variables --- */
#win-passwords {
  --pw-bg: #0b0e18;
  --pw-side: #0f1320;
  --pw-card: #151a2e;
  --pw-card-hover: #1c2240;
  --pw-border: rgba(255,255,255,0.06);
  --pw-text: #e8eaf0;
  --pw-muted: #6b7394;
  --pw-accent: #6366f1;
  --pw-accent-hover: #818cf8;
  --pw-accent-glow: rgba(99,102,241,0.15);
  --pw-danger: #ef4444;
  --pw-success: #10b981;
  --pw-warn: #f59e0b;
  --pw-radius: 10px;
  --pw-font: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset --- */
#win-passwords *,
#win-passwords *::before,
#win-passwords *::after {
  box-sizing: border-box;
}

/* --- Global font family for inputs --- */
#win-passwords input,
#win-passwords select,
#win-passwords textarea {
  font-family: var(--pw-font);
}

/* --- Scrollbar --- */
#win-passwords * {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

#win-passwords ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#win-passwords ::-webkit-scrollbar-track {
  background: transparent;
}

#win-passwords ::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
}

#win-passwords ::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.14);
}


/* ============================================================
   1. pw-root
   ============================================================ */
#win-passwords .pw-root {
  height: 100%;
  overflow: hidden;
  font-family: var(--pw-font);
  color: var(--pw-text);
  background: var(--pw-bg);
  position: relative;
}


/* ============================================================
   2. LOCK SCREEN
   ============================================================ */

/* --- pw-lock --- */
#win-passwords .pw-lock {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

/* --- pw-lock-bg --- */
#win-passwords .pw-lock-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(99,102,241,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(139,92,246,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(15,19,32,1) 0%, #0b0e18 100%);
  background-size: 200% 200%;
  animation: pwLockBgShift 12s ease-in-out infinite alternate;
}

/* --- pw-lock-card (frosted glass) --- */
#win-passwords .pw-lock-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: rgba(21,26,46,0.65);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow:
    0 24px 48px rgba(0,0,0,0.45),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  text-align: center;
  animation: pwSlideUp 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

#win-passwords .pw-lock-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#win-passwords .pw-lock-card p {
  margin: 0 0 24px;
  color: var(--pw-muted);
  font-size: 13px;
  line-height: 1.55;
}

/* --- pw-lock-shield (animated icon circle) --- */
#win-passwords .pw-lock-shield {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pw-accent), #818cf8);
  box-shadow: 0 0 28px var(--pw-accent-glow), 0 0 60px rgba(99,102,241,0.08);
  font-size: 30px;
  color: #fff;
  animation: pwShieldPulse 2.4s ease-in-out infinite;
  position: relative;
}

#win-passwords .pw-lock-shield::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(99,102,241,0.2);
  animation: pwShieldRing 2.4s ease-in-out infinite;
}

/* --- pw-lock-form --- */
#win-passwords .pw-lock-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

/* --- pw-field (form inputs) --- */
#win-passwords .pw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

#win-passwords .pw-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pw-muted);
}

#win-passwords .pw-field input,
#win-passwords .pw-field select,
#win-passwords .pw-field textarea {
  width: 100%;
  background: rgba(11,14,24,0.7);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  color: var(--pw-text);
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--pw-font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

#win-passwords .pw-field input:focus,
#win-passwords .pw-field select:focus,
#win-passwords .pw-field textarea:focus {
  border-color: var(--pw-accent);
  box-shadow: 0 0 0 3px var(--pw-accent-glow);
}

#win-passwords .pw-field input::placeholder {
  color: var(--pw-muted);
  opacity: 0.55;
}

/* --- pw-field-input-wrap --- */
#win-passwords .pw-field-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

#win-passwords .pw-field-input-wrap input {
  padding-right: 42px;
}

/* --- pw-eye-btn --- */
#win-passwords .pw-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--pw-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: grid;
  place-items: center;
  line-height: 1;
}

#win-passwords .pw-eye-btn:hover {
  color: var(--pw-text);
  background: rgba(255,255,255,0.06);
}

/* --- pw-strength-mini --- */
#win-passwords .pw-strength-mini {
  height: 4px;
  width: 100%;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-top: 4px;
}

#win-passwords .pw-strength-mini-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pw-danger), var(--pw-warn), var(--pw-success));
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* --- pw-btn-main (primary CTA) --- */
#win-passwords .pw-btn-main {
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--pw-font);
  color: #fff;
  background: linear-gradient(135deg, var(--pw-accent), #818cf8);
  border: none;
  border-radius: var(--pw-radius);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.15s;
  box-shadow: 0 4px 14px rgba(99,102,241,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#win-passwords .pw-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(99,102,241,0.35);
  filter: brightness(1.08);
}

#win-passwords .pw-btn-main:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99,102,241,0.2);
}

/* --- pw-btn-ghost --- */
#win-passwords .pw-btn-ghost {
  background: transparent;
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  color: var(--pw-muted);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--pw-font);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#win-passwords .pw-btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  color: var(--pw-text);
  border-color: rgba(255,255,255,0.12);
}

/* --- pw-lock-links --- */
#win-passwords .pw-lock-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
}

#win-passwords .pw-lock-links a,
#win-passwords .pw-lock-links button {
  background: none;
  border: none;
  color: var(--pw-accent);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--pw-font);
  text-decoration: none;
  transition: color 0.15s;
  padding: 0;
}

#win-passwords .pw-lock-links a:hover,
#win-passwords .pw-lock-links button:hover {
  color: var(--pw-accent-hover);
  text-decoration: underline;
}

#win-passwords .pw-lock-links .pw-sep {
  color: rgba(255,255,255,0.12);
}

/* --- pw-pin-dots --- */
#win-passwords .pw-pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px 0;
}

#win-passwords .pw-pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: transparent;
  transition: all 0.2s;
}

#win-passwords .pw-pin-dot.filled {
  background: var(--pw-accent);
  border-color: var(--pw-accent);
  box-shadow: 0 0 10px var(--pw-accent-glow);
}

/* --- pw-pin-hidden-input --- */
#win-passwords .pw-pin-hidden-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* --- pw-setup-extra (details/summary accordion) --- */
#win-passwords .pw-setup-extra {
  margin-top: 8px;
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  overflow: hidden;
}

#win-passwords .pw-setup-extra summary {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
  user-select: none;
}

#win-passwords .pw-setup-extra summary::-webkit-details-marker {
  display: none;
}

#win-passwords .pw-setup-extra summary::before {
  content: '\25B6';
  font-size: 8px;
  transition: transform 0.2s;
}

#win-passwords .pw-setup-extra[open] summary::before {
  transform: rotate(90deg);
}

#win-passwords .pw-setup-extra summary:hover {
  color: var(--pw-text);
}

#win-passwords .pw-setup-extra-body {
  padding: 12px 14px;
  border-top: 1px solid var(--pw-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- pw-lock-msg --- */
#win-passwords .pw-lock-msg {
  margin-top: 12px;
  min-height: 20px;
  font-size: 12px;
  text-align: center;
  border-radius: 6px;
  padding: 0;
  transition: all 0.2s;
}

#win-passwords .pw-lock-msg.error {
  color: var(--pw-danger);
}

#win-passwords .pw-lock-msg.success {
  color: var(--pw-success);
}


/* ============================================================
   3. MAIN APP LAYOUT
   ============================================================ */

/* --- pw-app (sidebar + main row) --- */
#win-passwords .pw-app {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
}

/* --- pw-side (sidebar 220px) --- */
#win-passwords .pw-side {
  width: 220px;
  min-width: 220px;
  background: var(--pw-side);
  border-right: 1px solid var(--pw-border);
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  gap: 8px;
  overflow-y: auto;
  flex-shrink: 0;
}

/* --- pw-side-brand --- */
#win-passwords .pw-side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 14px;
}

#win-passwords .pw-side-brand-icon,
#win-passwords .pw-side-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--pw-accent), #818cf8);
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

#win-passwords .pw-side-logo svg {
  color: white;
}

#win-passwords .pw-side-brand-text,
#win-passwords .pw-side-title {
  display: flex;
  flex-direction: column;
}

#win-passwords .pw-side-brand-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--pw-text);
}

#win-passwords .pw-side-brand-text span {
  font-size: 10px;
  color: var(--pw-muted);
  letter-spacing: 0.3px;
}

/* --- pw-side-nav --- */
#win-passwords .pw-side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

/* --- pw-side-btn (nav button) --- */
#win-passwords .pw-side-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--pw-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--pw-font);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  position: relative;
  white-space: nowrap;
}

#win-passwords .pw-side-btn i,
#win-passwords .pw-side-btn .pw-side-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

#win-passwords .pw-side-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

#win-passwords .pw-side-btn span:first-of-type {
  flex: 1;
}

#win-passwords .pw-side-btn:hover {
  background: rgba(255,255,255,0.04);
  color: var(--pw-text);
}

#win-passwords .pw-side-btn.active {
  background: var(--pw-accent-glow);
  color: var(--pw-accent);
  border-left-color: var(--pw-accent);
  font-weight: 600;
}

#win-passwords .pw-side-btn.active svg {
  opacity: 1;
  color: var(--pw-accent);
}

/* --- pw-side-count (badge) --- */
#win-passwords .pw-side-count {
  margin-left: auto;
  background: rgba(255,255,255,0.06);
  color: var(--pw-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
}

#win-passwords .pw-side-btn.active .pw-side-count {
  background: var(--pw-accent-glow);
  color: var(--pw-accent);
}

/* --- pw-side-divider --- */
#win-passwords .pw-side-divider {
  height: 1px;
  background: var(--pw-border);
  margin: 8px 12px;
}

/* --- pw-side-bottom --- */
#win-passwords .pw-side-bottom {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--pw-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* --- pw-side-lock --- */
#win-passwords .pw-side-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(239,68,68,0.06);
  border: none;
  border-radius: 8px;
  color: var(--pw-danger);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--pw-font);
  cursor: pointer;
  transition: all 0.15s;
}

#win-passwords .pw-side-lock:hover {
  background: rgba(239,68,68,0.12);
}


/* ============================================================
   4. MAIN CONTENT AREA
   ============================================================ */

/* --- pw-main --- */
#win-passwords .pw-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--pw-bg);
}

/* --- pw-topbar (sticky header) --- */
#win-passwords .pw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--pw-border);
  background: rgba(11,14,24,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

#win-passwords .pw-topbar-left,
#win-passwords .pw-top-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#win-passwords .pw-topbar-left h2,
#win-passwords .pw-top-left h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--pw-text);
}

#win-passwords .pw-topbar-left span,
#win-passwords .pw-top-left span {
  font-size: 12px;
  color: var(--pw-muted);
}

#win-passwords .pw-topbar-actions,
#win-passwords .pw-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- pw-search-box --- */
#win-passwords .pw-search-box {
  position: relative;
  width: 220px;
}

#win-passwords .pw-search-box i,
#win-passwords .pw-search-box .pw-search-icon,
#win-passwords .pw-search-box svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pw-muted);
  font-size: 13px;
  pointer-events: none;
}

#win-passwords .pw-search-box input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  border-radius: 99px;
  color: var(--pw-text);
  font-size: 13px;
  font-family: var(--pw-font);
  outline: none;
  transition: all 0.2s;
}

#win-passwords .pw-search-box input::placeholder {
  color: var(--pw-muted);
  opacity: 0.6;
}

#win-passwords .pw-search-box input:focus {
  background: rgba(11,14,24,0.9);
  border-color: var(--pw-accent);
  box-shadow: 0 0 0 3px var(--pw-accent-glow);
}

/* --- pw-btn-add --- */
#win-passwords .pw-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--pw-accent);
  color: #fff;
  border: none;
  border-radius: var(--pw-radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--pw-font);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

#win-passwords .pw-btn-add:hover {
  background: var(--pw-accent-hover);
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
  transform: translateY(-1px);
}

#win-passwords .pw-btn-add:active {
  transform: translateY(0);
}

/* --- pw-content-area --- */
#win-passwords .pw-content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* --- pw-view --- */
#win-passwords .pw-view {
  display: none;
  flex-direction: column;
  flex: 1;
  height: 100%;
  overflow: hidden;
  padding: 20px 24px;
  animation: pwFadeIn 0.25s ease;
}

#win-passwords .pw-view[style*="display:none"],
#win-passwords .pw-view[style*="display: none"] {
  display: none !important;
}

#win-passwords .pw-view.active {
  display: flex !important;
}


/* ============================================================
   5. VAULT VIEW - KPI, filters, split
   ============================================================ */

/* --- pw-kpi-bar --- */
#win-passwords .pw-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

#win-passwords .pw-kpi {
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s, border-color 0.15s;
}

#win-passwords .pw-kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.1);
}

#win-passwords .pw-kpi strong {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

#win-passwords .pw-kpi span {
  font-size: 11px;
  color: var(--pw-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* --- pw-kpi-card (JS-rendered variant) --- */
#win-passwords .pw-kpi-card {
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#win-passwords .pw-kpi-card strong {
  font-size: 24px;
  font-weight: 700;
  color: var(--pw-text);
  line-height: 1;
}

#win-passwords .pw-kpi-card span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pw-muted);
}

/* --- pw-filter-bar --- */
#win-passwords .pw-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

#win-passwords .pw-filter-bar select {
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: 8px;
  color: var(--pw-text);
  padding: 7px 28px 7px 10px;
  font-size: 12px;
  font-family: var(--pw-font);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7394'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

#win-passwords .pw-filter-bar select:focus {
  border-color: var(--pw-accent);
}


/* ============================================================
   6. SPLIT VIEW (list + detail)
   ============================================================ */

/* --- pw-split --- */
#win-passwords .pw-split {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* --- pw-list-col --- */
#win-passwords .pw-list-col {
  width: 320px;
  min-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid var(--pw-border);
  padding: 8px;
}

/* --- pw-detail-col --- */
#win-passwords .pw-detail-col {
  flex: 1;
  min-width: 0;
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: 14px;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

/* --- pw-list --- */
#win-passwords .pw-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  max-height: 100%;
  padding-right: 4px;
}


/* ============================================================
   7. LIST ITEMS
   ============================================================ */

/* --- pw-item (vault list items, JS-rendered) --- */
#win-passwords .pw-item {
  padding: 12px 14px;
  border-radius: var(--pw-radius);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  color: var(--pw-text);
}

#win-passwords .pw-item:hover {
  background: var(--pw-card);
  border-color: var(--pw-border);
}

#win-passwords .pw-item.active {
  background: var(--pw-accent-glow);
  border-color: var(--pw-accent);
  border-left: 3px solid var(--pw-accent);
}

#win-passwords .pw-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#win-passwords .pw-item-top strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

#win-passwords .pw-item-meta {
  font-size: 11px;
  color: var(--pw-muted);
  margin-top: 4px;
}

#win-passwords .pw-item-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- pw-list-item (email/note list items) --- */
#win-passwords .pw-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  border-radius: var(--pw-radius);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}

#win-passwords .pw-list-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  transform: translateX(3px);
}

#win-passwords .pw-list-item.active {
  background: var(--pw-accent-glow);
  border-color: var(--pw-accent);
  border-left: 3px solid var(--pw-accent);
  box-shadow: 0 4px 16px rgba(99,102,241,0.12);
}

#win-passwords .pw-list-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--pw-accent), #818cf8);
  box-shadow: 0 3px 8px rgba(99,102,241,0.2);
}

#win-passwords .pw-list-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

#win-passwords .pw-list-item-info strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#win-passwords .pw-list-item-info span {
  font-size: 11px;
  color: var(--pw-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#win-passwords .pw-list-item-fav {
  font-size: 14px;
  color: rgba(255,255,255,0.12);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}

#win-passwords .pw-list-item-fav.active {
  color: var(--pw-warn);
}

#win-passwords .pw-list-item-fav:hover {
  transform: scale(1.2);
}

#win-passwords .pw-list-item-strength {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- pw-item-email-icon --- */
#win-passwords .pw-item-email-icon {
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* --- pw-item-info (email/note info column) --- */
#win-passwords .pw-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* --- pw-item-badge --- */
#win-passwords .pw-item-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  color: var(--pw-muted);
}

/* --- pw-empty --- */
#win-passwords .pw-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--pw-muted);
  font-size: 13px;
}


/* ============================================================
   8. DETAIL VIEW
   ============================================================ */

/* --- pw-empty-state --- */
#win-passwords .pw-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  flex: 1;
  color: var(--pw-muted);
  height: 100%;
}

#win-passwords .pw-empty-state-icon {
  font-size: 48px;
  opacity: 0.35;
  margin-bottom: 16px;
}

#win-passwords .pw-empty-state svg {
  opacity: 0.2;
  margin-bottom: 16px;
}

#win-passwords .pw-empty-state h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--pw-text);
}

#win-passwords .pw-empty-state h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--pw-text);
}

#win-passwords .pw-empty-state p {
  margin: 0;
  font-size: 13px;
  color: var(--pw-muted);
  max-width: 260px;
  line-height: 1.5;
}

/* --- pw-detail-header --- */
#win-passwords .pw-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pw-border);
  margin-bottom: 20px;
}

#win-passwords .pw-detail-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

#win-passwords .pw-detail-header span {
  font-size: 12px;
  color: var(--pw-muted);
}

/* --- pw-item-field (detail field cards) --- */
#win-passwords .pw-item-field {
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--pw-radius);
  margin-bottom: 10px;
  transition: background 0.15s, border-color 0.15s;
}

#win-passwords .pw-item-field:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

#win-passwords .pw-item-field label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pw-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

#win-passwords .pw-item-field div {
  font-size: 14px;
  font-weight: 500;
  color: var(--pw-text);
  word-break: break-all;
}

/* --- pw-field-row --- */
#win-passwords .pw-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* --- pw-field-value --- */
#win-passwords .pw-field-value {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--pw-text);
  word-break: break-all;
}

/* --- pw-item-actions --- */
#win-passwords .pw-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--pw-border);
}


/* ============================================================
   9. BUTTONS
   ============================================================ */

/* --- pw-btn (general button) --- */
#win-passwords .pw-btn {
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--pw-font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
  background: var(--pw-card);
  color: var(--pw-text);
}

#win-passwords .pw-btn:hover {
  background: var(--pw-card-hover);
  border-color: rgba(255,255,255,0.12);
}

#win-passwords .pw-btn.primary {
  background: var(--pw-accent);
  color: #fff;
  border-color: transparent;
}

#win-passwords .pw-btn.primary:hover {
  background: var(--pw-accent-hover);
  box-shadow: 0 4px 12px rgba(99,102,241,0.25);
}

#win-passwords .pw-btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--pw-muted);
}

#win-passwords .pw-btn.ghost:hover {
  background: rgba(255,255,255,0.04);
  color: var(--pw-text);
}

#win-passwords .pw-btn.ghost-danger {
  background: transparent;
  border: 1px solid rgba(239,68,68,0.2);
  color: var(--pw-danger);
}

#win-passwords .pw-btn.ghost-danger:hover {
  background: rgba(239,68,68,0.08);
  border-color: var(--pw-danger);
}

#win-passwords .pw-btn.full {
  width: 100%;
}

#win-passwords .pw-btn.icon-only {
  padding: 7px;
  width: 32px;
  height: 32px;
}

#win-passwords .pw-btn.sm-icon {
  padding: 5px;
  width: 26px;
  height: 26px;
  font-size: 12px;
}

/* --- pw-link-btn --- */
#win-passwords .pw-link-btn {
  background: none;
  border: none;
  color: var(--pw-accent);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--pw-font);
  text-decoration: underline;
  padding: 0;
  transition: color 0.15s;
}

#win-passwords .pw-link-btn:hover {
  color: var(--pw-accent-hover);
}


/* ============================================================
   10. GENERATOR VIEW
   ============================================================ */

/* --- pw-gen-wrap --- */
#win-passwords .pw-gen-wrap {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* --- pw-gen-hero --- */
#win-passwords .pw-gen-hero {
  background: linear-gradient(145deg, rgba(21,26,46,0.6), rgba(11,14,24,0.4));
  border: 1px solid var(--pw-border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

/* --- pw-gen-output-box --- */
#win-passwords .pw-gen-output-box {
  background: rgba(11,14,24,0.8);
  border: 1px solid var(--pw-border);
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

#win-passwords .pw-gen-output-box input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--pw-accent) !important;
  padding: 10px 0 !important;
  letter-spacing: 1.5px;
  outline: none;
  min-width: 0;
}

/* --- pw-gen-btns --- */
#win-passwords .pw-gen-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* --- pw-gen-action (circular icon buttons) --- */
#win-passwords .pw-gen-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--pw-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: all 0.15s;
}

#win-passwords .pw-gen-action:hover {
  background: var(--pw-accent-glow);
  color: var(--pw-accent);
  transform: scale(1.1);
}

/* --- pw-gen-strength-bar --- */
#win-passwords .pw-gen-strength-bar {
  margin-top: 16px;
}

#win-passwords .pw-gen-strength-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#win-passwords .pw-gen-strength-bar-header span {
  font-size: 12px;
  color: var(--pw-muted);
}

#win-passwords .pw-gen-strength-bar-header strong {
  font-size: 13px;
  font-weight: 600;
}

#win-passwords .pw-gen-strength-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

#win-passwords .pw-gen-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.175,0.885,0.32,1.275), background 0.3s;
}

/* --- pw-gen-config --- */
#win-passwords .pw-gen-config {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- pw-gen-slider-row --- */
#win-passwords .pw-gen-slider-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#win-passwords .pw-gen-slider-row label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#win-passwords .pw-gen-slider-row label span {
  background: var(--pw-accent-glow);
  color: var(--pw-accent);
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

#win-passwords .pw-gen-slider-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  cursor: pointer;
  border: none;
  padding: 0;
  outline: none;
}

#win-passwords .pw-gen-slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pw-accent);
  box-shadow: 0 0 8px rgba(99,102,241,0.4);
  cursor: pointer;
  transition: transform 0.15s;
}

#win-passwords .pw-gen-slider-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

#win-passwords .pw-gen-slider-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pw-accent);
  border: none;
  box-shadow: 0 0 8px rgba(99,102,241,0.4);
  cursor: pointer;
}

/* --- pw-gen-toggles (2-column grid) --- */
#win-passwords .pw-gen-toggles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* --- pw-toggle-card --- */
#win-passwords .pw-toggle-card {
  position: relative;
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

#win-passwords .pw-toggle-card:hover {
  transform: translateY(-3px);
  background: var(--pw-card-hover);
  border-color: rgba(255,255,255,0.1);
}

#win-passwords .pw-toggle-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

#win-passwords .pw-toggle-card-key {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--pw-muted);
  transition: all 0.2s;
}

#win-passwords .pw-toggle-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-muted);
}

#win-passwords .pw-toggle-card:has(input:checked) {
  border-color: var(--pw-accent);
  background: rgba(99,102,241,0.06);
  box-shadow: 0 0 16px rgba(99,102,241,0.08);
}

#win-passwords .pw-toggle-card:has(input:checked) .pw-toggle-card-key {
  background: var(--pw-accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(99,102,241,0.25);
}

#win-passwords .pw-toggle-card:has(input:checked) .pw-toggle-card-label {
  color: var(--pw-text);
}


/* ============================================================
   11. AUDIT VIEW
   ============================================================ */

/* --- pw-audit-wrap --- */
#win-passwords .pw-audit-wrap {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

/* --- pw-audit-hero --- */
#win-passwords .pw-audit-hero {
  display: flex;
  align-items: center;
  gap: 32px;
  background: linear-gradient(145deg, var(--pw-card), rgba(11,14,24,0.4));
  border: 1px solid var(--pw-border);
  border-radius: 18px;
  padding: 32px;
  margin-bottom: 24px;
}

#win-passwords .pw-audit-hero-info {
  flex: 1;
}

#win-passwords .pw-audit-hero-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#win-passwords .pw-audit-hero-info p {
  margin: 0 0 16px;
  color: var(--pw-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* --- pw-audit-ring (ring container) --- */
#win-passwords .pw-audit-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

/* --- pw-ring-svg (audit ring chart) --- */
#win-passwords .pw-ring-svg {
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  display: block;
}

#win-passwords .pw-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 6;
}

#win-passwords .pw-ring-fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease, stroke 0.4s;
}

#win-passwords .pw-ring-text {
  fill: #fff;
  font-family: var(--pw-font);
  font-size: 9px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
}

#win-passwords .pw-ring-label {
  display: block;
  text-align: center;
  color: var(--pw-muted);
  font-family: var(--pw-font);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* --- pw-audit-grid --- */
#win-passwords .pw-audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

/* --- pw-audit-stat --- */
#win-passwords .pw-audit-stat {
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s, border-color 0.15s;
}

#win-passwords .pw-audit-stat:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.12);
}

#win-passwords .pw-audit-stat strong {
  font-size: 28px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  color: #fff;
}

#win-passwords .pw-audit-stat span {
  font-size: 11px;
  color: var(--pw-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- pw-audit-issues --- */
#win-passwords .pw-audit-issues {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#win-passwords .pw-audit-issue {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  transition: background 0.15s, border-color 0.15s;
}

#win-passwords .pw-audit-issue:hover {
  background: var(--pw-card-hover);
  border-color: rgba(255,255,255,0.1);
}

#win-passwords .pw-audit-issue-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}

#win-passwords .pw-audit-issue-info {
  flex: 1;
  min-width: 0;
}

#win-passwords .pw-audit-issue-info strong {
  font-size: 13px;
  color: var(--pw-text);
  display: block;
  margin-bottom: 2px;
}

#win-passwords .pw-audit-issue-info span {
  font-size: 11px;
  color: var(--pw-muted);
}


/* ============================================================
   12. BACKUP VIEW
   ============================================================ */

/* --- pw-backup-wrap --- */
#win-passwords .pw-backup-wrap {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* --- pw-backup-grid --- */
#win-passwords .pw-backup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* --- pw-backup-card --- */
#win-passwords .pw-backup-card {
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

#win-passwords .pw-backup-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

#win-passwords .pw-backup-card h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--pw-text);
}

#win-passwords .pw-backup-card p {
  margin: 0;
  font-size: 12px;
  color: var(--pw-muted);
  line-height: 1.5;
  min-height: 36px;
}

/* --- pw-backup-ico --- */
#win-passwords .pw-backup-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--pw-accent-glow);
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--pw-accent);
  margin-bottom: 4px;
}


/* ============================================================
   13. SETTINGS VIEW
   ============================================================ */

/* --- pw-settings-wrap --- */
#win-passwords .pw-settings-wrap {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- pw-setting-row --- */
#win-passwords .pw-setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: 12px;
  transition: background 0.15s;
}

#win-passwords .pw-setting-row:hover {
  background: var(--pw-card-hover);
}

#win-passwords .pw-setting-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#win-passwords .pw-setting-row-info strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
}

#win-passwords .pw-setting-row-info span {
  font-size: 11px;
  color: var(--pw-muted);
}

/* --- pw-switch (iOS toggle) --- */
#win-passwords .pw-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

#win-passwords .pw-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

#win-passwords .pw-switch-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s;
}

#win-passwords .pw-switch-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

#win-passwords .pw-switch input:checked + .pw-switch-slider {
  background: var(--pw-accent);
}

#win-passwords .pw-switch input:checked + .pw-switch-slider::before {
  transform: translateX(20px);
}


/* ============================================================
   14. CARDS VIEW (credit cards)
   ============================================================ */

/* --- pw-cards-grid --- */
#win-passwords .pw-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

#win-passwords .pw-credit-card {
  background: linear-gradient(145deg, #1a1f38, #0f1320);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

#win-passwords .pw-credit-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.08), transparent 70%);
  pointer-events: none;
}

#win-passwords .pw-credit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

#win-passwords .pw-credit-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

#win-passwords .pw-credit-card-chip {
  width: 36px;
  height: 26px;
  border-radius: 5px;
  background: linear-gradient(135deg, #c9a84c, #e8d48b);
}

#win-passwords .pw-credit-card-brand {
  font-size: 22px;
  font-weight: 800;
  color: rgba(255,255,255,0.2);
}

#win-passwords .pw-credit-card-number {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 17px;
  letter-spacing: 3px;
  color: var(--pw-text);
  margin: 16px 0 8px;
}

#win-passwords .pw-credit-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

#win-passwords .pw-credit-card-holder {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pw-muted);
}

#win-passwords .pw-credit-card-exp {
  font-size: 12px;
  color: var(--pw-muted);
}


/* ============================================================
   15. MODAL
   ============================================================ */

/* --- pw-modal (overlay) --- */
#win-passwords .pw-modal {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: pwFadeIn 0.2s ease;
}

#win-passwords .pw-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* --- pw-modal-card --- */
#win-passwords .pw-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  max-height: 80vh;
  background: rgba(21,26,46,0.92);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pwSlideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

/* --- pw-modal-head --- */
#win-passwords .pw-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--pw-border);
  background: rgba(11,14,24,0.4);
  flex-shrink: 0;
}

#win-passwords .pw-modal-head strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--pw-text);
}

/* --- pw-modal-body --- */
#win-passwords .pw-modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}

/* --- pw-modal-x (close button) --- */
#win-passwords .pw-modal-x {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: none;
  color: var(--pw-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: all 0.15s;
}

#win-passwords .pw-modal-x:hover {
  background: rgba(255,255,255,0.1);
  color: var(--pw-text);
}

/* --- pw-modal-grid (form grid) --- */
#win-passwords .pw-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

#win-passwords .pw-modal-grid.full {
  grid-template-columns: 1fr;
}

#win-passwords .pw-modal-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--pw-muted);
  font-weight: 600;
}

#win-passwords .pw-modal-grid input,
#win-passwords .pw-modal-grid select,
#win-passwords .pw-modal-grid textarea {
  background: rgba(11,14,24,0.7);
  border: 1px solid var(--pw-border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--pw-text);
  font-size: 13px;
  font-family: var(--pw-font);
  outline: none;
  transition: border-color 0.15s;
}

#win-passwords .pw-modal-grid input:focus,
#win-passwords .pw-modal-grid select:focus,
#win-passwords .pw-modal-grid textarea:focus {
  border-color: var(--pw-accent);
}

/* --- pw-modal-actions --- */
#win-passwords .pw-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--pw-border);
}

/* --- pw-quick-type-grid + btn --- */
#win-passwords .pw-quick-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

#win-passwords .pw-quick-type-btn {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--pw-muted);
  font-family: var(--pw-font);
  font-size: 13px;
  transition: all 0.15s;
}

#win-passwords .pw-quick-type-btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  color: var(--pw-text);
}

#win-passwords .pw-quick-type-btn.active {
  background: var(--pw-accent-glow);
  border-color: var(--pw-accent);
  color: var(--pw-accent);
}


/* ============================================================
   16. BADGES, TAGS, CHIPS, PILLS
   ============================================================ */

/* --- pw-badge --- */
#win-passwords .pw-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  background: var(--pw-accent-glow);
  color: var(--pw-accent);
  white-space: nowrap;
}

#win-passwords .pw-badge.danger {
  background: rgba(239,68,68,0.12);
  color: var(--pw-danger);
}

#win-passwords .pw-badge.success {
  background: rgba(16,185,129,0.12);
  color: var(--pw-success);
}

#win-passwords .pw-badge.warn {
  background: rgba(245,158,11,0.12);
  color: var(--pw-warn);
}

/* --- pw-tag --- */
#win-passwords .pw-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--pw-border);
  color: var(--pw-muted);
  cursor: default;
  transition: all 0.15s;
}

#win-passwords .pw-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tag-color, var(--pw-muted));
}

#win-passwords .pw-tag:hover {
  background: rgba(255,255,255,0.08);
  color: var(--pw-text);
}

/* --- pw-cat-chips (category filter chips) --- */
#win-passwords .pw-cat-chips {
  display: flex;
  gap: 6px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

#win-passwords .pw-cat-chips::-webkit-scrollbar {
  display: none;
}

#win-passwords .pw-cat-chip {
  padding: 5px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  color: var(--pw-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

#win-passwords .pw-cat-chip:hover {
  background: rgba(255,255,255,0.06);
  color: var(--pw-text);
}

#win-passwords .pw-cat-chip.active {
  background: var(--pw-accent);
  border-color: var(--pw-accent);
  color: #fff;
  box-shadow: 0 3px 8px rgba(99,102,241,0.25);
}

/* --- pw-cat-pills --- */
#win-passwords .pw-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#win-passwords .pw-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pw-border);
  font-size: 11px;
  font-weight: 600;
  color: var(--pw-muted);
  cursor: pointer;
  transition: all 0.15s;
}

#win-passwords .pw-cat-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat-color, var(--pw-muted));
  box-shadow: 0 0 6px var(--cat-color, transparent);
}

#win-passwords .pw-cat-pill:hover {
  background: rgba(255,255,255,0.07);
  color: var(--pw-text);
}

#win-passwords .pw-cat-pill.active {
  background: var(--cat-bg, var(--pw-accent-glow));
  border-color: var(--cat-color, var(--pw-accent));
  color: var(--pw-text);
}


/* ============================================================
   17. TOAST NOTIFICATIONS
   ============================================================ */

#win-passwords .pw-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pw-text);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  animation: pwToastIn 0.3s ease;
  max-width: 360px;
}

#win-passwords .pw-toast.success {
  border-left: 3px solid var(--pw-success);
}

#win-passwords .pw-toast.error {
  border-left: 3px solid var(--pw-danger);
}

#win-passwords .pw-toast.info {
  border-left: 3px solid var(--pw-accent);
}

#win-passwords .pw-toast-out {
  animation: pwToastOut 0.25s ease forwards;
}


/* ============================================================
   18. SHARED COMPONENTS
   ============================================================ */

/* --- pw-section-header --- */
#win-passwords .pw-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pw-border);
}

#win-passwords .pw-section-header h3,
#win-passwords .pw-section-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--pw-text);
}

/* --- pw-panel --- */
#win-passwords .pw-panel {
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: 14px;
  padding: 28px;
}

#win-passwords .pw-panel-header {
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pw-border);
}

#win-passwords .pw-panel-header h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
}

#win-passwords .pw-panel-header p {
  margin: 0;
  color: var(--pw-muted);
  font-size: 13px;
}

/* --- pw-input-group (floating label) --- */
#win-passwords .pw-input-group {
  position: relative;
}

#win-passwords .pw-input-group label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  padding: 0 4px;
  color: var(--pw-muted);
  font-size: 13px;
  pointer-events: none;
  transition: all 0.2s;
}

#win-passwords .pw-input-group input:focus + label,
#win-passwords .pw-input-group input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 11px;
  color: var(--pw-accent);
  background: var(--pw-card);
  transform: translateY(-50%);
}

/* --- pw-loader (spinning) --- */
#win-passwords .pw-loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--pw-accent);
  border-radius: 50%;
  animation: pwSpinLoader 0.6s linear infinite;
}

/* --- center-limit container --- */
#win-passwords .center-limit {
  max-width: 800px;
  margin: 0 auto;
}

/* --- pw-divider-text --- */
#win-passwords .pw-divider-text {
  color: rgba(255,255,255,0.12);
  font-size: 12px;
}


/* ============================================================
   19. KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes pwFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pwSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pwShieldPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 28px var(--pw-accent-glow); }
  50%      { transform: scale(1.06); box-shadow: 0 0 40px rgba(99,102,241,0.25); }
}

@keyframes pwShieldRing {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.08); }
}

@keyframes pwLockBgShift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 50% 100%; }
  100% { background-position: 100% 0%; }
}

@keyframes pwSpinLoader {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes pwToastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pwToastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(12px) scale(0.96); }
}


/* ============================================================
   20. ENTERPRISE FEATURES
   ============================================================ */

/* --- Alert badge (sidebar) --- */
#win-passwords .pw-alert-badge {
  margin-left: auto;
  background: var(--pw-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
  animation: pwPulse 2s ease-in-out infinite;
}

@keyframes pwPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* --- Offline badge --- */
#win-passwords .pw-offline-badge {
  background: rgba(239,68,68,0.15);
  color: var(--pw-danger);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid rgba(239,68,68,0.3);
}

#win-passwords .pw-last-sync {
  font-size: 10px;
  color: var(--pw-muted);
}

/* --- TOTP display --- */
#win-passwords .pw-totp-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 12px;
}

#win-passwords .pw-totp-code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 28px;
  font-weight: 800;
  color: var(--pw-accent);
  letter-spacing: 4px;
  flex: 1;
}

#win-passwords .pw-totp-countdown {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

#win-passwords .pw-totp-countdown span {
  font-size: 12px;
  font-weight: 700;
  color: var(--pw-muted);
  min-width: 20px;
  text-align: center;
}

#win-passwords .pw-totp-ring {
  width: 32px;
  height: 32px;
}

#win-passwords .pw-totp-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 3;
}

#win-passwords .pw-totp-ring-fill {
  fill: none;
  stroke: var(--pw-accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 97.4 97.4;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dasharray 0.3s linear, stroke 0.3s;
}

/* --- Self-destruct badge --- */
#win-passwords .pw-detail-self-destruct {
  margin-bottom: 12px;
}

#win-passwords .pw-self-destruct-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-danger);
}

#win-passwords .pw-self-destruct-icon,
#win-passwords .pw-totp-icon,
#win-passwords .pw-attach-icon {
  font-size: 11px;
  margin-right: 2px;
  opacity: 0.7;
}

/* --- Attachments list --- */
#win-passwords .pw-attachments-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#win-passwords .pw-attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--pw-border);
  border-radius: 8px;
  transition: background 0.15s;
}

#win-passwords .pw-attachment-item:hover {
  background: rgba(255,255,255,0.06);
}

#win-passwords .pw-att-icon {
  font-size: 18px;
  flex-shrink: 0;
}

#win-passwords .pw-att-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

#win-passwords .pw-att-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#win-passwords .pw-att-size {
  font-size: 10px;
  color: var(--pw-muted);
}

#win-passwords .pw-att-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: none;
  color: var(--pw-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

#win-passwords .pw-att-btn:hover {
  background: var(--pw-accent-glow);
  color: var(--pw-accent);
}

#win-passwords .pw-att-btn-del:hover {
  background: rgba(239,68,68,0.12);
  color: var(--pw-danger);
}

#win-passwords .pw-detail-attach-zone {
  margin: 8px 0 12px;
}

/* --- Trash view --- */
#win-passwords .pw-trash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pw-border);
}

#win-passwords .pw-trash-header span {
  font-size: 13px;
  color: var(--pw-muted);
}

#win-passwords .pw-trash-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  border-radius: var(--pw-radius);
  transition: all 0.15s;
  margin-bottom: 4px;
}

#win-passwords .pw-trash-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--pw-border);
}

#win-passwords .pw-trash-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* --- Alerts view --- */
#win-passwords .pw-alerts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pw-border);
}

#win-passwords .pw-alerts-header span {
  font-size: 13px;
  color: var(--pw-muted);
}

#win-passwords .pw-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#win-passwords .pw-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  cursor: pointer;
  transition: all 0.15s;
}

#win-passwords .pw-alert-item:hover {
  background: var(--pw-card-hover);
  border-color: rgba(255,255,255,0.1);
}

#win-passwords .pw-alert-item.unread {
  border-left: 3px solid var(--pw-accent);
}

#win-passwords .pw-alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

#win-passwords .pw-alert-content {
  flex: 1;
  min-width: 0;
}

#win-passwords .pw-alert-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
  margin-bottom: 2px;
}

#win-passwords .pw-alert-msg {
  font-size: 12px;
  color: var(--pw-muted);
  line-height: 1.4;
}

#win-passwords .pw-alert-time {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  margin-top: 4px;
}

/* --- Tag color picker (modal) --- */
#win-passwords .pw-modal-tags-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#win-passwords .pw-tag-color-picker {
  display: flex;
  gap: 6px;
}

#win-passwords .pw-tag-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
}

#win-passwords .pw-tag-color-dot:hover {
  transform: scale(1.2);
  border-color: rgba(255,255,255,0.3);
}

#win-passwords .pw-tag-color-dot.active {
  border-color: #fff;
  box-shadow: 0 0 8px currentColor;
}

/* --- Import preview --- */
#win-passwords .pw-import-preview {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--pw-border);
  border-radius: 8px;
  margin: 12px 0;
}

#win-passwords .pw-import-preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pw-border);
  font-size: 12px;
}

#win-passwords .pw-import-preview-item:last-child {
  border-bottom: none;
}

#win-passwords .pw-import-preview-item strong {
  color: var(--pw-text);
  font-weight: 600;
}

#win-passwords .pw-import-preview-item span {
  color: var(--pw-muted);
  font-size: 11px;
}

#win-passwords .pw-import-preview-more {
  padding: 8px 12px;
  text-align: center;
  color: var(--pw-muted);
  font-size: 11px;
  font-style: italic;
}

/* --- Version history restore button --- */
#win-passwords .pw-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

#win-passwords .pw-history-item:last-child {
  border-bottom: none;
}

#win-passwords .pw-history-title {
  font-size: 11px;
  color: var(--pw-muted);
  flex-shrink: 0;
}

/* --- Detail field improvements --- */
#win-passwords .pw-detail-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#win-passwords .pw-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

#win-passwords .pw-detail-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

#win-passwords .pw-detail-favicon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

#win-passwords .pw-detail-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--pw-text);
  word-break: break-word;
}

#win-passwords .pw-detail-url {
  font-size: 12px;
  color: var(--pw-accent);
  text-decoration: none;
}

#win-passwords .pw-detail-url:hover {
  text-decoration: underline;
}

#win-passwords .pw-detail-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

#win-passwords .pw-detail-act {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: none;
  color: var(--pw-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}

#win-passwords .pw-detail-act:hover {
  background: var(--pw-accent-glow);
  color: var(--pw-accent);
}

#win-passwords .pw-detail-field {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

#win-passwords .pw-detail-field label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pw-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

#win-passwords .pw-detail-field-val {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--pw-text);
  word-break: break-all;
}

#win-passwords .pw-detail-eye,
#win-passwords .pw-detail-copy {
  background: none;
  border: none;
  color: var(--pw-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

#win-passwords .pw-detail-eye:hover,
#win-passwords .pw-detail-copy:hover {
  color: var(--pw-accent);
  background: var(--pw-accent-glow);
}

#win-passwords .pw-detail-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 8px;
}

#win-passwords .pw-detail-strength-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

#win-passwords .pw-detail-strength-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}

#win-passwords .pw-detail-strength span {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

#win-passwords .pw-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#win-passwords .pw-detail-breach {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

#win-passwords .pw-breach-result {
  font-size: 12px;
  font-weight: 600;
}

#win-passwords .pw-detail-notes {
  font-size: 13px;
  color: var(--pw-text);
  line-height: 1.6;
  white-space: pre-wrap;
}

#win-passwords .pw-detail-history {
  margin-top: 8px;
  border: 1px solid var(--pw-border);
  border-radius: 8px;
  overflow: hidden;
}

#win-passwords .pw-detail-history summary {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

#win-passwords .pw-detail-history summary::-webkit-details-marker { display: none; }

#win-passwords .pw-history-list {
  padding: 8px 14px;
  border-top: 1px solid var(--pw-border);
}

#win-passwords .pw-history-date {
  font-size: 10px;
  color: var(--pw-muted);
  flex-shrink: 0;
}

#win-passwords .pw-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0 0;
  margin-top: 8px;
  border-top: 1px solid var(--pw-border);
}

#win-passwords .pw-detail-meta span {
  font-size: 11px;
  color: var(--pw-muted);
}

/* --- Item icons in list --- */
#win-passwords .pw-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

#win-passwords .pw-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: cover;
}

#win-passwords .pw-item-type-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: var(--pw-muted);
  flex-shrink: 0;
}

#win-passwords .pw-item-info {
  flex: 1;
  min-width: 0;
}

#win-passwords .pw-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#win-passwords .pw-item-sub {
  font-size: 11px;
  color: var(--pw-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#win-passwords .pw-item-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

#win-passwords .pw-star {
  color: #eab308;
  font-size: 14px;
}

#win-passwords .pw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* --- pw-kpi-val / pw-kpi-label (JS-rendered) --- */
#win-passwords .pw-kpi-val {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

#win-passwords .pw-kpi-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pw-muted);
  margin-top: 4px;
}

/* --- Audit issue items (JS rendered) --- */
#win-passwords .pw-audit-issue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 6px;
}

#win-passwords .pw-audit-issue-item:hover {
  background: var(--pw-card-hover);
  border-color: rgba(255,255,255,0.1);
  transform: translateX(3px);
}

#win-passwords .pw-audit-issue-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

#win-passwords .pw-audit-issue-body {
  flex: 1;
  min-width: 0;
}

#win-passwords .pw-audit-issue-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
}

#win-passwords .pw-audit-issue-desc {
  font-size: 11px;
  color: var(--pw-muted);
}

#win-passwords .pw-audit-issue-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}

#win-passwords .pw-audit-issue-arrow {
  color: var(--pw-muted);
  flex-shrink: 0;
}

/* --- Audit stat icons (JS rendered) --- */
#win-passwords .pw-audit-stat-icon {
  margin-bottom: 4px;
}

#win-passwords .pw-audit-stat-val {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

#win-passwords .pw-audit-stat-label {
  font-size: 11px;
  color: var(--pw-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Audit history rows --- */
#win-passwords .pw-audit-h-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--pw-border);
}

#win-passwords .pw-audit-h-score {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

#win-passwords .pw-audit-h-info {
  flex: 1;
  min-width: 0;
}

#win-passwords .pw-audit-h-date {
  font-size: 12px;
  color: var(--pw-text);
  font-weight: 500;
}

#win-passwords .pw-audit-h-detail {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

#win-passwords .pw-audit-h-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  color: var(--pw-muted);
}

#win-passwords .pw-audit-h-change {
  font-size: 10px;
  font-weight: 700;
}

#win-passwords .pw-audit-h-up { color: #22c55e; }
#win-passwords .pw-audit-h-down { color: #ef4444; }
#win-passwords .pw-audit-h-same { color: var(--pw-muted); }

#win-passwords .pw-audit-h-badges {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

#win-passwords .pw-audit-h-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
}

#win-passwords .pw-audit-issues h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--pw-text);
}

#win-passwords .pw-audit-info {
  flex: 1;
}

#win-passwords .pw-audit-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--pw-text);
}

#win-passwords .pw-audit-info p {
  margin: 0 0 16px;
  color: var(--pw-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* --- Card visual --- */
#win-passwords .pw-card-visual {
  border-radius: 16px;
  padding: 24px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}

#win-passwords .pw-card-visual:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

#win-passwords .pw-card-visual.active {
  box-shadow: 0 0 0 2px var(--pw-accent), 0 12px 32px rgba(0,0,0,0.3);
}

#win-passwords .pw-card-chip {
  margin-bottom: 16px;
}

#win-passwords .pw-card-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 12px;
}

#win-passwords .pw-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

#win-passwords .pw-card-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.6);
}

#win-passwords .pw-card-expiry {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

/* --- Modal form improvements --- */
#win-passwords .pw-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#win-passwords .pw-modal-btns {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--pw-border);
}

#win-passwords .pw-modal-advanced {
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  overflow: hidden;
  margin-top: 4px;
}

#win-passwords .pw-modal-advanced summary {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

#win-passwords .pw-modal-advanced summary::-webkit-details-marker { display: none; }

/* --- pw-optional --- */
#win-passwords .pw-optional {
  font-size: 10px;
  color: var(--pw-muted);
  font-weight: 400;
  font-style: italic;
}

/* --- pw-gen-inline (inline generator button) --- */
#win-passwords .pw-gen-inline {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--pw-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: color 0.15s;
}

#win-passwords .pw-gen-inline:hover {
  color: var(--pw-accent);
}

/* --- pw-setting-row improvements --- */
#win-passwords .pw-setting-row div strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
  display: block;
}

#win-passwords .pw-setting-row div p {
  font-size: 11px;
  color: var(--pw-muted);
  margin: 2px 0 0;
}

#win-passwords .pw-setting-row input[type="number"] {
  width: 70px;
  background: rgba(11,14,24,0.7);
  border: 1px solid var(--pw-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--pw-text);
  font-size: 14px;
  font-family: var(--pw-font);
  text-align: center;
  outline: none;
}

#win-passwords .pw-settings-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* --- pw-lock-btns-row --- */
#win-passwords .pw-lock-btns-row {
  display: flex;
  gap: 10px;
}

/* --- pw-recover-q --- */
#win-passwords .pw-recover-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--pw-text);
  padding: 8px 0;
}

/* --- pw-btn-main.small, pw-btn-ghost.small --- */
#win-passwords .pw-btn-main.small {
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
}

#win-passwords .pw-btn-ghost.small {
  padding: 6px 12px;
  font-size: 12px;
}

/* --- pw-empty-list --- */
#win-passwords .pw-empty-list {
  padding: 24px;
  text-align: center;
  color: var(--pw-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* --- pw-toggle-key (generator) --- */
#win-passwords .pw-toggle-key {
  font-size: 16px;
  font-weight: 700;
  color: var(--pw-muted);
  transition: color 0.2s;
}

#win-passwords .pw-toggle-card:has(input:checked) .pw-toggle-key {
  color: #fff;
}

/* --- pw-gen-strength-bar label --- */
#win-passwords .pw-gen-strength-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

#win-passwords #pw-gen-strength-text {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- pw-backup-desc --- */
#win-passwords .pw-backup-desc {
  color: var(--pw-muted);
  font-size: 13px;
  margin: 0 0 20px;
}

/* --- Audit history section --- */
#win-passwords .pw-audit-history-section {
  margin-top: 24px;
}

#win-passwords .pw-audit-history-section h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--pw-text);
}

#win-passwords .pw-audit-history-list {
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  overflow: hidden;
}

/* --- pw-modal-fav-label --- */
#win-passwords .pw-modal-fav-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--pw-text);
  cursor: pointer;
}

#win-passwords .pw-modal-fav-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--pw-accent);
}


/* ============================================================
   21. RESPONSIVE - Tablet / small screens (max-width: 820px)
   ============================================================ */
@media (max-width: 820px) {
  #win-passwords .pw-app {
    flex-direction: column;
  }

  #win-passwords .pw-side {
    width: 100%;
    min-width: unset;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    gap: 2px;
    border-right: none;
    border-bottom: 1px solid var(--pw-border);
  }

  #win-passwords .pw-side-brand {
    display: none;
  }

  #win-passwords .pw-side-nav {
    flex-direction: row;
    gap: 2px;
    flex: unset;
  }

  #win-passwords .pw-side-btn {
    border-left: none;
    border-bottom: 3px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 8px 12px;
    font-size: 12px;
  }

  #win-passwords .pw-side-btn.active {
    border-left-color: transparent;
    border-bottom-color: var(--pw-accent);
  }

  #win-passwords .pw-side-divider {
    width: 1px;
    height: 24px;
    margin: 0 4px;
  }

  #win-passwords .pw-side-bottom {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    flex-direction: row;
  }

  #win-passwords .pw-side-count {
    display: none;
  }

  #win-passwords .pw-split {
    flex-direction: column;
  }

  #win-passwords .pw-list-col {
    width: 100%;
    min-width: unset;
    max-height: 240px;
  }

  #win-passwords .pw-detail-col {
    min-height: 300px;
  }

  #win-passwords .pw-audit-hero {
    flex-direction: column;
    text-align: center;
  }

  #win-passwords .pw-backup-grid {
    grid-template-columns: 1fr;
  }

  #win-passwords .pw-gen-toggles {
    grid-template-columns: 1fr;
  }

  #win-passwords .pw-cards-grid {
    grid-template-columns: 1fr;
  }

  #win-passwords .pw-topbar {
    padding: 10px 14px;
  }

  #win-passwords .pw-search-box {
    width: 160px;
  }

  #win-passwords .pw-view {
    padding: 14px 14px;
  }
}


/* ============================================================
   21. RESPONSIVE - Mobile (max-width: 520px)
   ============================================================ */
@media (max-width: 520px) {
  #win-passwords .pw-lock-card {
    padding: 28px 20px;
    border-radius: 16px;
  }

  #win-passwords .pw-topbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  #win-passwords .pw-search-box {
    width: 100%;
    order: 3;
  }

  #win-passwords .pw-kpi-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  #win-passwords .pw-audit-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #win-passwords .pw-gen-output-box input {
    font-size: 16px !important;
  }
}


/* ============================================================
   22. JS-RENDERED ELEMENTS (v2 JS engine)
   Classes used by the rewritten app-passwords.js
   ============================================================ */

/* --- KPI value/label (v2) --- */
#win-passwords .pw-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

#win-passwords .pw-kpi-label {
  font-size: 11px;
  color: var(--pw-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  margin-top: 4px;
}

/* --- Item list cards (v2) --- */
#win-passwords .pw-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--pw-radius);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  color: var(--pw-text);
}

#win-passwords .pw-item:hover {
  background: var(--pw-card);
  border-color: var(--pw-border);
}

#win-passwords .pw-item.active {
  background: var(--pw-accent-glow);
  border-color: var(--pw-accent);
  border-left: 3px solid var(--pw-accent);
}

#win-passwords .pw-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--pw-card);
}

#win-passwords .pw-item-type-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--pw-accent);
  background: var(--pw-accent-glow);
}

#win-passwords .pw-item-type-icon svg {
  width: 16px;
  height: 16px;
}

#win-passwords .pw-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#win-passwords .pw-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#win-passwords .pw-item-sub {
  font-size: 11px;
  color: var(--pw-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#win-passwords .pw-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#win-passwords .pw-star {
  color: #eab308;
  font-size: 14px;
  line-height: 1;
}

#win-passwords .pw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

#win-passwords .pw-empty-list {
  padding: 40px 20px;
  text-align: center;
  color: var(--pw-muted);
  font-size: 13px;
  opacity: 0.7;
}

/* --- Detail panel (v2) --- */
#win-passwords .pw-detail-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#win-passwords .pw-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pw-border);
}

#win-passwords .pw-detail-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

#win-passwords .pw-detail-favicon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--pw-card-hover);
}

#win-passwords .pw-detail-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--pw-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#win-passwords .pw-detail-url {
  font-size: 12px;
  color: var(--pw-accent);
  text-decoration: none;
  transition: color 0.15s;
}

#win-passwords .pw-detail-url:hover {
  color: var(--pw-accent-hover);
  text-decoration: underline;
}

#win-passwords .pw-detail-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

#win-passwords .pw-detail-act {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--pw-border);
  border-radius: 8px;
  color: var(--pw-muted);
  cursor: pointer;
  transition: all 0.15s;
}

#win-passwords .pw-detail-act:hover {
  background: rgba(255,255,255,0.06);
  color: var(--pw-text);
  border-color: rgba(255,255,255,0.12);
}

/* --- Detail fields (v2) --- */
#win-passwords .pw-detail-field {
  padding: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--pw-radius);
  transition: background 0.15s, border-color 0.15s;
}

#win-passwords .pw-detail-field:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

#win-passwords .pw-detail-field label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pw-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

#win-passwords .pw-detail-field-val {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pw-text);
  word-break: break-all;
}

#win-passwords .pw-detail-field-val span {
  flex: 1;
  min-width: 0;
}

#win-passwords .pw-detail-masked {
  flex: 1;
  min-width: 0;
}

#win-passwords .pw-detail-eye,
#win-passwords .pw-detail-copy {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--pw-border);
  border-radius: 6px;
  color: var(--pw-muted);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

#win-passwords .pw-detail-eye:hover,
#win-passwords .pw-detail-copy:hover {
  background: rgba(255,255,255,0.06);
  color: var(--pw-text);
  border-color: rgba(255,255,255,0.12);
}

/* --- Detail strength bar (v2) --- */
#win-passwords .pw-detail-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 14px;
  font-size: 11px;
  font-weight: 600;
}

#win-passwords .pw-detail-strength-track {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

#win-passwords .pw-detail-strength-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s, background 0.3s;
}

/* --- Detail notes --- */
#win-passwords .pw-detail-notes {
  font-size: 13px;
  color: var(--pw-text);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* --- Detail tags --- */
#win-passwords .pw-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#win-passwords .pw-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--pw-accent);
  font-size: 11px;
  font-weight: 600;
}

/* --- Detail breach check --- */
#win-passwords .pw-detail-breach {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--pw-radius);
}

#win-passwords .pw-breach-result {
  font-size: 12px;
  font-weight: 600;
}

/* --- Detail history (v2) --- */
#win-passwords .pw-detail-history {
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  overflow: hidden;
}

#win-passwords .pw-detail-history summary {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
  user-select: none;
}

#win-passwords .pw-detail-history summary::-webkit-details-marker {
  display: none;
}

#win-passwords .pw-detail-history summary::before {
  content: '\25B6';
  font-size: 8px;
  transition: transform 0.2s;
}

#win-passwords .pw-detail-history[open] summary::before {
  transform: rotate(90deg);
}

#win-passwords .pw-detail-history summary:hover {
  color: var(--pw-text);
}

#win-passwords .pw-history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 14px 14px;
  border-top: 1px solid var(--pw-border);
}

#win-passwords .pw-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  font-size: 12px;
  color: var(--pw-text);
}

#win-passwords .pw-history-date {
  font-size: 11px;
  color: var(--pw-muted);
  white-space: nowrap;
}

/* --- Detail metadata (v2) --- */
#win-passwords .pw-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 14px;
  border-top: 1px solid var(--pw-border);
  font-size: 11px;
  color: var(--pw-muted);
}

/* --- Cards grid visual (v2) --- */
#win-passwords .pw-card-visual {
  border-radius: 14px;
  padding: 20px 22px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

#win-passwords .pw-card-visual:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

#win-passwords .pw-card-visual.active {
  border-color: var(--pw-accent);
  box-shadow: 0 0 0 2px var(--pw-accent-glow);
}

#win-passwords .pw-card-chip {
  margin-bottom: 16px;
}

#win-passwords .pw-card-number {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 18px;
  letter-spacing: 2px;
  font-weight: 500;
  margin-bottom: 16px;
}

#win-passwords .pw-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

#win-passwords .pw-card-name {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  opacity: 0.85;
}

#win-passwords .pw-card-expiry {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
}

/* --- Cards grid layout --- */
#win-passwords .pw-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 20px 24px;
}

/* --- Audit stat icon (v3) --- */
#win-passwords .pw-audit-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

#win-passwords .pw-audit-stat--total .pw-audit-stat-icon { background: rgba(99,102,241,0.1); }
#win-passwords .pw-audit-stat--weak .pw-audit-stat-icon { background: rgba(239,68,68,0.1); }
#win-passwords .pw-audit-stat--dupe .pw-audit-stat-icon { background: rgba(249,115,22,0.1); }
#win-passwords .pw-audit-stat--old .pw-audit-stat-icon { background: rgba(234,179,8,0.1); }
#win-passwords .pw-audit-stat--breach .pw-audit-stat-icon { background: rgba(239,68,68,0.1); }

/* --- Audit stat cards (v2) --- */
#win-passwords .pw-audit-stat-val {
  font-size: 28px;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  line-height: 1;
}

#win-passwords .pw-audit-stat-label {
  font-size: 11px;
  color: var(--pw-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* --- Modal form (v2) --- */
#win-passwords .pw-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Advanced section (collapsible) --- */
#win-passwords .pw-modal-advanced {
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}

#win-passwords .pw-modal-advanced summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s, background 0.15s;
  list-style: none;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

#win-passwords .pw-modal-advanced summary::-webkit-details-marker { display: none; }

#win-passwords .pw-modal-advanced summary::after {
  content: '';
  margin-left: auto;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--pw-muted);
  transition: transform 0.2s;
}

#win-passwords .pw-modal-advanced[open] summary::after {
  transform: rotate(180deg);
}

#win-passwords .pw-modal-advanced summary:hover {
  color: var(--pw-text);
  background: rgba(255,255,255,0.03);
}

#win-passwords .pw-modal-advanced[open] summary {
  border-bottom: 1px solid var(--pw-border);
  color: var(--pw-text);
}

#win-passwords .pw-modal-advanced > :not(summary) {
  padding: 0 14px;
}

#win-passwords .pw-modal-advanced > .pw-field:first-of-type {
  padding-top: 14px;
}

#win-passwords .pw-modal-advanced > .pw-field:last-of-type {
  padding-bottom: 14px;
}

#win-passwords .pw-modal-advanced .pw-field {
  margin-bottom: 12px;
}

#win-passwords .pw-modal-btns {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--pw-border);
}

#win-passwords .pw-gen-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 6px;
  color: var(--pw-accent);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

#win-passwords .pw-gen-inline:hover {
  background: rgba(99,102,241,0.2);
}

/* --- Card modal close --- */
#win-passwords .pw-card-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 8px;
  color: #fff;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s;
}

#win-passwords .pw-card-modal-close:hover {
  background: rgba(255,255,255,0.2);
}

/* --- pw-btn-ghost with .small modifier (v2) --- */
#win-passwords .pw-btn-ghost.small {
  padding: 6px 12px;
  font-size: 12px;
}

/* --- Item badge --- */
#win-passwords .pw-item-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(99,102,241,0.1);
  color: var(--pw-accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ============================================================
   AUDIT ISSUE ITEMS (v3 — improved)
   ============================================================ */
#win-passwords .pw-audit-issue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--pw-radius);
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 6px;
}

#win-passwords .pw-audit-issue-item:hover {
  background: var(--pw-card-hover);
  border-color: rgba(255,255,255,0.12);
  transform: translateX(2px);
}

#win-passwords .pw-audit-issue-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

#win-passwords .pw-audit-issue-body {
  flex: 1;
  min-width: 0;
}

#win-passwords .pw-audit-issue-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pw-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#win-passwords .pw-audit-issue-desc {
  font-size: 11px;
  color: var(--pw-muted);
  margin-top: 2px;
}

#win-passwords .pw-audit-issue-tag {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

#win-passwords .pw-audit-issue-arrow {
  color: var(--pw-muted);
  opacity: 0.4;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.15s;
}

#win-passwords .pw-audit-issue-item:hover .pw-audit-issue-arrow {
  opacity: 1;
  transform: translateX(2px);
}

/* ============================================================
   AUDIT HISTORY (v3)
   ============================================================ */
#win-passwords .pw-audit-history-section {
  margin-top: 28px;
  border-top: 1px solid var(--pw-border);
  padding-top: 20px;
}

#win-passwords .pw-audit-history-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--pw-text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#win-passwords .pw-audit-history-section h4 svg {
  color: var(--pw-muted);
  opacity: 0.7;
}

#win-passwords .pw-audit-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#win-passwords .pw-audit-h-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--pw-radius);
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  transition: all 0.15s ease;
}

#win-passwords .pw-audit-h-row:hover {
  background: var(--pw-card-hover);
  border-color: rgba(255,255,255,0.1);
}

#win-passwords .pw-audit-h-score {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
}

#win-passwords .pw-audit-h-info {
  flex: 1;
  min-width: 0;
}

#win-passwords .pw-audit-h-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--pw-text);
  margin-bottom: 4px;
}

#win-passwords .pw-audit-h-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#win-passwords .pw-audit-h-tag {
  font-size: 11px;
  color: var(--pw-muted);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 6px;
}

#win-passwords .pw-audit-h-tag--issues {
  color: var(--pw-accent);
  background: rgba(99,102,241,0.1);
}

#win-passwords .pw-audit-h-change {
  font-size: 11px;
  font-weight: 600;
}

#win-passwords .pw-audit-h-up { color: #22c55e; }
#win-passwords .pw-audit-h-down { color: #ef4444; }
#win-passwords .pw-audit-h-same { color: var(--pw-muted); }

#win-passwords .pw-audit-h-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

#win-passwords .pw-audit-h-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}


/* ============================================================
   SETUP WIZARD — 4 step, one-field-at-a-time
   ============================================================ */

#win-passwords .pw-wizard {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 300px;
}

/* --- Step panel --- */
#win-passwords .pw-wizard-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 0 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(.4,0,.2,1), transform 0.4s cubic-bezier(.4,0,.2,1);
}

#win-passwords .pw-wizard-step.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  position: relative;
}

#win-passwords .pw-wizard-step.exit-left {
  opacity: 0;
  transform: translateX(-50px) scale(0.96);
}

#win-passwords .pw-wizard-step.exit-right {
  opacity: 0;
  transform: translateX(50px) scale(0.96);
}

#win-passwords .pw-wizard-step.enter-right {
  opacity: 0;
  transform: translateX(50px) scale(0.96);
}

#win-passwords .pw-wizard-step.enter-left {
  opacity: 0;
  transform: translateX(-50px) scale(0.96);
}

/* --- Icon circle with breathing glow --- */
#win-passwords .pw-wizard-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pw-accent) 0%, #a78bfa 100%);
  color: #fff;
  flex-shrink: 0;
  animation: pwWizGlow 3s ease-in-out infinite;
  position: relative;
}

#win-passwords .pw-wizard-icon::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(99,102,241,0.25);
  animation: pwWizRing 3s ease-in-out infinite;
}

@keyframes pwWizGlow {
  0%,100% { box-shadow: 0 0 20px rgba(99,102,241,0.20), 0 0 40px rgba(99,102,241,0.08); }
  50%     { box-shadow: 0 0 28px rgba(99,102,241,0.35), 0 0 56px rgba(99,102,241,0.14); }
}

@keyframes pwWizRing {
  0%,100% { transform: scale(1); opacity: 0.6; }
  50%     { transform: scale(1.08); opacity: 1; }
}

/* --- Step label (Paso 1/4) --- */
#win-passwords .pw-wizard-step-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--pw-accent);
  opacity: 0.7;
}

/* --- Title & description --- */
#win-passwords .pw-wizard-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-align: center;
  line-height: 1.3;
}

#win-passwords .pw-wizard-desc {
  font-size: 13px;
  color: var(--pw-muted);
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
  margin: 0 0 4px;
}

/* --- Input fields area --- */
#win-passwords .pw-wizard-fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Progress dots --- */
#win-passwords .pw-wizard-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding-bottom: 2px;
}

#win-passwords .pw-wizard-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  transition: all 0.4s cubic-bezier(.4,0,.2,1);
}

#win-passwords .pw-wizard-dot.active {
  background: var(--pw-accent);
  transform: scale(1.35);
  box-shadow: 0 0 10px rgba(99,102,241,0.4);
}

#win-passwords .pw-wizard-dot.done {
  background: var(--pw-success);
  box-shadow: 0 0 6px rgba(16,185,129,0.3);
}

/* --- Action buttons --- */
#win-passwords .pw-wizard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

#win-passwords .pw-wizard-btn {
  padding: 11px 18px;
  border: none;
  border-radius: var(--pw-radius);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--pw-font);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

#win-passwords .pw-wizard-btn:active {
  transform: scale(0.96);
}

#win-passwords .pw-wizard-btn.primary {
  flex: 1;
  background: linear-gradient(135deg, var(--pw-accent), #818cf8);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.30);
}

#win-passwords .pw-wizard-btn.primary:hover {
  box-shadow: 0 6px 28px rgba(99,102,241,0.45);
  filter: brightness(1.08);
}

#win-passwords .pw-wizard-btn.primary.finish {
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 4px 20px rgba(16,185,129,0.30);
}

#win-passwords .pw-wizard-btn.primary.finish:hover {
  box-shadow: 0 6px 28px rgba(16,185,129,0.45);
}

#win-passwords .pw-wizard-btn.ghost {
  flex: 0 0 auto;
  background: rgba(255,255,255,0.05);
  color: var(--pw-muted);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 10px 12px;
}

#win-passwords .pw-wizard-btn.ghost:hover {
  background: rgba(255,255,255,0.10);
  color: var(--pw-text);
}

#win-passwords .pw-wizard-btn.skip {
  flex: 0 0 auto;
  background: transparent;
  color: var(--pw-muted);
  padding: 11px 14px;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#win-passwords .pw-wizard-btn.skip:hover {
  color: var(--pw-text);
}

/* --- Error message --- */
#win-passwords .pw-wizard-error {
  font-size: 12px;
  color: var(--pw-danger);
  text-align: center;
  min-height: 18px;
  margin: 0;
  opacity: 0;
  transition: opacity 0.25s;
}

#win-passwords .pw-wizard-error.shake {
  animation: pwWizShake 0.35s ease;
}

@keyframes pwWizShake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}


/* ═══════════════════════════════════════════════════════════
   TEMA CLARO — overrides (se activan SOLO con html[data-theme="light"]).
   Aditivo: NO modifica el tema oscuro por defecto. Lo controla el
   selector de Tema en Configuracion > Sistema (Claro/Oscuro/Horario).
   El password manager usa tokens bajo #win-passwords, asi que la mayor
   parte se cubre redefiniendolos; el resto son colores hardcodeados
   (#fff, gradientes de texto, fondos/bordes rgba blancos u oscuros).
   ═══════════════════════════════════════════════════════════ */

/* --- Tokens redefinidos para claro (cubre la mayoria de superficies) --- */
html[data-theme="light"] #win-passwords {
  --pw-bg: #eef1f7;
  --pw-side: #ffffff;
  --pw-card: #ffffff;
  --pw-card-hover: #f3f5fb;
  --pw-border: rgba(0,0,0,0.08);
  --pw-text: #1e293b;
  --pw-muted: rgba(30,41,59,0.6);
  --pw-accent: #7c3aed;
  --pw-accent-hover: #6d28d9;
  --pw-accent-glow: rgba(124,58,237,0.12);
}

/* --- Scrollbar --- */
html[data-theme="light"] #win-passwords ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.14); }
html[data-theme="light"] #win-passwords ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.22); }

/* ── LOCK SCREEN ── */
html[data-theme="light"] #win-passwords .pw-lock-bg {
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(124,58,237,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(139,92,246,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 80% 80% at 50% 50%, #f5f7fc 0%, #eef1f7 100%);
  background-size: 200% 200%;
}
html[data-theme="light"] #win-passwords .pw-lock-card {
  background: rgba(255,255,255,0.92);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 24px 48px rgba(30,41,59,0.18), 0 0 0 1px rgba(0,0,0,0.03) inset;
}
/* Gradiente de texto del titulo del lock -> solido oscuro */
html[data-theme="light"] #win-passwords .pw-lock-card h2 {
  background: none !important;
  -webkit-text-fill-color: #312e81 !important;
  color: #312e81;
}

/* ── INPUTS / FIELDS (fondos oscuros hardcodeados -> claros) ── */
html[data-theme="light"] #win-passwords .pw-field input,
html[data-theme="light"] #win-passwords .pw-field select,
html[data-theme="light"] #win-passwords .pw-field textarea,
html[data-theme="light"] #win-passwords .pw-modal-grid input,
html[data-theme="light"] #win-passwords .pw-modal-grid select,
html[data-theme="light"] #win-passwords .pw-modal-grid textarea,
html[data-theme="light"] #win-passwords .pw-setting-row input[type="number"] {
  background: #ffffff;
  border-color: rgba(0,0,0,0.14);
  color: #1e293b;
}

/* ── TOPBAR (fondo translucido oscuro -> claro) ── */
html[data-theme="light"] #win-passwords .pw-topbar {
  background: rgba(255,255,255,0.85);
}
html[data-theme="light"] #win-passwords .pw-search-box input {
  background: rgba(0,0,0,0.04);
  color: #1e293b;
}
html[data-theme="light"] #win-passwords .pw-search-box input:focus {
  background: #ffffff;
}

/* ── KPIs / titulos con #fff hardcodeado -> oscuro ── */
html[data-theme="light"] #win-passwords .pw-kpi strong,
html[data-theme="light"] #win-passwords .pw-kpi-val,
html[data-theme="light"] #win-passwords .pw-audit-stat strong,
html[data-theme="light"] #win-passwords .pw-audit-stat-val,
html[data-theme="light"] #win-passwords .pw-ring-text {
  color: #1e293b;
}
html[data-theme="light"] #win-passwords .pw-ring-text { fill: #1e293b; }

/* ── LIST ITEMS / fondos blancos translucidos sobre fondo oscuro ── */
html[data-theme="light"] #win-passwords .pw-list-item,
html[data-theme="light"] #win-passwords .pw-item-field,
html[data-theme="light"] #win-passwords .pw-detail-field,
html[data-theme="light"] #win-passwords .pw-detail-breach,
html[data-theme="light"] #win-passwords .pw-quick-type-btn,
html[data-theme="light"] #win-passwords .pw-attachment-item,
html[data-theme="light"] #win-passwords .pw-trash-item,
html[data-theme="light"] #win-passwords .pw-history-item {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] #win-passwords .pw-list-item:hover,
html[data-theme="light"] #win-passwords .pw-item-field:hover,
html[data-theme="light"] #win-passwords .pw-detail-field:hover,
html[data-theme="light"] #win-passwords .pw-quick-type-btn:hover,
html[data-theme="light"] #win-passwords .pw-attachment-item:hover,
html[data-theme="light"] #win-passwords .pw-trash-item:hover {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
}
html[data-theme="light"] #win-passwords .pw-list-item-fav { color: rgba(0,0,0,0.18); }

/* ── BUTONES / iconos con fondo blanco translucido ── */
html[data-theme="light"] #win-passwords .pw-modal-x,
html[data-theme="light"] #win-passwords .pw-detail-act,
html[data-theme="light"] #win-passwords .pw-att-btn,
html[data-theme="light"] #win-passwords .pw-gen-action,
html[data-theme="light"] #win-passwords .pw-detail-eye,
html[data-theme="light"] #win-passwords .pw-detail-copy,
html[data-theme="light"] #win-passwords .pw-item-type-icon {
  background: rgba(0,0,0,0.04);
}
html[data-theme="light"] #win-passwords .pw-modal-x:hover,
html[data-theme="light"] #win-passwords .pw-detail-act:hover,
html[data-theme="light"] #win-passwords .pw-att-btn:hover {
  background: rgba(0,0,0,0.08);
}
html[data-theme="light"] #win-passwords .pw-btn-ghost:hover,
html[data-theme="light"] #win-passwords .pw-btn.ghost:hover,
html[data-theme="light"] #win-passwords .pw-side-btn:hover,
html[data-theme="light"] #win-passwords .pw-tag:hover,
html[data-theme="light"] #win-passwords .pw-cat-chip:hover,
html[data-theme="light"] #win-passwords .pw-cat-pill:hover {
  background: rgba(0,0,0,0.05);
  color: #1e293b;
}
html[data-theme="light"] #win-passwords .pw-btn-ghost,
html[data-theme="light"] #win-passwords .pw-btn-ghost:hover { border-color: rgba(0,0,0,0.12); }
html[data-theme="light"] #win-passwords .pw-tag,
html[data-theme="light"] #win-passwords .pw-cat-chip,
html[data-theme="light"] #win-passwords .pw-cat-pill,
html[data-theme="light"] #win-passwords .pw-side-count,
html[data-theme="light"] #win-passwords .pw-item-badge,
html[data-theme="light"] #win-passwords .pw-audit-h-tag,
html[data-theme="light"] #win-passwords .pw-history-item {
  background: rgba(0,0,0,0.05);
}
/* Botones de accent (.primary / .pw-btn-add / .pw-cat-chip.active) conservan texto blanco */
html[data-theme="light"] #win-passwords .pw-btn-add,
html[data-theme="light"] #win-passwords .pw-btn.primary,
html[data-theme="light"] #win-passwords .pw-cat-chip.active { color: #fff; }

/* ── GENERATOR (output box / sliders / toggles oscuros) ── */
html[data-theme="light"] #win-passwords .pw-gen-hero {
  background: linear-gradient(145deg, rgba(124,58,237,0.05), rgba(0,0,0,0.02));
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] #win-passwords .pw-gen-output-box {
  background: #f3f5fb;
  border-color: rgba(0,0,0,0.1);
  box-shadow: inset 0 2px 4px rgba(30,41,59,0.06);
}
html[data-theme="light"] #win-passwords .pw-gen-strength-track,
html[data-theme="light"] #win-passwords .pw-detail-strength-track,
html[data-theme="light"] #win-passwords .pw-strength-mini,
html[data-theme="light"] #win-passwords .pw-gen-slider-row input[type="range"] {
  background: rgba(0,0,0,0.08);
}
html[data-theme="light"] #win-passwords .pw-toggle-card-key {
  background: rgba(0,0,0,0.05);
}
html[data-theme="light"] #win-passwords .pw-toggle-card:has(input:checked) .pw-toggle-card-key,
html[data-theme="light"] #win-passwords .pw-toggle-card:has(input:checked) .pw-toggle-key { color: #fff; }

/* ── AUDIT (hero con gradiente y texto en gradiente) ── */
html[data-theme="light"] #win-passwords .pw-audit-hero {
  background: linear-gradient(145deg, #ffffff, rgba(0,0,0,0.02));
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] #win-passwords .pw-audit-hero-info h3 {
  background: none !important;
  -webkit-text-fill-color: #312e81 !important;
  color: #312e81;
}
html[data-theme="light"] #win-passwords .pw-ring-bg,
html[data-theme="light"] #win-passwords .pw-totp-ring-bg { stroke: rgba(0,0,0,0.08); }
html[data-theme="light"] #win-passwords .pw-audit-stat-icon { background: rgba(0,0,0,0.04); }
html[data-theme="light"] #win-passwords .pw-audit-h-score { background: rgba(0,0,0,0.04); }

/* ── CREDIT CARDS (gradiente oscuro -> mantenemos oscuro pero suavizado para que el texto blanco siga legible) ── */
html[data-theme="light"] #win-passwords .pw-credit-card {
  background: linear-gradient(145deg, #4c4f6b, #2d2f44);
  border-color: rgba(0,0,0,0.12);
}
/* .pw-card-visual usa fondos generados por JS; su texto blanco se conserva */

/* ── MODAL ── */
html[data-theme="light"] #win-passwords .pw-modal-overlay { background: rgba(30,41,59,0.35); }
html[data-theme="light"] #win-passwords .pw-modal-card {
  background: rgba(255,255,255,0.96);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 24px 48px rgba(30,41,59,0.2);
}
html[data-theme="light"] #win-passwords .pw-modal-head { background: rgba(0,0,0,0.02); }

/* ── TOAST ── */
html[data-theme="light"] #win-passwords .pw-toast {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
  color: #1e293b;
  box-shadow: 0 12px 32px rgba(30,41,59,0.18);
}

/* ── SWITCH (iOS toggle) ── */
html[data-theme="light"] #win-passwords .pw-switch-slider { background: rgba(0,0,0,0.18); }

/* ── DIVISORES de texto / metas atenuadas ── */
html[data-theme="light"] #win-passwords .pw-divider-text,
html[data-theme="light"] #win-passwords .pw-lock-links .pw-sep { color: rgba(30,41,59,0.35); }
html[data-theme="light"] #win-passwords .pw-alert-time { color: rgba(30,41,59,0.42); }

/* ── LOADER ── */
html[data-theme="light"] #win-passwords .pw-loader { border-color: rgba(0,0,0,0.12); border-top-color: var(--pw-accent); }

/* ── WIZARD (titulos #fff -> oscuro; dots/ghost translucidos) ── */
html[data-theme="light"] #win-passwords .pw-wizard-title { color: #1e293b; }
html[data-theme="light"] #win-passwords .pw-wizard-dot { background: rgba(0,0,0,0.14); }
html[data-theme="light"] #win-passwords .pw-wizard-btn.ghost {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
}
html[data-theme="light"] #win-passwords .pw-wizard-btn.ghost:hover { background: rgba(0,0,0,0.09); color: #1e293b; }

/* ── DETAIL/HISTORY bordes blancos translucidos -> oscuros ── */
html[data-theme="light"] #win-passwords .pw-detail-field-history,
html[data-theme="light"] #win-passwords .pw-history-item { border-color: rgba(0,0,0,0.06); }
