[hidden] {
    display: none !important;
}

.rt-body {
    --warn: var(--amber);
    --danger: #ff6f7d;
}

.rt-mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.rt-error-text {
    margin: 4px 0 0;
    color: var(--danger);
    font-size: 10.5px;
    line-height: 1.45;
}

.rt-span-all {
    grid-column: 1 / -1;
}

.rt-detail-progress {
    width: 100%;
    height: 5px;
    margin: 6px 0 2px;
}

.rt-body {
    min-height: 100vh;
    background:
        radial-gradient(1100px 620px at 82% -8%, rgba(61, 220, 151, 0.08), transparent 62%),
        radial-gradient(900px 540px at 0% 100%, rgba(88, 183, 255, 0.05), transparent 60%),
        var(--bg);
}

.rt-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.rt-loading-bar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 300;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--green), transparent);
    background-size: 40% 100%;
    animation: rt-loading 1.1s linear infinite;
}

@keyframes rt-loading {
    from { background-position: -50% 0; }
    to { background-position: 150% 0; }
}

.rt-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid var(--line-2);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: rt-spin 0.7s linear infinite;
}

@keyframes rt-spin {
    to { transform: rotate(360deg); }
}

.rt-boot {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--dim);
    font-size: 13px;
}

.rt-gate {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 6vw, 64px) 20px;
    gap: 22px;
}

.rt-auth-brand {
    display: flex;
    width: min(460px, 100%);
    align-items: center;
    gap: 10px;
    color: var(--fg);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.055em;
}

.rt-auth-brand span span,
.rt-brand span span {
    color: var(--green);
}

.rt-auth-brand em,
.rt-brand em {
    padding-left: 10px;
    border-left: 1px solid var(--line-2);
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 10px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rt-auth-card {
    width: min(460px, 100%);
    padding: clamp(24px, 4vw, 34px);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(17, 25, 35, 0.9), rgba(10, 15, 22, 0.96));
    box-shadow: var(--shadow);
}

.rt-auth-head h1 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 5vw, 2.7rem);
    line-height: 0.96;
    word-spacing: 0.12em;
}

#auth-title:focus {
    outline: none;
}

.rt-auth-head > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.rt-eyebrow {
    margin: 0;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rt-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 24px 0 18px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--bg-2);
}

.rt-auth-tabs button {
    height: 34px;
    border: 0;
    border-radius: 6px;
    color: var(--dim);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.rt-auth-tabs button[aria-selected="true"] {
    color: var(--fg);
    background: var(--panel-2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.rt-auth-form {
    display: grid;
    gap: 13px;
}

.rt-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.rt-field > span,
.rt-field > label,
.rt-field-head label {
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 500;
}

.rt-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rt-field em {
    color: var(--dim);
    font-style: normal;
    font-weight: 400;
}

.rt-password-control {
    position: relative;
}

.rt-field .rt-password-control input {
    padding-right: 58px;
}

.rt-password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    min-width: 46px;
    height: 28px;
    padding: 0 7px;
    border: 0;
    border-radius: 5px;
    color: var(--dim);
    background: transparent;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transform: translateY(-50%);
}

.rt-password-toggle:hover {
    color: var(--green);
    background: rgba(61, 220, 151, 0.08);
}

.rt-password-toggle:focus-visible,
.rt-auth-link:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.rt-auth-link {
    padding: 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.rt-auth-link:hover {
    color: var(--green);
}

.rt-auth-link-center {
    display: block;
    margin: 4px auto 0;
    text-align: center;
}

.rt-strength {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 2px;
    color: var(--dim);
    font-size: 10.5px;
    line-height: 1.4;
}

.rt-strength-bars {
    display: grid;
    flex: none;
    width: 104px;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
}

.rt-strength-bars i {
    height: 3px;
    border-radius: 99px;
    background: var(--line-2);
    transition: background-color 0.18s var(--ease);
}

.rt-strength[data-level="1"] .rt-strength-bars i:nth-child(-n + 1) {
    background: var(--danger);
}

.rt-strength[data-level="2"] .rt-strength-bars i:nth-child(-n + 2) {
    background: var(--amber);
}

.rt-strength[data-level="3"] .rt-strength-bars i:nth-child(-n + 3) {
    background: var(--green);
}

.rt-strength[data-level="4"] .rt-strength-bars i {
    background: var(--green-bright);
}

.rt-auth-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 8px 0 2px;
    text-align: center;
}

.rt-auth-state-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(61, 220, 151, 0.22);
    border-radius: 50%;
    color: var(--green);
    background: rgba(61, 220, 151, 0.08);
}

.rt-auth-state-icon .icon {
    width: 20px;
    height: 20px;
}

.rt-auth-state h2 {
    margin: 2px 0 0;
    font-size: 1.45rem;
    line-height: 1;
}

.rt-auth-state p {
    max-width: 35ch;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.rt-auth-state p strong {
    color: var(--fg);
    overflow-wrap: anywhere;
}

.rt-auth-state .rt-button {
    width: 100%;
    margin-top: 6px;
}

.rt-field input,
.rt-field select,
.rt-field textarea,
.rt-search input,
.rt-device-select,
.rt-select-field select {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line-2);
    border-radius: 7px;
    outline: 0;
    color: var(--fg);
    background: var(--bg-2);
    font: inherit;
    font-size: 13px;
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.rt-field textarea {
    resize: vertical;
    min-height: 92px;
    line-height: 1.5;
}

.rt-field input::placeholder,
.rt-field textarea::placeholder,
.rt-search input::placeholder {
    color: #617083;
}

.rt-field input:focus,
.rt-field select:focus,
.rt-field textarea:focus,
.rt-search input:focus,
.rt-device-select:focus,
.rt-select-field select:focus {
    border-color: rgba(61, 220, 151, 0.6);
    box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.1);
}

.rt-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}

