:root {
  --integro-primary: #1E5BD6;
  --integro-primary-hover: #1747B0;
  --integro-navy: #1B2A4E;
  --integro-teal: #2DBFB8;
  --integro-text-body: #475569;
  --integro-text-muted: #94A3B8;
  --integro-border: #E2E8F0;
  --integro-border-focus: #1E5BD6;
  --integro-panel-bg-from: #EAF0FF;
  --integro-panel-bg-to: #D5E2FF;
  --integro-card-shadow: rgba(15, 23, 42, 0.06);
  --integro-radius-card: 24px;
  --integro-radius-panel: 20px;
  --integro-radius-input: 10px;
  --integro-radius-button: 10px;
  --integro-error-bg: #FEF2F2;
  --integro-error-border: #FCA5A5;
  --integro-error-text: #B91C1C;
  --integro-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

html, body {
  height: 100%;
  font-family: var(--integro-font-sans);
  color: var(--integro-text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  min-height: 100vh;
}

.login-card {
  width: 100%;
  max-width: 1080px;
  background: #FFFFFF;
  border-radius: var(--integro-radius-card);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px var(--integro-card-shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #F1F5F9;
}

/* ───── Left Panel (Form) ───── */
.login-form-panel {
  padding: 40px 56px;
  display: flex;
  flex-direction: column;
  min-height: 620px;
}

.form-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 380px;
  margin: 0 auto;
  width: 100%;
  padding: 24px 0;
}

.form-logo {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
}

.form-logo img {
  height: 72px;
  width: auto;
  display: block;
}

.form-heading {
  font-size: 26px;
  font-weight: 700;
  color: var(--integro-navy);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.form-subtitle {
  font-size: 14px;
  color: var(--integro-text-body);
  margin-bottom: 32px;
  line-height: 1.5;
}

.field {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--integro-navy);
  margin-bottom: 6px;
}

.field-input-wrap {
  position: relative;
}

.field-input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--integro-border);
  border-radius: var(--integro-radius-input);
  font-family: inherit;
  font-size: 14px;
  color: var(--integro-navy);
  background: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input::placeholder { color: var(--integro-text-muted); }

.field-input:focus {
  outline: none;
  border-color: var(--integro-border-focus);
  box-shadow: 0 0 0 4px rgba(30, 91, 214, 0.10);
}

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--integro-text-muted);
  pointer-events: none;
}

.field-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--integro-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.field-toggle:hover { color: var(--integro-text-body); }

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  margin-top: 4px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--integro-text-body);
  cursor: pointer;
  user-select: none;
}

.checkbox-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--integro-primary);
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  color: var(--integro-primary);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover { text-decoration: underline; }

.login-error {
  background: var(--integro-error-bg);
  border: 1px solid var(--integro-error-border);
  color: var(--integro-error-text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.45;
}

.btn-primary {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: var(--integro-radius-button);
  background: var(--integro-primary);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  box-shadow: 0 4px 12px rgba(30, 91, 214, 0.25);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary:hover:not(:disabled) { background: var(--integro-primary-hover); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: integro-spin 0.7s linear infinite;
  display: none;
}

.btn-primary.is-loading .btn-spinner { display: inline-block; }
.btn-primary.is-loading .btn-label   { opacity: 0.85; }

@keyframes integro-spin {
  to { transform: rotate(360deg); }
}

.form-footer {
  text-align: center;
  font-size: 13px;
  color: var(--integro-text-muted);
  margin-top: 24px;
}

/* ───── Right Panel (Visual) ───── */
.login-visual-panel {
  margin: 16px;
  border-radius: var(--integro-radius-panel);
  background: linear-gradient(160deg, var(--integro-panel-bg-from) 0%, var(--integro-panel-bg-to) 100%);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 588px;
}

.visual-heading {
  font-size: 28px;
  font-weight: 700;
  color: var(--integro-navy);
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.visual-heading .accent { color: var(--integro-primary); }

.orbital {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 24px 0;
}

.orbital-stage {
  position: relative;
  width: 340px;
  height: 340px;
}

.orbital-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(30, 91, 214, 0.22);
  border-radius: 50%;
}

.ring-inner  { width: 160px; height: 160px; }
.ring-middle { width: 240px; height: 240px; }
.ring-outer  { width: 340px; height: 340px; }

.orbital-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(27, 42, 78, 0.18);
  z-index: 2;
}

.orbital-center img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.orbital-node {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(27, 42, 78, 0.12);
  color: var(--integro-primary);
}

.orbital-node svg { width: 22px; height: 22px; }

.orbital-node.is-marketplace {
  background: var(--integro-primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.orbital-node.is-marketplace.tokopedia { background: #1B2A4E; }
.orbital-node.is-marketplace.shopee    { background: #1E5BD6; }
.orbital-node.is-marketplace.tiktok    { background: #0F172A; }
.orbital-node.is-marketplace.lazada    { background: #2DBFB8; }

.node-stock     { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-90deg) translate(80px) rotate(90deg); }
.node-sales     { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(30deg)  translate(80px) rotate(-30deg); }
.node-accounts  { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(150deg) translate(80px) rotate(-150deg); }

.node-tokopedia { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-45deg)  translate(170px) rotate(45deg); }
.node-shopee    { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(45deg)   translate(170px) rotate(-45deg); }
.node-tiktok    { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(135deg)  translate(170px) rotate(-135deg); }
.node-lazada    { top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-135deg) translate(170px) rotate(135deg); }

.visual-caption {
  text-align: center;
  font-size: 13px;
  color: var(--integro-text-body);
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto;
}

.visual-caption strong {
  color: var(--integro-navy);
  font-weight: 600;
  font-style: italic;
}

/* ───── Responsive ───── */
@media (max-width: 880px) {
  .login-card {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .login-visual-panel { display: none; }
  .login-form-panel { padding: 32px 28px 40px; min-height: auto; }
  .form-body { padding: 16px 0 0; }
}
