/* SSL Checker — local stylesheet (no CDN) */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/outfit-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/outfit-medium.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/outfit-semibold.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/outfit-bold.woff2") format("woff2");
}

@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vazirmatn-latin-regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vazirmatn-regular.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/vazirmatn-latin-medium.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/vazirmatn-medium.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/vazirmatn-latin-semibold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/vazirmatn-semibold.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/vazirmatn-latin-bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/vazirmatn-bold.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-medium.woff2") format("woff2");
}

:root {
  --bg-0: #05080f;
  --bg-1: #0a1020;
  --line: rgba(148, 163, 184, 0.14);
  --teal: #2dd4bf;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --panel: rgba(15, 23, 42, 0.55);
  --radius: 1.25rem;
  --font-display: "Outfit", "Vazirmatn", sans-serif;
  --font-body: "Outfit", "Vazirmatn", sans-serif;
  --font-fa: "Vazirmatn", "Outfit", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  background:
    radial-gradient(900px 480px at 85% -5%, rgba(45, 212, 191, 0.14), transparent 55%),
    radial-gradient(700px 420px at 5% 20%, rgba(56, 189, 248, 0.08), transparent 50%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1) 42%, #071018);
  -webkit-font-smoothing: antialiased;
}

html[lang="fa"] body,
html[dir="rtl"] body {
  font-family: var(--font-fa);
}

a { color: inherit; text-decoration: none; }
a:hover { color: #99f6e4; }

img { max-width: 100%; }
button, input, textarea { font: inherit; }

.container {
  width: min(100% - 2rem, 64rem);
  margin-inline: auto;
  padding-block: 2.5rem;
}

.glass {
  background: linear-gradient(160deg, rgba(18, 28, 48, 0.72), rgba(10, 16, 32, 0.55));
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border-radius: 1.5rem;
}

.header {
  text-align: center;
  margin-bottom: 2.25rem;
}
.header-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.brand-domain {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(94, 234, 212, 0.85);
}
.brand-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0;
  text-shadow: 0 0 48px rgba(45, 212, 191, 0.28);
}
.brand-tagline {
  max-width: 36rem;
  margin: 0.85rem auto 0;
  color: #94a3b8;
  font-size: 0.98rem;
  line-height: 1.7;
}

.lang-switch {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.8);
  background: rgba(2, 6, 23, 0.45);
}
.lang-switch a {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
}
.lang-switch a.active {
  background: rgba(45, 212, 191, 0.18);
  color: #99f6e4;
}

.panel { padding: 1.35rem; }
@media (min-width: 640px) {
  .panel { padding: 1.75rem; }
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}
.panel-head p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.mode-switch {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(2, 6, 23, 0.5);
}
.mode-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  border-radius: 0.8rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.mode-btn.active {
  background: rgba(45, 212, 191, 0.16);
  border-color: rgba(45, 212, 191, 0.45);
  color: #99f6e4;
}

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}
.field-hint {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.input,
.textarea,
.search-input {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(2, 6, 23, 0.6);
  color: #f1f5f9;
  padding: 0.9rem 1rem;
}
.input::placeholder,
.textarea::placeholder,
.search-input::placeholder { color: #475569; }

.input-domain-wrap { position: relative; }
.input-domain-wrap .prefix {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  display: flex;
  align-items: center;
  padding-inline: 1rem;
  color: #64748b;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.input-domain {
  padding-inline-start: 4.7rem;
  font-size: 1rem;
}

.textarea { min-height: 8rem; resize: vertical; font-size: 0.9rem; }

.public-box {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(2, 6, 23, 0.4);
  cursor: pointer;
  margin: 1.1rem 0;
}
.public-box strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
}
.public-box span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #64748b;
}

.toggle {
  appearance: none;
  width: 2.6rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #334155;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  border: 1px solid #475569;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #e2e8f0;
  transition: transform .2s;
}
.toggle:checked {
  background: rgba(45, 212, 191, 0.45);
  border-color: rgba(45, 212, 191, 0.7);
}
.toggle:checked::after { transform: translateX(1.15rem); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 1rem;
  padding: 0.8rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #020617;
  cursor: pointer;
  background: linear-gradient(90deg, #2dd4bf, #22d3ee);
  box-shadow: 0 10px 30px rgba(45, 212, 191, 0.22);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.progress {
  min-height: 1.25rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 1.75rem 0 1rem;
}
.results-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #fff;
}
.results-head p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #64748b;
}
.search-input { max-width: 18rem; padding: 0.7rem 1rem; font-size: 0.875rem; }

#results-body { display: grid; gap: 1rem; }

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #64748b;
  font-size: 0.9rem;
}
.empty-state.hidden { display: none; }

