/* ── RESET ──────────────────────────────────────────────── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f3;
    color: #1a1a1a;
    font-size: 14px;
}

/* ── LOGIN ──────────────────────────────────────────────── */
#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image: url('../img/background.webp');
    background-size: cover;
    background-position: center;
}
.lcard {
    backdrop-filter: blur(5px);
    background: rgba(255,255,255,0.6);
    border: 0.5px solid #e0ddd6;
    border-radius: 12px;
    padding: 32px;
    width: 380px;
    box-shadow: 0 2px 12px 4px rgba(255, 255, 255, 0.6);
}
.lcard h1 {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 4px;
}
.lcard p {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}
.lcard label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    margin-top: 14px;
}
.lcard input {
    width: 100%;
    border: 0.5px solid #ccc;
    border-radius: 7px;
    padding: 9px 12px!important;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.15s;
}
.lcard input:focus {
    outline: none;
    border-color: #888;
}
.lcard .field-wrap input {
    padding-right: 42px;
}
.lcard button.sign-in-btn {
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    border-radius: 7px;
    border: none;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: opacity 0.15s;
}
.lcard button.sign-in-btn:hover {
    opacity: 0.85;
}
.lerr {
    color: #c0392b;
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

/* ── FIELD WRAP (eye icon inside input) ─────────────────── */
.field-wrap {
    position: relative;
}
.field-wrap input {
    width: 100%;
    padding-right: 42px;
}
.field-wrap .eye-btn {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}
.field-wrap .eye-btn:hover {
    color: #555;
}
.field-wrap .eye-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
}

/* ── APP LAYOUT ─────────────────────────────────────────── */
#app-screen {
    display: none;
}
.app {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-right: 0.5px solid #e8e6e0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.logo {
    padding: 14px 15px;
    border-bottom: 0.5px solid #e8e6e0;
    font-size: 15px;
    font-weight: 600;
}
.logo small {
    display: block;
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
    margin-top: 1px;
}
.nav {
    padding: 10px 7px;
    flex: 1;
}
.ni {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    color: #666;
    margin-bottom: 2px;
    user-select: none;
    transition: background 0.1s;
}
.ni:hover {
    background: #f5f5f3;
    color: #1a1a1a;
}
.ni.active {
    background: #f0ede8;
    color: #1a1a1a;
    font-weight: 500;
}
.ni-count {
    margin-left: auto;
    background: #eee;
    color: #555;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 8px;
}
.ni-count.warn {
    background: #fcebeb;
    color: #a32d2d;
}
.role-box {
    padding: 10px;
    border-top: 0.5px solid #e8e6e0;
}
.role-box label {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 3px;
}
.role-box select {
    width: 100%;
    font-size: 12px;
    border: 0.5px solid #ddd;
    border-radius: 6px;
    padding: 4px 7px;
    background: #fff;
    font-family: inherit;
    color: #1a1a1a;
}
#ed-wrap {
    margin-top: 6px;
    display: none;
}

/* ── MAIN ───────────────────────────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar {
    background: #fff;
    border-bottom: 0.5px solid #e8e6e0;
    padding: 9px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 10;
}
.tl {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.pt {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* ── FORM ELEMENTS ──────────────────────────────────────── */
input[type="text"],
input[type="date"],
input[type="password"],
input[type="search"],
select.f {
    border: 0.5px solid #ddd;
    border-radius: 7px;
    padding: 5px 9px;
    font-size: 13px;
    background: #fff;
    color: #1a1a1a;
    font-family: inherit;
}
input:focus,
select:focus {
    outline: none;
    border-color: #999;
}
textarea {
    border: 0.5px solid #ddd;
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 13px;
    background: #fff;
    color: #1a1a1a;
    font-family: inherit;
    resize: vertical;
    min-height: 54px;
    width: 100%;
}
textarea:focus {
    outline: none;
    border-color: #999;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
    padding: 5px 12px;
    border-radius: 7px;
    border: 0.5px solid #ddd;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: #1a1a1a;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.1s;
}
.btn:hover {
    background: #e9e9e9;
}
.btn-p {
    background: #1a1a1a;
    color: #fff;
    border-color: transparent;
}
.btn-p:hover {
    color: #1a1a1a;
    border-color: #1a1a1a;
    opacity: 0.82;
}
.btn-sm {
    padding: 2px 8px;
    font-size: 12px;
}
.btn-warn {
    border-color: #e2c97a;
    color: #854f0b;
}
.btn-warn:hover {
    background: #faeeda;
}
.btn-restore {
    border-color: #c0dd97;
    color: #3b6d11;
}
.btn-restore:hover {
    background: #eaf3de;
}
.btn-info {
    border-color: #b5d4f4;
    color: #185fa5;
}
.btn-info:hover {
    background: #e6f1fb;
}
.active-filter {
    background: #185fa5;
    color: #fff;
    border-color: #185fa5;
}

