:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --panel: #ffffff;
    --line: #d9dee7;
    --text: #17202a;
    --muted: #687385;
    --primary: #0b6bcb;
    --primary-dark: #084f96;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --success: #0f7b4f;
    --success-bg: #edfdf5;
    --warning: #8a5a00;
    --shadow: 0 12px 28px rgba(22, 31, 43, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

.app-frame {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.app-frame.sidebar-collapsed {
    grid-template-columns: 78px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid var(--line);
    transition: width 160ms ease;
    width: 100%;
    z-index: 3;
}

.sidebar.collapsed {
    width: 78px;
}

.content-frame {
    min-width: 0;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 28px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-weight: 800;
}

.app-header span {
    color: var(--primary);
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
    width: 100%;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 7px;
    background: #edf4fc;
    color: var(--primary);
}

.brand-logo {
    display: block;
    width: min(220px, 100%);
    height: auto;
    max-height: 36px;
    object-fit: contain;
    object-position: left center;
}

.brand-icon {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-logout .nav-icon {
    background: #f1f5f9;
    color: var(--danger);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 58px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
}

.side-nav {
    display: grid;
    gap: 5px;
    padding: 14px 10px;
}

.side-nav a,
.sidebar-user,
.sidebar-logout button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 4px 8px;
    text-decoration: none;
    width: 100%;
}

.side-nav a:hover,
.sidebar-logout button:hover {
    background: #f1f5f9;
    color: var(--text);
}

.sidebar-user {
    margin-top: auto;
    border-top: 1px solid var(--line);
    border-radius: 0;
    color: var(--text);
    cursor: default;
    padding: 12px 18px;
}

.sidebar-logout {
    margin: 0;
    padding: 0 10px 14px;
}

.sidebar-logout button {
    color: var(--primary);
    font-weight: 800;
}

.sidebar.collapsed .nav-text {
    display: none;
}

.sidebar.collapsed .brand {
    justify-content: center;
}

.sidebar.collapsed .brand-logo {
    display: none;
}

.sidebar.collapsed .brand-icon {
    display: block;
}

.sidebar.collapsed .sidebar-head {
    justify-content: center;
}

.sidebar.collapsed .side-nav a,
.sidebar.collapsed .sidebar-user,
.sidebar.collapsed .sidebar-logout button {
    justify-content: center;
}

.sidebar-edge-toggle {
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: col-resize;
    padding: 0;
    z-index: 4;
}

.sidebar-edge-toggle::after {
    content: "";
    position: absolute;
    top: 0;
    right: 4px;
    width: 2px;
    height: 100%;
    background: transparent;
    transition: background-color 120ms ease, width 120ms ease;
}

.sidebar-edge-toggle:hover::after,
.sidebar-edge-toggle:focus-visible::after {
    width: 3px;
    background: var(--primary);
}

.sidebar-edge-toggle:focus-visible {
    outline: 0;
}

.app-shell {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 28px;
}

.page-heading {
    display: flex;
    gap: 20px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: 30px;
}

h2 {
    font-size: 16px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-search-bar {
    flex-wrap: wrap;
    justify-content: flex-end;
    transform: translateY(-8px);
}

.log-search-bar .button {
    align-self: flex-end;
}

.log-search-page-heading h1 {
    transform: translateY(-8px);
}

.search-field {
    display: grid;
    gap: 4px;
}

.search-field span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

input,
textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    padding: 8px 10px;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 107, 203, 0.14);
    outline: none;
}

.search-bar input[type="search"] {
    width: min(360px, 42vw);
}

.log-search-query input[type="search"] {
    width: min(360px, 28vw);
}

.search-bar input[type="datetime-local"] {
    width: 190px;
}

.check,
.switch {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 600;
}

.check input,
.switch input {
    width: 17px;
    min-height: 17px;
}

.terminal-workspace {
    display: block;
}

.table-panel,
.editor-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.panel-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.panel-tools {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
    table-layout: fixed;
}

.terminal-table {
    min-width: 0;
}

.terminal-table th,
.terminal-table td {
    overflow: hidden;
    padding-left: 10px;
    padding-right: 10px;
    text-overflow: ellipsis;
}

.terminal-table td {
    overflow-wrap: anywhere;
}

.terminal-table .actions {
    width: 128px;
}

.terminal-table .row-actions {
    gap: 5px;
}

.terminal-table .icon-button {
    width: 30px;
    height: 30px;
}

.terminal-table .icon-button svg {
    width: 16px;
    height: 16px;
}

.snno-view-button {
    display: inline;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-align: left;
}

.snno-view-button:hover,
.snno-view-button:focus-visible {
    color: var(--primary);
    outline: 0;
    text-decoration: underline;
}

.logs-table {
    min-width: 1180px;
}

.payment-logs-table {
    min-width: 1560px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    position: relative;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

th.grid-sortable {
    cursor: pointer;
    padding-right: 26px;
    user-select: none;
}

th.grid-sortable::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.38;
    transform: translateY(-50%);
}

th.grid-sortable[aria-sort="ascending"]::after {
    border-bottom: 6px solid currentColor;
}

th.grid-sortable[aria-sort="descending"]::after {
    border-top: 6px solid currentColor;
}

th.grid-sortable[aria-sort="none"]::after {
    border-top: 5px solid currentColor;
    border-bottom: 0;
}

.grid-resizer {
    position: absolute;
    top: 0;
    right: -4px;
    z-index: 2;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
}

.grid-resizer::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 3px;
    width: 2px;
    height: calc(100% - 20px);
    background: transparent;
    border-radius: 2px;
}

