/* Loaded as its own asset — never split for Surge. Keeps auth modals usable if main CSS chunks fail to parse. */
:root {
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --primary-bg: rgba(234, 88, 12, 0.08);
  --bg-muted: #f4f4f5;
  --card-bg: #ffffff;
  --text: #18181b;
  --text-muted: #71717a;
  --border: rgba(24, 24, 27, 0.08);
  --radius: 10px;
  --radius-md: 12px;
  --radius-xl: 16px;
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.18);
}

html.modal-open,
html.modal-open body {
  overflow: hidden;
  touch-action: none;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  padding-top: max(20px, env(safe-area-inset-top, 0px));
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.55);
  z-index: 9000;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overscroll-behavior: contain;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  isolation: isolate;
}

.modal-overlay[aria-hidden='false'] {
  display: flex !important;
}

.modal-overlay[aria-hidden='true'] {
  display: none !important;
}

.modal {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 400px;
  padding: 24px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin: auto;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: inherit;
  background-color: var(--bg-muted);
  color: var(--text);
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.12);
}

.form-error {
  font-size: 0.8125rem;
  color: #ff3b30;
  margin-bottom: 10px;
  min-height: 1.2em;
}

.form-error:empty {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: rgba(234, 88, 12, 0.4);
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  min-height: 0;
  color: var(--primary);
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
