:root {
  --bg-app: #121317;
  --bg-sidebar: #2b1f57;
  --bg-sidebar-active: #473385;
  --bg-main: #15171c;
  --bg-card: #1f2127;
  --bg-card-soft: #2a2d34;
  --line: #31353f;
  --line-soft: #3a3f4a;
  --text-main: #e4e8f1;
  --text-sub: #a4adbf;
  --brand: #5e62f3;
  --brand-dark: #4e52dd;
  --success: #27b47a;
  --danger: #d06375;
  --radius: 10px;

  font-family: "SF Pro Text", "Pretendard", "Noto Sans KR", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-main);
}

#app { min-height: 100vh; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 74px 1fr;
  background: var(--bg-main);
  position: relative;
}

.app-shell.app-drop-active::after {
  content: 'torrent 파일을 놓으면 추가 창이 열립니다';
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 24, 0.74);
  border: 2px dashed rgba(122, 131, 255, 0.72);
  color: #d5daff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 90;
  pointer-events: none;
}

.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid #3f2f74;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brand {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d7dff0;
  font-size: 1.5rem;
  font-weight: 300;
}

.side-icons { display: flex; flex-direction: column; gap: 8px; }

.side-icon {
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  background: transparent;
  color: #9ca6ba;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
}

.side-icon:hover,
.side-icon.add { background: #3d2f72; color: #ede8ff; }

.sidebar nav {
  margin-top: 6px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar nav a {
  color: #d2caf3;
  text-decoration: none;
  font-size: 0.74rem;
  text-align: center;
  padding: 8px 0;
  border-radius: 8px;
}

.sidebar nav a.active,
.sidebar nav a:hover { background: var(--bg-sidebar-active); color: #f2edff; }

.sidebar-foot { margin-top: auto; }

.content {
  padding: 14px;
  overflow: auto;
}

.downloads-view {
  background: #f3f3f5;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 20px;
}

.downloads-view .card {
  background: #f3f3f5;
  border: 1px solid #dfdfe4;
  border-radius: 10px;
}

.downloads-filter {
  padding: 16px;
  align-self: start;
  min-height: calc(100vh - 40px);
}

.downloads-filter h2 {
  margin: 2px 0 14px;
  color: #2a2a2e;
  font-size: 1.05rem;
}

.downloads-filter button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #3f424a;
  font-size: 0.98rem;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.downloads-filter button.active {
  background: #e9e9ee;
  color: #5b5fe9;
}

.downloads-main .toolbar {
  border-bottom: 1px solid #d8d8de;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.downloads-main h1 {
  color: #2f3136;
  font-size: 2.1rem;
  font-weight: 600;
}

.downloads-main .icon-tool.ghost {
  background: transparent;
  color: #5f626b;
  border-color: transparent;
}

.downloads-main .icon-tool.ghost:hover {
  background: #ebecf1;
  color: #383b42;
}

.downloads-main .task-pane {
  background: transparent;
  border: none;
  padding: 0;
}

.downloads-main .task-card {
  border: 1px solid #ceced6;
  border-radius: 10px;
  background: #f9f9fb;
  padding: 14px 16px;
}

.downloads-main .file-cell strong {
  color: #37393f;
  font-size: 1.08rem;
  font-weight: 500;
}

.downloads-main .task-actions-pill {
  background: #f5f5f8;
  border: 1px solid #dfdfe6;
}

.downloads-main .icon-pill {
  color: #727782;
  border-color: transparent;
  background: transparent;
}

.downloads-main .icon-pill:hover {
  background: #e7e8ee;
  border-color: transparent;
}

.downloads-main .bar {
  height: 8px;
  background: #e0e1ea;
}

.downloads-main .bar span {
  background: #6268ee;
}

.downloads-main .task-meta-row {
  color: #757b87;
  font-size: 1rem;
}

.downloads-main {
  position: relative;
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.toolbar-left { display: flex; align-items: baseline; gap: 10px; }

h1 { margin: 0; font-size: 1.16rem; font-weight: 600; }

.count { color: var(--text-sub); font-size: 0.8rem; }

.toolbar-right { display: flex; align-items: center; gap: 8px; }

.icon-tool {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.96rem;
}

.switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-sub);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.notice {
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.notice.error {
  background: rgba(208, 99, 117, 0.16);
  color: #ffb8c3;
  border: 1px solid rgba(208, 99, 117, 0.3);
}

.notice.success {
  background: rgba(39, 180, 122, 0.16);
  color: #a7f0cc;
  border: 1px solid rgba(39, 180, 122, 0.3);
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 160;
  min-width: 240px;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  border: 1px solid transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  animation: toast-in 180ms ease-out;
}

.app-toast.success {
  background: #1f3a2f;
  border-color: #2e7050;
  color: #c2f1da;
}

.app-toast.error {
  background: #4c2a31;
  border-color: #7a434f;
  color: #ffd3da;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.task-pane { padding: 10px; min-height: 560px; }

.tabs { display: flex; gap: 6px; margin-bottom: 8px; }

.tabs button {
  border: 1px solid var(--line-soft);
  background: #23262d;
  color: #a4aec0;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
}

.tabs button.active {
  border-color: #575ced;
  background: #30335c;
  color: #e0e3ff;
}

.task-card-list {
  display: grid;
  gap: 10px;
}

.task-card {
  border: 1px solid #363b45;
  border-radius: 10px;
  background: #20242c;
  padding: 12px 14px;
}

.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.file-cell { display: flex; flex-direction: column; gap: 2px; }
.file-cell strong { font-weight: 600; }
.file-cell small { color: var(--text-sub); font-size: 0.72rem; }

.status-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
  background: #343948;
  color: #aeb8d1;
}

.status-tag.active { background: #1d365f; color: #9ec7ff; }
.status-tag.waiting { background: #504122; color: #f0ce86; }
.status-tag.complete,
.status-tag.stopped { background: #264735; color: #9fe5c2; }
.status-tag.error,
.status-tag.removed { background: #5a2d39; color: #ffb8c3; }

.progress-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: center;
}

.bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: #343844;
  overflow: hidden;
}

.bar span {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #5b86ff, #5860f0);
}

.empty { text-align: center; color: var(--text-sub); }

.task-actions-pill {
  display: flex;
  gap: 6px;
  justify-content: flex-start;
  background: #262b33;
  border: 1px solid #3a404c;
  border-radius: 999px;
  padding: 4px;
}

.icon-pill {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.82rem;
}

.task-meta-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #a5afc1;
  font-size: 0.78rem;
}

.task-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.task-info-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(640px, 100%);
  height: 100%;
  background: #2f333a !important;
  border: 1px solid #4a4f5b !important;
  z-index: 30;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.task-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #4a4f5b;
}

.task-info-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #d9deeb;
}

.task-info-tabs {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #4a4f5b;
}

.task-info-tabs button {
  min-width: 34px;
  height: 32px;
  border: 1px solid transparent;
  background: transparent;
  color: #9da8be;
  border-radius: 6px;
  padding: 0;
  font-weight: 700;
  font-size: 0.8rem;
}

.task-info-tabs button.active {
  color: #dfe3ff;
  border-color: #5b62f3;
  background: #3a3f73;
}

.task-info-body {
  padding: 12px;
  overflow: auto;
}

.task-info-grid {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  font-size: 0.84rem;
  color: #d3d9e8;
}

.task-info-grid .k {
  color: #aab4c8;
}

.task-info-divider {
  margin: 14px 0 10px;
  padding-top: 10px;
  border-top: 1px solid #4a4f5b;
  color: #bcc6da;
  font-size: 0.82rem;
}

.inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.piece-grid {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 3px;
  padding: 8px;
  border: 1px solid #4a4f5b;
  border-radius: 6px;
  margin-bottom: 12px;
}

.piece-grid span {
  height: 9px;
  border-radius: 2px;
  background: #555b68;
}

.piece-grid span.done {
  background: #35bf57;
}

.task-info-progress-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.task-info-list {
  border: 1px solid #4a4f5b;
  border-radius: 6px;
  padding: 10px;
  background: #2b2f36;
  min-height: 240px;
  max-height: 560px;
  overflow: auto;
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
}

.task-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  border: 1px solid #4a4f5b;
}

.task-info-table th,
.task-info-table td {
  border-bottom: 1px solid #454a56;
  padding: 8px;
  color: #cfd7e8;
  text-align: left;
}

.task-info-table th {
  background: #252930;
  color: #aeb8cc;
}

.task-info-files-meta {
  margin-top: 8px;
  text-align: right;
  color: #98a2b8;
  font-size: 0.76rem;
}

.task-info-slide-enter-active,
.task-info-slide-leave-active {
  transition: transform 180ms ease, opacity 180ms ease;
}

.task-info-slide-enter-from,
.task-info-slide-leave-to {
  transform: translateX(16px);
  opacity: 0;
}

.task-info-footer {
  border-top: 1px solid #4a4f5b;
  padding: 10px 12px;
  display: flex;
  justify-content: center;
}

.task-info-actions-pill {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-start;
  background: #343844;
  border: 1px solid #505662;
  border-radius: 999px;
  padding: 4px;
}

.add-modal input,
.add-modal textarea {
  height: 33px;
  border: 1px solid #434955;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 0.85rem;
  color: var(--text-main);
  background: #242830;
}

.add-modal textarea {
  resize: none;
  height: auto;
  min-height: 92px;
}

.add-modal input:focus,
.add-modal textarea:focus {
  outline: none;
  border-color: #656cf5;
  box-shadow: 0 0 0 2px rgba(94, 98, 243, 0.18);
}

button {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #f7f8ff;
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

button.ghost {
  background: #2a2d34;
  color: #c1c8d8;
  border-color: #424854;
}

button.ghost:hover {
  background: #333741;
  border-color: #525a69;
}

button.small { padding: 4px 8px; font-size: 0.74rem; }
button.tiny { padding: 3px 7px; font-size: 0.72rem; }
button.ghost.danger {
  color: #ffbec8;
  border-color: #66414a;
  background: #4b2e35;
}
button.ghost.danger:hover {
  background: #5a3640;
  border-color: #7a4a55;
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 90px;
  z-index: 100;
}

.add-modal {
  width: min(680px, calc(100vw - 32px));
  background: var(--bg-card-soft);
  border: 1px solid #434955;
  border-radius: 9px;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.44);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #484f5b;
}

.modal-tabs { display: flex; gap: 8px; }

.modal-tabs button {
  background: transparent;
  border: none;
  color: #a9b1c4;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 4px 2px;
}

.modal-tabs button.active { color: #e7eaff; border-bottom-color: #5b62f3; }

.icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #a5aec1;
  font-size: 1.2rem;
  line-height: 1;
}

.hidden-input { display: none; }

.modal-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-body label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.8rem;
  color: #a9b2c4;
}

.modal-body small { color: #919cb2; font-size: 0.74rem; }

.category-panel {
  display: grid;
  gap: 8px;
  border: 1px solid #3a404c;
  border-radius: 6px;
  padding: 10px;
  background: #20242c;
}

.category-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.category-select-label {
  position: relative;
  display: block;
}

.category-select-label::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #8f98ab;
  border-bottom: 1.5px solid #8f98ab;
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}

.category-select-label select {
  width: 100%;
  height: 33px;
  border: 1px solid #3f4654;
  border-radius: 4px;
  padding: 7px 28px 7px 9px;
  font-size: 0.84rem;
  color: var(--text-main);
  background: #1d2128;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: none;
}

.category-select-label select:focus {
  outline: none;
  border-color: #666ef5;
  box-shadow: none;
}

.category-select-label select option {
  color: #dce2f0;
  background: #1d2128;
}

.category-row button.ghost.tiny {
  min-width: 34px;
  height: 33px;
  padding: 0;
  border-radius: 4px;
  background: #1d2128;
  border-color: #3f4654;
  color: #aeb8cc;
}

.category-row button.ghost.tiny:hover:not(:disabled) {
  background: #242933;
  border-color: #4a5263;
  color: #d0d7e7;
}

.torrent-drop-zone {
  border: 1px dashed #5a606f;
  border-radius: 8px;
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  color: #adb5c7;
  background: #242830;
  cursor: pointer;
}

.torrent-drop-zone.active {
  border-color: #6f75ff;
  background: #2b2f45;
  color: #d4d9ff;
}

.torrent-selected {
  border: 1px solid #454b59;
  border-radius: 8px;
  overflow: hidden;
}

.torrent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #2f333a;
  border-bottom: 1px solid #454b59;
}

