:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --text: #172033;
  --muted: #667085;
  --line: #dfe4ec;
  --panel: #ffffff;
  --blue: #2563eb;
  --blue-dark: #1746a2;
  --brand: #0f6b4b;
  --green: #12805c;
  --amber: #a15c00;
  --red: #b42318;
  --shadow: 0 10px 28px rgba(19, 32, 59, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  min-height: 68px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  align-items: center;
  display: inline-flex;
  height: 42px;
  width: 174px;
}

.brand img {
  display: block;
  height: auto;
  max-height: 42px;
  max-width: 174px;
  width: 100%;
}

.nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav a,
.userbox a {
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  border-radius: 8px;
  font-weight: 700;
  min-height: 36px;
  padding: 10px 11px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav a:hover,
.nav a.active {
  background: #eef4f1;
  color: var(--brand);
}

.nav a:hover {
  transform: translateY(-1px);
}

.userbox {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-left: auto;
  position: relative;
}

.userbox span {
  color: var(--text);
  font-size: 14px;
}

.admin-menu {
  position: relative;
}

.admin-menu summary {
  align-items: center;
  background: #eef2f7;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  display: inline-flex;
  font-size: 20px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  list-style: none;
  position: relative;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  width: 42px;
  z-index: 1002;
}

.admin-menu summary::-webkit-details-marker {
  display: none;
}

.admin-menu[open] summary {
  background: #eaf4ef;
  box-shadow: 0 8px 18px rgba(19, 32, 59, 0.12);
  color: var(--brand);
  transform: translateY(-1px);
}

.admin-menu[open]::before {
  background: rgba(15, 23, 42, 0.08);
  content: "";
  inset: 0;
  position: fixed;
  z-index: 1000;
}

.admin-menu-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(19, 32, 59, 0.24);
  display: grid;
  gap: 4px;
  min-width: 240px;
  padding: 10px;
  position: fixed;
  right: 28px;
  top: 74px;
  z-index: 1001;
  animation: menu-pop 0.16s ease both;
}

.admin-menu-panel strong {
  font-size: 13px;
  padding: 8px 10px 6px;
}

.admin-menu-panel a {
  border-radius: 8px;
  color: #344054;
  font-weight: 700;
  min-height: 38px;
  padding: 10px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.admin-menu-panel a:hover {
  background: #eef4f1;
  color: var(--brand);
  transform: translateX(3px);
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 120px);
  place-items: center;
}

.login-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 420px;
  padding: 32px;
  width: 100%;
}

.login-logo {
  display: block;
  height: auto;
  margin-bottom: 22px;
  max-width: 220px;
  width: 100%;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 34px;
  letter-spacing: 0;
  line-height: 1.15;
}

h2 {
  font-size: 20px;
  letter-spacing: 0;
}

.login-panel p,
.list-row span,
.module-card span,
small,
.eyebrow,
.panel-head span,
.muted-text {
  color: var(--muted);
}

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

.filter-bar {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) 190px 100px;
  margin: 14px 0 16px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.password-field {
  position: relative;
}

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

.password-toggle {
  background: #eef2f7;
  border: 1px solid #d6deea;
  border-radius: 6px;
  color: #344054;
  font-size: 13px;
  min-height: 32px;
  padding: 5px 9px;
  position: absolute;
  right: 6px;
  top: 6px;
}

.password-toggle:hover {
  background: #dfe7f3;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

button {
  background: var(--blue);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 40px;
  padding: 9px 14px;
}

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

button:disabled {
  background: #b8c1d1;
  cursor: not-allowed;
}

button.secondary {
  background: #eef2f7;
  color: #344054;
}

.button-link {
  align-items: center;
  background: #eef2f7;
  border-radius: 8px;
  color: #344054;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.button-link:hover {
  background: #dfe7f3;
  box-shadow: 0 8px 18px rgba(19, 32, 59, 0.08);
  transform: translateY(-1px);
}

.bug-tracker-button {
  background: #0f766e;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.24);
  font-size: 17px;
  min-height: 50px;
  padding: 12px 19px;
  position: fixed;
  right: -52px;
  top: 48%;
  transform: rotate(-90deg);
  transform-origin: center;
  z-index: 5000;
}

.bug-tracker-button:hover {
  background: #0d5f59;
}

.bug-modal {
  align-items: center;
  background: rgba(15, 23, 42, 0.46);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 6000;
}

.bug-modal[hidden] {
  display: none;
}

.bug-modal-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  max-height: min(760px, calc(100vh - 40px));
  max-width: 680px;
  overflow: auto;
  padding: 20px;
  width: min(680px, 100%);
}

.bug-modal-head,
.bug-modal-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.bug-modal-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.bug-modal-head h2 {
  margin: 0;
}

.bug-modal-close {
  background: #eef2f7;
  color: #344054;
  font-size: 22px;
  min-height: 40px;
  min-width: 40px;
  padding: 0;
}

