/* ===== MINIMALISTIC LOGIN PAGE CSS ===== */

/* Clean Reset */
.login-bg * {
  box-sizing: border-box;
}

/* Main Login Container */
.login-bg {
  min-height: 100vh;
  width: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Logo Section */
.login-logo {
  text-align: center;
  margin-bottom: 2rem;
  width: 100%;
}

.login-logo img {
  max-width: 180px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Login Card */
.login-card {
  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  min-width: 320px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* NDI Section */
.login-ndi-section {
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}

.login-ndi-btn {
  width: 100%;
  background: #124143;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.login-ndi-btn:hover {
  background: #0f363a;
  color: #ffffff;
  text-decoration: none;
}

.ndi-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  width: 100%;
}

.login-divider::before, 
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e1e5e9;
}

.login-divider:not(:empty)::before {
  margin-right: 16px;
}

.login-divider:not(:empty)::after {
  margin-left: 16px;
}

.login-divider span {
  color: #6c757d;
  font-size: 14px;
  font-weight: 400;
}

/* Traditional Login Section */
.login-traditional-section {
  width: 100%;
}

.login-traditional-section form {
  width: 100%;
}

.login-traditional-section input[type="text"], 
.login-traditional-section input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 16px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.login-traditional-section input[type="text"]:focus, 
.login-traditional-section input[type="password"]:focus {
  border-color: #124143;
  box-shadow: 0 0 0 3px rgba(18, 65, 67, 0.1);
}

/* Login Options */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
  width: 100%;
  flex-wrap: wrap;
  gap: 12px;
}

.login-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  color: #374151;
}

.login-options input[type="checkbox"] {
  margin: 0;
}

.login-options a {
  color: #124143;
  text-decoration: none;
  font-size: 14px;
}

.login-options a:hover {
  text-decoration: underline;
}

/* Login Button */
.login-btn {
  width: 100%;
  background: #124143;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  outline: none;
}

.login-btn:hover {
  background: #0f363a;
  color: #ffffff;
}

/* Modal Styles */
.ndi-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: #ffffff;
  margin: 10% auto;
  padding: 24px;
  border: 1px solid #e1e5e9;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.modal-header h3 {
  color: #124143;
  margin: 0;
  padding-right: 30px;
  font-size: 20px;
  font-weight: 600;
}

.ndi-green {
  color: #5AC994;
}

.close-btn {
  position: absolute;
  right: 0;
  top: 0;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
  padding: 4px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #124143;
  background: #f8f9fa;
}

.modal-body {
  text-align: center;
}

#qrCodeContainer {
  margin: 20px auto;
  width: 256px;
  height: 256px;
  background: #ffffff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #5AC994;
  display: flex;
  align-items: center;
  justify-content: center;
}

#statusMessage {
  margin: 16px 0;
  color: #6c757d;
  font-size: 14px;
  line-height: 1.4;
}

#statusSpinner {
  display: none;
  margin: 16px auto;
  width: 40px;
  height: 40px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #124143;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.alert {
  padding: 16px;
  margin: 16px 0;
  border-radius: 6px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 14px;
  line-height: 1.4;
}

.alert strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.alert small {
  display: block;
  margin-top: 8px;
  color: #9ca3af;
  font-size: 12px;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6c757d;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .login-bg {
    padding: 16px;
  }
  
  .login-card {
    padding: 32px 24px;
    margin: 0;
    min-width: 280px;
  }
  
  .login-logo img {
    max-width: 140px;
  }
  
  .login-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .modal-content {
    margin: 5% auto;
    width: 95%;
    padding: 20px;
  }
  
  #qrCodeContainer {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 24px 20px;
    border-radius: 6px;
  }
  
  .login-logo {
    margin-bottom: 1.5rem;
  }
  
  .login-logo img {
    max-width: 120px;
  }
  
  .login-ndi-btn,
  .login-btn {
    font-size: 15px;
    padding: 12px 16px;
  }
}

/* Template Compatibility */
.login-bg input,
.login-bg button {
  font-family: inherit;
}

.login-bg .t3-wrapper,
.login-bg .wrapper-hd,
.login-bg .container,
.login-bg .row {
  all: unset;
  display: block;
  width: 100%;
}