.rt-button:hover {
    transform: translateY(-1px);
}

.rt-button:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

.rt-button .icon {
    width: 15px;
    height: 15px;
}

.rt-button-primary {
    border-color: var(--green);
    color: var(--green-ink);
    background: var(--green);
}

.rt-button-primary:hover {
    border-color: var(--green-bright);
    background: var(--green-bright);
}

.rt-button-quiet {
    border-color: var(--line-2);
    color: var(--fg-soft);
    background: rgba(13, 18, 25, 0.55);
}

.rt-button-quiet:hover {
    border-color: #425367;
    color: var(--fg);
    background: var(--panel);
}

.rt-button-danger {
    border-color: #e56060;
    color: #180505;
    background: #e56060;
}

.rt-button-danger:hover {
    background: #ef7777;
}

.rt-button-small {
    min-height: 31px;
    padding: 0 11px;
    font-size: 11px;
}

.rt-button-wide {
    width: 100%;
    min-height: 42px;
}

.rt-hint,
.rt-auth-foot {
    margin: 0;
    color: var(--dim);
    font-size: 11px;
    line-height: 1.55;
}

.rt-hint[data-tone="error"] {
    color: #ff9c9c;
}

#auth-tabs[hidden] ~ .rt-auth-form,
#auth-tabs[hidden] ~ #forgot-sent,
#reset-panel {
    margin-top: 22px;
}

#reset-panel > .rt-hint {
    margin-bottom: 12px;
}

.rt-auth-message {
    min-height: 18px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.45;
}

.rt-auth-message[data-tone="error"] {
    color: #ff9c9c;
}

.rt-auth-message[data-tone="success"] {
    color: var(--green);
}

