/* General Styles */

/* Apply full-page background */
body:not(.map-page):not(.insights-page):not(.settings-page):not(.notification-preview-page) {
  background: url('https://images.squarespace-cdn.com/content/v1/647cab6bfaed10613f465e9f/dc51250f-9366-4b86-a766-9406ad935a24/aperture-earth-aerial-istock.jpg');
  background-size: cover; /* Ensures image covers entire page */
  background-position: center; /* Centers the image */
  background-attachment: fixed; /* Keeps background in place */
  background-repeat: no-repeat;
  height: 100vh; /* Full height */
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  color: white;
  min-height: 100vh;
}

body.notification-preview-page {
  background: #f6f1e9;
  color: #1f2a2e;
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
}

body.notification-preview-page main {
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: 120px 24px 80px;
}

/* Ensure main content takes up space without white gaps */
main {
  flex: 1; /* Fills remaining space */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white; /* Adjust text color if needed */
  padding-top: 80px; /* Adjust this value to match the height of your nav */
}

/* Make navbar blend into background */
nav {
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  height: 64px; /* Adjusted height */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
}

/* Hide mobile elements by default */
.hamburger,
.close-button {
  display: none;
}

/* Centered Form Container */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-box {
  background: #ffffff;
  color: #333;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: left;
  max-width: 500px;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.auth-box h2 {
  font-size: 30px;
  margin-bottom: 30px;
  font-weight: 600;
  color: #111827;
}

/* Form Inputs */
.auth-box form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.form-field {
  position: relative;
  margin-bottom: 16px;
}

.form-field:last-child {
  margin-bottom: 24px;
}

.password-field {
  margin-bottom: 8px;
}

.auth-box label {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
  color: #111827;
  font-weight: 500;
}

.auth-box input {
  padding: 12px;
  font-size: 16px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  color: #111827;
}

.auth-box input:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(88, 80, 236, 0.1);
}

.auth-box button {
  background-color: #007bff;
  color: white;
  cursor: pointer;
  font-weight: 500;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  width: 100%;
  margin-top: 10px;
  transition: background-color 0.3s;
}

.auth-box button:hover {
  background-color: #0056b3;
}

/* Password Reset Link */
.auth-box .forgot-password {
  position: absolute;
  right: 0;
  top: 0;
  color: #007bff;
  text-decoration: none;
  font-size: 14px;
  margin-top: 0;
  font-weight: 500;
}

.auth-box .forgot-password:hover {
  text-decoration: underline;
}

/* Not a member text */
.auth-box .signup-text {
  text-align: center;
  margin-top: 24px;
  color: #6B7280;
  font-size: 14px;
}

.auth-box .signup-text a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-logo img {
  height: 32px;
  object-fit: contain;
}

/* Mobile Menu Button Base */
.hamburger,
.close-button {
  display: none;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  position: relative;
  border-radius: 6px;
  transition: background-color 0.2s;
  align-items: center;
  justify-content: center;
}

.hamburger:hover,
.close-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.hamburger:focus,
.close-button:focus {
  outline: none;
}

/* Hamburger Icon */
.hamburger-lines {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: #333;
  transition: all 0.3s ease;
}

.hamburger-lines::before,
.hamburger-lines::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: #333;
  transition: all 0.3s ease;
}

.hamburger-lines::before {
  top: -6px;
}

.hamburger-lines::after {
  top: 6px;
}

/* Close Icon */
.close-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
}

.close-icon::before,
.close-icon::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: #6b7280;
  top: 50%;
  left: 0;
  transition: all 0.3s ease;
}

.close-icon::before {
  transform: rotate(45deg);
}

.close-icon::after {
  transform: rotate(-45deg);
}

/* Active States */
.hamburger.active .hamburger-lines {
  background: transparent;
}

.hamburger.active .hamburger-lines::before {
  top: 0;
  transform: rotate(45deg);
}

.hamburger.active .hamburger-lines::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Navigation Links - Items */
.nav-links li {
  display: flex;
}

/* Navigation Links - Links */
.nav-links a {
  color: #111827;
  text-decoration: none;
  font-size: 16px;
  font-weight: 300;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s;
  position: relative;
}

.nav-links a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -6px;
  height: 2px;
  background: #0a6b57;
  border-radius: 999px;
}

/* Auth Links */
.auth-links {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 50;
}

/* Auth Button */
.auth-links .button {
  background-color: #2563eb;
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.auth-links .button:hover {
  background-color: #1d4ed8;
}

/* User Greeting */
.user-greeting {
  color: #111827;
  font-weight: 300;
  line-height: 1.5;
  padding: 8px 8px 8px 0;
  border-bottom: none;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #111827;
  font: inherit;
}

.user-menu-trigger:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.user-menu-caret {
  font-size: 12px;
  line-height: 1;
  color: #6b7280;
}

.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.15);
  padding: 10px;
  display: none;
  z-index: 60;
}

.user-menu-panel.active {
  display: block;
}

.user-menu-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #111827;
  font-size: 14px;
}

.user-menu-panel a:hover {
  background: rgba(15, 23, 42, 0.06);
}

