/* ============================================================
   HariSree SSL Alerts — design tokens
   Palette grows from the logo: deep navy + signal teal + coral
   alert accent. Fraunces for display type (echoes the wordmark's
   serif), Inter for everything functional.
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy: #0A2740;
  --navy-2: #0E3A56;
  --navy-deep: #071B2E;
  --teal: #1BC7B5;
  --teal-dark: #109385;
  --coral: #FF6F5E;
  --amber: #E6A700;
  --red: #D8453A;
  --bg: #F3F6F7;
  --paper: #FFFFFF;
  --ink: #12232F;
  --muted: #5B707C;
  --line: #E1E8EA;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(10,39,64,0.04), 0 8px 24px rgba(10,39,64,0.06);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  margin: 0;
  line-height: 1.15;
}
a { color: inherit; }
button { font-family: var(--sans); cursor: pointer; }
img, svg { display: block; max-width: 100%; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-accent { background: var(--teal); color: var(--navy-deep); }
.btn-accent:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-danger { background: transparent; color: var(--red); border-color: #F3D6D3; }
.btn-danger:hover { background: #FCEEEC; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Top nav ---------- */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand-word { font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--navy); }

/* ---------- Landing hero ---------- */
.hero {
  padding: 64px 0 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { font-size: 44px; letter-spacing: -0.5px; }
.hero .lede { color: var(--muted); font-size: 18px; max-width: 46ch; margin-top: 18px; }
.hero .cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: #E9FBF8; color: var(--teal-dark);
  font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.hero-visual {
  background: var(--navy);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.hero-visual::before {
  content: '';
  position: absolute; inset: -40%;
  background: radial-gradient(circle at 30% 20%, rgba(27,199,181,0.35), transparent 60%);
}
.hero-visual .cert-card {
  position: relative;
  background: var(--paper);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow);
}
.hero-visual .cert-card:last-child { margin-bottom: 0; }
.hero-visual .cert-host { font-weight: 600; font-size: 14px; color: var(--navy); }
.hero-visual .cert-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head h2 { font-size: 30px; }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 16px; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--paper);
}
.feature .icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--navy); color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 14px;
}
.feature h3 { font-size: 17px; font-family: var(--sans); font-weight: 600; color: var(--navy); }
.feature p { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pricing-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 680px;
}
.plan-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 28px 24px;
  position: relative;
  overflow: hidden; /* keeps the corner ribbon from poking past the card edge and causing scroll on narrow screens */
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.plan-card.featured {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal), var(--shadow);
}
.plan-card .tag {
  position: absolute; top: 16px; right: -34px;
  background: var(--coral); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 36px; transform: rotate(45deg); letter-spacing: 0.5px;
}
.plan-card h3 { font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.plan-card .price { font-family: var(--serif); font-size: 42px; color: var(--navy); margin: 10px 0 2px; }
.plan-card .price span { font-size: 15px; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.plan-card ul { list-style: none; padding: 0; margin: 20px 0 24px; color: var(--muted); font-size: 14px; }
.plan-card li { padding: 6px 0; display: flex; gap: 8px; }
.plan-card li::before { content: '✓'; color: var(--teal-dark); font-weight: 700; }

/* ---------- Auth panels ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-side {
  background: var(--navy);
  color: #fff;
  padding: 56px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: '';
  position: absolute; inset: -30%;
  background: radial-gradient(circle at 70% 30%, rgba(27,199,181,0.28), transparent 55%);
}
.auth-side h2 { color: #fff; font-size: 32px; position: relative; }
.auth-side p { color: #B9C7CF; margin-top: 14px; max-width: 40ch; position: relative; }
.auth-form-wrap {
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.auth-form {
  width: 100%; max-width: 380px;
}
.auth-form h1 { font-size: 26px; margin-bottom: 6px; }
.auth-form .sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 13px; border-radius: 8px;
  border: 1px solid var(--line); font-size: 14px; font-family: var(--sans);
  background: var(--paper);
}
.field input:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: transparent; }
.form-error {
  background: #FCEEEC; color: var(--red); border: 1px solid #F3D6D3;
  padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; display: none;
}
.form-error.visible { display: block; }
.auth-switch { margin-top: 20px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Dashboard shell ---------- */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy); color: #fff; padding: 24px 18px;
  display: flex; flex-direction: column;
}
.sidebar .brand-word { color: #fff; }
.sidebar nav { margin-top: 40px; display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a, .sidebar-user {
  color: #C9D6DC; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.sidebar nav a.active, .sidebar nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.plan-widget {
  margin-top: auto; background: rgba(255,255,255,0.06); border-radius: 10px; padding: 16px;
}
.plan-widget .name { font-size: 13px; color: #9FB2BB; text-transform: uppercase; letter-spacing: 0.4px; }
.plan-widget .usage { font-family: var(--serif); font-size: 20px; color: #fff; margin: 6px 0 10px; }
.usage-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.15); overflow: hidden; }
.usage-bar > div { height: 100%; background: var(--teal); }

.main {
  padding: 32px 40px;
}
.main-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.main-head h1 { font-size: 26px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
.stat-card .n { font-family: var(--serif); font-size: 28px; color: var(--navy); }
.stat-card .l { font-size: 13px; color: var(--muted); margin-top: 4px; }

.add-domain-form {
  display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.add-domain-form input[type="text"] {
  flex: 1; min-width: 220px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px;
}
.add-domain-form input:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: transparent; }
.add-domain-form select {
  padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px;
  background: var(--paper); color: var(--ink); max-width: 180px;
}
.new-group-row {
  display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap;
}
.new-group-row input {
  flex: 1; min-width: 200px; padding: 10px 13px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px;
}

.active-filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: #EAF2F5; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 16px; font-size: 14px; color: var(--navy);
}

.stat-card { cursor: pointer; transition: box-shadow .12s ease, border-color .12s ease; }
.stat-card:hover { box-shadow: var(--shadow); }
.stat-card.active { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }

.group-tag {
  font-size: 11px; font-weight: 600; color: var(--navy-2); background: #EAF2F5;
  padding: 2px 8px; border-radius: 999px; margin-top: 4px; display: inline-block;
}

/* ---------- Mobile top bar + slide-in sidebar ---------- */
.mobile-topbar { display: none; }
.hamburger {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  width: 40px; height: 40px; font-size: 18px; color: var(--navy);
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(10,39,64,0.5); z-index: 90;
}

.domain-list { display: flex; flex-direction: column; gap: 10px; }
.domain-row {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: flex; align-items: center; gap: 16px;
}
.domain-row .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.domain-row .host { font-weight: 600; color: var(--navy); font-size: 15px; }
.domain-row .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.domain-row .spacer { flex: 1; }
.pill {
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.4px;
}
.pill-valid { background: #E7F8F1; color: #1B8F5C; }
.pill-warning { background: #FDF2DA; color: #A8760A; }
.pill-critical { background: #FDE9E3; color: #C6472F; }
.pill-expired { background: #FBDEDA; color: var(--red); }
.pill-error { background: #EFEFEF; color: #6B6B6B; }
.pill-pending { background: #EAF2F5; color: var(--navy-2); }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--paper);
}
.empty-state h3 { color: var(--navy); margin-bottom: 8px; font-family: var(--sans); font-weight: 600; }

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--navy); color: #fff; padding: 14px 18px; border-radius: 10px;
  font-size: 14px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease; pointer-events: none; max-width: 320px;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--red); }

.admin-table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.admin-table tr:last-child td { border-bottom: none; }
.plan-chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: capitalize; }
.plan-chip-trial { background: #EAF2F5; color: var(--navy-2); }
.plan-chip-starter { background: #E9FBF8; color: var(--teal-dark); }
.plan-chip-pro { background: #FDE9E3; color: var(--coral); }

/* ---------- Upgrade modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,39,64,0.55);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.modal-overlay.visible { display: flex; }
.modal {
  background: var(--paper); border-radius: 16px; padding: 28px;
  max-width: 620px; width: 100%; box-shadow: var(--shadow);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-head h2 { font-size: 22px; }
.modal-close {
  background: none; border: none; font-size: 18px; color: var(--muted);
  width: 32px; height: 32px; border-radius: 8px;
}
.modal-close:hover { background: var(--bg); color: var(--navy); }
.modal-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-plan {
  border: 1px solid var(--line); border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column;
}
.modal-plan.current { border-color: var(--teal); background: #F3FCFB; }
.modal-plan .mp-name { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.modal-plan .mp-price { font-family: var(--serif); font-size: 32px; color: var(--navy); margin: 8px 0 4px; }
.modal-plan .mp-price span { font-size: 13px; color: var(--muted); font-family: var(--sans); }
.modal-plan .mp-detail { font-size: 13px; color: var(--muted); margin-bottom: 16px; flex: 1; }
.modal-plan .mp-current-badge {
  font-size: 12px; font-weight: 700; color: var(--teal-dark); margin-top: 6px; text-align: center;
}
@media (max-width: 560px) {
  .modal-plans { grid-template-columns: 1fr; }
}

footer.site-footer {
  border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px;
  display: flex; justify-content: space-between;
}

@media (max-width: 860px) {
  .topnav {
    flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; padding: 18px 0 22px;
  }
  #navButtons { justify-content: center; width: 100%; }

  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .cta-row { justify-content: center; }
  .hero-visual { max-width: 440px; margin: 0 auto; }

  .section-head { text-align: center; margin-left: auto; margin-right: auto; }
  .features, .pricing-grid { grid-template-columns: 1fr; }
  .feature { text-align: center; }
  .feature .icon { margin-left: auto; margin-right: auto; }
  .pricing-grid-2 { max-width: 420px; margin: 0 auto; }

  /* The rotated corner ribbon looks clipped/broken on narrow screens —
     swap it for a plain inline badge above the plan name instead. */
  .plan-card { text-align: center; }
  .plan-card ul { text-align: left; display: inline-block; }
  .plan-card .tag {
    position: static; display: inline-block; transform: none;
    background: var(--coral); color: #fff; font-size: 11px; font-weight: 700;
    letter-spacing: 0.5px; padding: 4px 10px; border-radius: 6px; margin-bottom: 10px;
  }

  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }

  .app-shell { grid-template-columns: 1fr; }
  .mobile-topbar {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
  }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 100;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.visible { display: block; }
  .main { padding: 16px 18px 24px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .add-domain-form select { max-width: none; flex: 1; }
  .domain-row { flex-wrap: wrap; }
  .domain-row .spacer { display: none; }

  footer.site-footer { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .hero { padding: 32px 0 24px; }
  .hero h1 { font-size: 28px; }
  .hero .lede { font-size: 15px; margin-left: auto; margin-right: auto; }
  .hero-badge { margin-bottom: 12px; }
  .section { padding: 36px 0; }
  .section-head h2 { font-size: 22px; }
  .plan-card .price { font-size: 32px; }
  .main { padding: 14px 14px 20px; }
  .main-head h1 { font-size: 21px; }
  .stat-card { padding: 14px 14px; }
  .stat-card .n { font-size: 22px; }
  .domain-row { padding: 12px 14px; gap: 10px; }
  .domain-row .host { font-size: 14px; }
}
