:root { --ts-accent: #ff9a00; --ts-bg: #1c1f24; --ts-panel: #23272e; }

html, body { background: var(--ts-bg); color: #e8e8e8; font-family: system-ui, sans-serif; touch-action: manipulation; overscroll-behavior: none; }
html { touch-action: pan-x pan-y; }

.ts-auth { max-width: 420px; margin: 8vh auto; text-align: center; }
.ts-logo { color: var(--ts-accent); letter-spacing: 2px; }
.ts-card { background: var(--ts-panel); padding: 24px; border-radius: 10px; margin-top: 16px; }
.ts-input, .ts-input-sm { width: 100%; padding: 10px; margin: 6px 0; border-radius: 6px;
    border: 1px solid #3a3f45; background: #14171b; color: #eee; box-sizing: border-box; }
.ts-input-sm { padding: 6px; font-size: 0.9rem; }
.ts-btn { width: 100%; padding: 10px; margin-top: 10px; border: none; border-radius: 6px;
    background: var(--ts-accent); color: #111; font-weight: 600; cursor: pointer; }
.ts-btn-sm { padding: 6px 12px; border: none; border-radius: 6px; background: var(--ts-accent);
    color: #111; cursor: pointer; margin: 3px; font-size: 0.85rem; }
.ts-link { color: var(--ts-accent); cursor: pointer; margin-top: 10px; }
.ts-msg { color: var(--ts-accent); margin-top: 8px; word-break: break-all; }
.ts-muted { color: #9aa0a6; }

.ts-topbar { display: flex; align-items: center; gap: 18px; padding: 10px 16px;
    background: #14171b; border-bottom: 2px solid var(--ts-accent); flex-wrap: wrap; }
.ts-logo-sm { color: var(--ts-accent); font-weight: 700; letter-spacing: 1px; }
.ts-user { font-weight: 600; }
.ts-key code { color: var(--ts-accent); }

.ts-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 360px;
    gap: 12px;
    padding: 12px;
    height: calc(100vh - 60px);
    box-sizing: border-box;
}

.ts-side,
.ts-main,
.ts-commits {
    background: var(--ts-panel);
    border-radius: 10px;
    padding: 14px;
    overflow-y: auto;
    min-height: 0;
}

.ts-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ts-item {
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    word-break: break-word;
}

.ts-item:hover {
    background: rgba(255, 154, 0, 0.15);
}

.ts-item.active {
    background: var(--ts-accent);
    color: #111;
}

.ts-admin-box {
    background: #14171b;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ts-files {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ts-file-btn {
    background: #14171b;
    border: 1px solid #2c2f34;
    color: #dcdcdc;
    text-align: left;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: monospace;
}

.ts-file-btn:hover {
    background: rgba(255, 154, 0, 0.12);
}

.ts-code {
    width: 100%;
    background: #14171b;
    color: #dcdcdc;
    border: 1px solid #3a3f45;
    border-radius: 6px;
    font-family: monospace;
    padding: 8px;
    box-sizing: border-box;
}

.ts-branch-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ts-commit {
    padding: 9px;
    border-radius: 8px;
    cursor: pointer;
    border-bottom: 1px solid #2c2f34;
}

.ts-commit:hover {
    background: rgba(255, 154, 0, 0.12);
}

.ts-commit.active {
    background: rgba(255, 154, 0, 0.22);
}

.ts-commit-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.ts-commit-preview {
    display: block;
    width: 100%;
    background: #14171b;
    border: 1px solid #2c2f34;
    color: #e8e8e8;
    text-align: left;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 6px;
}

.ts-change-section,
.ts-section-collapse {
    background: #14171b;
    border: 1px solid #2c2f34;
    border-radius: 8px;
    padding: 8px;
    margin: 8px 0;
}

.ts-change-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
}

.ts-change-row:hover,
.ts-change-row.selected {
    background: rgba(255, 154, 0, 0.14);
}

.ts-change-type {
    min-width: 55px;
    color: var(--ts-accent);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.ts-change-path {
    word-break: break-all;
    font-family: monospace;
}

.ts-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.ts-modal {
    background: #23272e;
    border: 1px solid #3a3f45;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 18px;
}

.ts-modal-wide {
    max-width: 760px;
}

.ts-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ts-modal-header h3 {
    margin: 0;
}

.ts-x {
    background: none;
    border: none;
    color: #9aa0a6;
    font-size: 1.8rem;
    cursor: pointer;
}

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

.ts-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.ts-folder-row,
.ts-preview-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ts-folder-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow-y: auto;
    background: #14171b;
    border: 1px solid #2c2f34;
    border-radius: 8px;
    padding: 8px;
}

.ts-folder-item {
    background: #14171b;
    border: none;
    color: #e8e8e8;
    text-align: left;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.ts-folder-item:hover {
    background: rgba(255, 154, 0, 0.15);
}

.ts-preview-file {
    font-family: monospace;
    word-break: break-all;
    color: #dcdcdc;
}

.ts-link-btn {
    background: none;
    border: none;
    color: var(--ts-accent);
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
}

.ts-context-menu {
    position: fixed;
    top: 84px;
    right: 16px;
    z-index: 1200;
    width: 320px;
    background: #23272e;
    border: 1px solid var(--ts-accent);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.ts-context-menu-title {
    color: var(--ts-accent);
    font-weight: 700;
    margin-bottom: 8px;
    word-break: break-all;
}

.ts-context-item {
    display: block;
    width: 100%;
    background: #14171b;
    border: 1px solid #2c2f34;
    color: #e8e8e8;
    padding: 9px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 6px;
    text-align: left;
}

.ts-context-item:hover {
    background: rgba(255, 154, 0, 0.15);
}

.ts-context-danger {
    border-color: #dc3545;
    color: #ff6b6b;
}

/* Mobile */
@media (max-width: 900px) {
    .ts-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: calc(100vh - 60px);
        overflow: visible;
    }

    .ts-side,
    .ts-main,
    .ts-commits {
        overflow: visible;
    }

    .ts-topbar {
        gap: 10px;
    }

    .ts-modal {
        padding: 14px;
        max-height: 96vh;
    }

    .ts-folder-row,
    .ts-preview-row {
        flex-direction: column;
    }

    .ts-change-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .ts-context-menu {
        top: auto;
        bottom: 16px;
        right: 16px;
        width: calc(100vw - 32px);
        max-width: 420px;
    }
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.ts-admin-btn {
    background: #6c5ce7 !important;
    color: #fff !important;
}

.ts-admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
    overflow-y: auto;
}

.ts-admin-panel {
    background: #23272e;
    border: 1px solid #3a3f45;
    border-radius: 14px;
    width: 100%;
    max-width: 960px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 22px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
}

.ts-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ts-admin-header h3 {
    margin: 0;
    color: #ff9a00;
}

.ts-admin-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    border-bottom: 2px solid #3a3f45;
    padding-bottom: 8px;
    flex-wrap: wrap;
}

.ts-admin-tab {
    background: none;
    border: none;
    color: #9aa0a6;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-size: 0.95rem;
}

.ts-admin-tab:hover {
    color: #ff9a00;
    background: rgba(255, 154, 0, 0.08);
}

.ts-admin-tab.active {
    color: #111;
    background: #ff9a00;
    font-weight: 600;
}

.ts-admin-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Admin table */
.ts-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ts-admin-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid #3a3f45;
    color: #ff9a00;
    font-weight: 600;
    white-space: nowrap;
}

.ts-admin-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #2c2f34;
    vertical-align: middle;
}

.ts-admin-table tr:hover {
    background: rgba(255, 154, 0, 0.05);
}

.ts-row-active {
    background: rgba(255, 154, 0, 0.12) !important;
}

.ts-admin-table code {
    color: #ff9a00;
    background: #14171b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Small buttons for table rows */
.ts-btn-xs {
    padding: 3px 8px;
    font-size: 0.78rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #ff9a00;
    color: #111;
    margin-right: 4px;
}

.ts-btn-danger-xs {
    background: #dc3545;
    color: #fff;
}

.ts-btn-secondary-sm {
    background: #495057;
    color: #eee;
}

/* ============================================================
   PERMISSION EDITOR
   ============================================================ */
.ts-perm-editor {
    background: #1a1d22;
    border: 1px solid #3a3f45;
    border-radius: 10px;
    padding: 18px;
    margin-top: 8px;
}

.ts-perm-editor h4 {
    margin-top: 0;
    margin-bottom: 14px;
    color: #e8e8e8;
}

.ts-perm-preset-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ts-perm-preset-row label {
    color: #9aa0a6;
    font-weight: 600;
    white-space: nowrap;
}

.ts-perm-select {
    min-width: 200px;
}

.ts-perm-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px 16px;
    margin: 14px 0;
    padding: 14px;
    background: #14171b;
    border-radius: 8px;
    border: 1px solid #2c2f34;
}

.ts-perm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
    color: #dcdcdc;
    font-size: 0.9rem;
}

.ts-perm-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff9a00;
    cursor: pointer;
}

.ts-perm-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ============================================================
   API KEY MANAGEMENT
   ============================================================ */
.ts-apikey-create {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px;
    background: #14171b;
    border-radius: 8px;
    border: 1px solid #2c2f34;
}

.ts-apikey-create label {
    color: #9aa0a6;
    font-weight: 600;
    white-space: nowrap;
}

.ts-apikey-create .ts-input-sm {
    max-width: 220px;
}

.ts-key-display {
    background: #1a2e1a;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 14px;
}

.ts-key-display p {
    margin: 0 0 8px 0;
    color: #28a745;
}

.ts-key-display code {
    display: block;
    font-size: 1.05rem;
    color: #7bed7f;
    background: #0d1f0d;
    padding: 10px;
    border-radius: 6px;
    word-break: break-all;
    user-select: all;
}

/* ============================================================
   ADMIN PANEL RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .ts-admin-overlay {
        padding: 8px;
    }

    .ts-admin-panel {
        padding: 14px;
        max-height: 96vh;
    }

    .ts-admin-tabs {
        gap: 2px;
    }

    .ts-admin-tab {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .ts-perm-checkboxes {
        grid-template-columns: 1fr;
    }

    .ts-apikey-create {
        flex-direction: column;
        align-items: stretch;
    }

    .ts-apikey-create .ts-input-sm {
        max-width: 100%;
    }

    .ts-admin-table {
        font-size: 0.8rem;
    }

    .ts-admin-table th,
    .ts-admin-table td {
        padding: 5px 6px;
    }
}

/* ============================================================
   ACCOUNT PANEL
   ============================================================ */
.ts-account-btn {
    background: #0984e3 !important;
    color: #fff !important;
}

.ts-account-panel {
    max-width: 640px;
}

.ts-account-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    border-bottom: 2px solid #3a3f45;
    padding-bottom: 8px;
    flex-wrap: wrap;
}

