
/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 60px;
}

/* Brand Colors */
.bg-primary {
  background: linear-gradient(135deg, #003865 0%, #004d8c 100%) !important;
}

/* Alert Messages */
.alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  min-width: 300px;
  max-width: 500px;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 0.9375rem;
  font-weight: 500;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-left: 4px solid #28a745;
}

.alert-error {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-left: 4px solid #dc3545;
}

/* Header Bar */
.header-bar {
  height: 30px;
  background: linear-gradient(90deg, #003865 0%, #004d8c 100%);
  box-shadow: 0 2px 8px rgba(0, 56, 101, 0.15);
}

/* Logo Section */
.logo-section {
  text-align: center;
  padding: 0;
  margin-bottom: 0.5rem;
}

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

/* Main Container */
.main-container {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Card Styles */
.auth-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
}

.auth-card-wide {
  max-width: 550px;
}

/* Card Header */
.card-header {
  background: linear-gradient(135deg, #003865 0%, #004d8c 100%);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  position: relative;
}

.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.logo-container img {
  height: 70px;
  filter: brightness(0) invert(1);
}

.card-header h1,
.card-header h3 {
  color: white;
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.5px;
}

.card-header sup {
  font-size: 50%;
}

.card-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  margin-top: 0.75rem;
  line-height: 1.5;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: -175px;
}

/* Success Icon */
.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 36px;
  height: 36px;
  stroke: white;
  stroke-width: 3;
  fill: none;
}

/* Card Body */
.card-body {
  padding: 2.5rem 2rem;
}

/* Message Boxes */
.info-message {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #003865;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.info-message p {
  color: #1e40af;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

.success-message {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #22c55e;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.success-message p {
  color: #166534;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

.info-section {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #003865;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.info-section p {
  color: #1e40af;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

.info-section p:last-child {
  margin-bottom: 0;
}

.info-section a {
  color: #003865;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #003865;
  transition: all 0.2s ease;
}

.info-section a:hover {
  color: #004d8c;
  border-bottom-color: #004d8c;
}

.alert-box {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.alert-box p {
  color: #991b1b;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

.alert-box a {
  color: #dc2626;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid #dc2626;
  transition: all 0.2s ease;
}

.alert-box a:hover {
  color: #991b1b;
  border-bottom-color: #991b1b;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-control {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #1f2937;
  background-color: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  background-color: white;
  border-color: #003865;
  box-shadow: 0 0 0 3px rgba(0, 56, 101, 0.1);
}

/* Input Groups (for password toggle) */
.input-group {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group-append {
  display: flex;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  background-color: #f9fafb;
  border: 2px solid #e5e7eb;
  border-left: none;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.input-group:focus-within .input-group-text {
  background-color: white;
  border-color: #003865;
}

.input-group-text i {
  color: #6b7280;
}

/* Help Text */
.helptext {
  display: block;
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.helptext ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

.helptext li {
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.helptext li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #003865;
  font-weight: bold;
}

/* Error Lists */
.errorlist {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.errorlist li {
  color: #dc2626;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  background-color: #fef2f2;
  border-left: 3px solid #dc2626;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* Buttons */
.submit-btn,
.auth-btn {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #003865 0%, #004d8c 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(0, 56, 101, 0.2);
}

.submit-btn:hover,
.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 56, 101, 0.3);
}

.submit-btn:active,
.auth-btn:active {
  transform: translateY(0);
}

/* Links */
.forgot-link {
  text-align: right;
  margin-top: 0.5rem;
}

.forgot-link a {
  color: #003865;
  font-size: 0.875rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.forgot-link a:hover {
  color: #004d8c;
  text-decoration: underline;
}

.help-links {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.help-links p {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0;
}

.help-links a {
  color: #003865;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.help-links a:hover {
  color: #004d8c;
  text-decoration: underline;
}

.action-links {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.action-links a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #003865 0%, #004d8c 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 56, 101, 0.2);
}

.action-links a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 56, 101, 0.3);
}

/* Footer */
.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: white;
  text-align: center;
  padding: 10px 0;
  border-top: 30px solid;
  border-image: linear-gradient(90deg, #003865 0%, #004d8c 100%) 1;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
  color: #6b7280;
}

.text-trendsumo {
  color: #003865;
  text-decoration: none;
  font-weight: 500;
}

.text-trendsumo:hover {
  color: #004d8c;
  text-decoration: underline;
}

.footer-bar {
  height: 30px;
  background: linear-gradient(90deg, #003865 0%, #004d8c 100%);
  box-shadow: 0 -2px 8px rgba(0, 56, 101, 0.15);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .auth-card,
  .auth-card-wide {
    border-radius: 12px;
    margin: 1rem;
  }

  .card-header {
    padding: 2rem 1.5rem 1.5rem;
  }

  .card-body {
    padding: 2rem 1.5rem;
  }

  .card-header h1,
  .card-header h3 {
    font-size: 1.5rem;
  }

  .card-subtitle {
    font-size: 0.875rem;
  }

  .logo-section {
    padding: 1.5rem 0 1rem;
  }

  .logo-section img {
    max-width: 200px;
  }
}

/* Login Page Specific */
.login-main-container {
  min-width: 500px;
}