/**
 * Shared Authentication Styles for DWS6.com Multi-Login Platform
 * 
 * Consistent styling across all 10 login pages with role-specific theming
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary Colors */
  --primary-blue: #60a5fa;
  --primary-blue-dark: #3b82f6;
  --primary-purple: #667eea;
  --primary-purple-dark: #764ba2;
  
  /* Background Colors */
  --bg-gradient-start: #001f3f;
  --bg-gradient-mid: #003366;
  --bg-gradient-end: #0a3a52;
  
  /* Card Colors */
  --card-bg: rgba(15, 50, 90, 0.95);
  --card-border: rgba(0, 152, 254, 0.3);
  
  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  /* Status Colors */
  --success-bg: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.3);
  --success-text: #10b981;
  --error-bg: rgba(239, 68, 68, 0.1);
  --error-border: rgba(239, 68, 68, 0.3);
  --error-text: #fca5a5;
  
  /* Input Colors */
  --input-bg: rgba(15, 23, 42, 0.5);
  --input-border: rgba(148, 163, 184, 0.3);
  --input-focus-border: #60a5fa;
  --input-focus-bg: rgba(15, 23, 42, 0.8);
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 20px;
  --spacing-xl: 30px;
  --spacing-2xl: 40px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: var(--spacing-lg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: 500px;
}

.login-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 152, 254, 0.1);
  animation: fadeIn 0.5s ease-in-out;
}

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

.logo-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--spacing-xl);
  gap: var(--spacing-md);
}

.logo-section img {
  height: 50px;
  width: auto;
}

.logo-section h1 {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.page-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.page-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-xl);
}

.security-badge {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  font-size: 0.9rem;
  text-align: center;
  color: var(--success-text);
}

.security-badge strong {
  display: block;
  margin-bottom: var(--spacing-xs);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
  background: var(--input-focus-bg);
}

input::placeholder {
  color: var(--text-muted);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
}

.button-group {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.btn {
  flex: 1;
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(96, 165, 250, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(96, 165, 250, 0.1);
  color: var(--primary-blue);
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.btn-secondary:hover {
  background: rgba(96, 165, 250, 0.2);
}

.btn-full {
  width: 100%;
}

.social-login {
  margin-top: var(--spacing-lg);
}

.social-divider {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.2);
}

.social-btn {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  transition: all 0.3s ease;
  margin-bottom: var(--spacing-sm);
}

.social-btn:hover {
  background: rgba(0, 152, 254, 0.1);
  border-color: rgba(0, 152, 254, 0.3);
  transform: translateY(-2px);
}

.links {
  display: flex;
  justify-content: space-between;
  margin-top: var(--spacing-md);
  font-size: 0.9rem;
}

.links a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

.links a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.error-message,
.success-message,
.info-message {
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  display: none;
  animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-message {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
}

.success-message {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: #86efac;
}

.info-message {
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #93c5fd;
}

.error-message.show,
.success-message.show,
.info-message.show {
  display: block;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

.footer-info {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-info a {
  color: var(--primary-blue);
  text-decoration: none;
}

.footer-info a:hover {
  text-decoration: underline;
}

/* Role-specific theme colors */
.theme-mobile {
  --primary-color: #10b981;
}

.theme-store {
  --primary-color: #f59e0b;
}

.theme-enterprise {
  --primary-color: #8b5cf6;
}

.theme-vertex-ai {
  --primary-color: #ec4899;
}

.theme-backoffice {
  --primary-color: #ef4444;
}

.theme-api {
  --primary-color: #14b8a6;
}

.theme-mcp {
  --primary-color: #6366f1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    max-width: 100%;
  }
  
  .login-card {
    padding: var(--spacing-lg);
  }
  
  .logo-section h1 {
    font-size: 1.25rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .login-card {
    border: 1px solid #ccc;
    box-shadow: none;
  }
  
  .btn,
  .social-btn {
    display: none;
  }
}
