*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 20px;
}

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #162033;
  color: #E2E8F0;
}

a {
  color: #2DD4BF;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   GLOBAL APP BACKGROUND
========================= */

.app-bg {
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.05), transparent 25%),
    linear-gradient(180deg, #080e1c, #0b1224);
}

/* =========================
   GLOBAL PAGE LAYOUT
========================= */

.site-shell {
  min-height: calc(100vh - 73px);
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  min-height: calc(100vh - 73px);
  display: flex;
  flex-direction: column;
}

@media (min-width: 901px) {
  .site-shell,
  .site-main {
    min-height: calc(100vh - 79px);
  }
}

/* =========================
   PAGE CONTAINERS
========================= */

.page {
  margin: 26px;
  padding-top: 8px;
}

.page--full {
  margin: 0;
}

.page--narrow {
  margin: 26px;
  max-width: 1200px;
}

/* =========================
   GENERIC UI
========================= */

.card {
  background: #1B263B;
  border: 1px solid #2A364D;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px !important;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

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

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

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.ok {
  background: #0f4a37;
}

.fail {
  background: #4a1820;
}

.warn {
  background: #5a3416;
}

.unknown {
  background: #27344d;
}

.mode {
  background: #22314a;
  border: 1px solid #31435f;
}

.active {
  background: #134735;
  border: 1px solid #1b6248;
}

.inactive {
  background: #43202a;
  border: 1px solid #64313d;
}

.protected {
  background: #134735;
  border: 1px solid #1b6248;
}

.needs-attention {
  background: #4a1820;
  border: 1px solid #b91c1c;
}

.pending {
  background: #27344d;
  border: 1px solid #3a4b69;
}

.btn {
  display: inline-block;
  border: 1px solid #2A364D;
  background: #111827;
  color: #E2E8F0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}

.btn:hover {
  border-color: #41526f;
}

.btn-primary {
  display: inline-block;
  border: 1px solid #1f8f7d;
  background: #14B8A6;
  color: white;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.empty {
  border: 1px dashed #41526f;
  border-radius: 14px;
  padding: 24px;
  background: #111827;
}

.form-box {
  border: 1px solid #2A364D;
  border-radius: 14px;
  padding: 18px;
  background: #111827;
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  color: #A8B3C7;
}

.field input,
.field select,
.field textarea {
  background: #1B263B;
  color: #E2E8F0;
  border: 1px solid #41526f;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
}

.muted {
  color: #A8B3C7;
  font-size: 14px;
  padding-bottom: 10px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.subtle-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #2A364D;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.error {
  border: 1px solid #8b2431;
  background: #3a121b;
  color: #fecaca;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.success {
  border: 1px solid #1d6b3a;
  background: #102617;
  color: #bbf7d0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  margin-top: 15px;
}

code {
  background: #111827;
  padding: 2px 6px;
  border-radius: 8px;
}

img {
  max-width: 100%;
  border-radius: 10px;
}

pre {
  white-space: pre-wrap;
  margin-top: 10px;
  line-height: 1.35;
}

details {
  margin-top: 10px;
  background: #0b1220;
  border-radius: 10px;
  padding: 10px 12px;
}

summary {
  cursor: pointer;
  color: #cbd5e1;
  font-size: 16px;
}

.caption {
  margin-top: 8px;
  color: #94A3B8;
  font-size: 12px;
}

.btn[disabled],
.btn-primary[disabled],
input[disabled],
select[disabled],
textarea[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================
   AUTH SYSTEM
========================= */

.auth-page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.auth-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px 24px 72px;
}
.fin {
  padding-top: 43px !important;

}
.auth-card {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.auth-copy {
  margin-bottom: 30px;
}

.auth-title {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(2.35rem, 4.2vw, 3.25rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.auth-subtitle {
  margin: 14px 0 0;
  max-width: 580px;
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.58;
}

.auth-error {
  margin-top: 18px;
  margin-bottom: 8px;
}

.auth-form {
  width: 100%;
  margin-top: 30px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-field + .auth-field {
  margin-top: 18px;
}

.auth-field label {
  font-size: 1rem;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: -0.01em;
}

.auth-field input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.52);
  background: rgba(17, 24, 39, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #f8fafc;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.auth-field input::placeholder {
  color: #64748b;
}

.auth-field input:focus {
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(17, 24, 39, 0.66);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.08);
}

.auth-submit {
  width: 100%;
  margin-top: 24px;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #1fd1c1, #14b8a6);
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.18);
}

.auth-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.2);
}

.auth-meta {
  margin-top: 18px;
  color: #7f8ea7;
  font-size: 0.94rem;
  line-height: 1.65;
}

.auth-meta a {
  color: #cbd5e1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-secondary {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  color: #94a3b8;
  font-size: 1rem;
}

.auth-secondary a {
  color: #2dd4bf;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.auth-secondary a:hover {
  text-decoration: underline;
}

/* =========================
   AUTH GOOGLE
========================= */

.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff;
  backdrop-filter: blur(6px);
  color: #000;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s ease;
  margin-bottom: 16px;
}


.auth-google-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}

