/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/* Label/tag denoting the user that shared a connection */
.jdbc-share-tag {

    background: #0095ff;
    padding: 0.25em;

    -moz-border-radius:    0.25em;
    -webkit-border-radius: 0.25em;
    -khtml-border-radius:  0.25em;
    border-radius:         0.25em;

    color: white;
    font-size: 0.75em;
    font-weight: bold;

}
@font-face { font-family: 'Inter'; font-weight: 400; src: url('app/ext/minemind-vale/fonts/Inter-Regular.otf') format('opentype'); }
@font-face { font-family: 'Inter'; font-weight: 500; src: url('app/ext/minemind-vale/fonts/Inter-Medium.otf') format('opentype'); }
@font-face { font-family: 'Inter'; font-weight: 600; src: url('app/ext/minemind-vale/fonts/Inter-SemiBold.otf') format('opentype'); }



.login-ui {
  background: #0f1117 !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #e4e4e7;
  overflow: hidden;
}
.login-ui::before {
  content: '';
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 40% at 30% 32%, rgba(59, 130, 246, 0.14), transparent 70%),
    radial-gradient(36% 36% at 74% 64%, rgba(99, 102, 241, 0.12), transparent 70%),
    radial-gradient(30% 30% at 60% 18%, rgba(34, 211, 238, 0.07), transparent 70%);
  filter: blur(40px);
  animation: mm-aurora 24s ease-in-out infinite alternate;
}
@keyframes mm-aurora {
  from { transform: translate3d(-3%, -2%, 0) scale(1.05); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.16); }
}
.login-ui .login-dialog-middle { position: relative; z-index: 1; }

.login-ui .login-dialog {
  width: 360px;
  max-width: calc(100vw - 48px);
  background: #1a1b23;
  border: 1px solid #2e2f3e;
  border-radius: 14px;
  padding: 32px 30px 26px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  color: #e4e4e7;
  text-align: left;
}

.login-ui .login-dialog .logo {
  background: url('app/ext/minemind-vale/images/minemind-full.png') center / contain no-repeat;
  width: 132px;
  height: 44px;
  margin: 0 auto 8px;
}
.login-ui .login-dialog .app-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #94a3b8;
  text-transform: none;
  letter-spacing: 0;
  text-align: center;
  margin: 0 0 22px;
}
.login-ui .login-dialog .version,
.login-ui .login-dialog .version-number { display: none !important; }

.login-ui .login-fields { display: flex; flex-direction: column; gap: 16px; }
.login-ui .login-fields .labeled-field { margin: 0; padding: 0; }
.login-ui .labeled-field .field-header {
  display: block !important;
  position: static !important;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  margin: 0 0 6px;
  opacity: 1 !important;
}
.login-ui .login-fields input[type="text"],
.login-ui .login-fields input[type="password"],
.login-ui .login-fields input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  background: #0f1117;
  border: 1px solid #2e2f3e;
  border-radius: 10px;
  color: #e4e4e7;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-ui .login-fields input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}