.user-menu-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 8px 6px;
}

/* Desktop User Greeting */
@media (min-width: 769px) {
  .user-greeting {
    position: static;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
    margin: 0;
    line-height: normal;
    cursor: pointer;
  }

  .user-greeting:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 16px;
  }

  .nav-logo img {
    height: 28px;
  }

  .hamburger {
    display: flex;
    margin-right: -8px;
    margin-top: 0;
  }

  .close-button {
    display: flex;
    position: absolute;
    top: 32px; /* Half of the 64px space to center it */
    right: 16px;
    transform: translateY(-50%); /* Center it perfectly */
    margin: 0;
    padding: 8px;
    transform: translateY(-50%);
  }

  .user-greeting {
    position: static;
    transform: none;
    font-size: 18px;
    z-index: 51;
  }

  .user-menu {
    position: static;
    width: 100%;
    padding: 80px 32px 0;
  }

  .user-menu-trigger {
    width: 100%;
    justify-content: space-between;
    background: #f3f4f6;
  }

  .user-menu-panel {
    position: static;
    display: block;
    border: none;
    box-shadow: none;
    padding: 8px 0 0 16px;
  }

  .user-menu-panel a {
    padding: 14px 16px;
    border-bottom: none;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 500;
  }

  .user-menu-divider {
    display: none;
  }

  .auth-links {
    visibility: hidden;
    position: fixed;
    inset: 0;
    width: 100%;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
  }

  .auth-links.active {
    visibility: visible;
    transform: translateX(0);
    display: flex;
    flex-direction: column;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    margin-top: 64px;
    gap: 0;
    border-top: 1px solid #e5e7eb;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 24px;
    font-size: 16px;
    border-radius: 0;
  }

  .nav-links a:hover {
    background-color: transparent;
  }

  /* Mobile Login Button Styles */
  .auth-links .button {
    display: block;
    width: calc(100% - 76px);
    margin: 16px 24px;
    padding: 16px;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
  }

  .close-button {
    color: #6b7280;
  }

  .close-button .fas {
    font-size: 20px;
  }

  /* Add overlay when menu is active */
  body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 40;
  }

  body.menu-active::after {
    visibility: visible;
    opacity: 1;
  }

  .auth-links {
    z-index: 50;
  }
}

/* Form Container Styles */
.form-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 120px auto 20px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
}

label {
  font-weight: bold;
  margin-bottom: 5px;
}

input,
select,
button {
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

input:focus,
select:focus,
button:focus {
  outline: none;
  border-color: #007bff;0056b3
}

button {
  background-color: #007bff;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
  margin-top: 10px;
}

button:hover {
  background-color: #0056b3;
}

select {
  background-color: #fff;
  appearance: none; /* Remove native dropdown styling */
}

.hidden {
  display: none;
}

/* Spinner for Loading */
#loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.spinner {
  border: 8px solid #f3f3f3; /* Light gray */
  border-top: 8px solid #007bff; /* Blue */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Login Page Styles */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-box {
  background: #ffffff;
  color: #0f3460;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  width: 90%;
  min-height: 480px; /* Ensures the box stays the same height */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Ensures content stays balanced */
}

/* Header */
.login-header img {
  max-width: 100px;
  margin-bottom: 20px;
}

.login-header h1 {
  font-size: 1.8rem;
  margin: 0 0 10px;
  color: #0f3460;
}

/* Reserve Space for Error Message */
.login-message {
  min-height: 40px; /* Reserves space for errors */
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.5;
  color: red; /* Ensure error messages are clearly visible */
  visibility: hidden; /* Keeps space reserved when there's no error */
}

/* Make error message visible when it exists */
.login-message.has-error {
  visibility: visible;
}

/* Login Button */
.login-button {
  display: inline-block;
  background: #007bff;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 5px;
  transition: background 0.3s ease;
  font-weight: bold;
}

.login-button:hover {
  background: #0056b3;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .login-box {
    padding: 20px;
    min-height: 450px; /* Adjust for smaller screens */
  }

  .login-header img {
    max-width: 80px;
  }

  .login-header h1 {
    font-size: 1.5rem;
  }

  .login-message {
    font-size: 0.9rem;
  }

  .login-button {
    font-size: 0.9rem;
    padding: 10px 15px;
  }
}

/* Links */
.auth-box a {
  display: block;
  margin-top: 10px;
  color: #007bff;
  text-decoration: none;
}

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

/* Mobile Optimization */
@media (max-width: 768px) {
  .auth-box {
    width: 90%;
    padding: 30px;
  }
}

