:root {
  --primary: #0792f0;
  --primary-light: #6ec1ff;
  --bg: #f7faff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: linear-gradient(135deg, #eef6ff, #f9fbff);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Container */
.container {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

/* Single-column variant (support login — no left panel) */
.container-single {
    grid-template-columns: 1fr;   /* one column instead of two */
    max-width: 480px;             /* narrower, since it's just the form panel */
}

/* Left Side */
.left {
  background: linear-gradient(135deg, #0792f0, #6ec1ff);
  color: white;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.left h1 {
  font-size: 32px;
  margin-bottom: 20px;
}

.left p {
  opacity: 0.9;
  line-height: 1.6;
}

/* Right Side */
.right {
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Responsive */
@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
  }

  .left {
    display: none;
  }

  .right {
    padding: 40px 20px;
  }
}

/* Logo */
.logo {
  margin-bottom: 30px;
  display: flex;
  align-items: center;
}

.logo img {
  width: 160px;
  max-width: 100%;
  height: auto;
}

/* Responsive scaling */
@media (max-width: 768px) {
  .logo img {
    width: 130px;
  }
}

@media (max-width: 480px) {
  .logo img {
    width: 110px;
  }
}

/* Text elements */
h2 {
  margin-bottom: 10px;
}

.subtext {
  color: var(--muted);
  margin-bottom: 30px;
}

/* Inputs */
.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  font-size: 14px;
  transition: 0.3s;
}

.input-group label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  padding: 0 6px;
  color: var(--muted);
  font-size: 14px;
  transition: 0.3s;
  pointer-events: none;
}

.input-group input:focus {
  border-color: var(--primary);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group input:-webkit-autofill + label,
.input-group input:autofill + label {
    top: -8px;
    font-size: 12px;
    color: var(--primary);
}

.input-group input:disabled {
  background: #f9fafb;
  color: var(--muted);
  cursor: not-allowed;
}

.input-group input:disabled + label {
  background: #f9fafb;
}

.client-select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
}

/* Forgot Password */
.forgot-password-row {
    text-align: right;
    margin-top: -15px;      /* pull it up closer to the password field */
    margin-bottom: 20px;    /* keep space before the button */
}

.forgot-password-link {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* Toggle */
.toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 12px;
  color: var(--primary);
}

/* Flash message (login page) */
.flash {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  margin-bottom: 16px;
}

.flash-success {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.flash-error {
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.flash-info {
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.flash-warning {
  color: #92400e;
  background: #fef3c7;
  border-left: 1px solid #eab308;
}

/* Error message */
/* Flash messages from Flask login_manager are sent as 'message'category, so putting it as error with this styling */
.error-message,
.flash-message {
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  margin-bottom: 16px;
}

/* Cloudflare Turnstile */
.cf-turnstile {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

/* Button */
button {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #067ad1;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer */
.footer {
  margin-top: 25px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  opacity: 0.8;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}
