/* ═══════════════════════════════════════════════════════════════
   MOBILE DRAG HANDLE
   ═══════════════════════════════════════════════════════════════ */

.mobile-drag-handle {
  display: none; /* Desktop: hidden */
  width: 100%;
  height: 24px;
  background: var(--bg3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  flex-shrink: 0;
  touch-action: none;
  transition: background 0.15s;
  z-index: 5;
  gap: 3px;
}
.mobile-drag-handle:hover,
.mobile-drag-handle:active,
.mobile-drag-handle.dragging {
  background: var(--bg2);
}
.mobile-drag-grip {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--txm);
  opacity: 0.5;
  transition: background 0.15s, width 0.15s, opacity 0.15s;
}
.mobile-drag-handle:hover .mobile-drag-grip,
.mobile-drag-handle:active .mobile-drag-grip,
.mobile-drag-handle.dragging .mobile-drag-grip {
  background: var(--amber);
  width: 52px;
  opacity: 1;
}

@media (max-width: 767px) {
  .mobile-drag-handle {
    display: flex;
  }
  /* Remove the amber border-bottom from sidebar – handle replaces it */
  .module-sidebar {
    border-bottom: none !important;
    box-shadow: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════ */

#login-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  overflow-y: auto;
}
/* Subtile Gradient-Orbs im Hintergrund */
#login-screen::before,
#login-screen::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  pointer-events: none;
}
#login-screen::before {
  width: 400px; height: 400px;
  top: -100px; left: -100px;
  background: #7c3aed;
}
#login-screen::after {
  width: 350px; height: 350px;
  bottom: -80px; right: -80px;
  background: #2563eb;
}

.login-card {
  width: 100%;
  max-width: 380px;
  margin: auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.login-logo-text {
  font-family: var(--font-display, var(--serif));
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-welcome {
  font-family: var(--font-display, var(--serif));
  font-size: 20px;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 6px;
}
.login-sub {
  font-size: 12px;
  color: var(--txm);
  margin-bottom: 28px;
}

.login-fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.login-field  { display: flex; flex-direction: column; gap: 5px; }
.login-label  { font-size: 11px; font-weight: 600; color: var(--txs); text-transform: uppercase; letter-spacing: 0.3px; }
.login-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--tx);
  font-size: 13px;
  padding: 11px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.login-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.login-input::placeholder { color: var(--txm); }

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 10px;
  color: var(--red);
  font-size: 12px;
  margin-bottom: 16px;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}
.login-btn:hover {
  opacity: 0.9;
  box-shadow: 0 4px 16px rgba(124,58,237,0.3);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-divider span { font-size: 11px; color: var(--txm); }

.login-sso-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--txs);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  margin-bottom: 20px;
}
.login-sso-btn:hover {
  border-color: rgba(124,58,237,0.4);
  color: var(--tx);
  background: rgba(124,58,237,0.06);
}

.login-hint {
  text-align: center;
  font-size: 11px;
  color: var(--txm);
}
