body {
  margin: 0;
  background: var(--bg-muted);
  color: var(--text-main);
}

.form-w {
  background: var(--bg-main);
  border: 1px solid var(--border-main);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  padding: 24px;
  max-width: 520px;
  margin: 100px auto;
}
.form-w .logo-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}
.form-w h3 {
  font-size: 1.3rem;
  font-weight: normal;
  margin: 0 0 1.5rem;
  text-align: center;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 40px;
  text-align: center;
}

form .field {
  margin-bottom: 20px;
  display: block;
  width: 100%;
}
label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-main);
}
input {
  width: 100%;
  background: var(--bg-muted);
  color: var(--text-main);
  border: 1px solid var(--border-main);
  border-radius: 8px;
  padding: 12px;
  outline: none;
  transition: border-color .15s ease;
}
input:focus {
  border-color: var(--text-main);
}
.errors {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.35);
  color: #fecaca;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.errors.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}
ul.errorlist {
  margin: 8px 0;
  padding-left: 18px;
  color: var(--text-muted);
}
.btn {
  width: 100%;
}
.link {
  display: inline-block;
  text-decoration: none;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-weight: 500;
  font-size: 1.2rem;
}
.link:hover {
  color: var(--text-main);
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  outline: inherit;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.go-to-app-btn-w {
  margin-bottom: 3rem;
  text-align: center;
}
.go-to-app-btn-w .btn {
  display: inline-block;
  width: auto;
  min-width: 200px;
  text-align: center;
}

.messages-w {
  margin-bottom: 1.5rem;
}

.subscription-w {
  margin-bottom: 3rem;
}
.subscription-w span {
  font-size: 1.2rem;
  color: var(--text-muted);
}
.subscription-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.status-active {
  background-color: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.status-trial {
  background-color: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.status-paused {
  background-color: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}
.status-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.status-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.status-cancelled, .status-expired, .status-inactive {
  background-color: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
}
.status-info {
  margin: 10px 0 15px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.link-btn.cancel-link {
  color: var(--text-muted);
  text-decoration: underline;
  font-size: 0.9rem;
}
.link-btn.cancel-link:hover {
  color: var(--text-main);
}
.expiration-info {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.profile-w {
  margin-bottom: 3rem;
}
details.section summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  padding-bottom: 4px;
  outline: none;
  user-select: none;
  margin-bottom: 1.2rem;
  font-weight: 500;
  font-size: 1.2rem;
}
details.section summary:hover {
  color: var(--text-main);
}
details.section[open] summary {
  color: var(--text-main);
}
/* Hide default marker for WebKit; Firefox already hides when list-style none */
details.section summary::-webkit-details-marker {
  display: none;
}
details.section form {
  margin-bottom: 1.5rem;
}
/* Chevron indicator for collapsible section titles */
details.section summary {
  position: relative;
  padding-left: 22px; /* space for chevron */
}
details.section summary::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border: 2px solid currentColor;
  border-left: 0;
  border-top: 0;
  transform: rotate(-45deg);
  transition: transform .15s ease;
}
details.section[open] summary::before {
  transform: rotate(45deg);
}

.footer-w {
  margin-top: 2rem;
  text-align: center;
}
.support-email {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.support-email a {
  color: var(--text-muted);
  text-decoration: underline;
}
.support-email a:hover {
  color: var(--text-main);
}

.logout-link {
  margin-top: 0;
}

.google-auth-container {
  margin-bottom: 24px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 400;
  padding: 10px 24px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color .15s ease;
  background: var(--bg-main);
  color: var(--text-main);
  border: 1px solid var(--border-button);
  width: 100%;
}

.btn-google:hover {
  background: var(--bg-muted);
}

.btn-google img {
  display: block;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-muted);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-main);
}

.divider span {
  padding: 0 10px;
  font-size: 0.9rem;
}

.subscription-info-w {
  margin-top: 2rem;
}


.form-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.form-footer-main {
  display: flex;
  justify-content: space-between;
}
.form-footer a {
  text-decoration: underline;
}

.footer-divider {
  margin: 0 8px;
  color: var(--border-main);
}

.forgot-password-link-w {
  margin-top: 12px;
}
.forgot-password-link-w a {
  text-decoration: underline;
}