.bug-service-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.bug-service-box span {
  color: var(--muted);
  font-size: 13px;
}

.bug-screenshot-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.bug-screenshot-field > div:first-child {
  display: grid;
  gap: 4px;
}

.bug-screenshot-field span {
  color: var(--muted);
  font-size: 13px;
}

.bug-screenshot-field .button-link {
  justify-self: start;
}

.bug-paste-zone {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #b8c1d1;
  border-radius: 8px;
  color: #475467;
  display: flex;
  min-height: 58px;
  padding: 12px;
}

.bug-paste-zone:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 105, 70, 0.12);
  outline: none;
}

.bug-shot-preview {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 96px 1fr;
}

.bug-shot-preview[hidden] {
  display: none;
}

.bug-shot-preview img {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 72px;
  object-fit: cover;
  width: 96px;
}

.bug-modal-actions {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 14px;
}

.bug-report-panel {
  margin-bottom: 18px;
}

.bug-report-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 1.1fr);
  margin-top: 16px;
}

.bug-report-shot {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 220px;
  overflow: hidden;
}

.bug-report-shot img {
  display: block;
  max-height: 420px;
  max-width: 100%;
  object-fit: contain;
}

.bug-report-meta {
  display: grid;
  gap: 10px;
}

.bug-report-meta div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.bug-report-meta small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.bug-report-meta details {
  background: #0f172a;
  border-radius: 8px;
  color: #e5e7eb;
  padding: 12px;
}

.bug-report-meta summary {
  cursor: pointer;
  font-weight: 800;
}

.bug-report-meta pre {
  font-size: 12px;
  line-height: 1.45;
  margin: 12px 0 0;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
}

.alert {
  background: #fff4e5;
  border: 1px solid #ffd39c;
  border-radius: 8px;
  color: #7a3d00;
  margin: 18px 0;
  padding: 12px;
}

.success {
  background: #eaf8f1;
  border: 1px solid #a8e0c2;
  border-radius: 8px;
  color: #0f6848;
  margin: 0 0 18px;
  padding: 12px;
}

.compose-panel {
  max-width: 820px;
}

.hero,
.section-head {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr minmax(260px, 420px);
  margin: 18px 0 28px;
}

.portal-hero {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  margin: 12px 0 22px;
  padding-bottom: 24px;
}

.portal-hero h1 {
  font-size: 38px;
  margin-bottom: 10px;
}

.service-strip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.service-strip span {
  border-left: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 4px;
  min-height: 76px;
  padding: 14px;
}

.service-strip span:first-child {
  border-left: 0;
}

.service-strip strong {
  color: var(--text);
  font-size: 16px;
}

