/* ===================== SPLASH ===================== */
#splashScreen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--text);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px;
}
.splash-inner { text-align: center; }
.splash-logo {
  font-size: 3rem;
  background: var(--gold);
  color: white;
  width: 80px; height: 80px;
  border-radius: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 8px 32px rgba(201,168,76,0.4);
}
.splash-name {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: white;
  margin-bottom: 28px;
}
.splash-spin {
  width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.splash-msg { color: rgba(255,255,255,0.5); font-size: 0.88rem; }

/* ===================== BLOCKED ===================== */
#blockedScreen {
  position: fixed; inset: 0; z-index: 9998;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.blocked-inner {
  text-align: center;
  background: white;
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  max-width: 380px;
}
.blocked-icon { font-size: 3.5rem; margin-bottom: 16px; }
.blocked-inner h2 { font-size: 1.5rem; color: var(--red); margin-bottom: 12px; }
.blocked-inner p { color: var(--text2); line-height: 1.6; font-size: 0.95rem; }

/* ===================== AUTH SCREEN ===================== */
#authScreen {
  position: fixed; inset: 0; z-index: 9997;
  background: var(--bg);
  display: flex;
}
.auth-left {
  width: 42%;
  background: var(--text);
  padding: 60px 48px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: '✂';
  position: absolute;
  font-size: 20rem;
  opacity: 0.04;
  bottom: -60px; right: -40px;
  line-height: 1;
}
.auth-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 48px;
}
.auth-logo-icon {
  font-size: 1.4rem;
  background: var(--gold);
  color: white;
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.auth-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: white;
}
.auth-tagline {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: white;
  line-height: 1.25;
  margin-bottom: 16px;
}
.auth-sub {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 36px;
}
.auth-features { display: flex; flex-direction: column; gap: 10px; }
.auth-feat {
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  display: flex; align-items: center; gap: 8px;
}

.auth-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 32px;
  overflow-y: auto;
}
.auth-card {
  background: white;
  border-radius: 20px;
  padding: 36px;
  width: 100%; max-width: 420px;
  box-shadow: 0 4px 32px rgba(45,58,140,0.1);
  border: 1px solid var(--border);
}
.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  border-radius: 9px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text3);
  transition: all 0.2s;
  cursor: pointer;
}
.auth-tab.active {
  background: white;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(45,58,140,0.12);
  font-weight: 600;
}
.auth-form-group {
  display: flex; flex-direction: column; gap: 6px;
}
.auth-form-group label {
  font-size: 0.82rem; font-weight: 600; color: var(--text2);
}
.auth-input-wrap {
  display: flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color 0.2s;
  overflow: hidden;
}
.auth-input-wrap:focus-within { border-color: var(--accent2); background: white; }
.auth-input-icon {
  padding: 0 12px;
  font-size: 1rem;
  color: var(--text3);
  flex-shrink: 0;
}
.auth-input-wrap input {
  flex: 1;
  border: none;
  background: none;
  padding: 12px 14px 12px 0;
  font-size: 0.95rem;
  outline: none;
  color: var(--text);
}
.auth-btn {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.3px;
  margin-top: 4px;
}
.auth-btn:hover:not(:disabled) { background: var(--accent2); transform: translateY(-1px); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-loading-msg {
  font-size: 0.85rem;
  color: var(--accent);
  min-height: 18px;
  text-align: center;
}
.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text3);
}
.auth-switch a { color: var(--accent); font-weight: 600; }

/* Auth Toast */
.auth-toast {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--text);
  color: white;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 9999;
  white-space: nowrap;
}
.auth-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================== SIDEBAR USER INFO ===================== */
.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: auto;
}
.sidebar-user-icon {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.sidebar-user-phone {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  word-break: break-all;
  margin-bottom: 3px;
}
.sidebar-logout-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}
.sidebar-logout-btn:hover { background: rgba(255,255,255,0.08); color: white; }

/* ===================== APP ROOT LAYOUT ===================== */
#appRoot {
  display: flex;
  min-height: 100vh;
}
#appRoot .main-content {
  flex: 1;
}

/* ===================== RESPONSIVE AUTH ===================== */
@media (max-width: 768px) {
  #authScreen { flex-direction: column; }
  .auth-left {
    width: 100%;
    padding: 32px 24px 28px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    min-height: auto;
  }
  .auth-left::before { display: none; }
  .auth-brand { margin-bottom: 0; }
  .auth-tagline { font-size: 1.1rem; margin-bottom: 0; display: none; }
  .auth-sub, .auth-features { display: none; }
  .auth-right { padding: 24px 16px; align-items: flex-start; }
  .auth-card { padding: 24px 20px; }
}
