:root {
  --bg-1: #0e1c30;
  --bg-2: #122947;
  --panel: rgba(12, 21, 37, 0.86);
  --panel-soft: rgba(19, 34, 58, 0.8);
  --line: rgba(135, 177, 233, 0.25);
  --text: #ecf5ff;
  --muted: #afd2ff;
  --accent: #ff8a34;
  --accent-hover: #ffa056;
  --danger: #ff4a5f;
  --ok: #56d47e;
  --shadow: 0 20px 55px rgba(4, 10, 20, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 14% 15%, #2e4e78 0%, transparent 40%),
              radial-gradient(circle at 90% 20%, #3f6ca2 0%, transparent 32%),
              linear-gradient(140deg, var(--bg-1), var(--bg-2));
  font-family: "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.42;
  pointer-events: none;
  animation: drift 8s ease-in-out infinite alternate;
}

.shape-a {
  width: 340px;
  height: 340px;
  top: -90px;
  right: -40px;
  background: #4a77b7;
}

.shape-b {
  width: 260px;
  height: 260px;
  bottom: -80px;
  left: -50px;
  background: #f1802e;
  animation-delay: 1.2s;
}

.layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  padding: 28px;
}

.panel {
  background: linear-gradient(145deg, var(--panel), var(--panel-soft));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(3px);
}

.brand {
  padding: 34px;
}

.brand-logo {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  padding: 12px;
  background: rgba(7, 15, 28, 0.65);
  border: 1px solid rgba(186, 211, 247, 0.28);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(4, 10, 20, 0.4));
}

.chip {
  display: inline-block;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin-top: 18px;
}

.lead {
  margin-top: 14px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.5;
  color: #d8e8ff;
  max-width: 58ch;
}

.grid-info {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-info article {
  border-radius: 14px;
  border: 1px solid rgba(186, 211, 247, 0.2);
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.grid-info h2 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.grid-info p {
  margin: 0;
  color: #c8dffb;
  line-height: 1.45;
}

.note {
  margin-top: 22px;
  margin-bottom: 8px;
  color: var(--muted);
}

.cred {
  display: block;
  width: fit-content;
  margin-top: 7px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f7fbff;
  font-size: 0.88rem;
}

.auth {
  padding: 28px;
}

.auth h2 {
  margin-bottom: 20px;
  font-size: 1.55rem;
}

#login-form {
  display: grid;
  gap: 10px;
}

label {
  color: #cfe2ff;
  font-size: 0.92rem;
  font-weight: 600;
}

input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(181, 211, 252, 0.25);
  background: rgba(6, 14, 27, 0.7);
  color: #f6fbff;
  padding: 12px 12px;
  font-size: 0.98rem;
}

input:focus {
  border-color: rgba(255, 174, 112, 0.85);
  outline: 2px solid rgba(255, 138, 52, 0.24);
  outline-offset: 1px;
}

.password-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-primary {
  margin-top: 8px;
  background: var(--accent);
  color: #1e1308;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #d5e7ff;
  border: 1px solid rgba(178, 206, 245, 0.35);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.9);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-danger {
  background: transparent;
  color: #ffd0d6;
  border: 1px solid rgba(255, 102, 122, 0.5);
}

.btn-danger:hover {
  border-color: #ff7b8d;
  color: #ffdbe0;
}

.feedback {
  margin: 2px 2px 0;
  min-height: 20px;
  color: #ffd3af;
  font-size: 0.92rem;
}

.feedback.ok {
  color: var(--ok);
}

.feedback.error {
  color: #ff9ba8;
}

.session {
  margin-top: 16px;
  border-radius: 14px;
  border: 1px solid rgba(182, 217, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  padding: 15px;
}

.session h3 {
  font-size: 1.02rem;
}

#session-user {
  margin: 8px 0 10px;
  color: #cde2ff;
  font-size: 0.95rem;
}

.session-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#session-output {
  margin: 12px 0 0;
  border-radius: 10px;
  border: 1px dashed rgba(170, 205, 247, 0.35);
  padding: 10px;
  color: #dcecff;
  font-size: 0.84rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(8, 14, 26, 0.55);
  min-height: 88px;
}

.hidden {
  display: none;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.6s ease forwards;
}

.reveal.delay-1 {
  animation-delay: 0.16s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-18px, 14px) scale(1.08);
  }
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
    max-width: 860px;
    margin: 0 auto;
  }

  .brand,
  .auth {
    padding: 24px;
  }
}

@media (max-width: 680px) {
  .layout {
    gap: 16px;
    padding: 16px;
  }

  .brand-logo {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    padding: 8px;
  }

  .grid-info {
    grid-template-columns: 1fr;
  }

  .password-wrap,
  .session-actions {
    grid-template-columns: 1fr;
  }

  .btn-outline,
  .btn-danger,
  .btn-primary {
    width: 100%;
  }
}