.torrent-head strong {
  font-size: 0.84rem;
  color: #d8deed;
}

.torrent-file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.torrent-file-table th,
.torrent-file-table td {
  border-bottom: 1px solid #3f4450;
  padding: 8px;
  color: #cad2e2;
}

.torrent-file-table th {
  font-size: 0.72rem;
  color: #a0abc0;
  background: #262a31;
  text-align: left;
}

.modal-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 8px;
}

.modal-footer {
  border-top: 1px solid #484f5b;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-advanced {
  display: grid;
  gap: 10px;
  border-top: 1px solid #3f4450;
  padding-top: 10px;
}

.proxy-help-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.proxy-help-row a {
  color: #a8b2c8;
  font-size: 0.74rem;
  text-decoration: none;
  white-space: nowrap;
}

.proxy-help-row a:hover {
  color: #d4dcf2;
  text-decoration: underline;
}

.modal-advanced-toggle {
  font-size: 0.8rem;
  color: #c5cee2 !important;
}

.modal-advanced-toggle input {
  width: 15px;
  height: 15px;
}

.expand-advanced-enter-active,
.expand-advanced-leave-active {
  transition: opacity 140ms ease, transform 140ms ease;
}

.expand-advanced-enter-from,
.expand-advanced-leave-to {
  opacity: 0;
  transform: translateY(6px);
}

