/* === FILTERS === */
#filters {
  display: flex;
  gap: 0.5em;
}

.filter-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3em;
  flex-grow: 1;
  min-width: 0;
}

.filter-input {
  flex-grow: 1;
  min-width: 0;
  width: auto;
  padding: 0.4em 0.6em;
  padding-right: 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  background-color: var(--bg-tab);
  color: var(--text-main);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease;
}

.filter-input:focus {
  outline: none;
  background-color: var(--bg-panel);
  box-shadow: 0 0 6px var(--bg-button);
}

.filter-info {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  cursor: help;
  font-size: 1rem;
  color: var(--text-subtle);
  user-select: none;
}

/* === THEME SELECTOR === */
.theme-selector {
  min-width: 160px;
  cursor: pointer;
  margin-left: 1rem;
  font-size: 0.9rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-panel);
  color: var(--text-main);
  transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;
}

.theme-selector-mobile {
  display: none;
}

/* === ENTRY CARDS === */
.entry-card {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: var(--padding);
  box-shadow: var(--shadow);
  margin-bottom: 2em;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

/* === TABS === */
.entry-tabs {
  display: flex;
  gap: 0.6rem;
  border-bottom: 2px solid var(--tab-border);
  background: var(--bg-tab);
  padding: 0.2rem 0.4rem 0rem 0.4rem;
  border-radius: var(--radius) var(--radius) 0 0;
  user-select: none;
}

.entry-tabs button {
  background: var(--bg-button);
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-subtle);
  /* box-shadow: inset 0 -3px 0 var(--tab-shadow); */
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.entry-tabs button:hover {
  background: var(--tab-hover-bg);
  color: var(--tab-hover-text);
  /* box-shadow: inset 0 -3px 0 var(--tab-hover-shadow); */
}

.entry-tabs button.active {
  background: var(--bg-tab-active);
  color: var(--text-main);
  box-shadow: none;
  border-bottom: 2px solid var(--bg-tab-active);
  position: relative;
  top: 2px;
}

/* === TAB BODY === */
.entry-tab-content {
  border: 1px solid var(--tab-border);
  border-top: none;
  background: var(--bg-panel);
  padding: 1rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  min-height: 5rem;
  color: var(--text-main);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* === ENTRY FIELDS === */
.entry-field {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.25rem 0;
  align-items: center;
}

.entry-field.newline {
  display: block;
  margin-top: 1em;
}

.entry-label {
  font-weight: 700;
  color: var(--text-subtle);
  margin-right: 0.75rem;
  flex-shrink: 0;
  min-width: 100px;
}

.entry-value {
  color: var(--text-main);
  flex: 1;
}

/* === ENTRY IMAGES === */
.entry-image {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  cursor: zoom-in;
  margin-top: 0.25rem;
  display: block;
}

/* === IMAGE POPUP === */
.image-popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.image-popup-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.image-popup-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: #eee;
  cursor: pointer;
  font-weight: bold;
}

.image-popup-close:hover {
  color: #fff;
}

/* === QR FLOATING BOX === */
.qr-floating-box {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  padding: 1rem;
  border: 1px solid #aaa;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  text-align: center;
}

.qr-box canvas {
  margin-top: 1rem;
}

.qr-close {
  position: absolute;
  top: 4px;
  right: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.qr-close:hover {
  color: var(--text);
}

/* === BUTTONS === */
.copy-button,
.qr-toggle {
  background: #333;
  color: #eee;
  border: 1px solid #555;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  margin: 0.5rem 0.5rem 0 0;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.copy-button:hover,
.qr-toggle:hover {
  background: #444;
  color: #fff;
}

