/* Frosted glass forest green left panel */
.left-panel-combined {
  background: rgba(20, 42, 32, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(92, 150, 118, 0.50);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

.summary-box, .parameters-box {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Dark themed dropdown and input boxes */
.dark-dropdown .Select-control,
.dark-input {
  background-color: rgba(25, 45, 35, 0.7) !important;
  border: 1px solid rgba(92, 150, 118, 0.40) !important;
  color: #E0E0E0 !important;
  font-size: 13px !important;
  height: 24px !important;
  min-height: 24px !important;
}

/* Number input spinner arrows - grey color */
.dark-input::-webkit-inner-spin-button,
.dark-input::-webkit-outer-spin-button {
  opacity: 0.5;
  filter: invert(0.7);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 0.5;
  filter: invert(0.7);
}

.dark-dropdown .Select-value-label,
.dark-dropdown .Select-placeholder {
  color: #E0E0E0 !important;
}

/* Newer Dash dropdown styling */
.dark-dropdown div[class*="control"] {
  background-color: rgba(25, 45, 35, 0.7) !important;
  border-color: rgba(92, 150, 118, 0.40) !important;
  height: 24px !important;
  min-height: 24px !important;
}

.dark-dropdown div[class*="menu"] {
  background-color: rgba(25, 45, 35, 0.7) !important;
  border: 1px solid rgba(92, 150, 118, 0.40) !important;
}

.dark-dropdown div[class*="option"] {
  background-color: rgba(25, 45, 35, 0.7) !important;
  color: #E0E0E0 !important;
}

.dark-dropdown div[class*="option"]:hover {
  background-color: rgba(60, 179, 113, 0.3) !important;
}

.dark-dropdown div[class*="singleValue"] {
  color: #E0E0E0 !important;
}

.dark-dropdown div[class*="input"] {
  color: #E0E0E0 !important;
}

.dark-dropdown div[class*="indicatorSeparator"] {
  background-color: rgba(92, 150, 118, 0.40) !important;
}

.dark-dropdown div[class*="indicatorContainer"] {
  color: #E0E0E0 !important;
}

.dark-dropdown svg {
  fill: #E0E0E0 !important;
}

/* Dark dropdown styling for menu */
.dark-dropdown .Select__menu {
  background-color: rgba(25, 45, 35, 0.7) !important;
  border: 1px solid rgba(92, 150, 118, 0.40) !important;
}

.dark-dropdown .Select__option {
  background-color: rgba(25, 45, 35, 0.7) !important;
  color: #E0E0E0 !important;
}

.dark-dropdown .Select__option--is-focused {
  background-color: rgba(60, 179, 113, 0.3) !important;
}

.dark-dropdown .Select__option--is-selected {
  background-color: rgba(60, 179, 113, 0.5) !important;
}

.dark-dropdown .Select__control {
  background-color: rgba(25, 45, 35, 0.7) !important;
  border: 1px solid rgba(92, 150, 118, 0.40) !important;
  height: 24px !important;
  min-height: 24px !important;
}

.dark-dropdown .Select__single-value {
  color: #E0E0E0 !important;
}

.dark-dropdown .Select__input {
  color: #E0E0E0 !important;
}

.dark-dropdown .Select__indicator-separator {
  background-color: rgba(92, 150, 118, 0.40) !important;
}

.dark-dropdown .Select__dropdown-indicator {
  color: #E0E0E0 !important;
}

/* Compact slider styling with longer slider */
.compact-slider {
  margin-bottom: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

.compact-slider label {
  font-size: 13px !important;
  margin-bottom: 4px !important;
  color: #E0E0E0 !important;
  width: 100% !important;
}

.compact-slider .rc-slider {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Slider track and handle colors - medium sea green */
.compact-slider .rc-slider-track {
  background-color: #3CB371 !important;
}

.compact-slider .rc-slider-handle {
  border-color: #3CB371 !important;
  background-color: #3CB371 !important;
}

.compact-slider .rc-slider-handle:hover,
.compact-slider .rc-slider-handle:active,
.compact-slider .rc-slider-handle:focus {
  border-color: #2E8B57 !important;
  box-shadow: 0 0 5px #3CB371 !important;
}

/* Make slider track wider */
.compact-slider > div:last-child {
  width: 100% !important;
  padding-right: 0 !important;
}

/* Compact parameter row with wider inputs */
.param-row-compact {
  margin-bottom: 20px !important;
}

.param-row-compact label {
  font-size: 13px !important;
  color: #E0E0E0 !important;
}

.param-row-compact input,
.param-row-compact .Select-control {
  font-size: 13px !important;
  min-height: 24px !important;
  height: 24px !important;
  padding: 4px 8px !important;
}

/* Wider column for inputs/dropdowns */
.param-row-compact .col-5 {
  flex: 0 0 58.333333% !important;
  max-width: 58.333333% !important;
}

.param-row-compact .col-4 {
  flex: 0 0 28% !important;
  max-width: 28% !important;
}

.param-row-compact .col-3 {
  flex: 0 0 13.666667% !important;
  max-width: 13.666667% !important;
  padding-left: 8px !important;
  padding-right: 12px !important;
}

/* Table cell padding */
table td, table th {
  padding: 6px 8px !important;
  line-height: 1.3 !important;
}

/* Position Plotly modebar at top-right, same level as title */
.js-plotly-plot .plotly .modebar {
  top: 0px !important;
  right: 10px !important;
}

.js-plotly-plot .plotly .modebar-group {
  background-color: rgba(20, 42, 32, 0.7) !important;
  border: 1px solid rgba(92, 150, 118, 0.3) !important;
  border-radius: 4px !important;
  padding: 4px !important;
}

.js-plotly-plot .plotly .modebar-btn path {
  fill: rgba(144, 238, 144, 0.8) !important;
}

.js-plotly-plot .plotly .modebar-btn:hover path {
  fill: rgb(144, 238, 144) !important;
}

.js-plotly-plot .plotly .modebar-btn.active path {
  fill: rgb(60, 179, 113) !important;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

/* Login page container */
.login-page-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 9999;
}

/* Background with gradient */
.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
    rgba(15, 30, 20, 0.95) 0%,
    rgba(20, 42, 32, 0.95) 50%,
    rgba(25, 50, 35, 0.95) 100%);
  z-index: -1;
}

/* Add animated gradient overlay */
.login-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%,
    rgba(60, 179, 113, 0.1) 0%,
    transparent 50%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

/* Login card - glassmorphism style */
.login-card {
  background: rgba(20, 42, 32, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(92, 150, 118, 0.4);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  padding: 40px;
  width: 90%;
  max-width: 420px;
  z-index: 10;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Login header */
.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.login-title {
  color: #3CB371;
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 0;
}

/* Login form */
.login-form {
  margin-bottom: 24px;
}

.login-input-group {
  margin-bottom: 20px;
}

.login-label {
  display: block;
  color: #E0E0E0;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.login-input {
  width: 100%;
  background-color: rgba(25, 45, 35, 0.8) !important;
  border: 1px solid rgba(92, 150, 118, 0.4) !important;
  border-radius: 8px;
  padding: 12px 16px;
  color: #E0E0E0 !important;
  font-size: 14px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.login-input:focus {
  outline: none;
  border-color: #3CB371 !important;
  box-shadow: 0 0 0 3px rgba(60, 179, 113, 0.2);
  background-color: rgba(25, 45, 35, 0.95) !important;
}

.login-input::placeholder {
  color: rgba(224, 224, 224, 0.5);
}

/* Error message */
.login-error-message {
  background-color: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.5);
  border-radius: 8px;
  color: #ff6b6b;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-8px);
  }
  75% {
    transform: translateX(8px);
  }
}

/* Login button */
.login-button-container {
  margin-top: 24px;
}

.login-button {
  width: 100%;
  background: linear-gradient(135deg, #3CB371 0%, #2E8B57 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: white !important;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(60, 179, 113, 0.3);
}

.login-button:hover {
  background: linear-gradient(135deg, #2E8B57 0%, #3CB371 100%) !important;
  box-shadow: 0 6px 16px rgba(60, 179, 113, 0.4);
  transform: translateY(-2px);
}

.login-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(60, 179, 113, 0.3);
}

/* Login info */
.login-info {
  margin-top: 16px;
  text-align: center;
}

/* Login footer */
.login-footer {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(92, 150, 118, 0.2);
}

/* ============================================
   LOGOUT BUTTON STYLES
   ============================================ */

.logout-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20, 42, 32, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(92, 150, 118, 0.4);
  border-radius: 24px;
  padding: 8px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.current-username {
  color: #E0E0E0;
  font-size: 14px;
  font-weight: 500;
}

.logout-button {
  border-radius: 20px !important;
  padding: 6px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease;
}

.logout-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.logout-button i {
  margin-right: 4px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .login-card {
    padding: 24px;
    width: 95%;
  }

  .login-logo {
    width: 60px;
    height: 60px;
  }

  .login-title {
    font-size: 24px;
  }

  .logout-container {
    top: 12px;
    right: 12px;
  }

  .current-username {
    display: none;
  }
}