.auth-google-icon svg {
  width: 18px;
  height: 18px;
}


.auth-google-btn span:last-child {
  letter-spacing: -0.01em;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 6px 0 18px;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid #223047;
}

.auth-divider span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 10px;
  background: #0b1220;
  color: #94a3b8;
  font-size: 13px;
}


/* autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f8fafc !important;
  transition: background-color 9999s ease-out 0s;
  -webkit-box-shadow: 0 0 0 1000px #182338 inset !important;
  box-shadow: 0 0 0 1000px #182338 inset !important;
  border: 1px solid rgba(71, 85, 105, 0.52) !important;
  border-radius: 18px !important;
}

/* =========================
   FOOTER
========================= */

.lw-footer {
  width: 100%;
  padding-top: 30px;
  padding-bottom: 40px;
  background: #081220;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.lw-footer__nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 23px;
}

.lw-footer__nav a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.95rem;
}

.lw-footer__nav a:hover {
  color: #E2E8F0;
}

.lw-footer__divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 22px 0 28px;
}

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

.lw-footer__logo {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.lw-footer__desc {
  color: #94a3b8;
  max-width: 420px;
  line-height: 1.65;
  font-size: 0.96rem;
}

.lw-footer__meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  color: #7f8ea7;
}

.lw-footer__meta span {
  display: block;
  margin-top: 4px;
}

.lw-footer__copy {
  font-size: 0.95rem;
  color: #E2E8F0;
}

.lw-footer__tag {
  font-size: 0.95rem;
  color: #94a3b8;
}

.lw-footer__social {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
}

.lw-footer__social a {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0.8;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.15s ease;
}

.lw-footer__social a:hover {
  opacity: 1;
  background: rgba(20,184,166,0.15);
  border-color: rgba(20,184,166,0.4);
}

.lw-footer__social svg {
  width: 18px;
  height: 18px;
}

.lw-footer__status {
  margin-top: 6px;
  font-size: 0.88rem;
  color: #7f8ea7;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.lw-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}

.lw-footer-sep {
  opacity: 0.5;
}

.fb-icon svg {
  width: 24px;
  height: 24px;
}

.lw-footer__nav a {
  color: #94a3b8;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.lw-footer__nav a:hover {
  color: #14b8a6;
}

.footer-back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #94a3b8 !important;
}

.footer-arrow-up {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.footer-back-to-top:hover .footer-arrow-up {
  transform: translateY(-2px);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 860px) {
  .auth-wrap {
    padding: 40px 18px 56px;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .auth-title {
    font-size: clamp(2.1rem, 9vw, 2.8rem);
    max-width: 12ch;
  }

  .auth-subtitle {
    font-size: 0.96rem;
    line-height: 1.5;
    max-width: 100%;
  }

  .auth-field input {
    min-height: 54px;
    font-size: 0.96rem;
  }

  .auth-submit {
    min-height: 50px;
    font-size: 0.96rem;
  }
}