/* ========================================
   COASTWISE AUTHENTICATION STYLES
   Consistent branding across all auth pages
   ======================================== */

/* ========================================
   MAIN AUTH PAGE LAYOUT
   ======================================== */

.auth-page {
  min-height: 100vh;
  background-image: url('../images/sea.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: 'Rubik', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.auth-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.auth-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 77, 151, 0.85) 0%, rgba(248, 212, 71, 0.1) 30%, rgba(203, 56, 57, 0.85) 100%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.auth-container {
  width: 100%;
  max-width: 500px;
  position: relative;
  z-index: 1;
}

/* ========================================
   AUTH CARD
   ======================================== */

.auth-card {
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  border-radius: 25px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 12px solid transparent;
  background-clip: padding-box;
  border-image: linear-gradient(135deg, #004d97, #f8d447, #cb3839) 1;
  padding: 45px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #004d97 0%, #f8d447 50%, #cb3839 100%);
}

/* ========================================
   AUTH HEADER
   ======================================== */

.auth-header {
  margin-bottom: 30px;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.coastwise-logo {
  width: 180px;
  height: auto;
  margin-bottom: 10px;
  opacity: 0.95;
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 77, 151, 0.2));
}

.coastwise-logo:hover {
  opacity: 1;
  transform: scale(1.02);
  filter: drop-shadow(0 6px 12px rgba(0, 77, 151, 0.3));
}

.logo-icon {
  font-size: 3rem;
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.auth-title {
  color: #004d97;
  margin: 0;
  font-size: 2.5rem;
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  line-height: 1.2;
}

.auth-subtitle {
  color: #666;
  margin: 0 0 25px 0;
  font-size: 1.1rem;
  line-height: 1.5;
  opacity: 0.9;
}

/* ========================================
   FEATURE HIGHLIGHTS
   ======================================== */

.feature-highlights {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 25px 0;
  padding: 20px;
  background: linear-gradient(135deg, rgba(0, 77, 151, 0.05) 0%, rgba(248, 212, 71, 0.05) 50%, rgba(203, 56, 57, 0.05) 100%);
  border-radius: 15px;
  border: 1px solid rgba(0, 77, 151, 0.1);
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
  min-width: 100px;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 77, 151, 0.15);
}

.feature-icon {
  font-size: 1.5rem;
  color: #004d97;
  margin-bottom: 5px;
}

.feature-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #004d97;
  text-align: center;
  line-height: 1.2;
}

/* ========================================
   PROGRESS INDICATOR
   ======================================== */

.auth-progress {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px 0;
  border-top: 1px solid rgba(0, 77, 151, 0.1);
  border-bottom: 1px solid rgba(0, 77, 151, 0.1);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 3px solid #e5e7eb;
}

.step-label {
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-step.active .step-number {
  background: #004d97;
  color: #ffffff;
  border-color: #004d97;
  box-shadow: 0 4px 12px rgba(0, 77, 151, 0.3);
}

.progress-step.completed .step-number {
  background: #20c997;
  color: #ffffff;
  border-color: #20c997;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
  color: #004d97;
  font-weight: 600;
}

/* ========================================
   AUTH FORM
   ======================================== */

.auth-form {
  text-align: left;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #004d97;
  font-weight: 600;
  font-size: 1rem;
}

.icon {
  font-size: 1.1rem;
  color: #f8d447;
  margin-right: 5px;
}

.form-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.9);
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: #004d97;
  box-shadow: 0 0 0 3px rgba(0, 77, 151, 0.1);
  background: #ffffff;
  transform: translateY(-1px);
}

.form-input.disabled {
  background: #f8f9fa;
  cursor: not-allowed;
  opacity: 0.7;
}

.verification-input {
  text-align: center;
  letter-spacing: 0.2em;
  font-size: 1.2rem;
  font-weight: 600;
}

.verification-hint {
  font-size: 0.9rem;
  color: #666;
  margin-top: 8px;
  text-align: center;
  font-style: italic;
}

/* ========================================
   AUTH BUTTONS
   ======================================== */

.auth-button {
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, #004d97 0%, #0066cc 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(0, 77, 151, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.auth-button:hover:not(.loading):not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 77, 151, 0.4);
  background: linear-gradient(135deg, #0066cc 0%, #004d97 100%);
}

.auth-button:active:not(.loading):not(:disabled) {
  transform: translateY(0);
}

.auth-button.loading {
  opacity: 0.8;
  cursor: not-allowed;
  transform: none;
}

.auth-button.secondary {
  background: transparent;
  color: #004d97;
  border: 2px solid #004d97;
  box-shadow: none;
  margin-top: 15px;
}

.auth-button.secondary:hover:not(.loading):not(:disabled) {
  background: #004d97;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 77, 151, 0.3);
}

.button-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========================================
   MESSAGES
   ======================================== */

.auth-error {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid rgba(220, 53, 69, 0.2);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.error-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.auth-success {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid rgba(40, 167, 69, 0.2);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.success-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ========================================
   AUTH FOOTER
   ======================================== */

.auth-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 77, 151, 0.1);
}

.auth-links {
  margin-bottom: 20px;
}

.auth-link-text {
  color: #666;
  font-size: 0.9rem;
  margin: 8px 0;
  line-height: 1.5;
}

.auth-link {
  background: none;
  border: none;
  color: #004d97;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.3s ease;
  padding: 2px 4px;
  font-weight: 600;
}

.auth-link:hover {
  color: #0066cc;
  text-decoration: none;
}

.auth-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 25px 20px;
  background: linear-gradient(135deg, rgba(0, 77, 151, 0.08) 0%, rgba(248, 212, 71, 0.05) 50%, rgba(203, 56, 57, 0.08) 100%);
  border-radius: 15px;
  border: 1px solid rgba(0, 77, 151, 0.15);
  position: relative;
  overflow: hidden;
}

