/* ========================================
   PsΨ8 – Login Page Styles
   ======================================== */

:root {
  --primary: #6C63FF;
  --primary-dark: #5A52D5;
  --primary-light: #8B83FF;
  --secondary: #00C9A7;
  --bg-dark: #0F0F1A;
  --bg-card: #1A1A2E;
  --bg-input: #16213E;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0B8;
  --text-muted: #6B6B80;
  --border: #2A2A40;
  --error: #FF6B6B;
  --success: #00C9A7;
  --warning: #FFB347;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --transition: all 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

/* ========== Layout ========== */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* Marca d'água centralizada na linha divisória das duas colunas */
.page-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  max-width: 450px;
  height: auto;
  object-fit: contain;
  opacity: 0.06; /* Deixa sutil */
  pointer-events: none;
  z-index: 10;
}

/* ========== Branding Side ========== */
.login-branding {
  background: linear-gradient(145deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  position: relative;
  height: 100vh;
  overflow-y: auto;
  z-index: 2;
}

.brand-top {
  margin-bottom: 1.5rem;
}

.brand-logo-img {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.branding-content {
  max-width: 420px;
}

.login-branding h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-item i {
  width: 20px;
  height: 20px;
  color: var(--secondary);
  flex-shrink: 0;
}

.branding-footer {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========== Form Side ========== */
.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-dark);
  height: 100vh;
  overflow-y: auto;
  position: relative;
  z-index: 2;
}

.form-wrapper {
  width: 100%;
  max-width: 400px;
}

.form-header {
  margin-bottom: 2rem;
  text-align: center;
}

.form-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ========== Form Elements ========== */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--text-secondary);
}

.toggle-password i {
  width: 18px;
  height: 18px;
}

/* ========== Options ========== */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-wrapper input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.forgot-link {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

.forgot-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ========== Button ========== */
.btn-login {
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ========== Footer ========== */
.form-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-footer a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.form-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ========== Messages ========== */
.message {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-align: center;
}

.message.error {
  background: rgba(255, 107, 107, 0.15);
  color: var(--error);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.message.success {
  background: rgba(0, 201, 167, 0.15);
  color: var(--success);
  border: 1px solid rgba(0, 201, 167, 0.3);
}

.message.info {
  background: rgba(108, 99, 255, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(108, 99, 255, 0.3);
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  body {
    height: auto;
    overflow-y: auto;
  }

  .login-container {
    grid-template-columns: 1fr;
    height: auto;
  }

  .login-branding {
    display: none;
  }

  .login-form-side {
    min-height: 100vh;
    height: auto;
  }
}