.quick-actions {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.action-card {
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.action-card:hover,
.module-list-item:hover,
.admin-link-list a:hover {
  border-color: #b8c7dc;
  box-shadow: 0 12px 28px rgba(19, 32, 59, 0.11);
  transform: translateY(-2px);
}

.action-card.primary {
  border-color: #b8dbc9;
}

.action-card strong {
  font-size: 17px;
}

.action-card small,
.module-list-item small,
.admin-link-list small {
  color: var(--muted);
  line-height: 1.35;
}

.action-mark {
  align-items: center;
  background: #eef2f7;
  border-radius: 8px;
  color: #344054;
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.mail-mark {
  background: #eaf4ef;
  color: var(--brand);
}

.compose-mark {
  background: #edf3ff;
  color: var(--blue);
}

.files-mark {
  background: #fff5e5;
  color: var(--amber);
}

.telecom-mark {
  background: #edf3ff;
  color: var(--blue);
}

.hr-mark {
  background: #f4efff;
  color: #5b3a95;
  font-size: 13px;
}

.asset-mark {
  background: #eaf8f1;
  color: var(--green);
}

.task-mark {
  background: #edf3ff;
  color: var(--blue);
}

.address-mark {
  background: #eaf4ef;
  color: var(--brand);
}

.ai-mark {
  background: #f0f7ff;
  color: #155a9c;
  font-size: 13px;
}

.docs-mark {
  background: #eef4f1;
  color: var(--brand);
  font-size: 12px;
}

.portal-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 18px;
}

.portal-main-panel,
.portal-side-panel {
  min-width: 0;
}

.module-list,
.admin-link-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.module-list-item,
.admin-link-list a {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-height: 72px;
  padding: 12px 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.module-list-item span,
.admin-link-list a {
  min-width: 0;
}

.module-list-item span,
.admin-link-list a {
  display: grid;
  gap: 4px;
}

.dashboard-work-grid {
  margin-bottom: 28px;
}

.portal-news {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  padding: 20px;
}

.portal-news-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 14px;
}

.portal-news-head h2 {
  font-size: 24px;
  margin-bottom: 0;
}

.portal-news-head > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.portal-news-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-news-column {
  border: 1px solid #d8e4dd;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.portal-news-column.planned {
  border-color: #d8deec;
}

.portal-news-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.portal-news-title strong {
  font-size: 17px;
}

.portal-news-title span {
  background: #edf7f1;
  border-radius: 999px;
  color: #0d6b3d;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.portal-news-column.planned .portal-news-title span {
  background: #eef3fb;
  color: #244c8f;
}

.portal-news-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-news-list li {
  border-top: 1px solid #edf1f5;
  display: grid;
  gap: 3px;
  padding-top: 10px;
}

.portal-news-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.portal-news-list strong {
  font-size: 15px;
}

.portal-news-list span,
.portal-news-request span {
  color: var(--muted);
  line-height: 1.4;
}

.portal-news-request {
  background: #f7faf8;
  border: 1px solid #dce8e1;
  border-radius: 8px;
  padding: 14px 16px;
}

.portal-news-request div {
  display: grid;
  gap: 4px;
}

.mail-page {
  max-width: none;
  padding: 18px 22px 28px;
}

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

.mail-sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 48px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  left: 0;
  max-width: calc(100vw - 28px);
  overflow-y: auto;
  padding: 18px;
  position: fixed;
  top: 0;
  transform: translateX(-110%);
  transition: transform 0.18s ease;
  width: 320px;
  z-index: 1200;
}

.mail-sidebar.open {
  transform: translateX(0);
}

.mail-sidebar-backdrop {
  appearance: none;
  background: rgba(15, 23, 42, 0.28) !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: transparent;
  cursor: pointer;
  inset: 0;
  min-height: 0;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.18s ease;
  width: auto;
  z-index: 1190;
}

.mail-sidebar-backdrop:hover,
.mail-sidebar-backdrop:focus,
.mail-sidebar-backdrop:active {
  background: rgba(15, 23, 42, 0.28) !important;
  box-shadow: none;
  outline: none;
}

.mail-sidebar-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.mail-sidebar-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.mail-sidebar-head strong {
  font-size: 20px;
}

.mail-sidebar-head button {
  align-items: center;
  background: #eef2f7;
  border: 0;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  height: 36px;
  justify-content: center;
  min-height: 36px;
  padding: 0;
  width: 36px;
}

.mail-sidebar-head button:hover {
  background: #e1e9f4;
  color: var(--brand);
}

.mail-compose-button {
  align-items: center;
  background: #c8e8ff;
  border-radius: 8px;
  color: #12304a;
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  gap: 12px;
  justify-content: center;
  min-height: 56px;
  padding: 14px 18px;
  width: 100%;
}

.mail-compose-button span {
  font-size: 24px;
  line-height: 1;
}

.mail-folder-list,
.mail-sidebar-section {
  display: grid;
  gap: 4px;
}

.mail-folder-list a,
.mail-sidebar-section a {
  align-items: center;
  border-radius: 8px;
  color: #344054;
  display: flex;
  font-weight: 700;
  gap: 10px;
  justify-content: space-between;
  min-height: 40px;
  padding: 9px 12px;
}

.mail-folder-list a.active {
  background: #d9e8ff;
  color: #123f8c;
}

.mail-folder-list strong {
  color: #344054;
  font-size: 13px;
}

.mail-sidebar-section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.mail-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.mail-topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr);
  min-height: 88px;
  padding: 16px 20px;
}

.mail-topbar h1 {
  font-size: 28px;
  margin-bottom: 0;
}

.mail-title-area {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.mail-folder-toggle {
  align-items: center;
  background: #eef2f7;
  border: 0;
  border-radius: 8px;
  color: #0b1d3a;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.mail-folder-toggle:hover {
  background: #dfe8f5;
}

.mail-folder-toggle span {
  font-size: 18px;
  line-height: 1;
}

.mail-search {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 86px;
}

.mail-search input {
  background: #eef3fb;
  border-color: transparent;
  border-radius: 8px;
}

.mail-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 54px;
  padding: 8px 16px;
}

.mail-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-button {
  min-height: 34px;
  padding: 7px 10px;
}

.mail-toolbar-right {
  color: var(--muted);
  font-size: 14px;
}

.mail-pagination {
  align-items: center;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-height: 44px;
  padding: 6px 16px;
}

.mail-pagination > span {
  font-size: 13px;
  font-weight: 800;
}

.mail-page-disabled {
  background: #f0f3f8;
  border-radius: 8px;
  color: #98a2b3;
  cursor: default;
  min-height: 34px;
  padding: 7px 10px;
}

.mail-message-list {
  display: grid;
}

.mail-list-row {
  align-items: center;
  border-bottom: 1px solid #e8edf4;
  display: grid;
  gap: 10px;
  grid-template-columns: 22px 24px minmax(150px, 220px) minmax(360px, 1fr) minmax(120px, 150px) 0;
  min-height: 54px;
  padding: 0 12px;
  position: relative;
}

.mail-list-row:hover {
  background: #f3f7fd;
}

