/* Queue Web — Styles */

/* === CSS Custom Properties === */
:root {
  --q-accent: #F9423A;
  --q-accent-dim: rgba(249, 66, 58, 0.4);
  --q-accent-hover: #e03830;
  --q-bg: #ffffff;
  --q-bg-secondary: #f2f2f7;
  --q-bg-tertiary: #e5e5ea;
  --q-text: #1c1c1e;
  --q-text-secondary: #8e8e93;
  --q-text-tertiary: #c7c7cc;
  --q-separator: #e5e5ea;
  --q-sidebar-width: 280px;
  --q-sidebar-bg: #f2f2f7;
  --q-modal-backdrop: rgba(0,0,0,0.4);
  --q-pill-bg: #e5e5ea;
  --q-danger: #ff3b30;
  --q-success: #34c759;
  --q-radius-pill: 50px;
  --q-radius-sm: 4px;
  --q-radius-md: 8px;
  --q-radius-lg: 12px;
  --q-shadow: 0 2px 12px rgba(0,0,0,0.12);
  --q-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

[data-theme="dark"],
.dark-theme {
  --q-bg: #000000;
  --q-bg-secondary: #1c1c1e;
  --q-bg-tertiary: #2c2c2e;
  --q-text: #ffffff;
  --q-text-secondary: #8e8e93;
  --q-text-tertiary: #48484a;
  --q-separator: #38383a;
  --q-sidebar-bg: #1c1c1e;
  --q-modal-backdrop: rgba(0,0,0,0.6);
  --q-pill-bg: #2c2c2e;
  --q-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --q-bg: #000000;
    --q-bg-secondary: #1c1c1e;
    --q-bg-tertiary: #2c2c2e;
    --q-text: #ffffff;
    --q-text-secondary: #8e8e93;
    --q-text-tertiary: #48484a;
    --q-separator: #38383a;
    --q-sidebar-bg: #1c1c1e;
    --q-modal-backdrop: rgba(0,0,0,0.6);
    --q-pill-bg: #2c2c2e;
    --q-shadow: 0 2px 12px rgba(0,0,0,0.3);
  }
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--q-font);
  background: var(--q-bg);
  color: var(--q-text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
ul { list-style: none; }

/* === App Layout === */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* === Sidebar === */
.sidebar {
  width: var(--q-sidebar-width);
  min-width: var(--q-sidebar-width);
  height: 100vh;
  background: var(--q-sidebar-bg);
  border-right: 1px solid var(--q-separator);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
  position: sticky;
  top: 0;
  background: var(--q-sidebar-bg);
  z-index: 2;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.sidebar-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.profile-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--q-bg-tertiary);
  transition: opacity 0.15s;
}
.profile-btn:hover { opacity: 0.7; }
.profile-btn svg { width: 18px; height: 18px; }

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 16px 8px;
  padding: 6px 10px;
  background: var(--q-bg-tertiary);
  border-radius: 8px;
}
.sidebar-search .search-icon {
  display: flex;
  color: var(--q-text-tertiary);
  flex-shrink: 0;
}
.sidebar-search .search-icon svg { width: 14px; height: 14px; }
.sidebar-search .search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--q-text);
  font: inherit;
  font-size: 14px;
  padding: 0;
}
.sidebar-search .search-input::placeholder { color: var(--q-text-tertiary); }
.sidebar-search .search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sidebar-search .search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--q-text-tertiary);
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s;
}
.sidebar-search .search-clear:hover { color: var(--q-text); }
.sidebar-search .search-clear svg { width: 16px; height: 16px; }
.sidebar-search .search-clear.hidden { display: none; }

.sidebar-section { padding: 4px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 4px;
  margin: 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--q-text-secondary);
}

