/* Blackhount Watch — App CSS */
:root {
  --navy: #0a1a2f;
  --accent: #0a1a2f;
  --offwhite: #f5f3ef;
  --muted: #9fb0c4;
  --danger: #e05252;
  --success: #3a9e6f;
  --warning: #e08c3a;
  --radius: 8px;
  --font: 'Inter', system-ui, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--offwhite);
  color: var(--navy);
  min-height: 100vh;
}

/* NAV */
.watch-nav {
  background: var(--navy);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.watch-nav .logo {
  color: var(--offwhite);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.watch-nav .logo span { color: var(--navy); }
.watch-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.watch-nav .nav-right a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.watch-nav .nav-right a:hover { color: var(--offwhite); }
.watch-nav .nav-right .btn-logout {
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--muted);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.85rem;
}
.watch-nav .nav-right .btn-logout:hover { border-color: var(--navy); color: var(--navy); }

/* LAYOUT */
.watch-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* AUTH PAGES */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
}
.auth-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
}
.auth-card .auth-logo span { color: var(--navy); }
.auth-card h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--navy);
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--navy);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--navy); }
.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--navy);
  color: var(--navy);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-footer {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.88rem;
  color: #777;
}
.auth-footer a { color: var(--navy); text-decoration: none; font-weight: 600; }
.error-msg {
  background: #fff0f0;
  border: 1px solid #f5c6c6;
  color: var(--danger);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: none;
}

/* DASHBOARD */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}
.trial-badge {
  background: var(--navy);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* STATS ROW */
.stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e5e0d8;
  padding: 1.25rem 1.5rem;
  flex: 1;
  min-width: 140px;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
}
.stat-card .stat-sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

/* POSTURE SCORE */
.score-good  { color: var(--success); }
.score-warn  { color: var(--warning); }
.score-bad   { color: var(--danger); }

/* ASSETS TABLE */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-header h2 { font-size: 1.1rem; font-weight: 700; }
.btn-add {
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-add:hover { opacity: 0.85; }

.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e5e0d8;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.asset-row {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0ece4;
  gap: 1rem;
}
.asset-row:last-child { border-bottom: none; }
.asset-domain { font-weight: 700; font-size: 0.95rem; flex: 1; }
.asset-type {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}
.type-self { background: #e8f0fe; color: #1a56db; }
.type-vendor { background: #fef3e8; color: #b45309; }
.asset-score { font-size: 1.1rem; font-weight: 800; min-width: 60px; text-align: right; }
.asset-last-scan { font-size: 0.78rem; color: var(--muted); min-width: 100px; text-align: right; }
.btn-delete {
  background: transparent;
  border: 1px solid #ddd;
  color: var(--muted);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}
.btn-delete:hover { border-color: var(--danger); color: var(--danger); }

.empty-state {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--muted);
}
.empty-state p { margin-bottom: 1rem; }

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,26,47,0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.modal h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.modal-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }
.btn-cancel {
  padding: 0.55rem 1.1rem;
  background: transparent;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--navy);
}
.btn-confirm {
  padding: 0.55rem 1.2rem;
  background: var(--navy);
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--navy);
}