.mail-list-row.unread {
  background: #f8fbff;
}

.mail-list-row.unread .mail-sender,
.mail-list-row.unread .mail-subject strong,
.mail-list-row.unread .mail-date {
  color: var(--text);
  font-weight: 900;
}

.mail-icon-form,
.inline-action-form {
  margin: 0;
}

.mail-row-actions {
  align-items: center;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 18px);
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  min-width: 0;
  opacity: 0;
  padding-left: 22px;
  pointer-events: none;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.12s ease;
}

.mail-list-row:hover .mail-row-actions,
.mail-row-actions:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.mail-row-action {
  align-items: center;
  background: #eef2f7;
  border: 0;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  display: inline-flex;
  font-size: 16px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

.mail-row-action:hover {
  background: #e3ebf7;
  color: var(--brand);
}

.mail-row-action.danger:hover,
.danger-button:hover {
  background: #ffe9e4;
  color: #a83b24;
}

.mail-row-action.task-action:hover {
  background: #eaf7ef;
  color: #0d6b3d;
}

.mail-icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #8792a2;
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  height: 28px;
  justify-content: center;
  min-height: 28px;
  padding: 0;
  width: 28px;
}

.mail-icon-button:hover {
  background: #e9f0fa;
  color: var(--brand);
}

.mail-list-row.unread .read-toggle {
  color: #1a5be8;
}

.mail-list-row.flagged .important-toggle {
  color: #d9a400;
}

.mail-spam-button {
  background: #eef2f7;
  border: 0;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
  padding: 6px 10px;
}

.mail-spam-button:hover {
  background: #ffe9e4;
  color: #a83b24;
}

.mail-sender,
.mail-subject,
.mail-date {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-sender,
.mail-subject {
  color: var(--text);
}

.mail-date {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.mail-empty-state {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 44px 24px;
}

.mail-empty-state h2 {
  margin-bottom: 0;
}

.compose-page {
  display: grid;
  min-height: calc(100vh - 92px);
  place-items: center;
}

.compose-window {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(19, 32, 59, 0.18);
  display: grid;
  max-width: 920px;
  min-height: 680px;
  overflow: hidden;
  width: min(920px, 100%);
}

.compose-titlebar {
  align-items: center;
  background: #eef3fb;
  display: flex;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 20px;
}

.compose-titlebar h1 {
  font-size: 20px;
  margin: 0;
}

.compose-window-actions {
  display: flex;
  gap: 12px;
}

.compose-window-actions a {
  color: #344054;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.compose-form {
  display: grid;
  grid-template-rows: auto auto auto auto auto 1fr auto auto;
  min-height: 624px;
}

.compose-line {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 78px minmax(0, 1fr);
  min-height: 52px;
  padding: 0 22px;
}

.compose-line span,
.compose-line label {
  color: #444;
  font-size: 16px;
  font-weight: 400;
}

.compose-line input,
.compose-subject {
  border: 0;
  border-radius: 0;
  min-height: 50px;
  padding: 0;
}

.compose-line input:focus,
.compose-subject:focus,
.compose-body:focus {
  outline: none;
}

.from-line strong {
  color: #444;
  font-size: 16px;
}

.recipient-line {
  grid-template-columns: 78px minmax(0, 1fr) auto;
}

.compose-recipient-links {
  display: flex;
  gap: 10px;
}

.compose-recipient-links button {
  background: transparent;
  color: #444;
  font-weight: 700;
  min-height: 32px;
  padding: 4px 0;
}

.optional-recipient {
  display: none;
}

.optional-recipient.visible {
  display: grid;
}

.compose-subject {
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  padding: 0 22px;
}

.compose-body {
  border: 0;
  border-radius: 0;
  min-height: 360px;
  padding: 22px;
  resize: none;
}

.compose-attachments-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 12px 22px;
}

.compose-attachments-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.compose-attachments-head strong {
  font-size: 14px;
}

.compose-attachments-head span {
  color: var(--muted);
  font-size: 13px;
}

.compose-attachment-list {
  display: grid;
  gap: 6px;
}

.compose-attachment-row {
  align-items: center;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 90px 180px;
  min-height: 42px;
  padding: 8px 10px;
}

.compose-attachment-name,
.compose-attachment-size,
.compose-attachment-state {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compose-attachment-name {
  font-weight: 800;
}

.compose-attachment-size {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.compose-attachment-state {
  background: #eef2f7;
  border-radius: 999px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
  text-align: center;
}

.compose-attachment-row[data-state="uploading"] .compose-attachment-state {
  background: #eaf1ff;
  color: #1a5be8;
}

.compose-attachment-row[data-state="done"] .compose-attachment-state {
  background: #eaf7ef;
  color: #0d6b3d;
}

.compose-attachment-row[data-state="error"] .compose-attachment-state {
  background: #ffe9e4;
  color: #a83b24;
}

.compose-toolbar {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  min-height: 68px;
  padding: 12px 20px;
}

.compose-send-group {
  display: inline-flex;
}

.compose-send {
  border-radius: 999px;
  font-size: 16px;
  min-height: 48px;
  min-width: 150px;
}

.compose-send-menu {
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0 999px 999px 0;
  min-height: 48px;
  min-width: 48px;
}

.compose-tool {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  color: #4b5563;
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  padding: 8px;
}

.compose-tool:hover {
  background: #eef2f7;
}

.compose-tool input {
  display: none;
}

.compose-attachment-tool {
  font-size: 28px;
  min-height: 48px;
  min-width: 48px;
  padding: 6px;
}

.compose-attachment-tool span {
  line-height: 1;
}

.compose-hint {
  color: var(--muted);
  font-size: 13px;
  margin-left: auto;
}

.mail-settings-shell {
  display: grid;
  gap: 18px;
}

.mail-settings-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.settings-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mail-settings-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.mail-settings-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.search input {
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(19, 32, 59, 0.07);
}

.module-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 24px;
}

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

.module-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 18px;
}

.module-card strong {
  font-size: 17px;
}

.module-card span {
  font-size: 13px;
  line-height: 1.35;
}

.work-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

.hr-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 360px 1fr;
}