.section-plus {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--q-text-secondary);
  transition: all 0.15s;
}
.section-plus:hover { color: var(--q-accent); background: var(--q-bg-tertiary); }

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 8px;
  margin: 1px 8px;
  cursor: pointer;
  transition: background 0.12s;
  gap: 10px;
  min-height: 36px;
}
.sidebar-item:hover { background: var(--q-bg-tertiary); }
.sidebar-item.active { background: var(--q-accent); color: #fff; }
.sidebar-item.active .item-badge { background: rgba(255,255,255,0.25); color: #fff; }
.sidebar-item.active .item-icon { opacity: 1; }

.item-icon {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.7;
  flex-shrink: 0;
}
.item-icon svg { width: 16px; height: 16px; }

.item-label {
  flex: 1;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--q-bg-tertiary);
  color: var(--q-text-secondary);
  flex-shrink: 0;
}

/* Avatar circles */
.avatar-circle {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: var(--q-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar-pending {
  background: var(--q-text-tertiary);
}
.sidebar-item.active .avatar-circle {
  background: rgba(255,255,255,0.3);
}

/* People section */
.people-item {
  flex-wrap: wrap;
}
.people-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.people-name {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.people-status {
  font-size: 11px;
  color: var(--q-text-tertiary);
  flex-shrink: 0;
}
.people-status.copied {
  color: var(--q-accent);
}

.kebab-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--q-text-secondary);
  transition: background 0.12s;
  flex-shrink: 0;
}
.kebab-btn svg { width: 16px; height: 16px; }
.kebab-btn:hover { background: var(--q-bg-tertiary); }

.sidebar-empty {
  padding: 4px 16px 8px;
  font-size: 13px;
  color: var(--q-text-tertiary);
}

/* === Main Content Area === */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--q-bg);
}

.breadcrumb {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--q-separator);
  min-height: 44px;
  gap: 6px;
  flex-shrink: 0;
}
.breadcrumb:empty { display: none; }

.breadcrumb-back {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  color: var(--q-accent);
  cursor: pointer;
  transition: opacity 0.12s;
}
.breadcrumb-back:hover { opacity: 0.7; }
.breadcrumb-back svg { width: 14px; height: 14px; }

.breadcrumb-title {
  font-size: 17px;
  font-weight: 600;
  flex: 1;
}

.breadcrumb-add {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--q-accent);
  transition: background 0.12s;
  flex-shrink: 0;
  margin-left: auto;
}
.breadcrumb-add svg { width: 18px; height: 18px; }
.breadcrumb-add:hover { background: var(--q-bg-secondary); }

.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* === View Header (contact/list detail) === */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  border-bottom: 1px solid var(--q-separator);
}

.toggle-group {
  display: flex;
  gap: 4px;
}

.toggle-btn {
  width: 36px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--q-text-secondary);
  transition: all 0.15s;
}
.toggle-btn svg { width: 16px; height: 16px; }
.toggle-btn:hover { background: var(--q-bg-secondary); }
.toggle-btn.active {
  color: var(--q-accent);
  font-weight: 700;
  background: var(--q-bg-secondary);
}

.view-count {
  font-size: 13px;
  color: var(--q-text-secondary);
}

/* === Type Filter Pills === */
.type-filter-bar {
  display: flex;
  gap: 8px;
  padding: 8px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--q-separator);
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}
.type-filter-bar::-webkit-scrollbar { display: none; }

.filter-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--q-radius-pill);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--q-pill-bg);
  color: var(--q-text);
}
.filter-pill:hover { opacity: 0.85; }
.filter-pill.active {
  background: var(--q-accent);
  color: #fff;
  font-weight: 600;
}
.filter-pill .pill-count {
  opacity: 0.7;
}
.filter-pill.active .pill-count {
  opacity: 0.85;
}

/* === Item List === */
.item-list { }

.item-row {
  position: relative;
  padding: 12px 40px 12px 20px;
  border-bottom: 1px solid var(--q-separator);
  transition: background 0.1s;
}
.item-row:hover { background: color-mix(in srgb, var(--q-bg-secondary) 50%, transparent); }

.item-added-by {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--q-text-secondary);
}

.added-by-label { margin-right: 2px; }

.contact-link {
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.12s;
}
.contact-link.connected { color: var(--q-text); }
.contact-link.connected:hover { opacity: 0.7; }

.reaction-btn {
  display: inline-flex;
  align-items: center;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.reaction-btn:hover { background: var(--q-bg-tertiary); }
.reaction-btn.empty {
  color: var(--q-text-secondary);
  font-size: 11px;
}
.reaction-btn svg { width: 14px; height: 14px; }

.my-reactions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-right: 4px;
}

.item-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.item-favicon {
  width: 22px;
  height: 22px;
  border-radius: var(--q-radius-sm);
  flex-shrink: 0;
  margin-top: 2px;
  object-fit: contain;
}

.item-text {
  flex: 1;
  min-width: 0;
}