.auth-branding::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #004d97 0%, #f8d447 50%, #cb3839 100%);
}

.branding-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.branding-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #004d97;
}

.branding-icon {
  font-size: 1.5rem;
  animation: wave 3s ease-in-out infinite;
}

.branding-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

/* ========================================
   BRANDING INFO
   ======================================== */

.branding-info {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  border: 1px solid rgba(0, 77, 151, 0.2);
  transition: all 0.3s ease;
  font-size: 0.8rem;
  font-weight: 500;
  color: #004d97;
}

.info-item:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 77, 151, 0.15);
}

.info-item i {
  font-size: 0.9rem;
  color: #f8d447;
}

/* ========================================
   DEEPEARTH ATTRIBUTION
   ======================================== */

.deepearth-attribution {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 77, 151, 0.1);
  width: 100%;
}

.attribution-text {
  margin: 0;
  font-size: 0.8rem;
  color: #666;
  text-align: center;
}

.deepearth-link {
  color: #004d97;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.deepearth-link:hover {
  color: #0066cc;
  text-decoration: underline;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .auth-page {
    padding: 15px;
  }
  
  .auth-card {
    padding: 30px 25px;
    border-width: 8px;
  }
  
  .auth-title {
    font-size: 2rem;
  }
  
  .auth-subtitle {
    font-size: 1rem;
  }
  
  .coastwise-logo {
    width: 150px;
  }
  
  .feature-highlights {
    gap: 15px;
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .feature-item {
    min-width: 80px;
    padding: 12px 8px;
  }
  
  .feature-icon {
    font-size: 1.3rem;
  }
  
  .feature-item span {
    font-size: 0.8rem;
  }
  
  .branding-info {
    gap: 10px;
  }
  
  .info-item {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
  
  .auth-progress {
    gap: 15px;
    padding: 15px 0;
  }
  
  .step-number {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .step-label {
    font-size: 0.8rem;
  }
  
  .form-input {
    padding: 12px 15px;
    font-size: 0.95rem;
  }
  
  .auth-button {
    padding: 12px 15px;
    font-size: 1rem;
  }
  
  .logo-icon {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 10px;
  }
  
  .auth-card {
    padding: 25px 20px;
    border-width: 6px;
  }
  
  .auth-title {
    font-size: 1.8rem;
  }
  
  .auth-subtitle {
    font-size: 0.95rem;
  }
  
  .coastwise-logo {
    width: 120px;
  }
  
  .feature-highlights {
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }
  
  .feature-item {
    flex-direction: row;
    justify-content: center;
    min-width: auto;
    padding: 10px 15px;
  }
  
  .feature-icon {
    font-size: 1.2rem;
    margin-bottom: 0;
    margin-right: 8px;
  }
  
  .feature-item span {
    font-size: 0.85rem;
  }
  
  .branding-info {
    flex-direction: column;
    gap: 8px;
  }
  
  .info-item {
    justify-content: center;
    font-size: 0.8rem;
    padding: 8px 12px;
  }
  
  .auth-progress {
    flex-direction: column;
    gap: 10px;
  }
  
  .progress-step {
    flex-direction: row;
    gap: 10px;
  }
  
  .step-number {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }
  
  .step-label {
    font-size: 0.75rem;
  }
  
  .form-input {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .auth-button {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
  
  .logo-icon {
    font-size: 2rem;
  }
  
  .branding-text {
    font-size: 1rem;
  }
  
  .branding-icon {
    font-size: 1.2rem;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus styles for keyboard navigation */
.auth-button:focus,
.auth-link:focus,
.form-input:focus {
  outline: 2px solid #f8d447;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .auth-card {
    border-width: 3px;
    border-color: #000000;
  }
  
  .form-input {
    border-width: 2px;
  }
  
  .auth-button {
    border: 2px solid #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .logo-icon,
  .branding-icon {
    animation: none;
  }
  
  .button-spinner {
    animation: none;
  }
  
  .auth-button,
  .form-input {
    transition: none;
  }
}


/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .auth-page {
    background: none;
  }
  
  .auth-overlay {
    display: none;
  }
  
  .auth-card {
    box-shadow: none;
    border: 1px solid #000000;
  }
  
  .auth-button {
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
  }
}