/* ==========================================================================
   GROW SYNC - Register Page Stylesheet (app/register/style.css)
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  /* Color Palette */
  --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f8fafc 100%);
  --panel-bg: #ffffff;
  --visual-bg: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);

  /* Accents */
  --color-primary-navy: #243746;
  --color-primary-navy-hover: #17242f;
  --color-primary-blue: #2563eb;
  --color-primary-blue-hover: #1d4ed8;
  --color-eco-green: #10b981;

  /* Status Badges */
  --sensor-wind-bg: #d1fae5;
  --sensor-wind-color: #059669;
  --sensor-ph-bg: #dbeafe;
  --sensor-ph-color: #3b82f6;

  /* Typography */
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-placeholder: #94a3b8;

  /* Borders & Shadows */
  --border-light: #e2e8f0;
  --border-focus: #2563eb;
  --shadow-card: 0 24px 64px -12px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-input-focus: 0 0 0 4px rgba(37, 99, 235, 0.12);
  --shadow-button: 0 12px 24px -6px rgba(36, 55, 70, 0.32);

  /* Radius */
  --radius-card: 28px;
  --radius-input: 12px;
  --radius-btn: 14px;

  --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 30px 20px;
  -webkit-font-smoothing: antialiased;
}

/* Main Split Card */
.register-container-card {
  width: 100%;
  max-width: 1100px;
  background: var(--panel-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 440px 1fr;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}

/* 1. Left Visual Panel */
.visual-panel {
  background: var(--visual-bg);
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(226, 232, 240, 0.7);
}

.visual-panel::before {
  content: '';
  position: absolute;
  top: -15%;
  left: -15%;
  width: 130%;
  height: 130%;
  background: radial-gradient(circle at 50% 60%, rgba(219, 234, 254, 0.4) 0%, rgba(248, 250, 252, 0) 70%);
  pointer-events: none;
}

.brand-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-wrap {
  width: 42px;
  height: 42px;
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  color: var(--color-primary-navy);
}

.brand-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.visual-intro {
  position: relative;
  z-index: 2;
  margin-top: 24px;
}

.visual-headline {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.6px;
  color: var(--text-main);
}

.visual-headline .highlight {
  color: var(--color-primary-navy);
}

.visual-description {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 12px;
}

/* 3D Fertigation Device Stage */
.device-stage {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0 10px;
  min-height: 220px;
}

.device-img-wrapper {
  position: relative;
  z-index: 3;
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatDevice 6s ease-in-out infinite;
}

.device-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 14px 24px rgba(36, 55, 70, 0.12));
}

/* Feature Bullet Points on Left */
.features-list {
  position: relative;
  z-index: 2;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.feature-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-eco-green);
  flex-shrink: 0;
}

/* 2. Right Form Panel */
.form-panel {
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.form-inner {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 26px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Alert Banner */
.alert-banner {
  display: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 18px;
  align-items: center;
  gap: 10px;
  animation: fadeInDown 0.3s ease-out forwards;
}

.alert-banner.error {
  display: flex;
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  color: #dc2626;
}

.alert-banner.success {
  display: flex;
  background-color: #ecfdf5;
  border: 1px solid #d1fae5;
  color: #059669;
}

.alert-banner svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* Form Fields Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.col-span-2 {
  grid-column: span 2;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label .required-dot {
  color: #ef4444;
}

.input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-input);
  transition: all 0.2s ease;
  height: 48px;
  padding: 0 14px;
}

.input-box:focus-within {
  border-color: var(--color-primary-blue);
  box-shadow: var(--shadow-input-focus);
}

.input-box.error {
  border-color: #ef4444;
}

.input-box .field-icon {
  width: 18px;
  height: 18px;
  color: var(--text-placeholder);
  margin-right: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.input-box:focus-within .field-icon {
  color: var(--color-primary-blue);
}

.input-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text-main);
  height: 100%;
}

.input-box input::placeholder {
  color: var(--text-placeholder);
  font-weight: 400;
}

.input-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.input-btn:hover {
  color: var(--text-secondary);
}

.input-btn svg {
  width: 17px;
  height: 17px;
}

/* Validation Hint */
.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.4;
}

.input-hint.error {
  color: #dc2626;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  height: 50px;
  background: var(--color-primary-navy);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-button);
}

.btn-submit:hover:not(:disabled) {
  background: var(--color-primary-navy-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -6px rgba(36, 55, 70, 0.4);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-submit .arrow-icon {
  transition: transform 0.2s ease;
}

.btn-submit:hover .arrow-icon {
  transform: translateX(3px);
}

/* Spinner */
.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinSlow 0.8s linear infinite;
}

.btn-submit.loading .btn-text,
.btn-submit.loading .arrow-icon {
  display: none;
}

.btn-submit.loading .spinner {
  display: block;
}

/* Footer & Back Link */
.form-footer {
  margin-top: 24px;
  text-align: center;
}

.login-prompt {
  font-size: 13.5px;
  color: var(--text-muted);
}

.login-link {
  color: var(--color-primary-blue);
  font-weight: 700;
  text-decoration: none;
  margin-left: 6px;
}

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

/* Lukken Logo in Footer - Original Vibrant Colors */
.company-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-footer img {
  height: 30px;
  opacity: 1;
  filter: none;
  transition: transform 0.2s ease;
}

.company-footer img:hover {
  transform: scale(1.04);
}

/* Keyframes */
@keyframes floatDevice {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Top Brand Bar (hidden by default) */
.mobile-brand-bar {
  display: none;
}

/* Responsive Breakpoints */
@media screen and (max-width: 1024px) {
  .register-container-card {
    grid-template-columns: 360px 1fr;
    max-width: 900px;
  }
  .visual-panel {
    padding: 36px 28px;
  }
  .form-panel {
    padding: 40px 36px;
  }
  .device-img-wrapper {
    width: 160px;
    height: 160px;
  }
}

@media screen and (max-width: 768px) {
  body {
    padding: 12px;
    background: #f8fafc;
  }

  .register-container-card {
    grid-template-columns: 1fr;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  }

  .visual-panel {
    display: none;
  }

  .form-panel {
    padding: 34px 22px 28px;
  }

  .mobile-brand-bar {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    text-align: center;
  }

  .mobile-brand-bar .brand-icon-wrap {
    width: 36px;
    height: 36px;
    background: #edf3fa;
  }

  .mobile-brand-bar .brand-title {
    font-size: 16px;
  }

  .form-header {
    text-align: center;
    margin-bottom: 20px;
  }

  .page-title {
    font-size: 23px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-group.col-span-2 {
    grid-column: span 1;
  }

  .input-box {
    height: 48px;
  }

  .btn-submit {
    height: 48px;
    margin-top: 20px;
  }

  .company-footer {
    margin-top: 20px;
  }
}
