/**
 * Hospitality SaaS - Core Stylesheet
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent !important;
}

html,
body.portal-body {
  font-family: var(--font-body, system-ui, -apple-system, sans-serif);
  background-color: var(--color-bg, #f8fafc);
  color: #1e293b;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: hidden;
}

.portal-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Spinner Animation */
.portal-spinner {
  animation: portal-spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes portal-spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Common Card & Buttons */
.portal-card {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  border: 1px solid #e2e8f0;
}

.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.6rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  border: 1px solid transparent;
}

.portal-btn-primary {
  background-color: var(--color-primary, #0f172a);
  color: #ffffff;
}
.portal-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.portal-btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}
.portal-btn-secondary:hover {
  background-color: #e2e8f0;
}

/* Typography & Layout helpers */
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-gray-900 { color: #0f172a; }
.text-gray-700 { color: #334155; }
.text-gray-500 { color: #64748b; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.p-8 { padding: 2rem; }
.p-6 { padding: 1.5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-lg { max-width: 32rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }

/* Vector Icon Sizing Utilities */
.w-2\.5 { width: 10px; }
.h-2\.5 { height: 10px; }
.w-3 { width: 12px; }
.h-3 { height: 12px; }
.w-3\.5 { width: 14px; }
.h-3\.5 { height: 14px; }
.w-4 { width: 16px; }
.h-4 { height: 16px; }
.w-5 { width: 20px; }
.h-5 { height: 20px; }
.w-6 { width: 24px; }
.h-6 { height: 24px; }
.w-7 { width: 28px; }
.h-7 { height: 28px; }
.w-8 { width: 32px; }
.h-8 { height: 32px; }
.w-10 { width: 40px; }
.h-10 { height: 40px; }
/* Hospitality SaaS - Standalone Authentication Stylesheet (Login & Register) */

.owner-auth-screen {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  background-color: #f8fafc;
  background-image: radial-gradient(at 0% 0%, rgba(249, 115, 22, 0.06) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(15, 23, 42, 0.05) 0px, transparent 50%);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
}

.owner-auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  border: 1px solid #e2e8f0;
  box-sizing: border-box;
  text-align: center;
}

.owner-auth-card.max-w-lg {
  max-width: 520px;
}

.owner-auth-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-radius: 1.25rem;
  font-size: 1.85rem;
  margin-bottom: 1.25rem;
}

.owner-auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.owner-auth-title {
  font-size: 1.625rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.owner-auth-desc {
  font-size: 0.925rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Alert Error Box */
.owner-auth-error {
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #b91c1c;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.625rem;
  line-height: 1.4;
  text-align: left;
}

/* Form Styles */
.owner-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  text-align: left;
}

.owner-form-row {
  display: flex;
  gap: 1rem;
}

.owner-form-row > * {
  flex: 1;
}

.owner-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.owner-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  display: block;
}

.owner-input,
.owner-select {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-size: 0.95rem;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.625rem;
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.owner-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 16px 16px;
  padding-right: 2.5rem;
}

.owner-input:focus,
.owner-select:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.owner-input::placeholder {
  color: #94a3b8;
}

/* 2-Step Registration Layout & System-Matched Controls */
.owner-reg-step {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.owner-reg-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}

.owner-reg-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.owner-reg-step-pill.is-muted {
  font-weight: 600;
  color: #64748b;
}

.owner-reg-step-num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ea580c;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  flex-shrink: 0;
}

.owner-reg-step-pill.is-muted .owner-reg-step-num {
  background: #e2e8f0;
  color: #475569;
}

.owner-reg-step-line {
  flex: 1;
  min-width: 12px;
  height: 1px;
  background: #cbd5e1;
}

.owner-slug-input-wrap {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.625rem;
  overflow: hidden;
  background: #ffffff;
  transition: all 0.2s ease;
}

.owner-slug-input-wrap:focus-within {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.owner-slug-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 600;
  border-right: 1px solid #e2e8f0;
  white-space: nowrap;
  user-select: none;
}

.owner-slug-input-wrap .owner-input {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
}

.owner-reg-optional-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}

