*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:  #2563eb;
  --teal:  #0891b2;
  --teal2: #06b6d4;
  --cyan:  #67e8f9;
  --green: #4ade80;
}

html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* TWO-PANEL LAYOUT */
.login-wrap { display: flex; min-height: 100vh; }

/* LEFT - BRAND PANEL */
.brand-panel {
  flex: 0 0 46%;
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #1e3f88 0%, #163372 30%, #0f2860 60%, #0c2254 100%);
  display: flex; flex-direction: column;
  padding: 52px 48px;
}
.brand-panel::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.22) 0%, transparent 65%);
  pointer-events: none;
}
.brand-panel::after {
  content: '';
  position: absolute; bottom: -80px; left: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,.14) 0%, transparent 65%);
  pointer-events: none;
}

/* SVG network bg */
.brand-net {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
@keyframes dash-flow { to { stroke-dashoffset: -80; } }
.net-line {
  stroke: rgba(103,178,249,.18); stroke-width: .4; fill: none;
  stroke-dasharray: 5 12;
  animation: dash-flow 5s linear infinite;
}
.net-line.tl { stroke: rgba(6,182,212,.18); animation-duration: 7s; }
.net-line.sl { stroke: rgba(103,178,249,.09); animation-duration: 9s; }
@keyframes node-pulse { 0%,100% { opacity:.45; } 50% { opacity:.9; } }
.net-node { animation: node-pulse 3s ease-in-out infinite; }
.net-node.ai  { fill: rgba(6,182,212,.3);   stroke: rgba(6,182,212,.5);  stroke-width:.4; animation-duration:2.2s; }
.net-node.std { fill: rgba(37,99,235,.2);   stroke: rgba(37,99,235,.4);  stroke-width:.3; }
.net-node.eco { fill: rgba(74,222,128,.15); stroke: rgba(74,222,128,.4); stroke-width:.3; }
.net-label {
  fill: rgba(148,197,255,.22); font-size: 2.4px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}

/* drift chips */
@keyframes chip-drift {
  0%   { transform: translateY(0)     translateX(0);    opacity: .55; }
  50%  { transform: translateY(-14px) translateX(6px);  opacity: .35; }
  100% { transform: translateY(5px)   translateX(-5px); opacity: .55; }
}
.drift-chip {
  position: absolute; pointer-events: none; z-index: 1;
  background: rgba(37,99,235,.1); border: 1px solid rgba(37,99,235,.22);
  border-radius: 20px; padding: 4px 12px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .06em;
  color: rgba(103,232,249,.4); text-transform: uppercase; white-space: nowrap;
  animation: chip-drift 18s ease-in-out infinite alternate;
}

.brand-content { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; }

/* Logo */
.b-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 44px; }
.b-logo-name { font-size: 30px; font-weight: 900; color: #fff; letter-spacing: -.6px; line-height: 1; }
.b-logo-tag {
  font-size: 10.5px; font-weight: 600;
  background: linear-gradient(90deg, var(--cyan), var(--teal2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: .07em; text-transform: uppercase; margin-top: 5px;
}

/* Headline */
.b-headline { font-size: 26px; font-weight: 800; color: #fff; line-height: 1.3; margin-bottom: 14px; }
.b-headline span {
  background: linear-gradient(90deg, var(--cyan), var(--green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.b-sub { font-size: 13.5px; color: rgba(255,255,255,.5); line-height: 1.65; margin-bottom: 36px; }

/* Feature rows */
.b-features { display: flex; flex-direction: column; gap: 16px; }
.b-feature  { display: flex; align-items: flex-start; gap: 13px; }
.b-feat-ico {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.13);
  display: flex; align-items: center; justify-content: center;
}
.b-feat-ico i { font-size: 16px; }
.b-feat-text  { padding-top: 2px; }
.b-feat-title { font-size: 13.5px; font-weight: 700; color: #fff; }
.b-feat-desc  { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 2px; }

/* Module pills */
.b-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 32px; }
.b-pill {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 11px; border-radius: 20px;
  color: rgba(103,232,249,.8);
  background: rgba(6,182,212,.1); border: 1px solid rgba(6,182,212,.28);
}
.b-pill.g {
  color: rgba(134,239,172,.8);
  background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.28);
}

.b-foot { margin-top: auto; padding-top: 32px; font-size: 11.5px; color: rgba(255,255,255,.22); }

/* RIGHT - FORM PANEL */
.form-panel {
  flex: 1; background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 64px;
}
.form-inner { width: 100%; max-width: 380px; }

.f-greeting { font-size: 26px; font-weight: 800; color: #0f172a; margin-bottom: 6px; }
.f-hint     { font-size: 14px; color: #64748b; margin-bottom: 34px; }

/* Error */
.f-error {
  display: none; background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 9px; padding: 10px 14px;
  font-size: 13px; color: #dc2626;
  margin-bottom: 20px; align-items: center; gap: 8px;
}
.f-error.show { display: flex; }

/* Fields */
.f-group  { margin-bottom: 20px; }
.f-label  {
  display: block; font-size: 11.5px; font-weight: 700;
  color: #374151; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 7px;
}
.f-wrap   { position: relative; }
.f-ico    {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%); pointer-events: none;
  color: #94a3b8; font-size: 16px;
}
.f-inp {
  width: 100%; padding: 12px 14px 12px 42px;
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 14px; color: #0f172a; background: #f8fafc;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.f-inp::placeholder { color: #c8d3e0; }
.f-inp:focus { border-color: var(--teal2); background: #fff; box-shadow: 0 0 0 3px rgba(6,182,212,.13); }

.f-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: #94a3b8; font-size: 16px; padding: 0; line-height: 1;
}
.f-toggle:hover { color: #475569; }

/* Options */
.f-opts { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.f-rem  { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #475569; cursor: pointer; }
.f-rem input { accent-color: var(--blue); cursor: pointer; }
.f-forgot { font-size: 13px; color: var(--blue); text-decoration: none; font-weight: 600; }
.f-forgot:hover { text-decoration: underline; }

/* Submit */
.f-btn {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border: none; border-radius: 10px; color: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer; letter-spacing: .01em;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 4px 18px rgba(37,99,235,.32);
  position: relative; overflow: hidden;
}
.f-btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(255,255,255,.1), transparent); }
.f-btn:hover { opacity: .92; }
.f-btn:active { transform: scale(.99); }
.f-btn:disabled { opacity: .45; cursor: not-allowed; }

.f-foot { margin-top: 30px; text-align: center; font-size: 12px; color: #94a3b8; }

@media (max-width: 820px) {
  .login-wrap  { flex-direction: column; }
  .brand-panel { flex: 0 0 auto; min-height: 260px; padding: 36px 28px; }
  .form-panel  { padding: 40px 28px; justify-content: flex-start; }
  .b-headline  { font-size: 20px; }
  .b-features  { display: none; }
}