/* ── CONTENT ────────────────────────────────────────────── */
.content {
    padding: 14px 18px;
}
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    margin-bottom: 14px;
}
.sc {
    background: #f5f5f3;
    border-radius: 7px;
    padding: 11px 13px;
}
.sc-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
}
.sc-val {
    font-size: 21px;
    font-weight: 500;
}

/* ── SECTION / TABLE ────────────────────────────────────── */
.section {
    background: #fff;
    border: 0.5px solid #e8e6e0;
    border-radius: 11px;
    overflow: hidden;
    margin-bottom: 14px;
}
.sec-hdr {
    padding: 10px 15px;
    border-bottom: 0.5px solid #e8e6e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sec-title {
    font-size: 13px;
    font-weight: 500;
}
.tw {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}
th {
    font-size: 11px;
    color: #888;
    text-align: left;
    padding: 8px 13px;
    font-weight: 500;
    border-bottom: 0.5px solid #e8e6e0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
th:hover {
    color: #1a1a1a;
}
th.sorted {
    color: #1a1a1a;
}
td {
    font-size: 12px;
    padding: 8px 13px;
    border-bottom: 0.5px solid #f0ede8;
    color: #1a1a1a;
    vertical-align: middle;
}
tr:last-child td {
    border-bottom: none;
}
tr:hover td {
    background: #fafaf8;
}
.empty-row td {
    text-align: center;
    padding: 28px;
    color: #bbb;
    font-size: 14px;
}

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.b-green {
    background: #eaf3de;
    color: #3b6d11;
}
.b-amber {
    background: #faeeda;
    color: #854f0b;
}
.b-red {
    background: #fcebeb;
    color: #a32d2d;
}
.b-blue {
    background: #e6f1fb;
    color: #185fa5;
}
.b-purple {
    background: #eeedfe;
    color: #3c3489;
}
.b-gray {
    background: #f1efe8;
    color: #5f5e5a;
}
.b-teal {
    background: #e1f5ee;
    color: #085041;
}
.b-red {
    background: #fde8e8;
    color: #c0392b;
}
.b-coral {
    background: #faece7;
    color: #712b13;
}
.b-pink {
    background: #fbeaf0;
    color: #72243e;
}

/* ── CREDENTIALS / COPY ─────────────────────────────────── */
.copyable {
    cursor: pointer;
    border-bottom: 1px dashed #ccc;
    font-family: monospace;
    font-size: 11px;
    user-select: none;
}
.copyable:hover {
    color: #185fa5;
    border-color: #185fa5;
}
.pw-dots {
    cursor: pointer;
    letter-spacing: 2px;
    color: #bbb;
    font-size: 14px;
    user-select: none;
}
.pw-dots:hover {
    color: #333;
}
.pw-rev {
    cursor: pointer;
    font-family: monospace;
    font-size: 11px;
    border-bottom: 1px dashed #ccc;
    user-select: none;
}
.pw-rev:hover {
    color: #185fa5;
}
.eye {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    font-size: 12px;
    padding: 0 2px;
    line-height: 1;
    vertical-align: middle;
}
.eye:hover {
    color: #333;
}
.cred-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cred-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cred-lbl {
    font-size: 10px;
    color: #bbb;
    width: 16px;
    flex-shrink: 0;
}
.dash {
    color: #ccc;
}

/* ── TOAST ──────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 9999;
    white-space: nowrap;
}
.toast.on {
    opacity: 1;
}
.toast.toast-success {
    background: #1e7e34;
}
.toast.toast-error {
    background: #c0392b;
}

/* ── REDIRECT BADGE ─────────────────────────────────────── */
.rd-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 500;
    border: 1px solid transparent;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    cursor: default;
}
.rd-active   { background: #d4edda; color: #1e7e34; border-color: #b8dfc4; }
.rd-inactive { background: #fde8e8; color: #c0392b; border-color: #f5c6c6; }
.rd-error    { background: #fef3e2; color: #c87d0e; border-color: #f5e0b0; }
.rd-none     { background: #f0ede8; color: #888;    border-color: #e0ddd6; }

/* ── LOCK BAR ───────────────────────────────────────────── */
.lock-bar {
    background: #e6f1fb;
    border-bottom: 0.5px solid #b5d4f4;
    padding: 6px 16px;
    font-size: 12px;
    color: #185fa5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lock-bar button {
    padding: 5px 12px;
    border-radius: 6px;
    border: 0.5px solid #185fa5;
    background: transparent;
    font-size: 12px;
    color: #185fa5;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.lock-bar button:hover {
    background: #d0e8f8;
}

/* ── MODALS ─────────────────────────────────────────────── */
.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 100;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 10px;
    overflow-y: auto;
}
.modal-bg.open {
    display: flex;
}
.modal {
    background: #fff;
    border-radius: 11px;
    border: 0.5px solid #e0ddd6;
    padding: 20px;
    width: 560px;
    max-width: 100%;
    margin-bottom: 30px;
}
.modal h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 13px;
}
.fg {
    margin-bottom: 10px;
}
.fg label {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 3px;
}
.fg input,
.fg select {
    width: 100%;
    border: 0.5px solid #ddd;
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 13px;
    background: #fff;
    color: #1a1a1a;
    font-family: inherit;
}
.fg input:focus,
.fg select:focus {
    outline: none;
    border-color: #999;
}
.fg .field-wrap input {
    padding-right: 42px;
}
.frow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}
.mf {
    display: flex;
    gap: 7px;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 11px;
    border-top: 0.5px solid #eee;
}
.sub-hdr {
    font-size: 11px;
    font-weight: 500;
    color: #aaa;
    padding: 7px 0 5px;
    border-top: 0.5px solid #eee;
    margin-top: 6px;
}

/* ── SETTINGS ───────────────────────────────────────────── */
.srv-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}
.srv-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 0.5px solid #ddd;
    border-radius: 7px;
    font-size: 12px;
    background: #fff;
}
.arch-note {
    background: #faeeda;
    border-bottom: 0.5px solid #e8e6e0;
    padding: 6px 14px;
    font-size: 11px;
    color: #854f0b;
}
.chk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    margin: 6px 0 10px;
}
.chk-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 3px 0;
    cursor: pointer;
}
.chk-row input[type="checkbox"] {
    width: 13px;
    height: 13px;
    cursor: pointer;
    flex-shrink: 0;
}
.chk-row select {
    font-size: 11px;
    padding: 1px 4px;
    height: 22px;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    background: #fff;
    font-family: inherit;
}
.ed-card {
    background: #f8f8f6;
    border-radius: 7px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.ic-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 12px;
    font-family: inherit;
}
.ic-btn:hover {
    color: #1a1a1a;
    background: #eee;
}
.acc-row {
    display: flex;
    gap: 8px;
    margin: 8px 0;
}
.acc-opt {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 0.5px solid #ddd;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
}
.acc-opt:hover {
    background: #f5f5f3;
}
.acc-opt.sel {
    border-color: #1a1a1a;
    background: #f0ede8;
    font-weight: 500;
}
.acc-opt input[type="radio"] {
    width: 12px;
    height: 12px;
}