.admin-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 360px 1fr;
}

.panel {
  padding: 20px;
}

.wide {
  grid-column: 1 / -1;
}

.wide-panel {
  min-width: 0;
}

.panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.spaced {
  margin-top: 22px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 5px;
  padding-top: 12px;
}

.permission-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.permission-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 1.2fr 1.3fr 110px;
  min-height: 62px;
  padding: 10px 12px;
}

.permission-row:first-child {
  border-top: 0;
}

.permission-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.permission-row span {
  display: grid;
  gap: 3px;
}

.data-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.code-block {
  background: #101828;
  border-radius: 8px;
  color: #f8fafc;
  line-height: 1.55;
  margin: 12px 0 22px;
  overflow-x: auto;
  padding: 14px 16px;
  white-space: pre;
}

.code-block code {
  color: inherit;
  font-family: Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.api-doc-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.api-endpoint {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  margin: 8px 0 22px;
  min-width: 0;
  padding: 12px;
}

.api-endpoint span {
  background: #eaf4ef;
  border-radius: 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.api-endpoint code {
  overflow-wrap: anywhere;
}

.api-model-row,
.api-key-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
}

.api-model-row {
  grid-template-columns: 110px minmax(170px, 0.9fr) minmax(0, 1fr);
}

.api-key-row {
  grid-template-columns: minmax(180px, 1.2fr) 100px 150px 150px 120px;
}

.api-model-row:first-child,
.api-key-row:first-child {
  border-top: 0;
}

.api-model-row.header,
.api-key-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.api-key-row.created {
  background: #f0fdf4;
}

.api-key-row.empty {
  grid-template-columns: 1fr;
}

.api-secret-created {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.api-note-panel {
  align-content: start;
  display: grid;
  gap: 12px;
}

.data-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 1.4fr 1.2fr 1fr 120px;
  min-height: 62px;
  padding: 10px 12px;
}

.data-row:first-child {
  border-top: 0;
}

.data-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.data-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.address-book-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.address-book-summary span {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 14px;
}

.address-book-summary strong {
  font-size: 20px;
}

.address-book-summary small {
  color: var(--muted);
}

.address-book-filter {
  grid-template-columns: minmax(260px, 1fr) 180px 100px;
}

.address-book-create {
  margin-bottom: 18px;
}

.address-book-create-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) 100px;
  margin-top: 14px;
}

.address-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(210px, 1.2fr) minmax(180px, 1fr) minmax(220px, 1fr) minmax(150px, 0.8fr) 112px;
  min-height: 64px;
  padding: 10px 12px;
}

.address-row:first-child {
  border-top: 0;
}

.address-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.address-row.empty {
  grid-template-columns: 1fr;
}

.address-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.compose-suggest-menu {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(19, 32, 59, 0.2);
  display: grid;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  position: absolute;
  z-index: 6500;
}

.compose-suggest-menu[hidden] {
  display: none;
}

.compose-suggest-item {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: stretch;
  min-height: 48px;
  padding: 8px 10px;
  text-align: left;
}

.compose-suggest-item:hover,
.compose-suggest-item:focus {
  background: #eef4f1;
  color: var(--text);
}

.compose-suggest-item span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.compose-suggest-item small,
.compose-suggest-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.domain-auth-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.3fr) 120px 180px 110px;
  min-height: 58px;
  padding: 10px 12px;
}

.domain-auth-row:first-child {
  border-top: 0;
}

.domain-auth-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.domain-auth-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.report-preview {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.panel-head + .report-preview {
  margin-top: 14px;
}

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

.auth-preview-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  min-width: 840px;
  min-height: 48px;
  padding: 9px 12px;
}

