/* Login page styling */

:root {
    --text-color: #333;
    --input-border: #ddd;
    --error-color: #e74c3c;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --background-gradient: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    /* Primary theme colors used by modal actions */
    --primary-color: #4a6cf7;
    --primary-hover: #3a5ce4;
  }

  .login-button {
    --primary-color: #4a6cf7;
    --primary-hover: #3a5ce4;
    --text-color: #333;
    --input-border: #ddd;
    --error-color: #e74c3c;
  }

body {
  background: var(--background-gradient);
  min-height: 100vh;
}

/* Hide dashboard chrome on login */
.sidebar,
.navbar {
  display: none !important;
}

/* Ensure content uses full width without sidebar/header offsets */
.main-content,
.container-fluid {
  margin: 0 !important;
  padding-top: 0 !important;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  padding: 2rem;
  margin: 0 auto;
}

.login-box {
  background: white;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Font Awesome login icon: user + key combo */
.login-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #173b6d; /* navy tone similar to screenshot */
}

/* 3D-styled login title */
.login-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #173b6d;
  letter-spacing: 0.5px;
  /* multi-layer text shadow to simulate 3D depth */
  text-shadow:
    0 1px 0 #ffffff,
    0 2px 0 #e9eef8,
    0 3px 0 #d8e0f2,
    0 4px 0 #c6d2eb,
    0 5px 0 #b3c4e4,
    0 6px 0 #a1b6dd,
    0 7px 10px rgba(0, 0, 0, 0.15);
  margin-bottom: 1rem; /* extra space below the title */
}
.login-icon i {
  font-size: 34px;
  line-height: 1;
}
.login-icon .fa-key {
  font-size: 30px;
  transform: rotate(-10deg);
}

.form-group {
  margin-bottom: 1.5rem;
}

.schema-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(74, 108, 247, 0.22);
  background: linear-gradient(135deg, rgba(74, 108, 247, 0.08) 0%, rgba(74, 108, 247, 0.03) 100%);
  margin-bottom: 1.25rem;
}

.schema-indicator.is-empty {
  border-color: rgba(255, 193, 7, 0.45);
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.16) 0%, rgba(255, 193, 7, 0.06) 100%);
}

.schema-indicator-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.schema-indicator-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #173b6d;
  opacity: 0.7;
}

.schema-indicator-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #173b6d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: #f9fafc;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
  background-color: #fff;
}

.error {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.login-button {
  width: 100%;
  padding: 0.85rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.login-button:hover {
  background: var(--primary-hover);
}

.login-button:active {
  transform: translateY(1px);
}

.login-footer {
  margin-top: 1.75rem;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Schema Settings button: modern circular icon button placed in footer */
.schema-settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #f0f3ff;
  color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.schema-settings-btn i { font-size: 18px; }
.schema-settings-btn:hover {
  background: #e6ebff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.schema-settings-btn:active { transform: translateY(1px); }

/* Simple modal styles */
.schema-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
}
.schema-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  pointer-events: none; /* avoid blocking interactions with the modal content */
}
.schema-modal-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 10px;
  width: 90%;
  max-width: 420px;
  padding: 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 1001; /* ensure content sits above backdrop */
  pointer-events: auto;
}
.schema-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.schema-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f0f3ff;
  color: var(--primary-color);
  cursor: pointer;
}
.schema-modal-close i { font-size: 16px; }
.schema-modal-close:hover { background: #e6ebff; }
.schema-modal-content h3 {
  margin: 0 0 0.75rem 0;
  color: #173b6d;
}
.schema-modal .form-group { margin-bottom: 1rem; }
.schema-modal .form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: #f9fafc;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.btn.btn-primary {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
}
.btn.btn-secondary {
  background: #e9ecf5;
  color: #173b6d;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .login-box {
    padding: 1.5rem;
  }
  
  .login-footer {
    flex-direction: column;
    gap: 0.75rem;
  }
}