.rt-auth-foot {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.rt-auth-back {
    width: min(460px, 100%);
    color: var(--dim);
    font-size: 11.5px;
    text-decoration: none;
}

.rt-auth-back:hover {
    color: var(--fg-soft);
}

.rt-shell {
    min-height: 100vh;
}

.rt-header {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    min-height: 64px;
    align-items: center;
    gap: 18px;
    padding: 0 clamp(16px, 3vw, 32px);
    border-bottom: 1px solid var(--line);
    background: rgba(7, 10, 15, 0.92);
    backdrop-filter: blur(14px);
}

.rt-brand {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 9px;
    color: var(--fg);
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.055em;
    text-decoration: none;
}

.rt-header-device {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.rt-device-select {
    width: auto;
    max-width: 250px;
    min-height: 34px;
    padding: 5px 28px 5px 10px;
    border-color: var(--line);
    background-color: var(--panel);
    font-size: 11.5px;
}

.rt-icon-button {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: none;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    place-items: center;
}

.rt-icon-button:hover {
    border-color: var(--line-2);
    color: var(--fg);
    background: var(--panel);
}

.rt-icon-button .icon {
    width: 16px;
    height: 16px;
}

.rt-header-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.rt-sync-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.rt-sync-state > span:first-child {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--warn);
}

.rt-sync-state[data-state="online"] > span:first-child {
    background: var(--green);
    box-shadow: 0 0 10px rgba(61, 220, 151, 0.6);
}

.rt-sync-state[data-state="error"] > span:first-child {
    background: var(--danger);
}

.rt-account-button {
    max-width: 190px;
    padding: 6px 10px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.rt-account-button:hover {
    border-color: var(--line);
    color: var(--fg);
    background: var(--panel);
}

.rt-layout {
    display: grid;
    width: 100%;
    max-width: 1540px;
    min-height: calc(100vh - 64px);
    margin-inline: auto;
    grid-template-columns: 216px minmax(0, 1fr);
}

.rt-sidebar {
    position: sticky;
    top: 64px;
    display: flex;
    height: calc(100vh - 64px);
    flex-direction: column;
    padding: 20px 14px;
    border-right: 1px solid var(--line);
}

.rt-nav {
    display: grid;
    gap: 3px;
}

.rt-nav button {
    display: flex;
    height: 38px;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.rt-nav button .icon {
    width: 15px;
    height: 15px;
    color: var(--dim);
}

.rt-nav button b {
    margin-left: auto;
    padding: 1px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 500;
}

.rt-nav button:hover {
    color: var(--fg);
    background: rgba(17, 25, 35, 0.55);
}

.rt-nav button[aria-current="page"] {
    color: var(--fg);
    background: var(--panel-2);
}

.rt-nav button[aria-current="page"] .icon {
    color: var(--green);
}

.rt-sidebar-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding: 12px 10px 0;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 9.5px;
}

.rt-sidebar-foot p {
    margin: 0;
    line-height: 1.4;
}

.rt-sidebar-foot span {
    font-family: var(--font-mono);
}

.rt-main {
    min-width: 0;
    padding: 30px clamp(18px, 3.2vw, 44px) 60px;
}

.rt-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.rt-page-head h1 {
    margin: 6px 0 8px;
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    line-height: 0.95;
}

.rt-page-head > div > p:last-child {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.rt-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.rt-stat-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rt-stat {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(17, 25, 35, 0.56), rgba(10, 15, 22, 0.7));
}

.rt-stat-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: none;
    border: 1px solid rgba(61, 220, 151, 0.2);
    border-radius: 8px;
    color: var(--green);
    background: rgba(61, 220, 151, 0.07);
    place-items: center;
}

.rt-stat-icon .icon {
    width: 16px;
    height: 16px;
}

.rt-stat div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.rt-stat span {
    color: var(--dim);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.rt-stat strong {
    overflow: hidden;
    color: var(--fg);
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-overview-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rt-span-2 {
    grid-column: span 2;
}

.rt-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(13, 18, 25, 0.55);
}

.rt-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.rt-card-head h2 {
    margin: 0;
    font-size: 15px;
    letter-spacing: -0.025em;
}

.rt-card-head p {
    margin: 4px 0 0;
    color: var(--dim);
    font-size: 11px;
}

.rt-text-button {
    padding: 3px 0;
    border: 0;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.rt-text-button:hover {
    color: var(--green);
}

.rt-text-danger {
    color: #ff8d8d;
}

.rt-text-danger:hover {
    color: #ffb1b1;
}

.rt-mini-list {
    display: grid;
    gap: 2px;
}

.rt-mini-row {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid rgba(28, 37, 49, 0.65);
    grid-template-columns: minmax(0, 1fr) 100px 82px;
}

.rt-mini-row:first-child {
    border-top: 0;
}

.rt-mini-title {
    min-width: 0;
}

.rt-mini-title strong {
    display: block;
    overflow: hidden;
    color: var(--fg-soft);
    font-size: 12px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-mini-title span {
    display: block;
    margin-top: 4px;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 9.5px;
}

.rt-mini-speed {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-align: right;
    white-space: nowrap;
}

.rt-progress-wrap {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

@media (min-width: 761px) {
    .rt-torrent-table th:nth-child(4),
    .rt-torrent-table td:nth-child(4) {
        width: 150px;
    }
}

.rt-progress {
    width: 100%;
    height: 4px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    appearance: none;
    background: #1b2531;
}

.rt-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #1b2531;
}

.rt-progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--green);
}

.rt-progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--green);
}

