/* ===================================
   Cybersec Portal — Clean white theme
   Inspired by modern SaaS dashboards
   =================================== */

:root {
  --bg: #f5f5f7;
  --white: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #111827;
  --primary-hover: #374151;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;
  --bad: #dc2626;
  --bad-bg: #fef2f2;
  --bad-border: #fecaca;
  --accent: #2563eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --radius: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

/* ===== Form elements ===== */

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}

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

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--white);
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s;
}

button:hover {
  background: var(--primary-hover);
}

button.btn-secondary {
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
}

button.btn-secondary:hover {
  background: var(--bg);
}

/* ===== Layout ===== */

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ===== Sidebar ===== */

.sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  padding: 0 8px;
  margin-bottom: 24px;
}

.brand::before {
  content: '';
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, #4b5563 100%);
  border-radius: var(--radius);
}

/* Logo branding */
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  margin-bottom: 24px;
}

.brand-logo img {
  max-width: 100%;
  max-height: 48px;
  object-fit: contain;
}

.sidebar-logo {
  padding: 8px 12px;
  margin-bottom: 20px;
}

.sidebar-logo img {
  max-height: 36px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.menu a::before {
  content: '';
  width: 18px;
  height: 18px;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  opacity: .7;
}

.menu a[href*="dashboard"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z'/%3E%3C/svg%3E");
}

.menu a[href*="breach"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'/%3E%3C/svg%3E");
}

.menu a[href*="backup"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10'/%3E%3C/svg%3E");
}

.menu a:hover {
  background: var(--bg);
  color: var(--text);
}

.menu a.active {
  background: var(--bg);
  color: var(--text);
}

.sidebar form {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar button {
  width: 100%;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
}

.sidebar button:hover {
  background: var(--bg);
  color: var(--text);
}

/* ===== Main content ===== */

.content {
  padding: 32px 40px;
  max-width: 1200px;
}

.content > h1 {
  margin-bottom: 4px;
}

.content > .muted {
  margin-bottom: 8px;
}

/* ===== Helpers ===== */

.muted {
  color: var(--muted);
  font-size: 13px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 20px;
}

.hr {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ===== Cards ===== */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card.ok {
  border-left: 4px solid var(--ok);
  background: var(--ok-bg);
}

.card.bad {
  border-left: 4px solid var(--bad);
  background: var(--bad-bg);
}

.card .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.card .muted {
  font-size: 13px;
}

.card.ok .title {
  color: var(--ok);
}

.card.bad .title {
  color: var(--bad);
}

/* ===== Info card (dashboard explanation) ===== */

.info-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.info-card .title {
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 4px;
}

.info-card .muted {
  color: #0c4a6e;
}

/* ===== Alert ===== */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bad-bg);
  border: 1px solid var(--bad-border);
  color: var(--bad);
  font-size: 13px;
  margin-bottom: 12px;
}

.alert.success {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok);
}

/* ===== Table ===== */

.table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.table .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius);
}

.row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  background: var(--white);
  padding: 2px;
}

/* ===== Pre / code ===== */

.pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 12px;
  overflow: auto;
  max-height: 280px;
}

/* ===== Login page ===== */

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f7 0%, #e5e7eb 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
}

.login-card .brand {
  justify-content: center;
  margin-bottom: 32px;
}

.login-card .brand-logo {
  justify-content: center;
  margin-bottom: 28px;
}

.login-card .brand-logo img {
  max-height: 56px;
}

.login-card h1 {
  text-align: center;
  margin-bottom: 8px;
}

.login-card .subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 24px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-card button {
  margin-top: 8px;
}

/* ===== Security Banner ===== */

.security-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.security-banner-icon {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ok);
  color: white;
  border-radius: 50%;
  font-size: 20px;
  flex-shrink: 0;
}

.security-banner-icon .pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 0; }
}

.security-banner-icon i {
  position: relative;
  z-index: 1;
}

.security-banner-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.security-banner-content strong {
  font-size: 15px;
  color: #065f46;
}

