body {
  margin: 0;
  font-family: 'Inter', 'Roboto', 'Segoe UI', Arial, sans-serif;
  background: #181a1b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

/* --- Login Overlay Styles --- */
.login-overlay {
  position: fixed;
  z-index: 5000;
  inset: 0;
  background: rgba(24,26,27,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.login-form {
  background: #23272e;
  border-radius: 18px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.28);
  padding: 40px 32px 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 320px;
  max-width: 340px;
  gap: 18px;
  border: 3px solid #1976d2;
}

.login-title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 1px;
  font-family: inherit;
}

.login-input {
  background: #181a1b;
  border: 1.5px solid #444;
  border-radius: 8px;
  color: #fff;
  font-size: 1.08rem;
  padding: 12px 14px;
  margin-bottom: 4px;
  outline: none;
  transition: border 0.18s, background 0.18s;
  font-family: inherit;
}
.login-input:focus {
  border: 1.5px solid #1976d2;
  background: #23272e;
}

.login-btn {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 12px 0;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(25,118,210,0.13);
  transition: background 0.18s, color 0.18s;
  font-family: inherit;
}
.login-btn:hover, .login-btn:focus {
  background: #1565c0;
  color: #fff;
}

.header-bar {
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 64px;
  background: #23272e;
  border-bottom: 2.5px solid #222;
  z-index: 100;
}

.header-title {
  font-family: 'Inter', 'Roboto', 'Segoe UI', Arial, sans-serif;
  font-weight: 600;
  font-size: 2rem;
  color: #fff;
  letter-spacing: 1px;
  text-align: center;
  flex: 1;
  user-select: none;
}

.header-settings {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #bbb;
  font-size: 2rem;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.header-settings:hover {
  background: #31363f;
  color: #fff;
}

.settings-menu {
  position: absolute;
  top: 60px;
  right: 32px;
  background: #23272e;
  border: 1.5px solid #444;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  z-index: 3000;
  min-width: 220px;
  display: none;
  flex-direction: column;
  padding: 10px 0;
}
.settings-menu.open {
  display: flex;
}
.settings-menu label {
  color: #fff;
  font-size: 1.1rem;
  padding: 12px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.13s;
}
.settings-menu label:hover {
  background: #31363f;
}
.settings-menu input[type="checkbox"] {
  display: none;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #444;
  border-radius: 24px;
  transition: background 0.2s;
}
.toggle-switch input:checked + .slider {
  background: #1976d2;
}
.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .slider:before {
  transform: translateX(20px);
}

.pane-container {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow-x: auto;
  gap: 32px;
  padding: 32px 24px;
  min-height: 0;
  scroll-behavior: smooth;
}

.pane {
  background: #23272e;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  min-width: 320px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 0 18px 0;
  position: relative;
  margin-bottom: 12px;
  border: 5px solid var(--pane-color, #1976d2);
  box-sizing: border-box;
  transition: box-shadow 0.2s;
  overflow: hidden;
}

.pane-header {
  background: var(--pane-color, #1976d2);
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-top-left-radius: 13px;
  border-top-right-radius: 13px;
  position: relative;
  cursor: grab;
  user-select: none;
  z-index: 2;
}

.pane-header:active {
  cursor: grabbing;
}

.pane-title {
  color: #fff;
  font-weight: bold;
  font-size: 1.22rem;
  letter-spacing: 0.5px;
  flex: 1;
  text-align: left;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  transition: color 0.18s;
  font-family: inherit;
}

.pane-title-input {
  font-size: 1.22rem;
  font-weight: bold;
  text-align: left;
  background: transparent;
  color: #fff;
  border: 1.5px solid #fff;
  border-radius: 7px;
  width: 90%;
  margin: 0;
  padding: 2px 8px;
  outline: none;
  font-family: inherit;
}

.pane-header .pane-menu-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: 10px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.pane-header .pane-menu-btn:hover {
  background: rgba(255,255,255,0.13);
}

.pane-header .pane-menu {
  position: absolute;
  top: 48px;
  right: 18px;
  background: #000;
  color: #fff;
  border: 1.5px solid #444;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
  z-index: 9999;
  min-width: 110px;
  display: none;
  flex-direction: column;
}
.pane-header .pane-menu.open {
  display: flex;
}
.pane-header .pane-menu button {
  background: none;
  border: none;
  color: #fff;
  padding: 10px 18px;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.13s;
}
.pane-header .pane-menu button:hover {
  background: #31363f;
}

.tab-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 18px;
  margin-bottom: 10px;
  margin-top: 10px;
  overflow-y: auto;
  max-height: 420px;
  min-height: 60px;
}

.tab-item {
  display: flex;
  align-items: center;
  background: #282c34;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
  border: 1.5px solid #444;
  border-bottom: 2.5px solid #222;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  min-height: 32px;
  font-size: 1rem;
  margin-bottom: 0;
  margin-top: 8px;
  position: relative;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
  padding: 4px 10px 4px 8px;
  z-index: 1;
}

.tab-item.dragging {
  opacity: 1 !important;
  background: #1976d2 !important;
  color: #fff !important;
  box-shadow: 0 6px 24px rgba(25,118,210,0.25), 0 2px 8px rgba(0,0,0,0.13);
  z-index: 100;
}

.tab-item.placeholder {
  background: #444 !important;
  opacity: 0.5 !important;
  border: 2px dashed #1976d2 !important;
  min-height: 28px;
}

.pane.dragging {
  opacity: 1 !important;
  box-shadow: 0 8px 32px rgba(25,118,210,0.25), 0 2px 12px rgba(0,0,0,0.18);
  z-index: 100;
}

.pane.placeholder {
  background: #444 !important;
  opacity: 0.5 !important;
  border: 2.5px dashed #1976d2 !important;
}

.tab-item .tab-url,
.tab-item .tab-url-input {
  flex: 1;
  color: #e0e0e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
  font-size: 1.01rem;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 8px 0 0;
  margin: 0;
  max-width: 180px;
  min-width: 0;
}

.tab-item .tab-url-input {
  border: 1.5px solid #fff;
  border-radius: 7px;
  color: #fff;
  padding: 2px 8px;
  width: 90%;
}

.tab-item .tab-menu-btn {
  background: none;
  border: none;
  color: #bbb;
  font-size: 1.3rem;
  margin-left: auto;
  cursor: pointer;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.tab-item .tab-menu-btn:hover {
  background: #31363f;
  color: #fff;
}

.tab-item .tab-menu {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: #000;
  color: #fff;
  border: 1.5px solid #444;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
  z-index: 9999;
  min-width: 100px;
  display: none;
  flex-direction: column;
}
.tab-item .tab-menu.open {
  display: flex;
}
.tab-item .tab-menu button {
  background: none;
  border: none;
  color: #fff;
  padding: 8px 16px;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.13s;
}
.tab-item .tab-menu button:hover {
  background: #31363f;
}

.tab-item:hover {
  background: #3a4be7;
  color: #fff;
  box-shadow: 0 6px 24px rgba(58,75,231,0.18), 0 4px 16px rgba(0,0,0,0.18);
  z-index: 10;
}

.tab-item .favicon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  object-fit: contain;
  vertical-align: middle;
}

.tab-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 1.2rem;
  min-height: 28px;
  max-height: 28px;
  margin-top: 0;
  margin-bottom: 0;
  border: 1.5px dashed #444;
  background: #23272e;
  border-radius: 7px;
  transition: color 0.18s, background 0.18s;
  cursor: pointer;
  padding: 0;
}
.tab-add-btn:hover {
  color: #fff;
  background: #31363f;
}

.add-category-btn {
  height: 80px;
  width: 80px;
  font-size: 2.7rem;
  background: #23272e;
  border: 2.5px solid #444;
  color: #888;
  border-radius: 50%;
  margin-left: 32px;
  align-self: center;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
  flex-shrink: 0;
  flex-grow: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.add-category-btn:hover {
  color: #fff;
  background: #31363f;
}

/* Responsive: 3 panes fill viewport, more triggers scroll */
@media (max-width: 1100px) {
  .pane {
    min-width: 260px;
    max-width: 260px;
  }
}
@media (max-width: 800px) {
  .pane {
    min-width: 200px;
    max-width: 200px;
  }
  .pane-container {
    gap: 18px;
    padding: 18px 6px;
  }
}
