@layer views {
/* Settings pages: profile, general, workspaces, lists, roles, defaults and texts */
.panel.pad { padding: 16px 18px; }
.acts-row .hint, .sline .hint { font-size: var(--fs-11); color: var(--fg-4); align-self: center; }
.set-section + .set-section { margin-top: 26px; }

/* Profile */
.profile-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 18px; }
.pf-pic { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.pf-pic-acts { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pf-pic-acts .hint { font-size: var(--fs-11); color: var(--fg-4); }
.pf-pic-acts label.btn { cursor: pointer; }

/* General */
.badge-row { display: flex; align-items: center; gap: 14px; }
.badge-styles { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-styles button { border-radius: var(--r-11); padding: 2px; border: 2px solid transparent; }
.badge-styles button.on { border-color: var(--accent); }
.key-lock { display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: var(--fs-13); color: var(--fg-2); height: 34px; }

/* Editable lists: workspaces, systems, branches, tags */
.slist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-12); background: var(--bg-2); overflow: hidden; }
.sline { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); min-height: 44px; }
.sline:first-child { border-top: 0; }
.sline.on { background: var(--sel); }
.sline .nm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.sline .nm b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sline .meta { font-size: var(--fs-11-5); color: var(--fg-3); white-space: nowrap; }
.sline .input { height: 30px; flex: 1; min-width: 0; }
.sline .grip-acts { display: flex; gap: 2px; }
.sline .dotc { width: 12px; height: 12px; border-radius: var(--r-round); background: var(--c); flex: none; }
.sline-add { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg-1); }
.sline-add .input { flex: 1; height: 30px; }
.lists-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.lists-grid .h2 { margin-top: 0; }
.lists-grid .set-section { margin-top: 0; }

/* Workspace defaults panel */
.ws-defaults { margin-top: 14px; }

/* Roles: a matrix of actions by role */
.roles-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.roles-table th, .roles-table td { padding: 9px 10px; border-top: 1px solid var(--line); text-align: center; font-size: var(--fs-12-5); }
.roles-table thead th { border-top: 0; font-size: var(--fs-11); color: var(--fg-3); font-weight: 600; letter-spacing: 0.02em; position: sticky; top: 0; background: var(--bg-2); }
.roles-table th:first-child, .roles-table td:first-child { text-align: left; }
.roles-table td:first-child b { font-weight: 600; display: block; }
.roles-table td:first-child span { font-size: var(--fs-11); color: var(--fg-3); }
.grant { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 26px; border-radius: var(--r-7); border: 1px solid var(--line-2); font-size: var(--fs-11-5); color: var(--fg-3); gap: 4px; }
.grant:hover { border-color: var(--fg-4); color: var(--fg); }
.grant.yes { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 9%, transparent); }
.grant.own { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.grant.locked { opacity: 0.6; pointer-events: none; }

/* Texts */
.texts-group + .texts-group { margin-top: 22px; }
.text-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 64px; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.text-row:first-of-type { border-top: 0; }
/* Not .tl: the timeline's .tl (1300px wide, padded) would stretch the label over the Reset button. */
.text-row .text-lab { font-size: var(--fs-12-5); color: var(--fg-2); padding-top: 2px; }
.text-row .text-lab small { display: block; font-size: var(--fs-11); color: var(--fg-4); margin-top: 2px; }

/* A bar that sticks to the bottom of a settings page while it has unsaved changes */
.save-bar { position: sticky; bottom: 0; margin-top: 20px; display: flex; align-items: center; gap: 10px; padding: 12px 0; background: linear-gradient(transparent, var(--bg-1) 30%); }
.save-bar .note { font-size: var(--fs-12); color: var(--fg-3); }

@media (max-width: 900px) { .profile-card, .text-row { grid-template-columns: 1fr; } }
}
