/* Account Form Styles */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  background: #030b14;
}

/* Custom scrollbar */
.account-form::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.account-form::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.account-form::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.account-form::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.form-header {
  display: grid;
  gap: 12px;
}

.form-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-header {
  font-weight: 500;
  margin-bottom: 12px;
  color: #e6edf3;
  font-size: 1.1em;
}

.field-grid {
  display: grid;
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 8px;
}

/* Server settings row (host, port, ssl) */
.server-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 100px auto;
  gap: 12px;
  align-items: center;
}

/* Credentials row (username, password) */
.credentials-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.host-input {
  width: 100%;
  min-width: 0; /* Allows flex shrinking */
}

.port-input {
  width: 100%;
  min-width: 0; /* Allows flex shrinking */
}

.ssl-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e6edf3;
  white-space: nowrap;
  padding: 0 8px;
}

.ssl-label input[type="checkbox"] {
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .server-row {
    grid-template-columns: 1fr;
  }
  
  .credentials-row {
    grid-template-columns: 1fr;
  }
}

.form-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Input styling */
.account-form input[type="text"],
.account-form input[type="email"],
.account-form input[type="password"],
.account-form input[type="number"],
.account-form select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #e6edf3;
  padding: 8px 12px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.account-form input:focus,
.account-form select:focus {
  border-color: #2f81f7;
  outline: none;
}

.account-form input::placeholder {
  color: rgba(230, 237, 243, 0.5);
}

/* Dialog max-width for better layout */
.modal .dialog {
  max-width: 800px;
  width: 90%;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .field-group:first-child {
    grid-template-columns: 1fr;
  }
  
  .form-footer {
    flex-direction: column;
  }
  
  .form-footer button {
    width: 100%;
  }
}