:root {
  --spread-orange: #ff7a18;
  --spread-orange-dark: #e56a0f;
  --spread-orange-light: #fff4eb;
  --spread-text: #212b36;
  --spread-muted: #637381;
  --spread-border: #dfe3e8;
  --spread-danger: #ff5630;
  --spread-success: #22c55e;
  --spread-radius: 12px;
  --spread-shadow: 0 12px 24px rgba(145, 158, 171, 0.12);
  font-family: "Public Sans", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--spread-text);
  background: #f4f6f8;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--spread-orange-light) 0%, #ffffff 55%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--spread-radius);
  box-shadow: var(--spread-shadow);
  padding: 40px 32px 32px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.auth-logo img {
  max-width: 180px;
  height: auto;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
}

.auth-subtitle {
  margin: 0 0 24px;
  text-align: center;
  color: var(--spread-muted);
  font-size: 0.95rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--spread-border);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--spread-orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.2);
}

.form-control.is-invalid {
  border-color: var(--spread-danger);
}

.field-error {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--spread-danger);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, opacity 0.2s;
}

.btn-primary {
  width: 100%;
  background: var(--spread-orange);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--spread-orange-dark);
}

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

.btn-link {
  background: transparent;
  color: var(--spread-orange);
  padding: 0;
  font-weight: 600;
}

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 0.9rem;
}

.alert-success {
  background: #ecfdf3;
  color: #027a48;
  border: 1px solid #abefc6;
}

.alert-error {
  background: #fff2f0;
  color: #b42318;
  border: 1px solid #fecdca;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--spread-orange);
  text-decoration: none;
  font-weight: 600;
}

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

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-primary.is-loading .spinner {
  display: inline-block;
}

.btn-primary.is-loading .btn-label {
  opacity: 0.85;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: #fff;
  border-bottom: 1px solid var(--spread-border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-header img {
  height: 36px;
}

.app-main {
  flex: 1;
  padding: 32px 24px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.dashboard-card {
  background: #fff;
  border-radius: var(--spread-radius);
  box-shadow: var(--spread-shadow);
  padding: 28px;
}

.role-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--spread-orange-light);
  color: var(--spread-orange-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .auth-card {
    padding: 28px 20px 24px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