.settings-content {
  padding: 16px 18px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-nav {
  padding: 12px;
  position: sticky;
  top: 8px;
}

.settings-nav h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.settings-nav-sub {
  margin: 8px 0 14px;
  color: #97a2b9;
  font-size: 0.75rem;
  line-height: 1.45;
}

.settings-nav button {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 9px;
  margin-bottom: 8px;
  padding: 9px 10px;
  background: #23262d;
  color: #c9d1e3;
}

.settings-nav button span {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
}

.settings-nav button small {
  display: block;
  margin-top: 1px;
  color: #919db4;
  font-size: 0.68rem;
  font-weight: 500;
}

.settings-nav button.active {
  border-color: #575ced;
  background: #2f345e;
  color: #eef1ff;
}

.settings-nav button.active small {
  color: #c9d2ff;
}

.settings-panel {
  padding: 18px 20px;
  min-height: 640px;
}

.settings-header {
  margin-bottom: 16px;
}

.settings-header h1 {
  margin: 0;
  font-size: 1.2rem;
}

.settings-header p {
  margin: 6px 0 0;
  color: #98a2b8;
  font-size: 0.81rem;
}

.settings-form {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
}

.settings-group {
  display: grid;
  gap: 8px;
}

.settings-card-section {
  border: 1px solid #3a404c;
  border-radius: 10px;
  padding: 14px;
  background: #252a33;
}

.group-title {
  color: #e5e9f7;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.group-title.full-row {
  grid-column: 1 / -1;
}

.field-label {
  color: #9aa6bf;
  font-size: 0.76rem;
}

.theme-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.theme-tile {
  background: #2d313a;
  border: 1px solid #464d5b;
  color: #cdd4e6;
  min-height: 36px;
}

.theme-tile.active {
  background: #3a3f73;
  border-color: #646dff;
  color: #f0f3ff;
}

.settings-group label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #b1b9cb;
  font-size: 0.79rem;
}