/* Password Reset Page Styles */
.password-reset-page {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.password-reset-box {
  background: #ffffff;
  color: #0f3460;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  width: 90%;
  min-height: 400px; /* Reduced height */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center form content properly */
}

/* Reduce space below the title */
.password-reset-header {
  margin-bottom: 10px;
}

/* Properly align form elements */
.password-reset-box form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Input Fields */
.password-reset-box label {
  font-weight: bold;
  text-align: left;
  display: block;
  margin-bottom: 5px;
}

.password-reset-box input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

/* Submit Button */
.password-reset-button {
  display: inline-block;
  background: #007bff;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 5px;
  transition: background 0.3s ease;
  font-weight: bold;
  margin-top: 10px;
}

.password-reset-button:hover {
  background: #0056b3;
}

ul.errorlist {
  color: red; /* Makes the text red */
  list-style-type: none; /* Removes default bullet points */
  padding: 0;
}

ul.errorlist li {
  color: red; /* Ensures all list items inside are red */
  font-weight: bold; /* Optionally make the text bold */
}

/* Form error messages */
.auth-box .errorlist,
.auth-box .error {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #dc2626;
  font-size: 14px;
  margin-top: 8px;
}

.auth-box .errorlist li {
  color: #dc2626;
}

/* Settings Page */
.settings-page {
  background: radial-gradient(circle at top left, rgba(245, 222, 179, 0.35), transparent 50%),
    radial-gradient(circle at 10% 40%, rgba(14, 122, 94, 0.12), transparent 55%),
    #f6f1e9;
  color: #1f2a2e;
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
}

.settings-page main {
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: 120px 24px 80px;
  width: 100%;
}

.settings-shell {
  width: min(960px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-header {
  color: #1f2a2e;
}

.settings-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px;
}

.settings-header h1 {
  font-family: "Space Grotesk", "Work Sans", sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
}

.settings-subhead {
  font-size: 16px;
  max-width: 520px;
  margin: 0;
  color: #556366;
}

.settings-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  color: #111827;
}

.settings-alert {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-left: 4px solid #2563eb;
  padding: 12px 16px;
  border-radius: 12px;
  color: #1e3a8a;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.settings-alert p {
  margin: 0;
}

.settings-section h2 {
  font-family: "Space Grotesk", "Work Sans", sans-serif;
  font-size: 20px;
  margin: 0 0 6px;
}

.settings-muted {
  margin: 0 0 18px;
  color: #475569;
  font-size: 14px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
}

.settings-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.settings-row-text h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.settings-row-text p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  max-width: 420px;
}

.settings-row-stack {
  flex-direction: column;
  align-items: flex-start;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.settings-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.settings-segment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px;
}

.settings-segment label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: #1f2a2e;
  cursor: pointer;
}

.settings-segment input {
  accent-color: #0a6b57;
}

.settings-inline-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-input-suffix {
  font-size: 14px;
  color: #475569;
}

.settings-input-prefix {
  font-size: 14px;
  color: #475569;
}

/* Email preview */
.email-preview {
  width: min(720px, 100%);
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.email-header h1 {
  font-family: "Space Grotesk", "Work Sans", sans-serif;
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 36px);
  color: #1f2a2e;
}

.email-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 600;
  color: #0a6b57;
  margin: 0 0 12px;
}

.email-subhead {
  color: #556366;
  margin: 0 0 24px;
  font-size: 15px;
}

.email-card {
  background: #f8fafc;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}

.email-callout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #1f2937;
  color: #f8fafc;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.email-alert {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
}

.email-alert p {
  margin: 0;
  color: #1f2a2e;
}

.email-alert--critical {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.12);
}

.email-alert--warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.12);
}

.email-alert--good {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.12);
}

.email-alert:last-child {
  margin-bottom: 0;
}

.email-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 24px 0;
}

.email-footer {
  color: #64748b;
  font-size: 13px;
}

.email-footer p {
  margin: 0 0 6px;
}

.email-footer p:last-child {
  margin-bottom: 0;
}

.settings-input {
  width: 100%;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5f5;
  font-size: 15px;
  background: #f8fafc;
  color: #94a3b8;
  box-sizing: border-box;
}

.settings-input:disabled {
  cursor: not-allowed;
}

.settings-link-button {
  background: transparent;
  border: none;
  color: #2563eb;
  font-size: 14px;
  padding: 0;
  margin: 0;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.settings-link-button:hover {
  text-decoration: underline;
}

.settings-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.settings-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.toggle-ui {
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.settings-toggle input:checked + .toggle-ui {
  background: #0a6b57;
}

.settings-toggle input:checked + .toggle-ui::after {
  transform: translateX(22px);
}

.settings-toggle input:disabled + .toggle-ui {
  opacity: 0.65;
  cursor: not-allowed;
}

.settings-actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-button {
  border-radius: 10px;
  padding: 12px 18px;
  border: none;
  background: #0f172a;
  color: #fff;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.65;
}

.settings-note {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

@media (max-width: 768px) {
  .settings-page main {
    padding: 100px 18px 60px;
  }

  .settings-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-toggle {
    align-self: flex-start;
  }

  .settings-card {
    padding: 18px;
  }

  .settings-inline-input {
    flex-wrap: wrap;
    row-gap: 6px;
    width: 100%;
  }

  .settings-page .settings-input {
    max-width: 100%;
    width: 100%;
  }

  .settings-inline-input .settings-input {
    flex: 1;
    min-width: 0;
  }

  .settings-list-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-actions .settings-button {
    width: 100%;
  }

  .settings-segment {
    width: auto;
    align-self: center;
    justify-content: flex-start;
  }
}