/* ==========================================================================
   Bookingzentrale – Dark Theme (Asana-Listenansicht-Stil)
   ========================================================================== */

:root {
  --bg-app: #1c1d1f;
  --bg-topbar: #232427;
  --bg-panel: #25272a;
  --bg-elevated: #2c2e32;
  --bg-hover: #32353a;
  --bg-input: #1c1d1f;
  --border: #3a3d42;
  --border-light: #44474d;

  --text-primary: #e8e9ea;
  --text-secondary: #9a9da3;
  --text-tertiary: #6e7177;

  --accent: #7b6cf6;
  --accent-hover: #8f82f8;
  --accent-soft: rgba(123, 108, 246, 0.16);

  --green: #4caf50;
  --green-soft: rgba(76, 175, 80, 0.16);
  --red: #f0626a;
  --red-soft: rgba(240, 98, 106, 0.16);
  --grey: #6e7177;
  --grey-soft: rgba(110, 113, 119, 0.16);
  --orga: #5ac8fa;
  --orga-soft: rgba(90, 200, 250, 0.16);

  --radius: 6px;
  --radius-lg: 10px;

  font-size: 14px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}
textarea {
  resize: vertical;
  font-family: inherit;
}

/* Ohne explizite Größe rendern Inline-SVGs mit 300x150px */
svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 500;
  transition: background 0.1s, border-color 0.1s;
  white-space: nowrap;
}
.btn:hover {
  background: var(--bg-hover);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-danger {
  color: var(--red);
}
.btn-danger:hover {
  background: var(--red-soft);
}
.btn-text {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 4px 6px;
}
.btn-text:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text-secondary);
}
.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* ==========================================================================
   Login
   ========================================================================== */

.login-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 340px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.login-card h1 {
  margin: 0 0 4px;
  font-size: 22px;
}
.login-card .subtitle {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 13px;
}
.login-card .form-group {
  margin-bottom: 14px;
}
.login-card input {
  width: 100%;
}
.login-card .btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}
.error-message {
  background: var(--red-soft);
  color: var(--red);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 12.5px;
  margin-bottom: 14px;
}

/* ==========================================================================
   Topbar
   ========================================================================== */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  flex-shrink: 0;
  gap: 18px;
}
.topbar-logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.topbar-logo .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
  display: inline-block;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius);
  color: var(--text-secondary);
}
.user-badge:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar.sm {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

/* dropdown menu */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 100;
  padding: 4px;
}
.dropdown-menu.align-left {
  right: auto;
  left: 0;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
}
.dropdown-item:hover {
  background: var(--bg-hover);
}
.dropdown-item.danger {
  color: var(--red);
}
.dropdown-separator {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ==========================================================================
   Main layout
   ========================================================================== */

.main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 8px;
  background: var(--bg-topbar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.sidebar-label {
  padding: 4px 12px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.sidebar-item {
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.sidebar-item.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.status-tree {
  display: flex;
  flex-direction: column;
  margin: 2px 0 6px;
}
.status-tree-item {
  padding: 6px 12px 6px 28px;
  border-radius: var(--radius);
  color: var(--text-tertiary);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-tree-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.status-tree-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-add {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 4px;
  color: var(--text-tertiary);
  border-radius: var(--radius);
}
.sidebar-add:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.sidebar-add svg {
  width: 14px;
  height: 14px;
}
.sidebar-add input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-primary);
}
.sidebar-add input:focus {
  border: none;
}

.list-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 10px;
  flex-shrink: 0;
}
.list-toolbar h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.list-toolbar .toolbar-actions {
  display: flex;
  gap: 8px;
}

.list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 40px;
}

/* ==========================================================================
   List header & rows
   ========================================================================== */

.list-grid-template {
  display: grid;
  grid-template-columns: 40px minmax(160px, 1fr) 90px 90px minmax(220px, 320px) 56px;
  align-items: center;
  gap: 8px;
}

.list-header {
  position: sticky;
  top: 0;
  background: var(--bg-app);
  z-index: 5;
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.list-row {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-radius: var(--radius);
}
.list-row:hover {
  background: var(--bg-panel);
}
.list-row.selected {
  background: var(--bg-panel);
}

.cell-title {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-due, .cell-deadline {
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.cell-due.overdue, .cell-deadline.overdue {
  color: var(--red);
}
.cell-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.cell-comments {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  justify-content: flex-end;
}

/* status icon (Asana-style checkmark circle) */
.status-toggle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  padding: 0;
}
.status-toggle svg {
  width: 13px;
  height: 13px;
}
.status-toggle.status-bestaetigt {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.status-toggle.status-abgesagt {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.status-toggle.status-angefragt {
  border-color: var(--border-light);
}
.status-toggle.status-orga {
  background: var(--orga);
  border-color: var(--orga);
  color: #1c1d1f;
}
.status-toggle:hover {
  border-color: var(--accent);
}

/* tag pill */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  color: #1c1d1f;
}
.tag-pill .remove {
  cursor: pointer;
  opacity: 0.6;
  font-weight: 700;
}
.tag-pill .remove:hover {
  opacity: 1;
}

/* add booking row */
.add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  color: var(--text-secondary);
  border-radius: var(--radius);
}
.add-row:hover {
  background: var(--bg-panel);
  color: var(--text-primary);
}
.add-row input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
}
.add-row input:focus {
  border: none;
}

.empty-state {
  color: var(--text-tertiary);
  padding: 40px 10px;
  text-align: center;
  font-size: 13px;
}

.list-section-divider {
  display: flex;
  align-items: center;
  margin: 18px 0 10px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.list-section-divider span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

/* ==========================================================================
   Detail panel
   ========================================================================== */

.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.detail-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 460px;
  max-width: 100vw;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.18s ease-out;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.3);
}
.detail-panel.open {
  transform: translateX(0);
}

@media (min-width: 769px) {
  .detail-overlay {
    display: none;
  }
  #overlay-root {
    flex-shrink: 0;
  }
  .detail-panel {
    position: relative;
    width: 40vw;
    min-width: 380px;
    max-width: 640px;
    transform: none;
    box-shadow: none;
  }
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px 8px;
  gap: 8px;
  flex-shrink: 0;
}
.detail-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  border: none;
  background: transparent;
  padding: 4px 6px;
  border-radius: var(--radius);
  width: 100%;
}
.detail-title:focus {
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 20px;
}

