/* =============================================================================
   Grey Rewards POS — UK Login Page Styles
   Version: 1.0.0
   A sophisticated split-layout login for premium British hospitality software
   ============================================================================= */

/* ── Reset & tokens ── */
:root {
  --gr-charcoal:    #1a1a2e;
  --gr-charcoal-mid:#252540;
  --gr-gold:        #c9a84c;
  --gr-gold-light:  #dbbf6e;
  --gr-gold-dark:   #a8892f;
  --gr-gold-muted:  rgba(201, 168, 76, 0.14);
  --gr-white:       #ffffff;
  --gr-slate:       #4a5568;
  --gr-slate-light: #718096;
  --gr-mint:        #2dd4aa;
  --gr-radius:      10px;
  --gr-radius-lg:   14px;
  --gr-radius-xl:   20px;
  --gr-shadow-lg:   0 8px 32px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.08);
  --gr-shadow-gold: 0 4px 16px rgba(201,168,76,0.30);
  --gr-transition:  0.2s ease;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   1. Page Layout — Split screen
   ============================================================================= */
.login-page {
  display: flex;
  min-height: 100vh;
  background: var(--gr-charcoal);
}

/* ── Left panel ── */
.login-left {
  flex: 1.1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 3rem;
  overflow: hidden;

  /* Sophisticated gradient — dark charcoal with warm depth */
  background:
    linear-gradient(
      155deg,
      rgba(26,26,46,0.97) 0%,
      rgba(18,12,30,0.92) 40%,
      rgba(30,22,10,0.88) 100%
    ),
    /* Restaurant-themed background fallback pattern */
    radial-gradient(ellipse at 20% 80%, rgba(201,168,76,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(45,212,170,0.08) 0%, transparent 50%);
  background-color: var(--gr-charcoal);
}

/* Decorative orbs */
.login-left::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,212,170,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Decorative grid overlay */
.login-left-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* Left panel content */
.login-left-content {
  position: relative;
  z-index: 1;
}

/* Brand in left panel */
.login-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 3.5rem;
}

.login-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--gr-radius);
  background: linear-gradient(135deg, var(--gr-gold-light), var(--gr-gold) 50%, var(--gr-gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(201,168,76,0.35);
  flex-shrink: 0;
}

.login-brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gr-white);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.login-brand-name span {
  color: var(--gr-gold);
}

.login-brand-sub {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 2px;
}

/* Hero copy */
.login-hero-headline {
  font-size: clamp(1.625rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--gr-white);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.login-hero-headline .highlight {
  color: var(--gr-gold);
  position: relative;
}

.login-hero-subtext {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  max-width: 380px;
  margin: 0 0 2.5rem;
}

/* Feature bullets */
.login-features {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.login-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.4;
}

.login-feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--gr-gold-muted);
  border: 1px solid rgba(201,168,76,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  margin-top: -1px;
}

.login-feature-text strong {
  color: var(--gr-white);
  font-weight: 600;
  display: block;
  font-size: 0.875rem;
  margin-bottom: 1px;
}

/* Left panel footer */
.login-left-footer {
  position: relative;
  z-index: 1;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.login-tagline {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.38);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-tagline-badge {
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.18);
  color: var(--gr-gold);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
}

/* Trust logos / stat strip */
.login-trust-strip {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.login-trust-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.login-trust-stat .num {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--gr-gold);
  line-height: 1;
}

.login-trust-stat .label {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =============================================================================
   2. Right Panel — Login Form
   ============================================================================= */
.login-right {
  flex: 0 0 440px;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
}

/* Subtle inner shadow on the left edge */
.login-right::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(90deg, rgba(0,0,0,0.06), transparent);
  pointer-events: none;
}

.login-form-wrapper {
  width: 100%;
  max-width: 380px;
  position: relative;
}

/* Form card */
.login-card {
  background: var(--gr-white);
  border-radius: var(--gr-radius-xl);
  box-shadow: var(--gr-shadow-lg);
  padding: 2.5rem 2rem 2rem;
  border: 1px solid #e8ecf0;
}

/* Card top: logo + welcome */
.login-card-header {
  text-align: center;
  margin-bottom: 1.875rem;
}

.login-card-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--gr-radius);
  background: linear-gradient(135deg, var(--gr-gold-light), var(--gr-gold) 50%, var(--gr-gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.625rem;
  margin: 0 auto 1.125rem;
  box-shadow: var(--gr-shadow-gold);
}

.login-card-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--gr-charcoal);
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
}

.login-card-subtitle {
  font-size: 0.875rem;
  color: var(--gr-slate-light);
  margin: 0;
}

/* Form fields */
.login-form .form-group {
  margin-bottom: 1.125rem;
}

.login-form .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gr-slate);
  margin-bottom: 0.375rem;
  display: block;
}

