html,
body {
  height: 100%;
  margin: 0;
  background-color: #f8f9fa;
}

#appContainer {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#appContainer > .row {
  flex: 1;
}

#requestsColumn,
#companiesColumn,
#detailsColumn {
  height: calc(100vh - 56px);
  overflow: auto;
}

.table-hover tbody tr:hover {
  background-color: #eef2f5;
  cursor: pointer;
}

.table th,
.table td {
  vertical-align: middle;
}

.card {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.company-logo-placeholder,
.avatar-placeholder {
  width: 120px;
  height: 120px;
  border: 1px solid #ccc;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.company-logo-placeholder {
  background-color: #eee;
}

.avatar-placeholder {
  background-color: #ddd;
  border-radius: 50%;
}

.table .selected-row td {
  background-color: #3786ff !important;
  color: white !important;
  font-weight: 600 !important;
  border-color: #1a73e8 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.table-hover tbody tr.selected-row:hover td {
  background-color: #1a73e8 !important;
  color: white !important;
}

/* Editable field styling */
.editable {
  cursor: pointer;
  position: relative;
  display: inline-block;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s;
  min-width: 50px;
  min-height: 1.2em;
  white-space: pre-wrap;
  word-break: break-word;
}

.editable:empty::before {
  content: '(edit)';
  color: #888;
  font-style: italic;
}

.editable:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.editable::after {
  content: '\270E';
  position: absolute;
  right: -18px;
  top: 0;
  color: #888;
  font-size: 0.9em;
  opacity: 0;
  transition: opacity 0.2s;
}

.editable:hover::after {
  opacity: 1;
}

.editing {
  padding: 0;
}

.editing::after,
.editing::before {
  display: none;
}

.editing input,
.editing select {
  font-size: inherit;
  font-family: inherit;
  padding: 2px 4px;
  border: 1px solid #007bff;
  border-radius: 3px;
  width: auto;
  min-width: 100px;
}
.editing textarea {
  font-size: inherit;
  font-family: inherit;
  padding: 2px 4px;
  border: 1px solid #007bff;
  border-radius: 3px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  resize: vertical;
}

.editing input:focus,
.editing select:focus,
.editing textarea:focus {
  outline: none;
  box-shadow: 0 0 3px rgba(0, 123, 255, 0.5);
}

/* Override Bootstrap popover defaults for shipping breakdown */
.popover {
  --bs-popover-max-width: none !important;
  width: auto !important;
  min-width: 30rem !important;
}
.popover-body {
  overflow-x: auto;
  padding: 0.5rem;
}
.popover-body table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
}
.popover-body th {
  width: 40%;
  white-space: nowrap;
}
