/* ============================================================
   ORDERFLOW - GLOBAL STYLES
   ============================================================ */

:root {
  --of-bg: #f5f7fb;
  --of-surface: #ffffff;
  --of-border: #e6e9f0;
  --of-text: #1a2233;
  --of-muted: #6b7280;
  --of-primary: #4f46e5;
  --of-primary-dark: #4338ca;
  --of-primary-soft: #eef2ff;
  --of-success: #10b981;
  --of-warning: #f59e0b;
  --of-danger: #ef4444;
  --of-info: #3b82f6;
  --of-radius: 12px;
  --of-radius-sm: 8px;
  --of-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px rgba(16, 24, 40, 0.06);
  --of-shadow-lg: 0 10px 30px rgba(16, 24, 40, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--of-text);
  background: var(--of-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--of-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }
.muted { color: var(--of-muted); }

/* ---------- Auth pages ---------- */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f7fb 50%, #ecfeff 100%);
  padding: 24px;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  max-width: 980px;
  width: 100%;
  background: var(--of-surface);
  border-radius: 20px;
  box-shadow: var(--of-shadow-lg);
  overflow: hidden;
}

.auth-brand {
  background: linear-gradient(160deg, #4f46e5 0%, #6d28d9 100%);
  color: #fff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,0.16);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.auth-brand h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.auth-brand p { opacity: 0.9; margin: 0 0 24px; }

.auth-features { list-style: none; padding: 0; margin: 0; }
.auth-features li {
  padding: 6px 0;
  opacity: 0.92;
  font-size: 14px;
  position: relative;
  padding-left: 22px;
}
.auth-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #c7d2fe;
  font-weight: 700;
}

.auth-card {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-card h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.02em; }

.auth-foot { margin-top: 22px; font-size: 14px; color: var(--of-muted); text-align: center; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--of-border);
  border-radius: var(--of-radius-sm);
  font-size: 14px;
  background: #fff;
  color: var(--of-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--of-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--of-radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary { background: var(--of-primary); color: #fff; }
.btn-primary:hover { background: var(--of-primary-dark); }

.btn-secondary { background: #fff; color: var(--of-text); border-color: var(--of-border); }
.btn-secondary:hover { background: #f9fafb; }

.btn-danger { background: var(--of-danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.95); }

.btn-block { width: 100%; }

/* ---------- Alerts ---------- */
.alert {
  padding: 10px 12px;
  border-radius: var(--of-radius-sm);
  font-size: 13px;
  margin-bottom: 14px;
}
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-info { background: var(--of-primary-soft); color: #3730a3; border: 1px solid #c7d2fe; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { padding: 36px 28px; }
  .auth-card { padding: 36px 28px; }
  .form-row { grid-template-columns: 1fr; }
}