/* ==========================================================================
   TourismOS - Agency Auth Modern UI/UX Stylesheet
   ========================================================================== */

/* Page Background & Atmosphere */
.agency-auth-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.08) 0%, rgba(248, 250, 252, 0) 50%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  background-attachment: fixed;
  color: #1e293b;
  font-family: inherit;
  padding: 2rem 1.25rem 2.5rem;
}

.agency-auth-wrapper {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Header - Exactly matches Card width */
.agency-auth-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0 0.25rem;
}

.agency-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #0f172a;
  min-height: 2.5rem;
}

.agency-auth-brand__logo {
  height: 2.25rem;
  max-height: 2.5rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
}

.agency-auth-brand__name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.agency-auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.agency-auth-back-link i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.agency-auth-back-link:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.agency-auth-back-link:hover i {
  transform: translateX(-2px);
}

/* Card Container */
.agency-auth-card {
  width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.75rem;
  box-shadow: 
    0 20px 45px -12px rgba(15, 23, 42, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.03);
  padding: 2.25rem 2rem;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .agency-auth-card {
    padding: 2.75rem 2.5rem;
  }
}

/* Header & Eyebrow inside Card */
.agency-auth-card__header {
  margin-bottom: 2rem;
}

.agency-auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.agency-auth-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.agency-auth-subtitle {
  font-size: 0.925rem;
  color: #64748b;
  line-height: 1.55;
}

/* Form Groups & Inputs */
.agency-auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.agency-auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.agency-auth-label {
  font-size: 0.825rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.01em;
}

.agency-auth-input {
  width: 100%;
  padding: 0.825rem 1.15rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.935rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.agency-auth-input:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

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

/* Password Field Wrapper */
.agency-auth-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.agency-auth-password-wrapper .agency-auth-input {
  padding-right: 3rem;
}

.agency-auth-password-toggle {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.45rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: color 0.15s ease;
}

.agency-auth-password-toggle:hover {
  color: #334155;
}

/* Buttons */
.agency-auth-submit-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.875rem 1.5rem;
  border-radius: 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0.35rem;
}

.agency-auth-submit-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.38);
}

.agency-auth-submit-btn:active {
  transform: translateY(0);
}

.agency-auth-btn-secondary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.825rem 1.5rem;
  border-radius: 0.85rem;
  font-size: 0.925rem;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.agency-auth-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Alerts */
.agency-auth-alert {
  border-radius: 0.85rem;
  padding: 0.85rem 1.15rem;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.agency-auth-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.agency-auth-alert--warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.agency-auth-alert--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.agency-auth-field-error {
  font-size: 0.8rem;
  color: #dc2626;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Navigation Links */
.agency-auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

.agency-auth-link {
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.agency-auth-link:hover {
  color: #0369a1;
  text-decoration: underline;
}

.agency-auth-link--muted {
  color: #64748b;
  font-weight: 500;
}

.agency-auth-link--muted:hover {
  color: #0f172a;
}

/* TomSelect Integration in Agency Auth */
.agency-auth-card .ts-control {
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 0.85rem !important;
  background: #f8fafc !important;
  padding: 0.65rem 0.85rem !important;
  box-shadow: none !important;
  font-size: 0.935rem !important;
}

.agency-auth-card .ts-control.focus {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12) !important;
}

.agency-auth-card .ts-dropdown {
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.85rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
  overflow: hidden;
}

/* Checkbox */
.agency-auth-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: #475569;
  cursor: pointer;
  line-height: 1.5;
  user-select: none;
}

.agency-auth-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: #0284c7;
  cursor: pointer;
  border-radius: 0.35rem;
}

/* Footer */
.agency-auth-footer {
  width: 100%;
  max-width: 52rem;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
