:root { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #182026; background: #f4f6f7; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: 100%; min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); overflow-x: hidden; }
.sidebar { background: #172126; color: #dce5e8; border-right: 1px solid #2e393e; padding: 18px 12px; }
.brand { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: white; font-weight: 700; }
.tenant-switcher { height: 38px; display: grid; grid-template-columns: 18px minmax(0, 1fr) 30px 30px; align-items: center; gap: 6px; margin: 8px 4px 0; padding: 0 5px 0 7px; border: 1px solid #46545a; border-radius: 5px; color: #b9c6ca; }
.tenant-switcher select { min-width: 0; width: 100%; border: 0; outline: 0; background: #172126; color: white; font-size: 12px; }
.tenant-switcher button { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-left: 1px solid #46545a; background: transparent; color: #dce5e8; cursor: pointer; }
.tenant-switcher a { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; color: #dce5e8; border-left: 1px solid #46545a; }
.invitation-form { margin-bottom: 14px; }
.invitation-form h2 { margin: 0 0 14px; font-size: 16px; }
.invitation-form input { min-height: 36px; min-width: min(320px, 100%); border: 1px solid #bdc8cc; border-radius: 5px; padding: 0 10px; }
.invitation-list { overflow-x: auto; }
.token-form { margin-bottom: 14px; }
.token-form input { min-height: 36px; border: 1px solid #bdc8cc; border-radius: 5px; padding: 0 10px; }
.token-list { overflow-x: auto; }
.admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-metric { display: grid; gap: 8px; min-height: 92px; padding: 16px; background: white; border: 1px solid #d8dfe1; border-radius: 6px; }
.admin-metric span { color: #65737a; font-size: 12px; }
.admin-metric strong { color: #1c6157; font-size: 24px; }
.admin-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; font-size: 13px; }
.admin-jobs-table th:first-child, .admin-jobs-table td:first-child { width: 180px; }
.admin-jobs-table th:nth-child(4), .admin-jobs-table td:nth-child(4) { width: 92px; }
.job-status { display: inline-block; min-width: 68px; padding: 3px 7px; border-radius: 4px; background: #e8edef; color: #415159; text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.job-status.queued { background: #e4eef5; color: #315f7b; }
.job-status.succeeded { background: #dcefe9; color: #176451; }
.job-status.dead { background: #f8e2e0; color: #973c38; }
.sidebar nav { display: grid; gap: 3px; margin-top: 18px; }
.sidebar nav a { display: flex; align-items: center; gap: 7px; color: #b9c6ca; padding: 9px 10px; text-decoration: none; border-radius: 5px; font-size: 14px; }
.sidebar nav a:hover, .sidebar nav a.active { background: #2a373c; color: white; }
.workspace { min-width: 0; }
.topbar { height: 56px; background: white; border-bottom: 1px solid #dce2e4; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; font-size: 13px; color: #536168; }
.environment { color: #267a68; font-weight: 600; }
.page { padding: 28px; max-width: 1440px; margin: 0 auto; }
.page-heading { min-height: 58px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
h1 { font-size: 24px; line-height: 1.25; letter-spacing: 0; margin: 0; }
.page-heading p { margin: 5px 0 0; color: #65737a; font-size: 13px; }
.toolbar, .row-actions, .form-actions { display: flex; align-items: center; gap: 8px; }
.bulk-toolbar { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #eef4f2; border: 1px solid #c7d8d3; border-radius: 6px; }
.bulk-toolbar strong { margin-right: 4px; font-size: 13px; }
.bulk-toolbar select, .bulk-toolbar input { min-height: 34px; border: 1px solid #b8c5c9; border-radius: 4px; background: white; padding: 0 9px; }
.view-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.view-toolbar select, .view-toolbar input { min-height: 34px; border: 1px solid #b8c5c9; border-radius: 4px; background: white; padding: 0 9px; }
.selection-cell { width: 40px; text-align: center; }
.list-controls { min-height: 48px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.search-control { height: 38px; width: min(360px, 100%); display: flex; align-items: center; gap: 8px; background: white; border: 1px solid #bdc8cc; border-radius: 5px; padding: 0 10px; color: #65737a; }
.search-control:focus-within { border-color: #167565; box-shadow: 0 0 0 3px #d8eeea; }
.search-control input { min-width: 0; flex: 1; border: 0; outline: 0; }
.filter-control { display: grid; gap: 4px; color: #536168; font-size: 11px; font-weight: 600; }
.filter-control select, .filter-control input { height: 38px; min-width: 140px; border: 1px solid #bdc8cc; border-radius: 5px; background: white; padding: 0 9px; }
.range-filter { display: flex; gap: 6px; }
.range-filter input { width: 145px; min-width: 0; }
.primary-button, .secondary-button, .icon-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 5px; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 13px; }
.primary-button { background: #167565; color: white; padding: 0 13px; }
.primary-button:hover { background: #105f53; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.secondary-button { background: white; color: #27343a; border-color: #cbd4d7; padding: 0 13px; }
.icon-button { width: 36px; background: white; color: #425158; border-color: #cbd4d7; padding: 0; }
.icon-button:hover { background: #f0f3f4; }
.icon-button:disabled { opacity: .4; cursor: default; }
.icon-button.danger { color: #a33d3d; }
.table-frame, .form-frame { background: white; border: 1px solid #d8dfe1; border-radius: 6px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { height: 48px; padding: 0 14px; text-align: left; border-bottom: 1px solid #e5eaeb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
th { background: #f8fafb; color: #57656b; font-weight: 600; }
.sort-button { width: 100%; height: 46px; display: flex; align-items: center; gap: 5px; border: 0; background: transparent; color: inherit; cursor: pointer; font-weight: 600; padding: 0; }
th:last-child, td:last-child { width: 96px; }
tr:last-child td { border-bottom: 0; }
.row-actions { justify-content: flex-end; }
.row-actions .icon-button { width: 30px; min-height: 30px; }
.empty { height: 120px; color: #718087; text-align: center; }
.pagination { min-height: 52px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; color: #65737a; font-size: 13px; }
.pagination > div { display: flex; gap: 6px; }
.alert { padding: 11px 13px; background: #fff2f1; color: #8f302d; border: 1px solid #efc5c2; border-radius: 5px; margin-bottom: 16px; font-size: 13px; }
.form-page { max-width: 980px; }
.back-link { display: inline-flex; gap: 6px; align-items: center; color: #526168; text-decoration: none; font-size: 13px; margin-bottom: 9px; }
.form-frame { padding: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label, .checkbox-field { font-size: 13px; font-weight: 600; color: #334148; }
.field input, .field select, .field textarea { width: 100%; min-height: 40px; border: 1px solid #bdc8cc; border-radius: 5px; background: white; padding: 8px 10px; outline: none; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #167565; box-shadow: 0 0 0 3px #d8eeea; }
.field [aria-invalid="true"] { border-color: #b54642; }
.field-error { color: #a33d3d; }
.checkbox-field { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.form-actions { justify-content: flex-end; border-top: 1px solid #e3e8e9; margin-top: 24px; padding-top: 18px; }
.detail-page { max-width: 1100px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid #d8dfe1; border-radius: 6px; background: white; overflow: hidden; }
.detail-grid > div { min-width: 0; min-height: 82px; padding: 16px 18px; border-bottom: 1px solid #e5eaeb; }
.detail-grid > div:nth-child(odd) { border-right: 1px solid #e5eaeb; }
.detail-grid dt { color: #65737a; font-size: 12px; margin-bottom: 7px; }
.detail-grid dd { margin: 0; color: #27343a; overflow-wrap: anywhere; font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.account { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.account > span:first-child { color: #27343a; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.role-label { color: #65737a; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #eef2f3; }
.auth-panel { width: min(400px, 100%); background: white; border: 1px solid #d8dfe1; border-radius: 7px; padding: 30px; box-shadow: 0 12px 32px rgb(24 32 38 / 8%); }
.auth-brand { color: #167565; font-size: 14px; font-weight: 750; margin-bottom: 20px; }
.auth-panel h1 { margin-bottom: 24px; }
.auth-form { display: grid; gap: 17px; }
.auth-form label { display: grid; gap: 7px; color: #334148; font-size: 13px; font-weight: 600; }
.auth-form input { width: 100%; height: 42px; border: 1px solid #bdc8cc; border-radius: 5px; padding: 0 10px; outline: none; }
.auth-form input:focus { border-color: #167565; box-shadow: 0 0 0 3px #d8eeea; }
.auth-form .primary-button { height: 42px; margin-top: 3px; }
.auth-links { min-height: 22px; display: flex; justify-content: space-between; gap: 14px; font-size: 13px; }
.auth-links a { color: #276c62; }
.auth-success { min-height: 84px; display: flex; align-items: center; gap: 10px; color: #28675c; }
.auth-loading { width: 28px; height: 28px; position: fixed; inset: 50% auto auto 50%; border: 3px solid #ccd7d9; border-top-color: #167565; border-radius: 50%; animation: spin .8s linear infinite; }
.audit-table th:last-child, .audit-table td:last-child { width: auto; }
.audit-operation { display: inline-block; min-width: 58px; padding: 3px 7px; border-radius: 4px; background: #e8edef; color: #415159; text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.audit-operation.create { background: #dcefe9; color: #176451; }
.audit-operation.delete { background: #f8e2e0; color: #973c38; }
.audit-payload td { height: auto; padding: 0 14px 10px; white-space: normal; background: #fafbfb; }
.audit-payload summary { cursor: pointer; color: #536168; font-size: 12px; }
.audit-json { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 10px; }
.audit-json section { min-width: 0; }
.audit-json h2 { margin: 0 0 5px; font-size: 12px; }
.audit-json pre { max-height: 260px; margin: 0; overflow: auto; border: 1px solid #d8dfe1; border-radius: 5px; background: white; padding: 10px; font-size: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .shell { display: block; } .sidebar { padding: 8px 12px; border-right: 0; border-bottom: 1px solid #2e393e; } .brand { height: 38px; } .sidebar nav { display: flex; overflow-x: auto; margin-top: 4px; } .sidebar nav a { flex: 0 0 auto; } .topbar { display: none; } .page { padding: 18px 14px; } .page-heading { align-items: center; } .list-controls { align-items: stretch; flex-direction: column; } .search-control, .filter-control select, .filter-control > input { width: 100%; } .range-filter input { flex: 1 1 0; width: auto; } .form-grid, .detail-grid, .admin-grid { grid-template-columns: 1fr; } .detail-grid > div:nth-child(odd) { border-right: 0; } .table-frame { overflow-x: auto; } table { min-width: 680px; } }