/* =============================================================
   SPLIT LOGIN SCREEN  (full-window branded layout)
   Loaded AFTER style.css. Brand colours pulled from the actual
   hotel logo. Activated by  body.login-page.split.
   ============================================================= */

:root {
  --brand-navy:    #1a2659;   /* deep navy from logo border + title */
  --brand-navy-2:  #243370;   /* lighter navy for gradient */
  --brand-gold:    #f5c842;   /* logo background yellow */
  --brand-orange:  #f08930;   /* sunset orange */
  --brand-water:   #5dadec;   /* lake blue */
  --brand-burgundy:#8b1538;   /* "Lake View Resort" text */
  --brand-cream:   #fffbf0;   /* soft white for form */
  --form-text:     #1f2937;
  --form-muted:    #6b7280;
  --form-border:   #d1d5db;
}

body.login-page.split {
  background: #ffffff;
  color: var(--form-text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Title bar — solid dark strip across the full width so min/max/close
   stay visible over the white form panel as well as the navy brand panel. */
.titlebar.split-titlebar {
  background: #0a0a18;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
}
.titlebar.split-titlebar .titlebar-title { color: rgba(255,255,255,0.85); font-weight: 500; }
.titlebar.split-titlebar .titlebar-controls button {
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.06);
}
.titlebar.split-titlebar .titlebar-controls button:hover { background: rgba(255,255,255,0.18); color: #fff; }
.titlebar.split-titlebar .titlebar-controls .close-btn:hover { background: var(--brand-burgundy); color: #fff; }

/* Push form-panel content down so it doesn't sit under the titlebar */
.split-shell { padding-top: 38px; box-sizing: border-box; }

.split-shell {
  display: grid;
  grid-template-columns: 5fr 6fr;
  flex: 1;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ============================================================
   LEFT — branded panel
   ============================================================ */
.brand-panel {
  background:
    radial-gradient(circle at 20% 30%, rgba(245,200,66,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(93,173,236,0.15) 0%, transparent 50%),
    linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-2) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 80px 60px 40px;
  position: relative;
  overflow: hidden;
}
.brand-panel::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(245,200,66,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.brand-panel::after {
  content: '';
  position: absolute;
  bottom: -150px; left: -150px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(93,173,236,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  justify-content: center;
  position: relative;
  z-index: 1;
}
/* Logo wrap = the circle/frame; image inside fits with padding so it's
   centered and the original PNG stays at its native resolution (no blur) */
.brand-logo-wrap {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--brand-gold);
  box-shadow: 0 0 0 8px rgba(245,200,66,0.15), 0 14px 44px rgba(0,0,0,0.35);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Hint browsers to render scaled images crisp */
  image-rendering: -webkit-optimize-contrast;
}
.brand-logo {
  width: 92%;
  height: 92%;
  object-fit: contain;
  object-position: center;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}
.brand-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #ffffff;
  margin-bottom: 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.brand-divider {
  width: 60px;
  height: 3px;
  background: var(--brand-gold);
  margin: 4px 0 16px;
  border-radius: 2px;
}
/* Two properties of Hotel Mahamaya — shown side-by-side under the divider */
.brand-properties {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.brand-property {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--brand-gold);
  text-transform: uppercase;
}
.brand-prop-sep {
  color: rgba(245,200,66,0.5);
  font-size: 14px;
  font-weight: 300;
}
.brand-since {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
}
.brand-foot {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.8;
}
.brand-credit {
  margin-top: 4px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(245,200,66,0.7);
  text-transform: none;
}
.brand-credit strong {
  color: var(--brand-gold);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ============================================================
   RIGHT — form panel (white)
   ============================================================ */
.form-panel {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  overflow-y: auto;
}
.form-stack {
  width: 100%;
  max-width: 420px;
}
.form-heading {
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.form-sub {
  font-size: 14px;
  color: var(--form-muted);
  margin-bottom: 36px;
}

/* Role selector cards */
.role-selector { display: flex; flex-direction: column; gap: 14px; }
.role-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: #fff;
  border: 2px solid var(--form-border);
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  transition: all .18s;
}
.role-card:hover {
  border-color: var(--brand-gold);
  background: #fffaeb;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245,200,66,0.15);
}
.role-card-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  background: var(--brand-cream);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.role-card-text { display: flex; flex-direction: column; gap: 4px; }
.role-card-text strong { font-size: 15px; color: var(--brand-navy); font-weight: 600; }
.role-card-text small  { font-size: 12px; color: var(--form-muted); }

.employee-card .role-card-icon { background: rgba(245,200,66,0.15); color: var(--brand-orange); }
.guest-card    .role-card-icon { background: rgba(93,173,236,0.15);  color: var(--brand-water); }

/* Employee form */
.employee-form { display: flex; flex-direction: column; gap: 18px; }
.employee-form .form-group { display: flex; flex-direction: column; gap: 8px; }
.employee-form label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--form-muted);
}
.employee-form input {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-family: var(--font);
  background: #fff;
  border: 2px solid var(--form-border);
  border-radius: 8px;
  color: var(--form-text);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.employee-form input:focus {
  border-color: var(--brand-gold);
  box-shadow: 0 0 0 4px rgba(245,200,66,0.15);
}
.employee-form input::placeholder { color: #9ca3af; }

/* Password field with eye toggle */
.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 48px; }
.pw-toggle {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  width: 36px; height: 36px;
  cursor: pointer;
  font-size: 18px;
  color: var(--form-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.pw-toggle:hover { background: #f3f4f6; color: var(--brand-navy); }
.pw-toggle.active { color: var(--brand-orange); }

.field-hint {
  font-size: 11px;
  color: var(--form-muted);
  margin-top: -4px;
}

/* Buttons (white-theme variants for the form panel) */
.form-panel .btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--brand-gold) 0%, var(--brand-orange) 100%);
  color: var(--brand-navy);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: var(--font);
  transition: transform .1s, box-shadow .15s, filter .15s;
  box-shadow: 0 4px 16px rgba(245,200,66,0.3);
}
.form-panel .btn-primary:hover  { filter: brightness(1.05); box-shadow: 0 6px 20px rgba(245,200,66,0.4); }
.form-panel .btn-primary:active { transform: translateY(1px); }
.form-panel .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.3); }

.form-panel .btn-ghost {
  width: 100%;
  padding: 11px;
  background: none;
  color: var(--form-muted);
  border: 1px solid var(--form-border);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
  margin-top: 4px;
}
.form-panel .btn-ghost:hover { background: #f9fafb; color: var(--brand-navy); border-color: #9ca3af; }

/* Error message inside form panel */
.form-panel .login-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
}

.form-panel .spinner {
  margin: 16px auto 0;
  width: 28px; height: 28px;
  border: 3px solid #f3f4f6;
  border-top-color: var(--brand-gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Hide old centered login wrap if any leftover */
body.login-page.split .login-wrap,
body.login-page.split .login-card { display: none; }

/* Responsive: collapse to single column on narrow windows */
@media (max-width: 880px) {
  .split-shell { grid-template-columns: 1fr; grid-template-rows: 280px 1fr; }
  .brand-panel { padding: 50px 40px 24px; }
  .brand-logo-wrap { width: 120px; height: 120px; margin-bottom: 12px; }
  .brand-title { font-size: 22px; }
  .brand-property { font-size: 11px; letter-spacing: 0.16em; }
  .brand-since { display: none; }
  .brand-foot  { display: none; }
  .form-panel  { padding: 40px 36px; }
}

.hidden { display: none !important; }
