/* Base styles */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* App layout */
#app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar styles */
#sidebar {
  width: 250px;
  background-color: #f8f9fa;
  border-right: 1px solid #dee2e6;
  padding: 20px;
}

.sidebar-header {
  margin-bottom: 20px;
}

#sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sidebar nav a {
  display: block;
  padding: 10px;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

#sidebar nav a:hover {
  background-color: #e9ecef;
}

#sidebar nav a.selected-bank {
  background-color: #e9ecef;
  border-left-color: #007bff;
  font-weight: 500;
}

#sidebar nav a small {
  display: block;
  color: #6c757d;
  font-size: 0.875em;
}

/* Main content area */
#content {
  flex: 1;
  padding: 20px;
}

/* Bank item styles */
.bank-item {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.bank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.bank-actions {
  display: flex;
  gap: 10px;
}

/* Form styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: .375rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: .25rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form Error styles */
.form-error {
  background-color: #fff0f0;
  color: #dc3545;
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  border-left: 4px solid #dc3545;
  font-size: 1.1rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

/* Button styles */
.btn-primary {
  color: #fff;
  background-color: #007bff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-danger {
  color: #fff;
  background-color: #dc3545;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover {
  opacity: 0.9;
}

/* Modal styles */
.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: #fff;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  width: 80%;
  max-width: 500px;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
}

/* Empty state styles */
.empty-state {
  color: #6c757d;
  text-align: center;
  padding: 20px;
}

.empty-state-content {
  text-align: center;
  padding: 40px 20px;
}

/* Enhanced Error styles */
.error-container {
  margin: 15px 0;
  padding: 15px;
  background-color: #fff3f4;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  color: #721c24;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.error-container h1 {
  color: #dc3545;
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 10px;
}

.error-container .error-message {
  color: #721c24;
  margin-bottom: 15px;
  font-weight: 500;
}

.error-container .user-message {
  color: #555;
  margin-bottom: 15px;
}

.error-container .error-context {
  color: #6c757d;
  font-size: 0.9em;
  margin-bottom: 0;
}

/* Error State Component */
.error-state {
  text-align: center;
  padding: 40px 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 40px auto;
}

.error-state h2 {
  color: #dc3545;
  margin-bottom: 20px;
  font-size: 1.75rem;
}

.error-state p {
  color: #666;
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

.error-actions button {
  min-width: 120px;
  padding: 10px 20px;
  font-size: 1rem;
}

/* Modal Error Styles */
.modal .error-container {
  margin: 0 0 20px 0;
  background-color: #fff3f4;
  border: none;
  padding: 15px;
  border-left: 4px solid #dc3545;
}

.modal-error-title {
  color: #dc3545;
  margin: 0 0 10px 0;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Delete confirmation styles */
.delete-confirmation {
  background-color: #fff3f4;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
}

.delete-confirmation p {
  margin: 8px 0;
  padding: 4px 0;
  border-bottom: 1px solid rgba(220, 53, 69, 0.1);
}

.delete-confirmation p:last-child {
  border-bottom: none;
}

.delete-confirmation p strong {
  color: #721c24;
  display: inline-block;
  width: 100px;
}

/* New confirmation styles */
.confirmation-container {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #dee2e6;
}

.confirmation-container p {
  margin-bottom: 10px;
  color: #495057;
}

.confirmation-input {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

.confirmation-input:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.modal-actions {
  margin-top: 20px;
  text-align: right;
}

.modal-actions button {
  margin-left: 10px;
}

#modalOkButton:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.65;
}

/* Support Button */
.support-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.support-btn:hover {
  background-color: #218838;
}

/* Refresh Button */
.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Stored Errors Container */
.stored-errors-container {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stored-errors-container h3 {
  color: #dc3545;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-top: 0;
}

.stored-error {
  transition: background-color 0.2s;
}

.stored-error:hover {
  background-color: #fff3f4;
}