.security-banner-content span {
  font-size: 13px;
  color: #047857;
}

/* ===== Dashboard Header ===== */

.dashboard-header {
  margin-bottom: 24px;
}

.dashboard-header h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

/* ===== Stats Row ===== */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card.highlight-ok {
  border-color: var(--ok-border);
  background: var(--ok-bg);
}

.stat-card.highlight-warn {
  border-color: #fcd34d;
  background: #fffbeb;
}

.stat-card.highlight-bad {
  border-color: var(--bad-border);
  background: var(--bad-bg);
}

.stat-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.stat-icon i {
  font-size: 20px;
  color: var(--text);
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-sub {
  font-size: 12px;
  color: var(--muted);
}

/* ===== Scan Section ===== */

.scan-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.scan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.scan-header h2 {
  margin-bottom: 4px;
}

.btn-scan {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary) 0%, #374151 100%);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  box-shadow: var(--shadow);
}

.btn-scan:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.btn-icon {
  font-size: 16px;
}

.btn-icon i {
  font-size: 14px;
}

.scan-placeholder {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 40px 20px;
  margin-top: 24px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border);
}

.scan-placeholder-icon {
  font-size: 48px;
  opacity: .5;
}

.scan-placeholder-icon i {
  font-size: 40px;
}

.scan-placeholder-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scan-placeholder-text strong {
  font-size: 16px;
  color: var(--text);
}

.scan-placeholder-text span {
  font-size: 13px;
  color: var(--muted);
}

/* ===== Scan Results ===== */

.scan-results {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.scan-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.scan-results-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.scan-date {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 20px;
}

/* Results message */
.results-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}

.results-message.ok {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok-border);
}

.results-message.warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.results-message i {
  font-size: 18px;
}

/* Scan footer */
.scan-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.scan-footer i {
  color: var(--accent);
}

.checks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--border);
  transition: background .15s;
}

.check-item:hover {
  background: #f0f0f2;
}

.check-item.ok {
  border-left-color: var(--ok);
}

.check-item.warn {
  border-left-color: #fbbf24;
  background: #fffbeb;
  border-left-width: 3px;
}

.check-item.bad {
  border-left-color: var(--bad);
}