.item-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-description {
  font-size: 13px;
  color: var(--q-text-secondary);
  line-height: 1.35;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-thumbnail {
  width: 72px;
  height: 72px;
  border-radius: var(--q-radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.item-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--q-text-secondary);
}

.meta-icon {
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.meta-icon svg { width: 14px; height: 14px; }

.share-names {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
}

.share-icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--q-text-secondary);
  transition: all 0.12s;
}
.share-icon-btn:hover { color: var(--q-accent); background: var(--q-bg-tertiary); }
.share-icon-btn svg { width: 14px; height: 14px; }

.item-kebab {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--q-text-tertiary);
  transition: all 0.12s;
  opacity: 0;
}
.item-row:hover .item-kebab { opacity: 1; }
.item-kebab:hover { background: var(--q-bg-tertiary); color: var(--q-text-secondary); }

/* === Dropdown Menu === */
.dropdown-menu {
  position: absolute;
  right: 12px;
  top: 38px;
  background: var(--q-bg);
  border: 1px solid var(--q-separator);
  border-radius: var(--q-radius-lg);
  box-shadow: var(--q-shadow);
  z-index: 50;
  min-width: 180px;
  padding: 4px;
  animation: fadeIn 0.12s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: var(--q-bg-secondary); }
.dropdown-item.danger { color: var(--q-danger); }
.dropdown-item svg { width: 16px; height: 16px; flex-shrink: 0; }

/* FAB removed — add button is now in breadcrumb bar */

/* === Empty State === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 16px;
}
.empty-icon { font-size: 48px; color: var(--q-text-tertiary); }
.empty-icon svg { width: 48px; height: 48px; stroke: var(--q-text-tertiary); }
.empty-title { font-size: 17px; font-weight: 600; }
.empty-subtitle { font-size: 14px; color: var(--q-text-secondary); max-width: 280px; }

/* === Loading === */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--q-separator);
  border-top-color: var(--q-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.15);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }

.modal-card {
  background: var(--q-bg);
  border: 1px solid var(--q-separator);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  width: 90%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}

[data-theme="dark"] .modal-card,
.dark-theme .modal-card {
  background: #2c2c2e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .modal-card {
    background: #2c2c2e;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--q-separator);
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 1;
}
.modal-title { font-size: 17px; font-weight: 600; }
.modal-close {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--q-bg-tertiary);
  color: var(--q-text-secondary);
  transition: opacity 0.12s;
  flex-shrink: 0;
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { opacity: 0.7; }

.modal-body { padding: 16px 20px; }
.modal-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--q-separator);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Modal list items (share picker, list manager) */
.modal-list-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--q-separator);
  cursor: pointer;
  transition: opacity 0.12s;
  gap: 12px;
}
.modal-list-item:last-child { border-bottom: none; }
.modal-list-item:hover { opacity: 0.8; }
.modal-list-item.disabled { opacity: 0.5; cursor: default; }

.modal-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--q-separator);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.modal-check.checked {
  border-color: var(--q-accent);
  background: var(--q-accent);
  color: #fff;
}
.modal-check svg { width: 12px; height: 12px; }

.modal-list-label { flex: 1; font-size: 15px; }
.modal-list-meta { font-size: 12px; color: var(--q-text-secondary); }

/* Link preview in share modal */
.link-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--q-separator);
  margin-bottom: 8px;
}
.link-preview-favicon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}
.link-preview-text { flex: 1; min-width: 0; }
.link-preview-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-preview-url {
  font-size: 12px;
  color: var(--q-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-preview-thumb {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

/* System action rows (copy link, etc) */
.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--q-separator);
  cursor: pointer;
  font-size: 15px;
  transition: opacity 0.12s;
}
.action-row:hover { opacity: 0.7; }
.action-row svg { width: 18px; height: 18px; color: var(--q-text-secondary); }

/* === Form Fields === */
.field-group { margin-bottom: 12px; }
.field-row { display: flex; gap: 10px; }
.field-row .field-group { flex: 1; }

.pill-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--q-radius-pill);
  border: 1.5px solid var(--q-separator);
  background: var(--q-bg-secondary);
  font-size: 16px;
  color: var(--q-text);
  outline: none;
  transition: border-color 0.15s;
}
.pill-input:focus { border-color: var(--q-accent); }
.pill-input::placeholder { color: var(--q-text-tertiary); }