.rt-progress-value {
    width: 34px;
    flex: none;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 9.5px;
    text-align: right;
}

.rt-engine-card {
    display: grid;
    gap: 11px;
}

.rt-engine-state {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rt-engine-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--danger);
}

.rt-engine-dot[data-online="true"] {
    background: var(--green);
    box-shadow: 0 0 12px rgba(61, 220, 151, 0.55);
}

.rt-engine-state strong {
    color: var(--fg);
    font-size: 13px;
}

.rt-engine-state span {
    display: block;
    margin-top: 2px;
    color: var(--dim);
    font-size: 10.5px;
}

.rt-meta-grid {
    display: grid;
    gap: 7px;
    grid-template-columns: 1fr 1fr;
}

.rt-meta-grid div {
    padding: 8px 9px;
    border: 1px solid rgba(28, 37, 49, 0.8);
    border-radius: 7px;
    background: rgba(5, 8, 12, 0.28);
}

.rt-meta-grid span {
    display: block;
    color: var(--dim);
    font-size: 9px;
    text-transform: uppercase;
}

.rt-meta-grid strong {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--fg-soft);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-quick-grid {
    display: grid;
    gap: 7px;
    grid-template-columns: 1fr 1fr;
}

.rt-quick-grid .rt-button {
    justify-content: flex-start;
    padding-inline: 10px;
    font-size: 10.5px;
}

.rt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.rt-search {
    display: flex;
    width: min(300px, 100%);
    min-height: 36px;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid var(--line-2);
    border-radius: 7px;
    background: var(--bg-2);
}

.rt-search .icon {
    width: 14px;
    height: 14px;
    color: var(--dim);
}

.rt-search input {
    min-height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
}

.rt-search input:focus {
    box-shadow: none;
}

.rt-select-field select {
    width: auto;
    min-height: 36px;
    padding-right: 28px;
    font-size: 11.5px;
}

.rt-toolbar-spacer {
    flex: 1;
}

.rt-result-count {
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 10px;
}

.rt-bulkbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 9px 12px;
    border: 1px solid rgba(61, 220, 151, 0.24);
    border-radius: 8px;
    background: rgba(61, 220, 151, 0.06);
}

.rt-bulkbar strong {
    color: var(--fg);
    font-size: 11px;
    font-weight: 600;
}

.rt-bulk-clear {
    margin-left: auto;
}

.rt-table-card {
    padding: 0;
    overflow: hidden;
}

.rt-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.rt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.rt-table th {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--dim);
    background: rgba(5, 8, 12, 0.35);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.rt-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(28, 37, 49, 0.56);
    color: var(--fg-muted);
    vertical-align: middle;
}

.rt-table tbody tr:last-child td {
    border-bottom: 0;
}

.rt-table tbody tr:hover {
    background: rgba(17, 25, 35, 0.46);
}

.rt-check-cell {
    width: 34px;
    padding-right: 0 !important;
}

.rt-table input[type="checkbox"],
.rt-check input {
    width: 14px;
    height: 14px;
    accent-color: var(--green);
    cursor: pointer;
}

.rt-torrent-name {
    min-width: 220px;
    max-width: 420px;
}

.rt-torrent-name button {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    color: var(--fg-soft);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.rt-torrent-name button:hover {
    color: var(--green);
}

.rt-torrent-name span {
    display: block;
    margin-top: 3px;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 9px;
}

.rt-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.rt-pill::before {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.rt-pill[data-status="downloading"],
.rt-pill[data-status="seeding"] {
    border-color: rgba(61, 220, 151, 0.25);
    color: var(--green);
    background: rgba(61, 220, 151, 0.06);
}

.rt-pill[data-status="paused"],
.rt-pill[data-status="queued"],
.rt-pill[data-status="metadata"],
.rt-pill[data-status="checking"] {
    border-color: rgba(240, 179, 93, 0.24);
    color: var(--amber);
    background: rgba(240, 179, 93, 0.06);
}

.rt-pill[data-status="error"] {
    border-color: rgba(229, 96, 96, 0.28);
    color: #ff8f8f;
    background: rgba(229, 96, 96, 0.07);
}

.rt-pill[data-status="stopped"] {
    color: var(--dim);
}

.rt-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.rt-row-action {
    display: inline-grid;
    width: 26px;
    height: 26px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--dim);
    background: transparent;
    cursor: pointer;
    place-items: center;
}

.rt-row-action:hover {
    border-color: var(--line);
    color: var(--fg);
    background: var(--panel);
}

.rt-row-action .icon {
    width: 13px;
    height: 13px;
}

.rt-empty {
    display: flex;
    min-height: 280px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    text-align: center;
}

.rt-empty > .icon {
    width: 34px;
    height: 34px;
    margin-bottom: 4px;
    color: var(--dim);
}

.rt-empty h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.03em;
}