.auth-preview-row:first-child {
  border-top: 0;
}

.auth-preview-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 40px;
}

.auth-preview-row.empty {
  grid-template-columns: 1fr;
  min-width: 0;
}

.auth-preview-row span {
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-groups {
  display: grid;
  gap: 10px;
}

.auth-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.auth-group summary {
  align-items: center;
  background: #fff;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.8fr) repeat(4, minmax(120px, 1fr));
  list-style: none;
  min-height: 64px;
  padding: 12px 14px;
}

.auth-group summary::-webkit-details-marker {
  display: none;
}

.auth-group summary::before {
  color: var(--muted);
  content: ">";
  font-weight: 800;
  transform: rotate(0deg);
}

.auth-group[open] summary::before {
  transform: rotate(90deg);
}

.auth-group summary {
  grid-template-columns: 16px minmax(220px, 1.8fr) repeat(4, minmax(120px, 1fr));
}

.auth-group summary span,
.auth-user-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.auth-group summary strong {
  overflow-wrap: anywhere;
}

.auth-group summary small,
.auth-user-meta {
  color: var(--muted);
  font-size: 12px;
}

.auth-group-body {
  background: #fbfcfe;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 12px;
}

.auth-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.auth-event-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 155px 150px 120px 80px 120px 140px 150px 120px;
  min-height: 44px;
  min-width: 980px;
  padding: 8px 10px;
}

.auth-event-row:first-child {
  border-top: 0;
}

.auth-event-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
}

.auth-event-row.empty {
  grid-template-columns: 1fr;
  min-width: 0;
}

.auth-event-row span {
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
}

.progress-track {
  background: #eef2f7;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-track div {
  background: var(--green);
  height: 100%;
  transition: width 0.2s ease;
}

.data-row strong,
.data-row small {
  overflow-wrap: anywhere;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.settings-list span {
  border-top: 1px solid var(--line);
  display: block;
  padding-top: 12px;
}

.settings-list span:first-child {
  border-top: 0;
  padding-top: 0;
}

.audit-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 160px 180px 1fr 1.5fr;
  min-height: 62px;
  padding: 10px 12px;
}

.audit-row:first-child {
  border-top: 0;
}

.audit-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.audit-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mail-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 1.2fr 1.5fr 180px;
  min-height: 62px;
  padding: 10px 12px;
}

.mail-row:first-child {
  border-top: 0;
}

.mail-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.mail-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mail-folders {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding-top: 16px;
}

.mail-folders h3 {
  font-size: 14px;
  margin: 0 0 4px;
}

.mail-folders a {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  padding: 9px 10px;
  text-decoration: none;
}

.mail-folders a.active {
  background: #eaf1ff;
  border-color: #b8cdfa;
  color: var(--brand);
}

.message-head {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.message-head span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.section-actions,
.message-actions,
.message-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.message-actions {
  margin-top: 14px;
}

.message-toolbar {
  border-bottom: 1px solid var(--line);
  margin: -2px 0 16px;
  padding-bottom: 14px;
}

.message-body {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
}

.message-html {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.5;
  max-height: 620px;
  overflow: auto;
  padding: 16px;
}

.message-html img {
  height: auto;
  max-width: 100%;
}

.message-html table {
  border-collapse: collapse;
  max-width: 100%;
}

.message-html td,
.message-html th {
  border: 1px solid #e5e7eb;
  padding: 6px;
}

.inline-upload {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 120px;
  align-items: end;
}

.file-toolbar {
  display: flex;
  gap: 10px;
  margin: 14px 0 16px;
}

.file-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) 120px 150px 104px;
  min-height: 58px;
  padding: 10px 12px;
}

.file-row:first-child {
  border-top: 0;
}

.file-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.file-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.user-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(230px, 1fr) 180px 100px 104px;
  min-height: 58px;
  padding: 10px 12px;
}

.user-row:first-child {
  border-top: 0;
}

.user-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.user-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.asset-row,
.task-row,
.history-row,
.mini-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
}

.asset-row {
  grid-template-columns: 130px minmax(220px, 1fr) minmax(180px, 260px) 110px 104px;
}

.task-row {
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 220px) 110px 90px;
}

.task-title-link {
  color: var(--text);
  display: inline-block;
  max-width: 100%;
  text-decoration: none;
}

.task-title-link:hover {
  color: var(--brand);
  text-decoration: underline;
}

.history-row {
  grid-template-columns: 170px minmax(220px, 1fr) 160px;
}

.mini-row {
  grid-template-columns: minmax(180px, 1fr) 110px 104px;
}

.asset-row:first-child,
.task-row:first-child,
.history-row:first-child,
.mini-row:first-child {
  border-top: 0;
}

.asset-row.header,
.task-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.asset-row.empty,
.task-row.empty,
.history-row.empty,
.mini-row.empty {
  grid-template-columns: 1fr;
}