select.pill-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238e8e93' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: var(--q-radius-pill);
  background: var(--q-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: opacity 0.15s, background 0.15s;
  border: none;
}
.btn-primary:hover { background: var(--q-accent-hover); }
.btn-primary:disabled { background: var(--q-accent-dim); cursor: not-allowed; }

.btn-secondary {
  padding: 10px 18px;
  border-radius: var(--q-radius-pill);
  background: var(--q-bg-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s;
  border: none;
}
.btn-secondary:hover { background: var(--q-bg-tertiary); }

.btn-danger {
  padding: 10px 18px;
  border-radius: var(--q-radius-pill);
  background: var(--q-danger);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: opacity 0.12s;
}
.btn-danger:hover { opacity: 0.85; }

.btn-text {
  font-size: 14px;
  color: var(--q-accent);
  font-weight: 500;
  transition: opacity 0.12s;
}
.btn-text:hover { opacity: 0.7; }

.error-msg {
  color: var(--q-danger);
  font-size: 13px;
  padding: 4px 0;
}

/* === Login Page === */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--q-bg);
  padding: 24px;
  overflow-y: auto;
}

.login-container {
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-logo {
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--q-accent);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 15px;
  color: var(--q-text-secondary);
  margin-bottom: 32px;
}

.login-form { text-align: left; }

.login-toggle {
  margin-top: 20px;
  text-align: center;
}

.auth-banner {
  text-align: center;
  margin-bottom: 24px;
}
.invite-heading {
  font-size: 26px;
  font-weight: 700;
  color: var(--q-text);
  margin-bottom: 6px;
}
.invite-sub {
  font-size: 15px;
  font-weight: 500;
  color: var(--q-text-secondary);
}

/* === Profile Modal === */
.profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 0 16px;
}
.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--q-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.profile-name { font-size: 17px; font-weight: 600; }
.profile-email { font-size: 13px; color: var(--q-text-secondary); }

.profile-section {
  padding: 16px 0;
  border-top: 1px solid var(--q-separator);
}
.profile-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--q-text-secondary);
  margin-bottom: 10px;
}

.theme-picker {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--q-separator);
}
.theme-option {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  background: var(--q-bg);
  transition: all 0.12s;
  border-right: 1px solid var(--q-separator);
}
.theme-option:last-child { border-right: none; }
.theme-option:hover { background: var(--q-bg-secondary); }
.theme-option.active { background: var(--q-accent); color: #fff; }

.profile-meta {
  font-size: 12px;
  color: var(--q-text-tertiary);
  text-align: center;
  padding: 12px 0;
}

.profile-signout {
  width: 100%;
  padding: 12px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--q-danger);
  border-top: 1px solid var(--q-separator);
  transition: background 0.12s;
}
.profile-signout:hover { background: var(--q-bg-secondary); }

/* === Toast === */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: var(--q-radius-pill);
  background: var(--q-text);
  color: var(--q-bg);
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  animation: toastIn 0.2s ease, toastOut 0.2s ease 2.5s forwards;
  pointer-events: none;
}

/* === Hamburger (mobile) === */
.hamburger {
  display: none;
  position: fixed;
  top: 11px;
  left: 14px;
  z-index: 60;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: none;
  border: none;
  padding: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hamburger img { width: 26px; height: 26px; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 49;
}

/* === Confirm Dialog === */
.confirm-body {
  padding: 24px 20px;
  text-align: center;
}
.confirm-msg {
  font-size: 15px;
  margin-bottom: 20px;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* === Add Item Form === */
.add-item-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--q-bg-secondary);
  border-radius: var(--q-radius-md);
  margin-bottom: 12px;
}
.add-item-preview img {
  width: 40px;
  height: 40px;
  border-radius: var(--q-radius-sm);
  object-fit: cover;
}
.add-item-preview-text { flex: 1; min-width: 0; }
.add-item-preview-title { font-size: 14px; font-weight: 600; }
.add-item-preview-url { font-size: 12px; color: var(--q-text-secondary); }

/* === Animations === */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* === Responsive === */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  .sidebar-backdrop.visible { display: block; }
  .main { margin-left: 0; }
  .breadcrumb { padding-left: 50px; }
  .item-kebab { opacity: 1; }
  .fab { bottom: 20px; right: 20px; }
}

/* === Utility === */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