.rt-empty p {
    max-width: 360px;
    margin: 0 0 8px;
    color: var(--dim);
    font-size: 11.5px;
    line-height: 1.5;
}

.rt-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 10px;
}

.rt-feed-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rt-feed-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(13, 18, 25, 0.55);
}

.rt-feed-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.rt-feed-card h3 {
    margin: 0;
    overflow: hidden;
    color: var(--fg);
    font-size: 13px;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-feed-card p {
    margin: 3px 0 0;
    overflow: hidden;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 9.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-feed-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--dim);
    font-size: 9.5px;
}

.rt-feed-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 2px;
}

.rt-rss-items {
    display: grid;
    gap: 0;
}

.rt-rss-item {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(28, 37, 49, 0.6);
    grid-template-columns: minmax(0, 1fr) 90px 110px auto;
}

.rt-rss-item:first-child {
    border-top: 0;
}

.rt-rss-title {
    min-width: 0;
}

.rt-rss-title strong {
    display: block;
    overflow: hidden;
    color: var(--fg-soft);
    font-size: 11.5px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-rss-title span {
    display: block;
    margin-top: 3px;
    color: var(--dim);
    font-size: 9.5px;
}

.rt-rss-size,
.rt-rss-date {
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 9.5px;
    white-space: nowrap;
}

.rt-settings-grid {
    display: grid;
    align-items: start;
    gap: 14px;
    margin-bottom: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rt-stack {
    display: grid;
    gap: 11px;
}

.rt-stack h3 {
    margin: 4px 0 0;
    color: var(--fg);
    font-size: 12px;
    letter-spacing: -0.02em;
}

.rt-form-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.rt-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.rt-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.4;
    cursor: pointer;
}

.rt-inline-form {
    display: grid;
    align-items: end;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.rt-info-list {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0;
}

.rt-info-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(28, 37, 49, 0.55);
}

.rt-info-list dt {
    color: var(--dim);
    font-size: 10.5px;
}

.rt-info-list dd {
    margin: 0;
    overflow: hidden;
    color: var(--fg-soft);
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-device-list {
    display: grid;
    gap: 8px;
}

.rt-device-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-2);
}

.rt-device-card[data-active="true"] {
    border-color: rgba(61, 220, 151, 0.3);
}

.rt-device-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.rt-device-icon {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: none;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--dim);
    background: var(--panel);
    place-items: center;
}

.rt-device-icon .icon {
    width: 15px;
    height: 15px;
}

.rt-device-main strong {
    display: block;
    overflow: hidden;
    color: var(--fg);
    font-size: 12px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-device-main span {
    display: block;
    margin-top: 2px;
    color: var(--dim);
    font-size: 9.5px;
}

.rt-device-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    color: var(--dim);
    background: rgba(125, 139, 157, 0.1);
    font-family: var(--font-mono);
    font-size: 9px;
    white-space: nowrap;
}

.rt-device-badge[data-online="true"] {
    color: var(--green);
    background: rgba(61, 220, 151, 0.08);
}

.rt-device-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.rt-dialog {
    width: min(540px, calc(100vw - 28px));
    max-height: min(88vh, 900px);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    color: var(--fg);
    background: var(--panel);
    box-shadow: 0 32px 80px -24px rgba(0, 0, 0, 0.9);
}

.rt-dialog[open] {
    display: flex;
    flex-direction: column;
}

.rt-dialog::backdrop {
    background: rgba(2, 5, 8, 0.72);
    backdrop-filter: blur(3px);
}

.rt-dialog form {
    display: flex;
    min-height: 0;
    max-height: min(88vh, 900px);
    flex-direction: column;
}

.rt-dialog-wide {
    width: min(980px, calc(100vw - 28px));
}

.rt-dialog-small {
    width: min(420px, calc(100vw - 28px));
}

.rt-dialog-head {
    display: flex;
    flex: none;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 12px;
}