.login-ui .login-fields input::placeholder { color: #94a3b8; opacity: .6; }

.login-ui .login-dialog .buttons { margin-top: 20px; padding: 0; }
.login-ui .login-dialog .buttons input[type="submit"],
.login-ui .login-dialog .buttons button,
.login-ui .login-dialog input.login,
.login-ui .login-dialog input.continue-login {
  width: 100%;
  margin: 0;
  padding: 11px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: background .15s ease;
}
.login-ui .login-dialog .buttons input[type="submit"]:hover,
.login-ui .login-dialog .buttons button:hover { background: #2563eb; }

.login-ui .login-error,
.login-ui p.login-error,
.login-ui .login-dialog .error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  margin: 0 0 16px;
  text-align: left;
}
.login-ui .login-dialog .login-info,
.login-ui .login-dialog p.info,
.login-ui .login-dialog .instructions {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 16px;
}

.notification, .notification .body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #1a1b23 !important;
  color: #e4e4e7 !important;
  border-color: #2e2f3e !important;
  border-radius: 14px;
}
.notification .title-bar { background: #22232e !important; color: #e4e4e7 !important; border-radius: 14px 14px 0 0; }
.notification .buttons button { background: #3b82f6; color: #fff; border: none; border-radius: 10px; }

@media (prefers-reduced-motion: reduce) { .login-ui::before { animation: none; } }

.login-ui .login-dialog .logo {
  position: relative;
  width: 132px;
  height: 44px;
  margin: 0 auto 52px;
}
.login-ui .login-dialog .logo::after {
  content: 'Vale · User Acceptance Testing';
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 400;
  color: #94a3b8;
}
.login-ui .login-dialog .login-fields .labeled-field .field-header,
.login-ui .login-dialog .login-fields .field-header { padding: 0 !important; margin-left: 0 !important; }
.login-ui .login-dialog .login-fields input[type="text"],
.login-ui .login-dialog .login-fields input[type="password"] {
  background: #0f1117 !important;
  border: 1px solid #2e2f3e !important;
  margin: 0 !important;
}
.login-ui .login-dialog .login-fields input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22) !important;
}
.login-ui .login-dialog::after {
  content: 'Need help? contact@minemindai.com';
  display: block;
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}
.login-ui .login-dialog .login-fields .field-header,
.login-ui .login-dialog .login-fields .field-header * {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #94a3b8 !important;
  font-family: 'Inter', system-ui, sans-serif !important;
}

img[src*="guac-tricolor"],
img[src*="images/logo-64"],
img[src*="images/logo-144"] {
  content: url('app/ext/minemind-vale/images/minemind-icon.png');
}
.menu .header h2, .user-menu .menu-dropdown .menu-title { font-family: 'Inter', system-ui, sans-serif; }

/* Light page, dark card */