.check-status {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.check-item.ok .check-status {
  background: var(--ok-bg);
  color: var(--ok);
  border: 2px solid var(--ok);
}

.check-item.warn .check-status {
  background: #fef3c7;
  color: #d97706;
  border: 2px solid #fbbf24;
}

/* Optional checks */
.optional-checks {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.optional-checks-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.optional-checks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.optional-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.optional-check i {
  font-size: 8px;
}

.optional-check.ok {
  color: var(--ok);
}

.optional-check.ok i {
  font-size: 12px;
}

.optional-checks-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.check-item.bad .check-status {
  background: var(--bad-bg);
  color: var(--bad);
  border: 2px solid var(--bad);
}

.check-content {
  flex: 1;
  min-width: 0;
}

.check-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.check-summary {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.check-desc {
  font-size: 12px;
  color: var(--muted);
  opacity: .8;
  font-style: italic;
}

/* ===== Features Section ===== */

.features-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.features-section h2 {
  margin-bottom: 20px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.feature-card {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color .15s;
}

.feature-card:hover {
  border-color: #cbd5e1;
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.feature-icon i {
  font-size: 22px;
  color: var(--text);
}

.feature-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.feature-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== Breach Page ===== */

.breach-hero {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.breach-hero-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 20px;
  flex-shrink: 0;
}

.breach-hero-content h2 {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}

.breach-hero-content p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.breach-hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.breach-hero-features span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.breach-hero-features i {
  color: var(--ok);
  font-size: 10px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.card-header i {
  color: var(--accent);
  font-size: 18px;
}

.card-header .title {
  margin-bottom: 0;
}

.breach-form {
  margin-top: 12px;
}

.input-group {
  display: flex;
  gap: 12px;
}

.input-group input {
  flex: 1;
}

.input-group button {
  white-space: nowrap;
}

.breach-results {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.breach-results-header {
  margin-bottom: 20px;
}

.breach-results-header h2 {
  font-size: 18px;
}

.breach-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.breach-alert.danger {
  background: #fef2f2;
  border-left: 3px solid var(--bad);
}

.breach-alert.success {
  background: var(--ok-bg);
  border-left: 3px solid var(--ok);
}

.breach-alert-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.breach-alert.danger .breach-alert-icon {
  color: var(--bad);
}

.breach-alert.success .breach-alert-icon {
  color: var(--ok);
}

.breach-alert-content strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--text);
}

.breach-alert-content p {
  font-size: 13px;
  margin: 0;
  color: var(--muted);
}

.breach-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.breach-stat {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.breach-stat-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.breach-stat.ok .breach-stat-value { color: var(--ok); }
.breach-stat.warn .breach-stat-value { color: #b45309; }
.breach-stat.bad .breach-stat-value { color: var(--bad); }

.breach-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  margin-top: 4px;
}

.breach-stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.breach-section {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.breach-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.data-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.data-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text);
}

.password-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.password-item {
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.password-item.danger {
  border-left: 3px solid var(--bad);
}

.password-item.warning {
  border-left: 3px solid #f59e0b;
}

.password-count {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.password-item.danger .password-count { color: var(--bad); }
.password-item.warning .password-count { color: #b45309; }

.password-label {
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  color: var(--text);
}

.password-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.breach-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breach-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius);
}

.breach-item-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.breach-item-logo img {
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
}

.breach-item-logo i {
  color: var(--muted);
}

.breach-item-content {
  flex: 1;
  min-width: 0;
}

.breach-item-name {
  font-weight: 600;
  font-size: 14px;
}

.breach-item-domain {
  font-size: 12px;
  color: var(--muted);
}

.breach-item-date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.breach-item-records {
  font-size: 12px;
  color: var(--muted);
  background: var(--white);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.action-section {
  background: var(--bg);
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 20px;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.action-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.action-number {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: white;
  font-weight: 600;
  font-size: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.action-content strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--text);
}

.action-content p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.resource-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 13px;
  color: var(--text);
  transition: border-color .15s;
}

.resource-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.resource-card i {
  color: var(--muted);
  font-size: 14px;
}

.resource-card:hover i {
  color: var(--accent);
}

.tips-list {
  margin: 0;
  padding-left: 20px;
}

.tips-list li {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
}

/* ===== Mobile Menu ===== */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.mobile-header .brand-logo {
  display: flex;
  align-items: center;
}

.mobile-header .brand-logo img {
  height: 36px;
}

.menu-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 18px;
  color: var(--text);
}

.menu-toggle:hover {
  background: var(--bg);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
  opacity: 0;
  transition: opacity .2s;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }

  .layout {
    grid-template-columns: 1fr;
    padding-top: 56px;
  }

  .brand-logo {
    margin:0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 200;
    border-right: 1px solid var(--border);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar .sidebar-logo {
    padding-top: 20px;
  }

  .content {
    padding: 20px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .scan-header {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-scan {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  /* Prevent iOS zoom on input focus */
  input, select, textarea {
    font-size: 16px;
  }

  /* Prevent horizontal overflow */
  .content {
    overflow-x: hidden;
  }

  .breach-results {
    padding: 16px;
    margin-left: -4px;
    margin-right: -4px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .breach-hero {
    flex-direction: column;
    text-align: center;
  }

  .breach-hero-features {
    justify-content: center;
  }

  .breach-stats {
    grid-template-columns: 1fr;
  }

  .breach-stat {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .breach-stat-value {
    font-size: 18px;
    margin: 0;
  }

  .breach-stat-label {
    margin-top: 0;
  }

  .password-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .resource-grid {
    flex-direction: column;
  }

  .input-group {
    flex-direction: column;
  }

  .action-section {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .data-tags {
    gap: 4px;
  }

  .data-tag {
    font-size: 11px;
    padding: 4px 8px;
  }
}
