/* ══════════════════════════════════════════════════
   APP SHELL — Loading + Luxury Login + Shell grid
══════════════════════════════════════════════════ */

/* ── LOADING ── */
.app-loading {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; z-index: 9999;
}
.app-loading__inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 28px;
}
.app-loading__img {
  animation: float 2.2s ease-in-out infinite;
  filter: drop-shadow(0 10px 24px rgba(30,64,175,.18));
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.app-loading__bar {
  width: 160px; height: 3px;
  background: #E2E8F0; border-radius: 99px; overflow: hidden;
}
.app-loading__fill {
  height: 100%; width: 40%;
  background: linear-gradient(90deg, #2563EB, #60A5FA);
  border-radius: 99px;
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide { 0%{transform:translateX(-100%)} 100%{transform:translateX(400%)} }

/* ── LOGIN LAYOUT ── */
.login-screen {
  min-height: 100dvh; display: flex;
  background: #fff;
}

/* Left panel — visible only on tablet+ */
.login-left {
  display: none;
  flex-direction: column; justify-content: center;
  width: 50%; min-height: 100dvh;
  background: linear-gradient(145deg, #1E3A8A 0%, #1E40AF 40%, #2563EB 70%, #3B82F6 100%);
  padding: 60px 56px;
  position: relative; overflow: hidden;
}
.login-left__blob {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.login-left__blob--1 { width:420px; height:420px; top:-100px; right:-80px; }
.login-left__blob--2 { width:300px; height:300px; bottom:-60px; left:-40px; }
.login-left__content { position: relative; z-index: 1; }
.login-left__logo {
  width: 180px; height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 4px 16px rgba(0,0,0,.2));
  margin-bottom: 32px;
}
.login-left__tagline {
  font-size: 22px; font-weight: 700;
  color: rgba(255,255,255,.95);
  margin-bottom: 36px; line-height: 1.4;
}
.login-features {
  list-style: none; display: flex; flex-direction: column; gap: 16px;
}
.login-features li {
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; color: rgba(255,255,255,.85);
  font-weight: 500;
}
.login-feat-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #93C5FD; flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(147,197,253,.25);
}

/* Right panel — login form */
.login-right {
  flex: 1; display: flex;
  align-items: center; justify-content: center;
  padding: 32px 20px;
  background: #fff;
}
.login-card {
  width: 100%; max-width: 400px;
  background: #fff;
  border-radius: 24px; padding: 40px 36px;
  box-shadow: 0 4px 24px rgba(15,23,42,.08);
  border: 1px solid #F1F5F9;
  animation: cardIn .4s ease forwards;
}
@keyframes cardIn {
  from { opacity:0; transform:translateY(16px) scale(.98); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}
.login-card__logo-wrap {
  text-align: center; margin-bottom: 24px;
}
.login-card__logo {
  display: inline-block;
  filter: drop-shadow(0 4px 12px rgba(37,99,235,.14));
  animation: float 3s ease-in-out infinite;
}
.login-card__title {
  font-size: 22px; font-weight: 800;
  color: #0F172A; text-align: center;
  margin-bottom: 6px;
}
.login-card__subtitle {
  font-size: 14px; color: #94A3B8;
  text-align: center; margin-bottom: 28px;
}
.login-form { display: flex; flex-direction: column; gap: 18px; }

/* Input with icon */
.lf-input-wrap { position: relative; display: flex; align-items: center; }
.lf-icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: #94A3B8; pointer-events: none;
}
.lf-input {
  padding-right: 42px !important;
  padding-left: 44px !important;
  background: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  height: 52px !important;
  transition: all .18s !important;
}
.lf-input:focus {
  background: #fff !important;
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important;
}
.lf-eye {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #94A3B8; padding: 6px; border-radius: 6px;
  transition: color .15s;
}
.lf-eye:hover { color: #475569; }
.login-error {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: #FEF2F2; border: 1px solid #FECACA;
  border-radius: 10px; font-size: 13px; color: #DC2626;
}
.login-error::before { content:'⚠️'; flex-shrink:0; }
.login-card__footer {
  text-align: center; margin-top: 28px;
  font-size: 11px; color: #CBD5E1;
}

/* Desktop: show split layout */
@media (min-width: 768px) {
  .login-left { display: flex; }
  .login-card {
    box-shadow: none; border: none; padding: 36px 28px;
  }
  .login-right { background: #F8FAFC; }
}

/* ── APP SHELL ── */
.app-shell {
  display: flex; height: 100dvh; overflow: hidden; position: relative;
}
.main-content {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
}

/* Sidebar overlay */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  z-index: calc(var(--z-topbar) - 1);
  opacity: 0; pointer-events: none;
  transition: opacity var(--ease);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

/* Offline banner */
.offline-banner {
  position: fixed; top: var(--topbar-height); left: 0; right: 0;
  background: #F59E0B; color: #fff;
  text-align: center; padding: 8px;
  font-size: 13px; font-weight: 600;
  z-index: var(--z-toast);
  transform: translateY(-100%);
  transition: transform .3s ease;
}
.offline-banner.show { transform: translateY(0); }

@media (min-width: 768px) {
  .sidebar-overlay { display: none !important; }
  .sidebar__close-btn { display: none !important; }
  .sidebar {
    display: flex !important; position: static !important;
    transform: none !important; box-shadow: none !important;
  }
}