.settings-group input,
.settings-group select,
.settings-group textarea {
  height: 33px;
  border: 1px solid #434955;
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 0.81rem;
  color: var(--text-main);
  background: #1b1f27;
}

.settings-group input:focus,
.settings-group select:focus,
.settings-group textarea:focus {
  outline: none;
  border-color: #656cf5;
  box-shadow: none;
}

.settings-group textarea {
  min-height: 66px;
  height: auto;
  resize: vertical;
}

.settings-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8e97aa 50%),
    linear-gradient(135deg, #8e97aa 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 2px),
    calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.settings-group.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.check-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
  color: #c1c8d9 !important;
}

.check-row input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #373d49;
}

.folder-picker-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.folder-browse-btn {
  white-space: nowrap;
  padding: 7px 12px;
  min-height: 33px;
}

.inline-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.muted-line {
  color: #97a2ba;
  font-size: 0.74rem;
}

.rpc-helper {
  display: grid;
  gap: 8px;
}

.rpc-test-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rpc-ok {
  color: #8ad9af;
}

.rpc-fail {
  color: #f0a3b1;
}

.settings-placeholder {
  padding: 20px;
  background: #242831;
  border: 1px solid #3a404c;
  border-radius: 12px;
}

.settings-placeholder h3 {
  margin: 0 0 8px;
  font-size: 0.96rem;
}

.settings-placeholder p {
  margin: 0;
  color: #9aa6bf;
  font-size: 0.82rem;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .main-grid { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .settings-nav h2,
  .settings-nav-sub {
    grid-column: 1 / -1;
  }
  .settings-nav button {
    margin-bottom: 0;
  }
}

@media (max-width: 900px) {
  .downloads-view {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .downloads-filter {
    min-height: auto;
  }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .settings-group.two-col {
    grid-template-columns: 1fr;
  }
  .theme-row {
    grid-template-columns: 1fr;
  }
}
