/* Variables */
:root {
  --cr-black-100: #14191f;
  --cr-black-200: #101419;
  --cr-black-300: #0c0f13;
  --cr-white: #ffffff;
  --cr-gray-200: #e2e5e9;
  --cr-gray-300: #c9cdd3;
  --cr-gray-400: #9ba1ab;
  --cr-gray-500: #6b7280;
  --cr-gray-600: #4b5563;
  --cr-blue-500: #3b5bdb;
  --cr-red-500: #ef4444;
  --cr-shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.08), 0 1px 2px 0 rgba(0,0,0,0.04);
  --cr-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --cr-shadow-lg: 0 10px 40px -4px rgba(0,0,0,0.12);
}

/* Base Override for Login ONLY */
.login-wrapper {
  display: grid;
  grid-template-columns: 55fr 45fr;
  height: 100vh;
  min-height: 600px;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  margin: 0; padding: 0; box-sizing: border-box;
  font-size: 16px;
  background: var(--cr-black-200);
}
.login-wrapper *, .login-wrapper *::before, .login-wrapper *::after {
  box-sizing: border-box;
}

/* ── Left Hero Panel ──────────────────────── */
.hero-panel {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 56px; overflow: hidden; background: var(--cr-black-200);
}
.hero-panel::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(59,91,219,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(59,91,219,0.06) 0%, transparent 50%);
  z-index: 1;
}
.hero-bg-image {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; z-index: 0;
}
.hero-decoration {
  position: absolute; top: 48px; right: 48px; z-index: 2; display: flex; gap: 6px;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15);
}
.hero-dot:first-child { background: var(--cr-blue-500); }

/* ── Right Form Panel ─────────────────────── */
.form-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 32px; background: var(--cr-white); overflow-y: auto;
}
.form-container {
  width: 100%; max-width: 380px; animation: fadeSlideUp 0.5s ease-out both; 
  text-align: left;
}
.form-logo {
  width: 56px; height: 56px; border-radius: 14px; object-fit: contain; margin-bottom: 32px;
  box-shadow: var(--cr-shadow-sm); border: 1px solid var(--cr-gray-200);
  background: #fff;
}
.form-heading {
  font-size: 28px !important; font-weight: 700; color: var(--cr-black-100); letter-spacing: -0.025em; line-height: 1.2; margin-top: 0; margin-bottom: 8px; font-family: 'Inter', sans-serif;
}
.form-subheading {
  font-size: 15px !important; color: var(--cr-gray-500); margin-bottom: 32px; font-weight: 400; font-family: 'Inter', sans-serif;
}

/* ── Form Controls ────────────────────────── */
.field-group { margin-bottom: 20px; text-align: left; }
.field-label {
  display: block; font-size: 13px !important; font-weight: 500; color: var(--cr-gray-600); margin-bottom: 6px; letter-spacing: 0.01em; font-family: 'Inter', sans-serif;
}
.field-input-wrapper { position: relative; }
.field-input, .field-input.form-control {
  width: 100% !important; height: 46px !important; padding: 0 44px 0 14px !important; font-size: 15px !important;
  color: var(--cr-black-100) !important; background: var(--cr-white) !important; border: 1.5px solid var(--cr-gray-200) !important;
  border-radius: 10px !important; outline: none !important; transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Inter', sans-serif !important; box-shadow: none !important; margin: 0 !important;
}
.field-input::placeholder { color: var(--cr-gray-400); font-weight: 400; }
.field-input:focus {
  border-color: var(--cr-blue-500) !important; box-shadow: 0 0 0 3px rgba(59,91,219,0.1) !important;
}
.field-icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--cr-gray-400); font-size: 14px; pointer-events: none; z-index: 5;
}
.field-icon.clickable { pointer-events: auto; cursor: pointer; transition: color 0.15s ease; }
.field-icon.clickable:hover { color: var(--cr-black-100); }

/* ── Remember Me ──────────────────────────── */
.remember-row { display: flex; align-items: center; margin-bottom: 24px; }
.custom-checkbox {
  position: relative; display: flex; align-items: center; cursor: pointer; font-size: 14px; color: var(--cr-gray-600); user-select: none; gap: 8px; font-family: 'Inter', sans-serif; font-weight: 500;
}
.custom-checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkmark {
  width: 18px; height: 18px; border: 1.5px solid var(--cr-gray-300); border-radius: 5px; display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; flex-shrink: 0;
}
.checkmark::after {
  content: ''; width: 10px; height: 10px; border-radius: 2px; background: var(--cr-black-100); opacity: 0; transform: scale(0.5); transition: all 0.15s ease;
}
.custom-checkbox input:checked + .checkmark { border-color: var(--cr-black-100); }
.custom-checkbox input:checked + .checkmark::after { opacity: 1; transform: scale(1); }

/* ── Button ───────────────────────────────── */
.btn-signin {
  width: 100%; height: 46px; border: none; border-radius: 10px; background: var(--cr-black-100); color: var(--cr-white);
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em; cursor: pointer; position: relative; overflow: hidden; transition: all 0.25s ease; box-shadow: var(--cr-shadow-md);
  font-family: 'Inter', sans-serif;
}
.btn-signin:hover { background: var(--cr-black-300); transform: translateY(-1px); box-shadow: var(--cr-shadow-lg); }
.btn-signin:active { transform: translateY(0); box-shadow: var(--cr-shadow-sm); }
.btn-signin::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent); opacity: 0; transition: opacity 0.25s ease;
}
.btn-signin:hover::after { opacity: 1; }

/* ── Forgot Password & Footer ─────────────── */
.forgot-link {
  display: block; text-align: center; margin-top: 20px; color: var(--cr-gray-500); font-size: 13px; text-decoration: none; transition: color 0.15s ease; font-family: 'Inter', sans-serif; font-weight: 500;
}
.forgot-link:hover { color: var(--cr-blue-500); }
.form-footer {
  margin-top: 48px; text-align: center; font-size: 12px; color: var(--cr-gray-400); letter-spacing: 0.02em; font-family: 'Inter', sans-serif;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 900px) {
  .login-wrapper { grid-template-columns: 1fr; grid-template-rows: 220px 1fr; }
  .hero-panel { padding: 32px; justify-content: center; align-items: center; text-align: center; }
  .form-panel { padding: 32px 24px; }
}
@media (max-width: 480px) {
  .login-wrapper { grid-template-rows: 160px 1fr; }
  .form-heading { font-size: 24px !important; }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