/* UPGRADE BANNER */
.upgrade-banner {
  background: var(--navy);
  color: var(--offwhite);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.upgrade-banner p { font-size: 0.9rem; color: var(--muted); }
.upgrade-banner strong { color: var(--offwhite); }
.btn-upgrade {
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

@media (max-width: 600px) {
  .stats-row { flex-direction: column; }
  .watch-container { padding: 1rem; }
  .asset-last-scan { display: none; }
}

/* Watch app homepage */
.watch-home-body {
  min-height: 100vh;
  margin: 0;
  background: #f5f3ef;
  color: #0a1a2f;
}

.watch-home {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  box-sizing: border-box;
}

.watch-home-panel {
  width: min(960px, 100%);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding: 36px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 22px 56px rgba(10, 26, 47, 0.12);
  border: 1px solid rgba(10, 26, 47, 0.08);
  box-sizing: border-box;
  overflow: hidden;
}

.watch-home-copy {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.watch-kicker,
.watch-card-label {
  margin: 0 0 12px;
  color: #52657a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.watch-home h1 {
  margin: 0;
  max-width: 560px;
  color: #0a1a2f;
  font-size: clamp(2.55rem, 5vw, 4.1rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.watch-home-lead {
  max-width: 540px;
  margin: 22px 0 0;
  color: #334155;
  font-size: 1.08rem;
  line-height: 1.55;
}

.watch-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.watch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.watch-button:hover {
  transform: translateY(-1px);
}

.watch-button.primary {
  background: #0a1a2f;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(10, 26, 47, 0.2);
}

.watch-button.secondary {
  background: #ffffff;
  color: #0a1a2f;
  border: 1px solid rgba(10, 26, 47, 0.16);
}

.watch-home-card {
  width: 300px;
  flex: 0 0 300px;
  padding: 26px;
  border-radius: 22px;
  background: #0a1a2f;
  color: #f5f3ef;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.watch-feature {
  padding: 18px 0;
  border-top: 1px solid rgba(245, 243, 239, 0.13);
}

.watch-feature strong {
  display: block;
  margin-bottom: 7px;
  color: #ffffff;
  font-size: 1rem;
}

.watch-feature span {
  display: block;
  color: #cbd5e1;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .watch-home {
    align-items: flex-start;
    padding: 24px 16px;
  }

  .watch-home-panel {
    flex-direction: column;
    padding: 28px;
    border-radius: 22px;
  }

  .watch-home h1 {
    font-size: clamp(2.35rem, 11vw, 3.6rem);
  }

  .watch-home-lead {
    font-size: 1.03rem;
  }

  .watch-home-card {
    width: auto;
    flex: 0 1 auto;
  }
}


/* Logo treatment */
.watch-home-logo,
.auth-logo-img {
  display: block;
  background: #0a1a2f;
  -webkit-mask-image: url('/public/img/blackhount-wordmark.png');
  mask-image: url('/public/img/blackhount-wordmark.png');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.watch-home-logo {
  width: 156px;
  max-width: 55vw;
  height: 45px;
  margin: 0 0 24px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.35rem;
}

.auth-logo-img {
  width: 148px;
  max-width: 70%;
  height: 43px;
}

.auth-product-name {
  color: #0a1a2f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


.scan-message {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid #d9e0e8;
  color: #0a1a2f;
  font-size: 0.9rem;
  font-weight: 600;
}

.scan-message.success {
  border-color: rgba(10, 26, 47, 0.24);
  background: rgba(10, 26, 47, 0.05);
}

.scan-message.error {
  border-color: #f5c6c6;
  background: #fff0f0;
  color: #e05252;
}

.btn-scan {
  border: 1px solid rgba(10, 26, 47, 0.18);
  background: #0a1a2f;
  color: #ffffff;
  border-radius: 7px;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-scan:disabled {
  opacity: 0.65;
  cursor: wait;
}


.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.btn-primary-small,
.btn-secondary-small {
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary-small {
  border: 1px solid #0a1a2f;
  background: #0a1a2f;
  color: #ffffff;
}

.btn-secondary-small {
  border: 1px solid rgba(10, 26, 47, 0.16);
  background: #ffffff;
  color: #0a1a2f;
}

.plans-modal {
  max-width: 640px;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.plan-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-height: 145px;
  border: 1px solid rgba(10, 26, 47, 0.14);
  border-radius: 12px;
  background: #ffffff;
  color: #0a1a2f;
  padding: 1rem;
  text-align: left;
  cursor: pointer;
}

.plan-option:hover {
  border-color: #0a1a2f;
}

.plan-option strong {
  font-size: 1rem;
}

.plan-option span {
  font-size: 0.9rem;
  font-weight: 800;
}

.plan-option small {
  color: #52657a;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .page-header {
    align-items: flex-start;
    gap: 1rem;
  }

  .header-actions {
    justify-content: flex-start;
  }

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