.ni {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #666;
    margin-bottom: 3px;
    user-select: none;
    transition: all 0.15s;
    border: 1px solid transparent;
}
.ni:hover {
    background: #f5f5f3;
    color: #1a1a1a;
    border-color: #e8e6e0;
}
.ni.active {
    font-weight: 500;
    border-color: transparent;
}
.ni-count {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
}
.ni-count.warn {
    background: #fcebeb;
    color: #a32d2d;
}

/* Colored active tabs */
.ni[data-v="domains"].active {
    background: #e6f1fb;
    color: #185fa5;
    border-color: #b5d4f4;
}
.ni[data-v="domains"].active .ni-count {
    background: #185fa5;
    color: #fff;
}
.ni[data-v="wordpress"].active {
    background: #eeedfe;
    color: #3c3489;
    border-color: #afa9ec;
}
.ni[data-v="wordpress"].active .ni-count {
    background: #3c3489;
    color: #fff;
}
.ni[data-v="webmail"].active {
    background: #e1f5ee;
    color: #085041;
    border-color: #9fe1cb;
}
.ni[data-v="webmail"].active .ni-count {
    background: #085041;
    color: #fff;
}
.ni[data-v="cloudflare"].active {
    background: #faeeda;
    color: #854f0b;
    border-color: #fac775;
}
.ni[data-v="cloudflare"].active .ni-count {
    background: #854f0b;
    color: #fff;
}
.ni[data-v="livechat"].active {
    background: #fbeaf0;
    color: #72243e;
    border-color: #f4c0d1;
}
.ni[data-v="livechat"].active .ni-count {
    background: #72243e;
    color: #fff;
}
.ni[data-v="expiring"].active {
    background: #fcebeb;
    color: #a32d2d;
    border-color: #f7c1c1;
}
.ni[data-v="expiring"].active .ni-count {
    background: #a32d2d;
    color: #fff;
}
.ni[data-v="archive"].active {
    background: #faece7;
    color: #712b13;
    border-color: #f5c4b3;
}
.ni[data-v="archive"].active .ni-count {
    background: #712b13;
    color: #fff;
}
.ni[data-v="settings"].active {
    background: #f1efe8;
    color: #5f5e5a;
    border-color: #d3d1c7;
}
.ni[data-v="server"].active {
    background: #e1f5ee;
    color: #085041;
    border-color: #9fe1cb;
}
.ni[data-v="server"].active .ni-count {
    background: #085041;
    color: #fff;
}