.ts-account-tab {
    background: none;
    border: none;
    color: #9aa0a6;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-size: 0.95rem;
}

.ts-account-tab:hover {
    color: #ff9a00;
    background: rgba(255, 154, 0, 0.08);
}

.ts-account-tab.active {
    color: #111;
    background: #ff9a00;
    font-weight: 600;
}

.ts-account-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ts-form-label {
    color: #9aa0a6;
    font-weight: 600;
    margin-top: 8px;
}

.ts-form-note {
    color: #9aa0a6;
    font-size: 0.85rem;
    margin: 4px 0;
}

.ts-success {
    color: #28a745;
}

.ts-btn-danger {
    background: #dc3545;
    color: #fff;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.ts-secret-box {
    background: #14171b;
    border: 1px solid #2c2f34;
    border-radius: 8px;
    padding: 10px;
}

.ts-secret-box code {
    display: block;
    word-break: break-all;
    color: #ff9a00;
    background: transparent;
    padding: 0;
    user-select: all;
}

.ts-otpauth {
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .ts-account-panel {
        max-width: 100%;
    }

    .ts-account-tabs {
        gap: 2px;
    }

    .ts-account-tab {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

/* ============================================================
   TASK MANAGEMENT & PRIORITY SIDEBAR
   ============================================================ */
.ts-view-switch {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    background: #14171b;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #2c2f34;
}

.ts-view-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #9aa0a6;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.ts-view-btn:hover {
    color: #fff;
    background: rgba(255, 154, 0, 0.1);
}

.ts-view-btn.active {
    background: var(--ts-accent);
    color: #111;
}

.ts-task-filterbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    background: #14171b;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #2c2f34;
    margin-bottom: 12px;
}