.grid-resizer:hover::after,
.grid-resizer.is-dragging::after {
    background: var(--primary);
}

.column-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 15;
    display: none;
    min-width: 220px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 8px;
}

.column-menu.is-open {
    display: grid;
    gap: 4px;
}

.column-menu label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    padding: 4px 8px;
}

.column-menu label:hover {
    background: #f1f5f9;
}

.column-menu input {
    width: 16px;
    min-height: 16px;
}

small {
    color: var(--muted);
}

.actions {
    width: 156px;
    white-space: nowrap;
}

.actions form {
    display: inline;
}

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status.active {
    background: var(--success-bg);
    color: var(--success);
}

.status.inactive {
    background: #eef1f5;
    color: #566171;
}

.boolean-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    min-width: 42px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.boolean-chip.yes {
    background: var(--success-bg);
    color: var(--success);
}

.boolean-chip.no {
    background: #eef1f5;
    color: #687385;
}

.permission-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.permission-summary span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    background: #edf4fc;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
}

.editor-panel {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 0 16px 16px;
}

.editor-panel label:not(.switch) {
    display: grid;
    gap: 6px;
}

.editor-panel label > span:first-child {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}

.feature-grid legend {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.feature-grid .switch {
    min-height: 30px;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}

.permission-grid legend {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.permission-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    border: 1px solid #edf1f7;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
}

.permission-option:hover {
    background: #f8fafc;
}

.permission-option input {
    width: 16px;
    min-height: 16px;
    margin-top: 2px;
}

.permission-option span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.permission-option strong {
    font-size: 13px;
}

.permission-option small {
    line-height: 1.3;
}

.form-actions {
    display: flex;
    gap: 10px;
    padding-top: 4px;
}

.modal-panel .form-actions {
    justify-content: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 13px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
}

.button.primary {
    background: var(--primary);
    color: #ffffff;
}

.button.primary:hover {
    background: var(--primary-dark);
}

.button.secondary {
    background: #ffffff;
    border-color: var(--line);
    color: var(--text);
}

.button.danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.button.compact {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
}

.button.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.icon-button:hover,
.icon-button:focus-visible {
    border-color: #b9c3d2;
    background: #f8fafc;
    color: var(--text);
    outline: 0;
}

.icon-button.primary {
    border-color: transparent;
    background: var(--primary);
    color: #ffffff;
}

.icon-button.primary:hover,
.icon-button.primary:focus-visible {
    background: var(--primary-dark);
    color: #ffffff;
}

.icon-button.danger {
    border-color: transparent;
    background: var(--danger-bg);
    color: var(--danger);
}

.icon-button.ghost {
    border-color: transparent;
    background: transparent;
}

.icon-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 10;
    max-width: 180px;
    border-radius: 5px;
    background: #111827;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    opacity: 0;
    padding: 6px 8px;
    pointer-events: none;
    transform: translate(-50%, 3px);
    transition: opacity 120ms ease, transform 120ms ease;
    white-space: nowrap;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.42);
    padding: 24px;
}

.modal-shell.is-open {
    display: flex;
}