/* Colored icons per tab */
.ni[data-v="domains"] svg {
    color: #378add;
}
.ni[data-v="wordpress"] svg {
    color: #7f77dd;
}
.ni[data-v="webmail"] svg {
    color: #1d9e75;
}
.ni[data-v="cloudflare"] svg {
    color: #ba7517;
}
.ni[data-v="livechat"] svg {
    color: #d4537e;
}
.ni[data-v="expiring"] svg {
    color: #e24b4a;
}
.ni[data-v="archive"] svg {
    color: #d85a30;
}
.ni[data-v="settings"] svg {
    color: #888780;
}
.ni[data-v="server"] svg {
    color: #1d9e75;
}

/* ── SERVER ACCORDION ───────────────────────────────────────── */
.srv-acc-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    cursor: pointer;
    user-select: none;
    border-bottom: 0.5px solid #e8e6e0;
    transition: background 0.1s;
}
.srv-acc-hdr:hover {
    background: #fafaf8;
}
.srv-acc-arr {
    font-size: 10px;
    color: #aaa;
    width: 12px;
    flex-shrink: 0;
}

/* ── GEN BUTTON ─────────────────────────────────────────────── */
.gen-wrap {
    display: flex;
    gap: 5px;
    align-items: center;
}
.gen-wrap input {
    flex: 1;
}
.gen-btn {
    padding: 4px 9px;
    border-radius: 6px;
    border: 0.5px solid #9fe1cb;
    background: #e1f5ee;
    font-size: 11px;
    color: #085041;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.1s;
}
.gen-btn:hover {
    background: #c5eddf;
}

/* ── PAGINATION ─────────────────────────────────────────────── */
.pag-bar { padding: 8px 0 4px; display: flex; justify-content: center; }
.pag { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pag-btn {
    padding: 4px 10px; border-radius: 6px; border: 1px solid #ddd;
    background: #fff; font-size: 12px; cursor: pointer; font-family: inherit;
    color: #444; transition: background 0.1s;
}
.pag-btn:hover:not(:disabled) { background: #f0f4ff; border-color: #aac; }
.pag-btn.active { background: #185fa5; color: #fff; border-color: #185fa5; font-weight: 600; }
.pag-btn:disabled { opacity: .35; cursor: default; }
.pag-dot { font-size: 12px; color: #aaa; padding: 0 2px; }

/* ── EXTRA WP ACCOUNTS ──────────────────────────────────────── */
.wp-extra-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}
.wp-extra-row input,
.wp-extra-row select {
    padding: 5px 8px;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
    height: 32px;
}
tr.wp-extra-sub td {
    background: #f5f7ff;
    border-top: none;
    border-bottom: 1px dashed #e8eaf0;
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 11px;
}
tr.wp-extra-sub:last-of-type td {
    border-bottom: none;
}
.clr-btn {
    padding: 3px 9px;
    border-radius: 6px;
    border: 0.5px solid #ddd;
    background: #f5f5f3;
    font-size: 11px;
    color: #888;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.1s, color 0.1s;
}
.clr-btn:hover {
    background: #ffe8e8;
    border-color: #f5b7b1;
    color: #c0392b;
}

/* ── WORDPRESS TABLE ───────────────────────────────────────── */
#wp-tbody tr td {
    vertical-align: middle;
    padding: 8px 10px;
}
#wp-thead th {
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}
#wp-tbody tr:hover td {
    background-color: inherit;
    filter: brightness(0.97);
}
#wp-tbody tr:hover td[style*="background:#f7fbff"] { background: #eaf3ff !important; }
#wp-tbody tr:hover td[style*="background:#faf7ff"] { background: #f3eeff !important; }
.wp-extra-sub td { background: #fafafa !important; }

/* ── SUB-TABS ──────────────────────────────────────────────── */
.sub-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}
.sub-tab {
    background: #f1f0ea;
    color: #666;
    border-radius: 20px;
    padding: 4px 14px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}
.sub-tab:hover {
    background: #e4e2da;
}
.sub-tab.active {
    background: #185fa5;
    color: #fff;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
.filter-toggle {
    display: none;
    background: #f5f5f3;
    border: 0.5px solid #ddd;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .sidebar {
        width: 160px;
    }
}

@media (max-width: 700px) {
    .app {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        overflow-y: visible;
    }
    .nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 6px;
    }
    .ni {
        border-radius: 16px;
        padding: 4px 10px;
    }
    .role-box {
        display: none;
    }
    .topbar {
        position: static;
    }
    .filter-toggle {
        display: inline-block;
    }
    .tl.collapsed {
        display: none;
    }
    .content {
        padding: 10px;
    }
}