@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --orange: #f97316;
  --red: #ef4444;
  --gradient: linear-gradient(135deg, #f97316, #ef4444);
  --page-bg: #fef9f5;
  --card-bg: #ffffff;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --input-bg: #f3f4f6;
  --input-border: #e5e7eb;
  --staff-blue: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
}

body.customer-bg {
  background-color: #fef9f5;
}

body.staff-bg {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.auth-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 60px 20px 48px;
}

.auth-above {
  text-align: center;
}

.pizza-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  border-radius: 14px;
  color: #fff;
  flex-shrink: 0;
}

.pizza-icon .pizza-slice-graphic {
  width: 78%;
  height: 78%;
  max-width: 40px;
  max-height: 40px;
  display: block;
  flex-shrink: 0;
}

.pizza-icon--lg {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
}

body.staff-bg .pizza-icon--lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.45);
}

body.staff-bg .pizza-icon--lg .pizza-slice-graphic {
  max-width: 44px;
  max-height: 44px;
  width: 70%;
  height: 70%;
}

.pizza-icon--hero {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35);
}

.pizza-icon--staff-hero {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  margin: 0 auto 16px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.auth-title--sm {
  font-size: 26px;
}

.auth-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 24px;
}

body.staff-bg .auth-title,
body.staff-bg .auth-title-staff {
  color: #fff;
}

.auth-title-staff {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

body.staff-bg .auth-sub {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 24px;
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  max-width: 340px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.role-switch {
  background: #f3f4f6;
  border-radius: 999px;
  padding: 3px;
  display: flex;
  margin-bottom: 20px;
}

.role-switch button {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 0;
  border-radius: 999px;
  cursor: pointer;
  color: #6b7280;
  font-family: inherit;
  min-height: 34px;
  box-sizing: border-box;
  touch-action: manipulation;
}

.role-switch button:focus-visible {
  outline: 2px solid var(--staff-blue);
  outline-offset: 2px;
}

.role-switch button.active {
  color: #fff;
}

.role-switch button.active.customer {
  background: var(--orange);
}

.role-switch button.active.staff {
  background: var(--staff-blue);
}

.field-group {
  margin-bottom: 16px;
}

.field-group--tight {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.field-input-wrap {
  position: relative;
}

.field-input-wrap input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 11px 12px 11px 38px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
}

.field-input-wrap input::placeholder {
  color: var(--text-muted);
}

.field-input-wrap--pwd input {
  padding-right: 38px;
}

.field-input-wrap .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.field-input-wrap .eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
}

.link-orange {
  color: var(--orange);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
}

body.staff-bg .link-staff {
  color: var(--staff-blue);
  text-decoration: none;
  font-size: 13px;
}

.remember-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.remember-row label {
  font-size: 13px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-row input[type='checkbox'] {
  width: 16px;
  height: 16px;
}

.btn-signin {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-signin.customer {
  background: var(--gradient);
  color: #fff;
}

.btn-signin.customer:hover {
  opacity: 0.88;
}

.btn-signin.staff {
  background: var(--staff-blue);
  color: #fff;
}

.btn-signin.staff:hover {
  background: #1d4ed8;
}

.btn-signin {
  box-sizing: border-box;
  min-height: 44px;
  border: 2px solid transparent;
  touch-action: manipulation;
}

.btn-signin:active {
  transform: none;
}

.btn-signin:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.auth-footer {
  text-align: center;
  margin-top: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #374151;
}

.auth-footer a {
  color: var(--orange);
  text-decoration: none;
  cursor: pointer;
}

body.staff-bg .auth-footer a {
  color: var(--staff-blue);
}

.demo-box {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

.demo-box.customer {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.demo-box.staff {
  background: #fefce8;
  border: 1px solid #fde68a;
  color: #92400e;
}

.demo-box.staff strong {
  font-weight: 700;
}

.field-error {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
}

.back-link {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  z-index: 20;
}

.back-link:hover {
  color: var(--orange);
}

.register-page {
  position: relative;
  min-height: 100vh;
}

.terms-row {
  margin-bottom: 16px;
  font-size: 13px;
  color: #374151;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.terms-row a {
  color: var(--orange);
  text-decoration: none;
}

body.staff-bg .terms-row a {
  color: var(--staff-blue);
}

.verify-page {
  min-height: 100vh;
  background: var(--page-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.verify-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  max-width: 420px;
  text-align: center;
}

.verify-card h1 {
  font-size: 22px;
  margin: 0 0 12px;
}

.verify-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.flash-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.flash-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.customer-only,
.staff-only {
  display: none;
}

body.mode-customer .customer-only {
  display: block;
}

body.mode-staff .staff-only {
  display: block;
}

body.mode-staff .staff-inline {
  display: flex;
}

body.mode-customer .staff-inline {
  display: none;
}

.field-group.staff-only {
  margin-bottom: 16px;
}

body.mode-staff .field-group.staff-only {
  display: block;
}

body.mode-customer .field-group.customer-only {
  display: block;
}