.asset-row span,
.task-row span,
.history-row span,
.mini-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.telecom-layout {
  align-items: start;
}

.telecom-page-layout {
  display: grid;
  gap: 18px;
}

.telecom-upload-panel {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1fr) minmax(260px, 0.8fr);
}

.telecom-upload-panel h2,
.telecom-upload-panel p {
  margin-bottom: 0;
}

.telecom-upload-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 180px;
}

.telecom-upload-form label {
  display: grid;
  gap: 8px;
}

.telecom-upload-form span {
  color: #344054;
  font-weight: 800;
}

.telecom-upload-form input[type="file"] {
  min-height: 56px;
}

.telecom-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 16px;
}

.telecom-metrics span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 12px;
}

.telecom-metrics strong {
  font-size: 24px;
}

.telecom-metrics small,
.telecom-meta {
  color: var(--muted);
}

.telecom-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.telecom-filter-bar {
  grid-template-columns: minmax(240px, 1fr) 210px 150px 96px;
  margin-bottom: 8px;
}

.telecom-filter-summary {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.telecom-table,
.telecom-table-wrap {
  margin: 10px 0 24px;
}

.telecom-table-wrap {
  overflow-x: auto;
}

.telecom-report-table {
  border-collapse: collapse;
  font-size: 14px;
  min-width: 1280px;
  width: 100%;
}

.telecom-report-table th,
.telecom-report-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.telecom-report-table th {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.telecom-report-table tr:first-child th,
.telecom-report-table tr:first-child td {
  border-top: 1px solid var(--line);
}

.telecom-report-table tbody tr:nth-child(even) {
  background: #fbfcfe;
}

.telecom-report-table tbody tr:hover {
  background: #f4f8fb;
}

.telecom-report-table td {
  overflow-wrap: anywhere;
}

.telecom-report-table td:first-child,
.telecom-report-table td:nth-last-child(1),
.telecom-report-table td:nth-last-child(2) {
  white-space: nowrap;
}

.telecom-report-table small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.telecom-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
}

.telecom-row:first-child {
  border-top: 0;
}

.telecom-row.unused {
  grid-template-columns: 130px minmax(220px, 1fr) 130px minmax(170px, 260px);
}

.telecom-row.options {
  grid-template-columns: 130px minmax(180px, 260px) minmax(260px, 1fr) 100px minmax(170px, 250px);
}

.telecom-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.telecom-row.empty {
  grid-template-columns: 1fr;
}

.telecom-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.telecom-row small {
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.notice {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 12px;
}

.notice.compact {
  align-self: stretch;
  margin-top: 0;
}

.notice strong {
  color: var(--text);
}

.notice.error {
  background: #fff4f2;
  border-color: #fecdca;
  color: var(--red);
}

.notice.warning {
  background: #fff9ed;
  border-color: #fedf89;
  color: var(--amber);
}

.user-detail-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 420px);
  margin-top: 18px;
}

.status-pill {
  background: #eef2f7;
  border-radius: 999px;
  color: #344054;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  min-height: 30px;
  padding: 7px 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
}

.security-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  margin-top: 10px;
  overflow: hidden;
}

.security-list div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 10px;
}

.security-list div:first-child {
  border-top: 0;
}

.security-list small {
  color: var(--muted);
}

.button-link.compact {
  min-height: 34px;
  padding: 7px 10px;
}

.documents-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.panel-divider {
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.document-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  margin-top: 14px;
  overflow: hidden;
}

.document-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1.6fr) 110px 100px 150px minmax(170px, auto);
  min-height: 58px;
  padding: 10px 12px;
}

.document-row:first-child {
  border-top: 0;
}

.document-row.header {
  background: #f0f3f8;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
}

.document-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.document-row small {
  display: block;
  margin-top: 3px;
}

.document-name-link {
  color: var(--text);
  display: inline-block;
  max-width: 100%;
  transition: color 0.16s ease, transform 0.16s ease;
}

.document-name-link:hover {
  color: var(--blue);
  transform: translateX(2px);
}

.document-badge {
  align-items: center;
  background: #eef4f1;
  border: 1px solid #c8ddd2;
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 28px;
  padding: 6px 10px;
  width: fit-content;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.empty-state {
  border: 1px dashed #cfd7e3;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  justify-items: start;
  margin-top: 14px;
  padding: 28px;
}

.document-editor-head {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 18px 0 20px;
}

.document-head-actions,
.editor-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  overflow: hidden;
}

.editor-toolbar {
  border-bottom: 1px solid var(--line);
  min-height: 58px;
  padding: 10px 14px;
}

.editor-toolbar button {
  margin-left: auto;
}

.document-editor {
  border: 0;
  border-radius: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  line-height: 1.55;
  min-height: calc(100vh - 260px);
  padding: 18px;
  resize: vertical;
}

.document-editor:focus {
  outline: none;
}