.login-form .form-control {
  border: 1.5px solid #e2e8f0;
  border-radius: var(--gr-radius);
  padding: 0.6rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--gr-charcoal);
  background: var(--gr-white);
  transition: all var(--gr-transition);
  width: 100%;
}

.login-form .form-control::placeholder {
  color: #a0aec0;
  font-size: 0.875rem;
}

.login-form .form-control:focus {
  border-color: var(--gr-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
  outline: none;
  background: var(--gr-white);
}

.login-form .form-control.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.login-form .invalid-feedback {
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 4px;
}

/* Password field with toggle */
.login-password-group {
  position: relative;
}

.login-password-group .form-control {
  padding-right: 2.75rem;
}

.login-password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gr-slate-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--gr-transition);
  line-height: 1;
}

.login-password-toggle:hover {
  color: var(--gr-gold-dark);
}

/* Remember me + Forgot password row */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 0.5rem;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 4px;
  accent-color: var(--gr-gold);
  cursor: pointer;
}

.login-remember span {
  font-size: 0.8125rem;
  color: var(--gr-slate);
}

.login-forgot {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gr-gold-dark);
  text-decoration: none;
  transition: color var(--gr-transition);
}

.login-forgot:hover {
  color: var(--gr-gold);
  text-decoration: underline;
}

/* Submit button */
.btn-login {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--gr-gold-light) 0%, var(--gr-gold) 50%, var(--gr-gold-dark) 100%);
  border: none;
  border-radius: var(--gr-radius);
  color: #1a1200;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition: all var(--gr-transition);
  box-shadow: var(--gr-shadow-gold);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--gr-transition);
}

.btn-login:hover {
  background: linear-gradient(135deg, var(--gr-gold), var(--gr-gold-dark));
  box-shadow: 0 6px 20px rgba(201,168,76,0.35);
  transform: translateY(-1px);
  color: #0a0900;
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: var(--gr-shadow-gold);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Loading spinner inside button */
.btn-login .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26,18,0,0.25);
  border-top-color: #1a1200;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-login.loading .spinner { display: block; }
.btn-login.loading .btn-text { opacity: 0.7; }

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

/* Error alert */
.login-alert {
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.2);
  border-left: 4px solid #ef4444;
  border-radius: var(--gr-radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #991b1b;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.login-alert svg { flex-shrink: 0; margin-top: 1px; }

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  color: #a0aec0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* SSO / alt login */
.btn-sso {
  width: 100%;
  padding: 0.6rem;
  background: var(--gr-white);
  border: 1.5px solid #e2e8f0;
  border-radius: var(--gr-radius);
  color: var(--gr-slate);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--gr-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-sso:hover {
  border-color: var(--gr-slate);
  color: var(--gr-charcoal);
  background: #f8f9fa;
  transform: translateY(-1px);
}

/* Footer below card */
.login-form-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--gr-slate-light);
  line-height: 1.6;
}

.login-form-footer a {
  color: var(--gr-gold-dark);
  font-weight: 600;
  text-decoration: none;
}

.login-form-footer a:hover {
  color: var(--gr-gold);
  text-decoration: underline;
}

/* =============================================================================
   3. Responsive — Stack on mobile / tablet
   ============================================================================= */
@media (max-width: 1023px) {
  .login-page {
    flex-direction: column;
  }

  .login-left {
    flex: 0 0 auto;
    padding: 2rem 1.5rem 1.75rem;
    min-height: auto;
  }

  .login-hero-headline { font-size: 1.625rem; }

  .login-features { display: none; } /* hide on tablet for space */

  .login-right {
    flex: 1;
    align-items: flex-start;
    padding: 2rem 1rem;
  }

  .login-right::before { display: none; }

  .login-form-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 639px) {
  .login-left {
    padding: 1.5rem 1.25rem;
  }

  .login-brand { margin-bottom: 1.25rem; }

  .login-hero-headline { font-size: 1.375rem; }

  .login-hero-subtext { font-size: 0.875rem; }

  .login-trust-strip { gap: 1rem; }

  .login-right {
    padding: 1.25rem 1rem;
  }

  .login-card {
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: var(--gr-radius-lg);
  }
}

/* =============================================================================
   4. Animations
   ============================================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.login-brand       { animation: fadeInLeft 0.5s ease 0.1s both; }
.login-hero-headline { animation: fadeInLeft 0.5s ease 0.2s both; }
.login-hero-subtext  { animation: fadeInLeft 0.5s ease 0.3s both; }
.login-features      { animation: fadeInLeft 0.5s ease 0.4s both; }
.login-card          { animation: fadeInUp  0.5s ease 0.15s both; }

/* =============================================================================
   END — Grey Rewards POS Login Styles v1.0
   ============================================================================= */