.login-ui {
  background: linear-gradient(180deg, #f8fafd 0%, #eef3f9 100%) !important;
  color: #0f172a;
}
.login-ui::before {
  background:
    radial-gradient(40% 40% at 25% 30%, rgba(56, 189, 248, 0.16), transparent 70%),
    radial-gradient(36% 36% at 78% 70%, rgba(30, 79, 138, 0.10), transparent 70%),
    radial-gradient(30% 30% at 60% 15%, rgba(14, 165, 233, 0.08), transparent 70%);
}
.login-ui .login-dialog {
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22), 0 2px 6px rgba(15, 23, 42, 0.08);
}
.login-ui .login-dialog .logo {
  background: url('app/ext/minemind-vale/images/logos.png') center / contain no-repeat;
  width: 162px;
  height: 60px;
  margin: 0 auto 28px;
}
.login-ui .login-dialog .logo::after { content: none; display: none; }
.login-ui .login-dialog .app-name { display: none !important; }
/* Softer page: blurred MineMind office behind a slate veil */
html, body { background: #ffffff; }
.login-ui {
  background:
    linear-gradient(180deg, rgba(37, 66, 110, 0.22) 0%, rgba(15, 23, 42, 0.42) 100%),
    url('app/ext/minemind-vale/images/login-bg.jpg') center / cover no-repeat !important;
}
.login-ui::before { display: none; }

.login-ui .login-dialog {
  width: 368px;
  background: rgba(26, 27, 35, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
  padding: 28px 30px 22px;
}

.login-ui .login-dialog .logo {
  width: 112px;
  height: 42px;
  margin: 0 auto 20px;
}

.login-ui .mm-welcome { text-align: center; margin: 0 0 22px; }
.login-ui .mm-welcome h1 {
  margin: 0 0 6px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}
.login-ui .mm-welcome p {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #94a3b8;
}

.login-ui .mm-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}
.login-ui .mm-remember input {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid #3f4152;
  border-radius: 4px;
  background: #0f1117;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.login-ui .mm-remember input::after {
  content: '';
  width: 8px;
  height: 4px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.login-ui .mm-remember input:checked { background: #3b82f6; border-color: #3b82f6; }
.login-ui .mm-remember input:checked::after { opacity: 1; }
.login-ui .mm-remember input:focus-visible { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); }

/* First sign-in step: only new password + email */
.login-ui .login-dialog:has(input[name="new-password"]) .labeled-field-username,
.login-ui .login-dialog:has(input[name="new-password"]) .labeled-field-password,
.login-ui .login-dialog:has(input[name="new-password"]) .mm-welcome { display: none !important; }
.login-ui .login-dialog p[ng-show="helpText"],
.login-ui .login-dialog .login-form > p {
  margin: 0 0 20px;
  padding: 10px 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.5;
  text-align: left;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 10px;
}
.login-ui .login-dialog .buttons input.continue-login,
.login-ui .login-dialog .buttons input.login {
  width: 100% !important;
  float: none !important;
}
.login-ui .mm-field-error:empty { display: none; }

/* Keep browser autofill from painting the fields light blue */
.login-ui .login-fields input:-webkit-autofill,
.login-ui .login-fields input:-webkit-autofill:hover,
.login-ui .login-fields input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px #0f1117 inset !important;
  -webkit-text-fill-color: #e4e4e7 !important;
  caret-color: #e4e4e7;
  transition: background-color 9999s ease-out 0s;
}

.login-ui .login-dialog::after { margin-top: 16px; }
.mm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-family: 'Inter', system-ui, sans-serif;
}
.mm-modal {
  width: 380px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  background: #1a1b23;
  border: 1px solid #2e2f3e;
  border-radius: 14px;
  padding: 26px 26px 22px;
  color: #e4e4e7;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.35);
  text-align: left;
}
.mm-modal h2 { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: #f1f5f9; }
.mm-modal p { margin: 0 0 16px; font-size: 13px; line-height: 1.5; color: #94a3b8; }
.mm-modal .mm-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  background: #0f1117;
  border: 1px solid #2e2f3e;
  border-radius: 10px;
  color: #e4e4e7;
  font: 14px 'Inter', system-ui, sans-serif;
  outline: none;
}
.mm-modal .mm-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22); }
.mm-secret {
  padding: 12px;
  background: #0f1117;
  border: 1px dashed #3b82f6;
  border-radius: 10px;
  font: 600 18px ui-monospace, 'Cascadia Mono', Consolas, monospace;
  letter-spacing: 0.06em;
  text-align: center;
  color: #f1f5f9;
  user-select: all;
}
.mm-error, .mm-field-error { min-height: 16px; margin-top: 8px; font-size: 12px; color: #f87171; }
.mm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.mm-primary, .mm-secondary {
  padding: 9px 16px;
  border-radius: 10px;
  font: 600 13px 'Inter', system-ui, sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.mm-primary { background: #3b82f6; color: #fff; }
.mm-primary:hover { background: #2563eb; }
.mm-primary:disabled { opacity: .6; cursor: default; }
.mm-secondary { background: transparent; color: #cbd5e1; border-color: #3f4152; }
.mm-secondary:hover { border-color: #64748b; color: #f1f5f9; }

.mm-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 100001;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border-radius: 10px;
  background: #1a1b23;
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #e4e4e7;
  font: 13px 'Inter', system-ui, sans-serif;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3);
  transition: opacity .5s ease;
}
.mm-toast-error { border-color: rgba(239, 68, 68, 0.5); }
.mm-toast-hide { opacity: 0; }

.login-ui .mm-email-field .field-header label { color: #94a3b8; }

.mm-admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 4px;
  padding: 12px 14px;
  background: #1a1b23;
  border: 1px solid #2e2f3e;
  border-radius: 12px;
  font-family: 'Inter', system-ui, sans-serif;
}
.mm-admin-actions .mm-admin-label { margin-right: auto; font-size: 13px; font-weight: 600; color: #e4e4e7; }