.rt-dialog-head h2 {
    margin: 5px 0 0;
    font-size: 20px;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.rt-dialog-body {
    min-height: 0;
    flex: 1 1 auto;
    padding: 4px 20px 20px;
    overflow-y: auto;
}

.rt-dialog-foot {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    background: rgba(5, 8, 12, 0.28);
}

.rt-details-tabs {
    display: flex;
    flex: none;
    gap: 2px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.rt-details-tabs button {
    padding: 9px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--dim);
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.rt-details-tabs button[aria-selected="true"] {
    border-bottom-color: var(--green);
    color: var(--fg);
}

.rt-details-tabs button:hover {
    color: var(--fg-soft);
}

.rt-detail-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 0 14px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--line);
}

.rt-detail-hero .rt-pill {
    margin-right: 8px;
}

.rt-detail-hero p {
    margin: 4px 0 0;
    color: var(--dim);
    font-size: 10px;
}

.rt-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.rt-info-grid {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rt-info-grid div {
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--bg-2);
}

.rt-info-grid span {
    display: block;
    color: var(--dim);
    font-size: 9px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rt-info-grid strong {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--fg-soft);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-detail-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.rt-detail-section h3 {
    margin: 0 0 9px;
    color: var(--fg);
    font-size: 12px;
    letter-spacing: -0.02em;
}

.rt-detail-section .rt-inline-form {
    align-items: end;
}

.rt-detail-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
}

.rt-detail-form .rt-field {
    min-width: 120px;
    flex: 1;
}

.rt-file-table input[type="checkbox"] {
    accent-color: var(--green);
}

.rt-file-table select {
    min-height: 27px;
    padding: 3px 7px;
    border: 1px solid var(--line-2);
    border-radius: 5px;
    color: var(--fg-soft);
    background: var(--bg-2);
    font: inherit;
    font-size: 10px;
}

.rt-file-name {
    max-width: 460px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-tracker-list {
    width: 100%;
    min-height: 150px;
    padding: 9px 10px;
    border: 1px solid var(--line-2);
    border-radius: 7px;
    color: var(--fg-soft);
    background: var(--bg-2);
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 1.6;
    resize: vertical;
}

.rt-empty-small {
    min-height: 120px;
    padding: 20px;
}

.rt-empty-small .icon {
    width: 24px;
    height: 24px;
}

.rt-empty-small h2 {
    font-size: 14px;
}

.rt-toasts {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 200;
    display: flex;
    width: min(360px, calc(100vw - 36px));
    flex-direction: column;
    gap: 7px;
    pointer-events: none;
}

.rt-toast {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 13px;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    color: var(--fg-soft);
    background: rgba(17, 25, 35, 0.97);
    box-shadow: var(--shadow);
    font-size: 11.5px;
    line-height: 1.45;
    pointer-events: auto;
    animation: rt-toast-in 0.2s var(--ease);
}

.rt-toast[data-tone="success"] {
    border-color: rgba(61, 220, 151, 0.3);
}

.rt-toast[data-tone="error"] {
    border-color: rgba(229, 96, 96, 0.4);
}

.rt-toast strong {
    display: block;
    color: var(--fg);
    font-size: 11.5px;
    font-weight: 600;
}

.rt-toast p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 10.5px;
}

@keyframes rt-toast-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.rt-hide-sm,
.rt-hide-md {
    white-space: nowrap;
}

.rt-select-page {
    display: none;
}

@media (max-width: 760px) {
    .rt-select-page {
        display: inline-flex;
    }
}