.document-preview-panel {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.pdf-viewer-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: calc(100vh - 230px);
  overflow: hidden;
}

.pdf-viewer-shell iframe {
  border: 0;
  display: block;
  height: calc(100vh - 230px);
  min-height: 620px;
  width: 100%;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ai-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

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

.ai-chat-panel {
  display: grid;
  grid-template-rows: minmax(420px, calc(100vh - 280px)) auto;
  overflow: hidden;
}

.ai-messages {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding: 18px;
}

.ai-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  max-width: 86%;
  padding: 12px 14px;
}

.ai-message.user {
  background: #eef4ff;
  justify-self: end;
}

.ai-message.assistant {
  background: #f8fafc;
  justify-self: start;
}

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

.ai-message-content {
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ai-message time {
  color: var(--muted);
  font-size: 12px;
}

.ai-compose {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(132px, 170px) auto minmax(0, 1fr) auto;
  padding: 12px;
}

.ai-provider-select {
  min-height: 48px;
}

.ai-compose textarea {
  min-height: 48px;
  resize: vertical;
}

.ai-file-button {
  align-items: center;
  background: #eef2f7;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  min-height: 48px;
  padding: 0 14px;
}

.ai-file-button input {
  display: none;
}

.ai-side-panel {
  align-content: start;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.ai-file-list {
  display: grid;
  gap: 10px;
}

.ai-file-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.ai-file-list span {
  color: var(--muted);
  font-size: 12px;
}

.ai-empty {
  align-self: center;
}

@keyframes menu-pop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .bug-tracker-button {
    right: -56px;
    top: 58%;
  }

  .bug-report-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
  }

  .userbox {
    margin-left: 0;
  }

  .admin-menu-panel {
    left: 18px;
    right: 18px;
    top: 132px;
  }

  .page {
    padding: 18px;
  }

  .hero,
  .portal-hero,
  .section-head,
  .document-editor-head,
  .work-grid,
  .portal-layout,
  .ai-layout,
  .api-doc-layout,
  .mail-app,
  .mail-topbar,
  .admin-layout,
  .hr-layout {
    grid-template-columns: 1fr;
  }

  .mail-compose-button {
    width: 100%;
  }

  .mail-list-row {
    grid-template-columns: 22px 24px minmax(100px, 0.8fr) minmax(140px, 1.2fr) 0;
  }

  .mail-date {
    display: none;
  }

  .compose-window {
    min-height: calc(100vh - 40px);
  }

  .compose-toolbar {
    flex-wrap: wrap;
  }

  .compose-attachment-row {
    grid-template-columns: minmax(0, 1fr) 90px;
  }

  .compose-attachment-state {
    grid-column: 1 / -1;
    text-align: left;
  }

  .compose-hint {
    margin-left: 0;
    width: 100%;
  }

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

  .quick-actions,
  .service-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-news-grid {
    grid-template-columns: 1fr;
  }

  .service-strip span:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-column: 1 / -1;
  }

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

  .permission-row,
  .data-row,
  .address-row,
  .domain-auth-row,
  .audit-row,
  .mail-row,
  .file-row,
  .document-row,
  .user-row,
  .asset-row,
  .task-row,
  .history-row,
  .mini-row,
  .telecom-row.unused,
  .telecom-row.options,
  .api-model-row,
  .api-key-row,
  .user-detail-grid,
  .telecom-upload-panel,
  .telecom-upload-form,
  .telecom-filter-bar,
  .auth-group summary,
  .filter-bar,
  .address-book-create-form,
  .inline-upload {
    grid-template-columns: 1fr;
  }

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

  .telecom-metrics {
    grid-template-columns: 1fr;
  }

  .ai-compose {
    grid-template-columns: 1fr;
  }

  .ai-message {
    max-width: 100%;
  }

  .document-actions,
  .document-head-actions {
    justify-content: flex-start;
  }

  .editor-toolbar button {
    margin-left: 0;
  }

  .auth-group summary::before {
    display: none;
  }
}

@media (max-width: 560px) {
  .quick-actions,
  .service-strip,
  .address-book-summary {
    grid-template-columns: 1fr;
  }

  .service-strip span,
  .service-strip span:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .service-strip span:first-child {
    border-top: 0;
  }

  .portal-hero h1 {
    font-size: 30px;
  }

  .portal-news {
    padding: 16px;
  }

  .portal-news-head,
  .portal-news-title {
    align-items: start;
    flex-direction: column;
  }

  .portal-news-head > span {
    white-space: normal;
  }

  .mail-title-area {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .recipient-line {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .compose-recipient-links {
    grid-column: 1 / -1;
    padding-bottom: 10px;
  }

  .compose-line {
    grid-template-columns: 56px minmax(0, 1fr);
    padding: 0 14px;
  }

  .compose-subject,
  .compose-body,
  .compose-attachments-panel {
    padding-left: 14px;
    padding-right: 14px;
  }
}
