html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Password Table Styling */
#passwordTableContainer {
  width: 100%;
  overflow: visible;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.table-responsive {
  width: 100%;
  margin-bottom: 1rem;
  overflow-x: visible;
}

table {
  table-layout: auto;
  width: 100%;
}

#passwordTable {
  border-collapse: collapse;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

#passwordTable thead th {
  vertical-align: middle;
  padding: 0.5rem 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Flexible column sizing - uses auto width based on content */
#passwordTable th:nth-child(1),
#passwordTable td:nth-child(1) {
  width: 15%;
  padding: 0.5rem 0.25rem;
}

#passwordTable th:nth-child(2),
#passwordTable td:nth-child(2) {
  width: 12%;
  padding: 0.5rem 0.25rem;
}

#passwordTable th:nth-child(3),
#passwordTable td:nth-child(3) {
  width: 13%;
  padding: 0.5rem 0.25rem;
}

#passwordTable th:nth-child(4),
#passwordTable td:nth-child(4) {
  width: 12%;
  padding: 0.5rem 0.25rem;
}

#passwordTable th:nth-child(5),
#passwordTable td:nth-child(5) {
  width: 10%;
  padding: 0.5rem 0.25rem;
}

#passwordTable th:nth-child(6),
#passwordTable td:nth-child(6) {
  width: 13%;
  padding: 0.5rem 0.25rem;
}

#passwordTable th:nth-child(7),
#passwordTable td:nth-child(7) {
  width: 25%;
  padding: 0.5rem 0.25rem;
}

/* Cell content styling */
#passwordTable td {
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#passwordTable td > * {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#passwordTable .text-nowrap {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}

#passwordTable .badge {
  white-space: nowrap;
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.25rem 0.35rem;
}

#passwordTable .btn-group,
#passwordTable .d-flex {
  flex-wrap: nowrap;
  gap: 0.2rem;
}

#passwordTable .btn {
  flex-shrink: 1;
  white-space: nowrap;
  padding: 0.15rem 0.3rem;
  font-size: 0.75rem;
}

#passwordTable a.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: inline-block;
}

/* Actions column specific styling */
#passwordTable td.text-end {
  text-align: right;
}

#passwordTable td.text-end > div {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
  align-items: center;
}

/* Passwords page specific styling */
.navbar-brand {
  margin-right: 0;
}

#passwordTableContainer + section h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

#passwordTable .password-mask {
  font-family: monospace;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* Modal improvements */
.modal-body .form-control,
.modal-body .form-select {
  white-space: normal;
}

#descriptionEditor .ql-editor {
  white-space: normal;
}

/* Ensure full-width password table and container */
#passwordTableContainer {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
}

.table-responsive {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: visible;
  overflow-y: visible;
}

#passwordTable {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

/* Page header optimization */
h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

#btnAddNew {
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
}