@media (max-width: 1180px) {
    .rt-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rt-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rt-span-2 {
        grid-column: span 2;
    }

    .rt-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 940px) {
    .rt-header {
        position: static;
        flex-wrap: wrap;
        padding-block: 10px;
    }

    .rt-header-device {
        order: 3;
        width: 100%;
    }

    .rt-device-select {
        max-width: none;
        flex: 1;
    }

    .rt-layout {
        display: block;
    }

    .rt-sidebar {
        position: sticky;
        top: 0;
        z-index: 60;
        height: auto;
        padding: 8px 12px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        background: rgba(7, 10, 15, 0.94);
        backdrop-filter: blur(12px);
    }

    .rt-nav {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .rt-nav::-webkit-scrollbar {
        display: none;
    }

    .rt-nav button {
        flex: none;
        height: 34px;
        padding-inline: 9px;
        white-space: nowrap;
    }

    .rt-sidebar-foot {
        display: none;
    }

    .rt-main {
        padding-top: 22px;
    }
}

@media (max-width: 760px) {
    .rt-brand em {
        display: none;
    }

    .rt-account-button {
        max-width: 120px;
    }

    .rt-sync-state > span:last-child {
        display: none;
    }

    .rt-page-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .rt-page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .rt-stat-grid,
    .rt-overview-grid,
    .rt-feed-grid,
    .rt-settings-grid {
        grid-template-columns: 1fr;
    }

    .rt-span-2 {
        grid-column: span 1;
    }

    .rt-form-grid,
    .rt-info-grid {
        grid-template-columns: 1fr;
    }

    .rt-inline-form {
        grid-template-columns: 1fr;
    }

    .rt-overview-grid .rt-card,
    .rt-card {
        padding: 14px;
    }

    .rt-mini-row {
        grid-template-columns: minmax(0, 1fr) 80px;
    }

    .rt-mini-row .rt-progress-wrap {
        grid-column: 1 / -1;
        order: 3;
    }

    .rt-rss-item {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .rt-rss-size,
    .rt-rss-date {
        display: none;
    }

    .rt-device-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .rt-device-actions {
        width: 100%;
    }

    .rt-table thead {
        display: none;
    }

    .rt-table,
    .rt-table tbody,
    .rt-table tr,
    .rt-table td {
        display: block;
        width: 100%;
    }

    .rt-table tr {
        margin: 8px;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(5, 8, 12, 0.22);
    }

    .rt-table td {
        display: flex;
        min-height: 26px;
        align-items: center;
        gap: 10px;
        padding: 4px 0;
        border: 0;
    }

    .rt-table td::before {
        width: 76px;
        flex: none;
        color: var(--dim);
        content: attr(data-label);
        font-family: var(--font-mono);
        font-size: 8.5px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .rt-table td.rt-check-cell {
        width: 100%;
        padding-right: 0;
    }

    .rt-table td.rt-check-cell::before,
    .rt-table td.rt-actions-cell::before {
        display: none;
    }

    .rt-table .rt-hide-sm,
    .rt-table .rt-hide-md {
        display: flex;
    }

    .rt-torrent-name {
        min-width: 0;
        max-width: none;
    }

    .rt-table td.rt-torrent-name {
        display: grid;
        align-items: center;
        grid-template-columns: 76px minmax(0, 1fr);
        column-gap: 10px;
    }

    .rt-table td.rt-torrent-name::before {
        width: auto;
        align-self: start;
        grid-column: 1;
        grid-row: 1 / span 2;
        padding-top: 2px;
    }

    .rt-torrent-name button,
    .rt-torrent-name > span {
        grid-column: 2;
    }

    .rt-row-actions {
        justify-content: flex-start;
    }

    .rt-bulkbar {
        position: sticky;
        top: 52px;
        z-index: 40;
        background: rgba(13, 18, 25, 0.97);
    }
}

@media (max-width: 600px) {
    .rt-sidebar {
        padding: 5px 8px;
    }

    .rt-nav {
        display: grid;
        overflow: visible;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
    }

    .rt-nav button {
        height: 52px;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 4px 2px;
        font-size: 8.5px;
        text-align: center;
        white-space: nowrap;
    }

    .rt-nav button .icon {
        width: 16px;
        height: 16px;
    }

    .rt-nav button b {
        display: none;
    }
}

@media (max-width: 480px) {
    .rt-main {
        padding-inline: 13px;
    }

    .rt-header {
        gap: 8px;
        padding-inline: 13px;
    }

    .rt-brand span {
        font-size: 15px;
    }

    .rt-account-button {
        display: none;
    }

    .rt-page-actions .rt-button {
        flex: 1;
        min-width: 0;
        padding-inline: 9px;
        font-size: 10.5px;
    }

    .rt-stat {
        padding: 12px;
    }

    .rt-stat strong {
        font-size: 15px;
    }

    .rt-dialog-body,
    .rt-dialog-head,
    .rt-dialog-foot {
        padding-inline: 14px;
    }

    .rt-details-tabs {
        padding-inline: 14px;
    }

    .rt-toasts {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .rt-loading-bar,
    .rt-spinner,
    .rt-toast {
        animation: none;
    }
}