.owner-reg-optional-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.owner-logo-upload-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.625rem 0.875rem;
  border: 1.5px dashed #cbd5e1;
  border-radius: 0.625rem;
  background: #ffffff;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.owner-logo-upload-btn:hover {
  border-color: #f97316;
  background: #fff7ed;
}

.owner-reg-field-error {
  font-size: 0.78rem;
  font-weight: 500;
  color: #dc2626;
  margin-top: 0.25rem;
}

.owner-input-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

/* Enterprise Custom Select Component */
.enterprise-select {
  position: relative;
  width: 100%;
  text-align: left;
}

.enterprise-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.625rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  box-sizing: border-box;
  outline: none;
  text-align: left;
}

.enterprise-select-trigger:hover {
  border-color: #94a3b8;
  background: #fdfefe;
}

.enterprise-select-trigger:focus,
.enterprise-select.is-open .enterprise-select-trigger {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.enterprise-select.has-error .enterprise-select-trigger {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.enterprise-select-current {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.enterprise-select-icon-wrap {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.enterprise-select-trigger.has-value .enterprise-select-icon-wrap {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #ffedd5;
}

.enterprise-select-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.enterprise-select-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enterprise-select-placeholder {
  color: #64748b;
  font-weight: 500;
}

.enterprise-select-sub {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.enterprise-select-chevron {
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.enterprise-select.is-open .enterprise-select-chevron {
  transform: rotate(180deg);
  color: #f97316;
}

.enterprise-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.14), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  z-index: 1000;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.4rem;
  box-sizing: border-box;
}

.enterprise-select-dropdown::-webkit-scrollbar {
  width: 6px;
}
.enterprise-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.enterprise-select-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.enterprise-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.enterprise-select-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  border: 1px solid transparent;
}

.enterprise-select-option:hover {
  background: #f8fafc;
  border-color: #f1f5f9;
}

.enterprise-select-option.is-selected {
  background: #fff7ed;
  border-color: #fed7aa;
}

.enterprise-opt-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.enterprise-select-option:hover .enterprise-opt-icon {
  background: #e2e8f0;
  color: #0f172a;
}

.enterprise-select-option.is-selected .enterprise-opt-icon {
  background: #ffedd5;
  color: #ea580c;
}

.enterprise-opt-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.enterprise-opt-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}

.enterprise-select-option.is-selected .enterprise-opt-title {
  color: #c2410c;
}

.enterprise-opt-desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.25;
  margin-top: 2px;
}

.enterprise-opt-check {
  display: none;
  color: #ea580c;
  flex-shrink: 0;
}

.enterprise-select-option.is-selected .enterprise-opt-check {
  display: flex;
  align-items: center;
}

.owner-form-actions {
  margin-top: 0.5rem;
}

.owner-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0.625rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  width: auto;
  box-sizing: border-box;
  text-decoration: none;
}

.owner-auth-card .owner-btn,
.owner-form .owner-btn,
.owner-form-actions .owner-btn {
  width: 100%;
}

.owner-btn-primary {
  background-color: #f97316;
  color: #ffffff;
}

.owner-btn-primary:hover:not(:disabled) {
  background-color: #ea580c;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.28);
}

.owner-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

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

.owner-auth-footer {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
}

.owner-auth-footer a {
  color: #f97316;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.owner-auth-footer a:hover {
  color: #ea580c;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .owner-auth-card {
    padding: 2rem 1.25rem;
    box-shadow: none;
    border: none;
    background: transparent;
  }
  .owner-auth-screen {
    padding: 1.5rem 0.5rem;
    align-items: flex-start;
  }
  .owner-form-row {
    flex-direction: column;
    gap: 1.125rem;
  }
}

/* Universal Password Visibility Toggle */
.owner-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.owner-password-wrap input {
  width: 100%;
  padding-right: 2.75rem !important;
  box-sizing: border-box;
}

.owner-password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
  z-index: 2;
  outline: none;
}

.owner-password-toggle:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.owner-password-toggle:focus-visible {
  box-shadow: 0 0 0 2px #3b82f6;
}

.owner-password-toggle svg,
.owner-password-toggle .portal-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}
