/* Prático ERP — Auth Pages (Login + SelecGrupo)
   Standalone full-page designs com Layout = null */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Card shared styles */
.login-card, .select-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  position: relative;
  animation: slideUp 0.5s ease-out;
}
.login-card { padding: 40px; }
.select-card { padding: 36px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.login-header, .select-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo, .select-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2563eb, #6366f1);
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.login-title, .select-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.login-subtitle, .select-subtitle {
  color: #64748b;
  font-size: 14px;
  font-weight: 400;
}

/* User card (SelecGrupo) */
.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e9eef3;
  border-radius: 12px;
  margin-bottom: 24px;
}
.user-card img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #2563eb;
  object-fit: cover;
  flex-shrink: 0;
}
.user-card-info { flex: 1; }
.user-card-name { font-size: 15px; font-weight: 600; color: #0f172a; }
.user-card-text { font-size: 13px; color: #64748b; margin-top: 2px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

/* Login text inputs */
.input-wrap { position: relative; }
.form-control {
  width: 100%;
  height: 46px;
  padding: 10px 16px 10px 44px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-control::placeholder { color: #94a3b8; }

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
  transition: color 0.2s;
}
.input-wrap:focus-within .input-icon { color: #2563eb; }

/* Select (SelecGrupo) */
.form-select {
  width: 100%;
  height: 46px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.form-select:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Submit buttons */
.btn-login, .btn-submit {
  width: 100%;
  height: 46px;
  background: linear-gradient(135deg, #2563eb, #6366f1);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-login:hover, .btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.btn-login:active, .btn-submit:active { transform: translateY(0); }
.btn-login:disabled, .btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Footer */
.login-footer, .form-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}
.login-footer p { font-size: 13px; color: #94a3b8; margin: 0; }
.login-footer a, .form-footer a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}
.login-footer a:hover, .form-footer a:hover { text-decoration: underline; }

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.15s;
}
.btn-logout:hover {
  background: #f1f5f9;
  color: #dc2626;
}

/* Alert box */
.alert-box {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid transparent;
  animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.alert-box.error {
  background: #fef2f2;
  color: #991b1b;
  border-left-color: #dc2626;
}
.alert-box.error i { color: #dc2626; }
.alert-box.success {
  background: #f0fdf4;
  color: #166534;
  border-left-color: #16a34a;
}
.alert-box.success i { color: #16a34a; }
.alert-box i { font-size: 16px; flex-shrink: 0; }

/* Responsive */
@media (max-width: 480px) {
  .login-card { padding: 28px 24px; margin: 12px; }
  .select-card { padding: 24px 20px; margin: 12px; }
  .login-title, .select-title { font-size: 20px; }
  .form-control, .form-select { height: 42px; font-size: 14px; }
  .btn-login, .btn-submit { height: 42px; font-size: 14px; }
}