.ts-task-filterbar input[type="text"] {
    flex: 1;
    min-width: 180px;
    margin: 0;
}

.ts-filter-check {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e8e8e8;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.9rem;
}

.ts-filter-check input {
    accent-color: var(--ts-accent);
}

.ts-task-groups-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ts-task-group-card {
    background: #14171b;
    border: 1px solid #2c2f34;
    border-radius: 8px;
    padding: 12px;
}

.ts-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2c2f34;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.ts-group-title {
    font-weight: 700;
    color: var(--ts-accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-task-items-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ts-task-card {
    background: #23272e;
    border: 1px solid #3a3f45;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s ease;
}

.ts-task-card:hover {
    border-color: var(--ts-accent);
}

.ts-task-card.is-locked {
    border-left: 4px solid #e74c3c;
}

.ts-task-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.ts-task-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.ts-task-desc {
    font-size: 0.88rem;
    color: #a0a6ad;
    white-space: pre-wrap;
}

.ts-task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ts-tag-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    color: #fff;
    background: #444;
    font-weight: 600;
}

.ts-task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    border-top: 1px solid #2c2f34;
    padding-top: 8px;
    margin-top: 4px;
}

.ts-task-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9aa0a6;
}

.ts-lock-badge {
    background: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ts-lock-badge.active-user {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border-color: #2ecc71;
}

/* Right-side Priority Sidebar Stack */
.ts-priority-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.ts-priority-item {
    background: #14171b;
    border: 1px solid #3a3f45;
    border-radius: 6px;
    padding: 10px;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}

.ts-priority-item:active {
    cursor: grabbing;
}

.ts-priority-item:hover {
    border-color: var(--ts-accent);
    background: #191e24;
}

.ts-priority-item.drag-over {
    border-top: 3px solid var(--ts-accent);
    transform: translateY(2px);
}

.ts-priority-item.is-top {
    border-color: var(--ts-accent);
    background: rgba(255, 154, 0, 0.08);
}

.ts-priority-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ts-accent);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ts-priority-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e8e8e8;
    margin-bottom: 4px;
}