.check-card {
  position: relative;
  overflow: hidden;
  animation: rise .4s ease-out;
}
.check-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-bar, #64748b);
}
.check-card-inner {
  padding: 1.25rem 1.35rem;
  background: linear-gradient(to left, transparent, var(--card-tone, transparent));
}
html[dir="rtl"] .check-card-inner {
  background: linear-gradient(to right, transparent, var(--card-tone, transparent));
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  justify-content: space-between;
  align-items: flex-start;
}
.card-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.card-domain {
  margin: 0.7rem 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-issuer {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}
.card-issuer strong { color: #e2e8f0; font-weight: 500; }

.days-box {
  min-width: 8.5rem;
  text-align: center;
  padding: 0.85rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.75);
  background: rgba(2, 6, 23, 0.45);
}
.days-box .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.days-box .value {
  margin-top: 0.15rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.8);
  overflow: hidden;
  margin-top: 0.7rem;
}
.meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.1rem;
}
@media (min-width: 640px) {
  .meta-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.meta-item {
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: rgba(2, 6, 23, 0.35);
  padding: 0.75rem 0.85rem;
}

.detail-label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.detail-value {
  margin-top: 0.2rem;
  color: #f1f5f9;
  word-break: break-word;
  font-size: 0.88rem;
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}
.card-foot p {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
}
.btn-ghost {
  border-radius: 0.8rem;
  border: 1px solid rgba(71, 85, 105, 0.85);
  background: rgba(15, 23, 42, 0.6);
  color: #5eead4;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost:hover { border-color: rgba(45, 212, 191, 0.45); }

.detail-panel {
  margin-top: 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: rgba(2, 6, 23, 0.4);
  padding: 1rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem 1.1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 0.5rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-green { background: rgba(16,185,129,.16); color: #6ee7b7; border: 1px solid rgba(16,185,129,.35); }
.badge-yellow { background: rgba(234,179,8,.14); color: #fde68a; border: 1px solid rgba(234,179,8,.35); }
.badge-red { background: rgba(239,68,68,.14); color: #fca5a5; border: 1px solid rgba(239,68,68,.35); }
.badge-slate { background: rgba(148,163,184,.1); color: #cbd5e1; border: 1px solid rgba(148,163,184,.25); }

.mono { font-family: var(--font-mono); }
.ltr { direction: ltr; text-align: left; unicode-bidi: isolate; }
.hidden { display: none !important; }

.pulse-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #2dd4bf;
  animation: pulse 1.4s ease-in-out infinite;
  vertical-align: middle;
  margin-inline-end: 0.4rem;
}
@keyframes pulse {
  0%, 100% { opacity: .35; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1); }
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 50;
  padding: 0.75rem 1.1rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: #ccfbf1;
  font-size: 0.875rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  transition: transform .3s ease;
  max-width: min(92vw, 420px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
}
.footer strong { color: #cbd5e1; }
.footer a { color: rgba(45, 212, 191, 0.9); }
.footer p { margin: 0.4rem 0; }

input:focus, textarea:focus, button:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.45);
  outline-offset: 2px;
}

/* Admin extras */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.admin-tab {
  border-radius: 0.9rem;
  border: 1px solid #334155;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
}
.admin-tab.active {
  background: rgba(45, 212, 191, 0.2);
  border-color: rgba(45, 212, 191, 0.4);
  color: #99f6e4;
}
.table-wrap { overflow-x: auto; border-radius: 1rem; border: 1px solid rgba(51, 65, 85, 0.7); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: start;
}
table.data th {
  background: rgba(15, 23, 42, 0.8);
  color: #94a3b8;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  font-weight: 600;
}
table.data td {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  color: #cbd5e1;
  vertical-align: top;
}
table.data tr:hover td { background: rgba(30, 41, 59, 0.35); }
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
}
.pagination a,
.pagination .page-btn {
  border: 1px solid #334155;
  border-radius: 0.6rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}
.pagination a.active,
.pagination .page-btn.active {
  border-color: rgba(45, 212, 191, 0.5);
  background: rgba(45, 212, 191, 0.15);
  color: #99f6e4;
}
.results-pager {
  margin-top: 1rem;
}
.clear-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
  margin: 0 0 1.1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(2, 6, 23, 0.35);
}
.clear-box .field { margin: 0; }
.clear-box label { margin-bottom: 0.35rem; }
.clear-box .input { width: 5.5rem; padding: 0.55rem 0.7rem; }
.btn-danger {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-radius: 0.8rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger:hover { filter: brightness(1.08); }
.btn-warn {
  border: 1px solid rgba(234, 179, 8, 0.4);
  background: rgba(234, 179, 8, 0.12);
  color: #fde68a;
  border-radius: 0.8rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.login-box { max-width: 26rem; margin-inline: auto; }
.alert-error {
  margin: 1rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-size: 0.875rem;
}
.nav-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.nav-actions a {
  border-radius: 0.9rem;
  border: 1px solid #334155;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  color: #cbd5e1;
}
.nav-actions a.danger {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}