.modal-panel {
    width: min(620px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.modal-panel .editor-panel {
    border: 0;
    border-radius: 8px;
    box-shadow: none;
}

.modal-title {
    margin: 0 -16px 0;
    padding-left: 16px;
    padding-right: 16px;
}

.confirm-panel {
    width: min(420px, 100%);
    overflow: hidden;
}

.static-qr-panel {
    width: min(520px, calc(100vw - 48px));
    overflow: hidden;
}

.static-qr-panel .modal-title {
    margin: 0;
}

.static-qr-body {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.static-qr-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.static-qr-details div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}

.static-qr-details dt,
.static-qr-text-block span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.static-qr-details dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.static-qr-text-block {
    display: grid;
    gap: 6px;
}

.static-qr-text-block code {
    display: block;
    max-height: 180px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.45;
    padding: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.command-panel {
    width: min(1120px, calc(100vw - 48px));
    overflow: hidden;
}

.command-panel .modal-title {
    margin: 0;
    padding: 18px 22px;
}

.command-form {
    display: flex;
    flex-direction: column;
    min-height: min(620px, calc(100vh - 48px));
    overflow: hidden;
}

.command-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

.command-menu {
    border-right: 1px solid var(--line);
    padding: 18px 16px;
}

.command-menu-item {
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 8px 10px;
    text-align: left;
    white-space: nowrap;
}

.command-menu-item.is-active,
.command-menu-item:hover {
    background: #edf4fc;
    color: var(--primary);
}

.command-content {
    display: grid;
    gap: 12px;
    justify-self: stretch;
    min-width: 0;
    max-width: none;
    padding: 22px 26px 24px;
    overflow-x: hidden;
    overflow-y: auto;
}

.command-target {
    color: var(--muted);
    font-weight: 700;
}

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

.command-json-field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.command-json-field textarea {
    min-height: 320px;
    max-width: 100%;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.45;
    resize: vertical;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.command-tab-panel {
    display: none;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}

.command-tab-panel.is-active {
    display: grid;
}

.command-tab-panel label:not(.switch):not(.file-field),
.file-field {
    display: grid;
    gap: 6px;
}

.command-tab-panel label > span:first-child,
.file-field > span:first-child {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.command-help {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    padding: 10px 12px;
}

.command-help code {
    color: var(--text);
    font-family: Consolas, "Courier New", monospace;
}

.file-field input[type="file"] {
    border: 1px dashed var(--line-strong);
    border-radius: 6px;
    background: #fff;
    padding: 10px;
}

.command-actions {
    justify-content: flex-end;
}

.command-form.is-submitting .button.primary {
    cursor: progress;
    opacity: 0.85;
}

.confirm-panel .modal-title {
    margin: 0;
}

.confirm-body {
    display: grid;
    gap: 18px;
    padding: 18px 16px 16px;
}

.confirm-body p {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.confirm-actions {
    padding-top: 0;
}

.alert,
.validation {
    border-radius: 6px;
}

.alert {
    margin-bottom: 14px;
    padding: 10px 12px;
    font-weight: 700;
}

.alert.success {
    background: var(--success-bg);
    color: var(--success);
}

.alert.error {
    background: var(--danger-bg);
    color: var(--danger);
}

.validation {
    color: var(--danger);
    font-size: 12px;
}

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

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    border-top: 1px solid var(--line);
    padding: 10px 16px;
}

.pagination-summary,
.page-count {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.pagination-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.json-cell {
    cursor: copy;
}

.url-cell span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.json-cell code {
    display: block;
    max-height: 96px;
    overflow: auto;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.4;
    padding: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.json-cell.is-copied code {
    background: var(--success-bg);
    color: var(--success);
}

.role-list {
    display: grid;
    gap: 8px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
}

.role-list legend {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(135deg, #eef4fb 0%, #f7f8fb 52%, #f3f7f4 100%);
    padding: 24px;
}

.login-shell {
    width: min(440px, calc(100vw - 32px));
    margin: auto;
}

.login-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.login-logo {
    display: block;
    width: min(320px, 100%);
    height: auto;
    max-height: 72px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 16px;
}

.login-panel h1 {
    margin-bottom: 18px;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label:not(.check) {
    display: grid;
    gap: 6px;
}

.login-form label > span:first-child {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #f1f5f9;
    color: var(--text);
    outline: 0;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle [data-password-eye-off] {
    display: none;
}

.password-toggle.is-visible [data-password-eye] {
    display: none;
}

.password-toggle.is-visible [data-password-eye-off] {
    display: block;
}

.login-form .button {
    width: 100%;
}

@media (max-width: 980px) {
    .app-frame {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .app-frame:not(.sidebar-collapsed) {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .sidebar {
        width: 100%;
    }

    .sidebar:not(.collapsed) {
        position: fixed;
        width: 280px;
        box-shadow: var(--shadow);
    }

    .sidebar:not(.collapsed) .nav-text {
        display: inline;
    }

    .sidebar .nav-text {
        display: none;
    }

    .sidebar:not(.collapsed) .side-nav a,
    .sidebar:not(.collapsed) .sidebar-user,
    .sidebar:not(.collapsed) .sidebar-logout button {
        justify-content: flex-start;
    }

    .page-heading,
    .search-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-bar input[type="search"] {
        width: 100%;
    }

    .log-search-query input[type="search"] {
        width: 100%;
    }

    .search-bar input[type="datetime-local"] {
        width: 100%;
    }

    .terminal-workspace {
        grid-template-columns: 1fr;
    }

    .command-layout {
        grid-template-columns: 1fr;
    }

    .static-qr-details {
        grid-template-columns: 1fr;
    }

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

    .permission-grid {
        grid-template-columns: 1fr;
    }

    .command-menu {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .pagination-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .pagination-actions {
        justify-content: space-between;
    }
}

@media (max-width: 560px) {
    .app-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 14px 18px;
    }

    .app-shell {
        padding: 18px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .permission-grid {
        grid-template-columns: 1fr;
    }
}