.ts-urgency-info {
    background: #14171b;
    border: 1px solid #2c2f34;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.85rem;
    color: #a0a6ad;
    line-height: 1.4;
    margin-top: -4px;
    margin-bottom: 6px;
}

.ts-tag-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.ts-tag-toggle {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid transparent;
    color: #e8e8e8;
    background: #14171b;
}

.ts-tag-toggle.selected {
    border-color: #fff;
    font-weight: 700;
}

/* ============================================================
   TASK COMPLETION PROGRESS
   ============================================================ */
.ts-task-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-task-progress-bar {
    flex: 1;
    height: 8px;
    background: #14171b;
    border: 1px solid #2c2f34;
    border-radius: 6px;
    overflow: hidden;
}

.ts-task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 6px;
    transition: width 0.25s ease;
}

.ts-task-progress-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #2ecc71;
    min-width: 38px;
    text-align: right;
}

.ts-task-card.is-completed {
    border-color: #2ecc71;
    opacity: 0.85;
}

.ts-completed-badge {
    color: #2ecc71;
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 4px;
}

.ts-btn-complete-xs {
    background: #2ecc71;
    color: #111;
}

/* ============================================================
   START WORKING / TASK BRANCH MODAL
   ============================================================ */
.ts-modal input[readonly] {
    color: var(--ts-accent);
    font-family: monospace;
    background: #14171b;
}

/* ============================================================
   FOLDER BROWSER MODAL (checkout file picker)
   ============================================================ */
.ts-browser-overlay {
    z-index: 1100;
}

.ts-browser-modal {
    max-width: 640px;
}

.ts-browser-pathbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ts-browser-path {
    flex: 1;
    min-width: 200px;
    background: #14171b;
    border: 1px solid #2c2f34;
    border-radius: 6px;
    padding: 8px 10px;
    color: var(--ts-accent);
    font-size: 0.85rem;
    word-break: break-all;
}

.ts-browser-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 320px;
    min-height: 120px;
    overflow-y: auto;
    background: #14171b;
    border: 1px solid #2c2f34;
    border-radius: 8px;
    padding: 8px;
}

.ts-browser-newrow {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ts-browser-newrow .ts-input {
    flex: 1;
    min-width: 160px;
    margin: 0;
}

@media (max-width: 900px) {
    .ts-browser-pathbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ts-browser-newrow {
        flex-direction: column;
    }
}

/* ============================================================
   BRANCH DEPRECATION
   ============================================================ */
.ts-branch-deprecated {
    color: #8a8f96;
    opacity: 0.65;
}

.ts-branch-deprecated:hover {
    background: rgba(140, 140, 140, 0.12);
}

.ts-branch-deprecated.active {
    background: #4a4f55;
    color: #c8c8c8;
}

.ts-deprecated-icon {
    color: #e74c3c;
    font-weight: 700;
    margin-left: 4px;
}

.ts-branch-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 154, 0, 0.15);
    color: var(--ts-accent);
    border: 1px solid var(--ts-accent);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-right: 6px;
    word-break: break-all;
}

.ts-branch-badge.deprecated {
    background: rgba(120, 120, 120, 0.15);
    color: #8a8f96;
    border-color: #6a6f75;
}

.ts-branch-exists-info,
.ts-branch-exists-info.deprecated {
    background: #14171b;
    border: 1px solid #2c2f34;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.ts-branch-exists-info.deprecated {
    border-color: #e74c3c;
    opacity: 0.75;
}

.ts-branch-name {
    font-family: monospace;
    color: var(--ts-accent);
    word-break: break-all;
}

.ts-branch-exists-info.deprecated .ts-branch-name {
    color: #8a8f96;
    text-decoration: line-through;
}

.ts-btn-danger-sm {
    background: #dc3545;
    color: #fff;
}