.detail-section {
  margin-bottom: 18px;
}
.detail-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
.detail-row {
  display: flex;
  gap: 16px;
}
.detail-row > div {
  flex: 1;
}
.detail-row input[type="date"],
.detail-row input[type="text"],
.detail-row select {
  width: 100%;
}

.status-select {
  display: flex;
  gap: 6px;
}
.status-option {
  flex: 1;
  padding: 7px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.status-option:hover {
  border-color: var(--border-light);
}
.status-option.active.status-angefragt {
  background: var(--grey-soft);
  color: var(--text-primary);
  border-color: var(--grey);
}
.status-option.active.status-bestaetigt {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--green);
}
.status-option.active.status-abgesagt {
  background: var(--red-soft);
  color: var(--red);
  border-color: var(--red);
}
.status-option.active.status-orga {
  background: var(--orga-soft);
  color: var(--orga);
  border-color: var(--orga);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.tag-add-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px dashed var(--border-light);
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tag-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.popover {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
  padding: 6px;
  min-width: 200px;
  max-height: 260px;
  overflow-y: auto;
}
.popover-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
}
.popover-option:hover {
  background: var(--bg-hover);
}
.popover-option .swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.popover-option .check {
  margin-left: auto;
  color: var(--accent);
}

.description-textarea {
  width: 100%;
  min-height: 90px;
  background: var(--bg-input);
}

@media (min-width: 769px) {
  .description-textarea {
    min-height: 270px;
  }
}

/* attachments */
.attachment-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.attachment-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.attachment-info {
  flex: 1;
  min-width: 0;
}
.attachment-name {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-meta {
  font-size: 11px;
  color: var(--text-tertiary);
}
.upload-dropzone {
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12.5px;
  margin-top: 8px;
  cursor: pointer;
}
.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--accent);
  color: var(--accent);
}

/* comments */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 12px;
}
.comment-item {
  display: flex;
  gap: 10px;
}
.comment-body {
  flex: 1;
}
.comment-meta {
  font-size: 12px;
  margin-bottom: 3px;
}
.comment-author {
  font-weight: 700;
}
.comment-time {
  color: var(--text-tertiary);
  margin-left: 6px;
}
.comment-text {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.comment-text .mention {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0 3px;
}
.mention-chip {
  display: inline;
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0 3px;
  user-select: none;
}
.comment-delete {
  color: var(--text-tertiary);
  font-size: 11px;
  margin-left: 8px;
  cursor: pointer;
}
.comment-delete:hover {
  color: var(--red);
}

.comment-input-wrap {
  position: relative;
}
.comment-input {
  width: 100%;
  min-height: 60px;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
}
.comment-input:focus {
  border-color: var(--accent);
}
.comment-input:empty::before {
  content: attr(data-placeholder);
  color: var(--text-tertiary);
  pointer-events: none;
}
.mention-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  max-height: 180px;
  overflow-y: auto;
  z-index: 60;
}
.mention-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
}
.mention-option:hover, .mention-option.active {
  background: var(--bg-hover);
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 540px;
  max-width: 92vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}
.modal.modal-lg {
  width: 720px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 {
  margin: 0;
  font-size: 16px;
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.tab {
  padding: 10px 14px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.tab:hover {
  color: var(--text-primary);
}
.tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

/* forms */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row > .form-group {
  flex: 1;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-row input {
  width: auto;
}
.help-text {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* generic table for admin lists */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.table-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section-header h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.color-swatch-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}
.color-swatch.selected {
  border-color: var(--text-primary);
}

.ical-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.ical-link-row input {
  flex: 1;
  font-size: 11px;
  color: var(--text-secondary);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 13px;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.error {
  border-color: var(--red);
  color: var(--red);
}

.loading-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.icon-btn-row {
  display: flex;
  gap: 4px;
}

.mobile-close-btn {
  display: none;
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
    width: 100%;
    border-right: none;
  }
  .list-view {
    display: none;
  }
  .main.show-sidebar .sidebar {
    display: flex;
  }
  .main:not(.show-sidebar) .list-view {
    display: flex;
  }
  .mobile-close-btn {
    display: flex;
  }
  .detail-panel {
    width: 100%;
  }
  .modal,
  .modal.modal-lg {
    width: 92vw;
  }
}
