:root {
  --brand-red: #e11919;
}

.logo {
  height: 40px;
  width: auto;
}

/* Form styling improvements */
.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  background-color: #fff;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(225, 25, 25, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input:disabled {
  background-color: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

.input-readonly {
  background-color: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}
.input-readonly:hover,
.input-readonly:focus {
  border-color: #e5e7eb;
  box-shadow: none;
}

/* Brand ring helper for hover borders using Soprole red */
.hover-brand-ring:hover {
  box-shadow: 0 0 0 2px rgba(225, 25, 25, 0.5);
  border-color: var(--brand-red);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Login page specific styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  background: white;
  color: #111827;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid #f3f4f6;
}

.login-header .logo {
  height: 56px;
  width: auto;
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.login-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #111827;
  line-height: 1.4;
}

.login-header .subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.login-body {
  padding: 1.5rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.login-form-group.focused label {
  color: var(--brand-red);
}

.login-form-group label {
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
  transition: color 150ms ease;
}

.login-form-group input {
  padding: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 150ms ease;
  background-color: #fff;
}

.login-form-group input:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(225, 25, 25, 0.1);
}

.login-form-group input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.login-submit {
  background: var(--brand-red);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}

.login-submit:hover:not(:disabled) {
  background: #c41230;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(225, 25, 25, 0.2);
}

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

.login-submit:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(225, 25, 25, 0.2);
}

.login-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-submit:disabled::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* EntraID Login Styles */
.login-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #e5e7eb;
}

.login-divider span {
  padding: 0 1rem;
  background-color: white;
}

.entra-id-login {
  margin-bottom: 1.5rem;
}

.entra-id-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #0078d4;
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 150ms ease;
  border: 2px solid transparent;
}

.entra-id-button:hover {
  background-color: #106ebe;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
  color: white;
  text-decoration: none;
}

.entra-id-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 120, 212, 0.3);
}

.entra-id-button svg {
  flex-shrink: 0;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Already logged in modal */
.logged-in-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.logged-in-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.3s ease-out;
}

.logged-in-avatar {
  width: 64px;
  height: 64px;
  background: var(--brand-red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 auto 1rem;
}

.logged-in-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.logged-in-message {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.logged-in-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-secondary:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.btn-logout {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
}

.btn-logout:hover {
  background: #dc2626;
}

.btn-primary {
  background: var(--brand-red);
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  transition: background 150ms ease, transform 120ms ease, box-shadow 150ms ease;
}

.btn-primary:hover {
  filter: brightness(0.95);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-primary:focus-visible {
  outline: 2px solid rgba(225, 25, 25, 0.55);
  outline-offset: 2px;
}

pre,
code {
  white-space: pre-wrap;
}

/* 
 * [28-08-2025] FIX: Remove external scroll for chat applications
 * - Prevents body scroll when chat is active
 * - Ensures only internal chat scroll is available
 * - Improves UX by eliminating double scrollbars
 */
html, body {
  overflow: hidden !important;
  height: 100vh !important;
}

/* subtle scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* mobile sidebar overlay utility */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

/* drop highlight */
.outline {
  outline: 2px solid #e2e8f0;
  border-radius: 6px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  transition: background 120ms ease;
}
.icon-btn:hover {
  background: #f1f5f9;
}

.icon-btn-lg {
  width: 32px;
  height: 32px;
  font-size: 16px;
}
