:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eaf2ff;
  --mint-soft: #e9fbf7;
  --sky-soft: #f3f8ff;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(37, 99, 235, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 12%, rgba(20, 184, 166, 0.12), transparent 26%),
    radial-gradient(circle at 22% 4%, rgba(37, 99, 235, 0.1), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.auth-pending,
body.is-signed-out {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.tracker-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  height: 100vh;
  max-width: 100vw;
  overflow: hidden;
}

body.auth-pending .tracker-shell,
body.is-signed-out .tracker-shell {
  display: none;
}

.login-gate {
  min-height: 100vh;
  padding: 30px;
  display: none;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(248, 251, 255, 0.74), rgba(248, 251, 255, 0.46) 48%, rgba(37, 99, 235, 0.05)),
    url("../assets/job-tracker-login-background.png") center / cover no-repeat;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

body.auth-pending .login-gate,
body.is-signed-out .login-gate {
  display: grid;
}

.login-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 10% 8%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 34px;
  transform: rotate(-3deg);
}

.login-art span {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.82;
}

.login-art span:nth-child(1) {
  width: 420px;
  height: 420px;
  right: -150px;
  top: 5%;
  background: rgba(255, 255, 255, 0.16);
}

.login-art span:nth-child(2) {
  width: 320px;
  height: 320px;
  left: -110px;
  bottom: 8%;
  background: rgba(20, 184, 166, 0.16);
}

.login-art span:nth-child(3) {
  width: 170px;
  height: 170px;
  right: 22%;
  bottom: 14%;
  background: rgba(96, 165, 250, 0.14);
}

.login-card {
  width: min(1080px, 100%);
  min-height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.64), rgba(248, 251, 255, 0.38)),
    rgba(255, 255, 255, 0.34);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
  padding: clamp(24px, 5vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "brand"
    "copy"
    "actions";
  gap: 38px;
  align-items: center;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: auto -12% -26% 48%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 70%);
  pointer-events: none;
}

.login-card::after {
  content: "";
  position: absolute;
  right: clamp(20px, 6vw, 78px);
  top: clamp(90px, 18vh, 150px);
  width: min(30vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(20, 184, 166, 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle, black 0 46%, transparent 70%);
  pointer-events: none;
}

.login-brand {
  grid-area: brand;
  align-self: start;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  position: relative;
  z-index: 1;
}

.login-copy {
  grid-area: copy;
  display: grid;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.login-copy h1 {
  max-width: 100%;
  color: var(--text);
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1;
  font-weight: 880;
  white-space: nowrap;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 100%;
  color: #4b5563;
  font-size: clamp(15px, 1.18vw, 18px);
  line-height: 1.55;
  white-space: nowrap;
}

.login-actions {
  grid-area: actions;
  align-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.login-actions .primary-button {
  min-height: 50px;
  padding-inline: 24px;
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.login-actions .primary-button:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

.login-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.gate-language {
  margin-left: auto;
  min-height: 38px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.gate-language select {
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  outline: 0;
}

.gate-language option {
  color: #0f172a;
}

.sidebar {
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96)),
    #ffffff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 760;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eff7ff, #d9f1ff);
  border: 1px solid rgba(37, 99, 235, 0.12);
  color: var(--accent);
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
  overflow: hidden;
}

.brand-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.sidebar-account {
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
  background:
    radial-gradient(circle at 14% 0%, rgba(20, 184, 166, 0.13), transparent 42%),
    linear-gradient(145deg, #ffffff, #f4f9ff 62%, #eefdfa);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.08);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.cloud-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
}

.sync-status {
  display: block;
  color: #4f6f9d;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sidebar-actions .ghost-button {
  min-height: 34px;
  min-width: 0;
  padding: 0 10px;
  border-color: rgba(37, 99, 235, 0.14);
  background: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  white-space: nowrap;
}

.sidebar-actions .ghost-button:last-child {
  grid-column: 1 / -1;
}

.nav-item {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #374151;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 650;
}

.nav-item.active,
.nav-item:hover {
  background: linear-gradient(135deg, #eaf2ff, #eefdfa);
  color: var(--accent-dark);
}

.sidebar-note {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #ffffff, var(--sky-soft));
  display: grid;
  gap: 2px;
}

.sidebar-note strong {
  font-size: 28px;
}

.sidebar-note span {
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  padding: 26px;
  display: grid;
  gap: 22px;
  min-width: 0;
  max-width: 100%;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 90% 0%, rgba(20, 184, 166, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(243, 248, 255, 0.9), rgba(248, 250, 252, 0.82) 38%, rgba(255, 255, 255, 0.5));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.backup-actions {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.backup-actions .ghost-button {
  padding-inline: 12px;
}

.backup-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cloud-actions {
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.16), transparent 38%),
    linear-gradient(135deg, #ffffff, #f2fbff 58%, #eefdfa);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.cloud-actions .ghost-button {
  width: 100%;
  justify-content: center;
  background: white;
  border-color: rgba(37, 99, 235, 0.12);
}

.cloud-profile {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.cloud-profile img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e7eb;
}

.demo-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #16a34a);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.cloud-profile strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-profile span,
.cloud-actions > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.language-switch {
  min-height: 38px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.language-switch select {
  height: 30px;
  border: 0;
  padding: 0 2px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  outline: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 760;
}

.topbar p,
.panel-head p,
.rate-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
}

.primary-button {
  background: var(--accent);
  color: white;
}

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

.ghost-button {
  border-color: rgba(37, 99, 235, 0.12);
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  color: #374151;
}

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

.icon-button {
  width: 38px;
  padding: 0;
  border-color: var(--line);
  background: white;
  font-size: 22px;
  line-height: 1;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  min-width: 0;
}

.metric-card,
.panel,
.rate-card {
  border: 1px solid rgba(37, 99, 235, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 255, 0.94)),
    var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 128px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.metric-card span,
.rate-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  line-height: 1.25;
}

.metric-card strong {
  font-size: 28px;
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  min-height: 31px;
}

body.is-lang-en .brand {
  font-size: 15px;
}

body.is-lang-en .sidebar-actions .ghost-button {
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
}

body.is-lang-en .cloud-profile strong {
  font-size: 11px;
}

body.is-lang-en .cloud-profile span,
body.is-lang-en .cloud-status {
  font-size: 11px;
}

body.is-lang-en .topbar h1 {
  font-size: 24px;
}

body.is-lang-en .topbar p {
  font-size: 13px;
  line-height: 1.35;
}

body.is-lang-en .topbar-actions .primary-button,
body.is-lang-en .language-switch {
  font-size: 12px;
}

body.is-lang-en .metric-card span,
body.is-lang-en .rate-card span {
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
}

body.is-lang-en .metric-card strong {
  font-size: 26px;
}

body.is-lang-en .metric-card small {
  font-size: 12px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

body.is-lang-en .panel h2 {
  font-size: 17px;
}

body.is-lang-en .panel-head p,
body.is-lang-en .rate-card p,
body.is-lang-en .bar-label {
  font-size: 12px;
  line-height: 1.35;
}

body.is-lang-en .rate-card strong {
  font-size: 28px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  gap: 20px;
}

.panel {
  padding: 18px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #14b8a6);
  opacity: 0.72;
}

.panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel h2 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 760;
}

.chart-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.donut {
  width: min(100%, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: auto;
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: white;
}

.donut span {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
}

.donut small {
  color: var(--muted);
  font-size: 12px;
}

.status-bars {
  display: grid;
  gap: 10px;
}

.status-bar-row {
  display: grid;
  gap: 5px;
}

.bar-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #374151;
  font-size: 13px;
}

.bar-label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bar-label strong {
  color: var(--text);
  flex: 0 0 auto;
}

.bar-track,
.rate-track {
  height: 8px;
  border-radius: 999px;
  background: #edf0f4;
  overflow: hidden;
}

.bar-track span,
.rate-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.rate-stack {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.rate-card {
  box-shadow: none;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.rate-card div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.rate-card strong {
  font-size: 30px;
}

.rate-track span {
  background: var(--accent);
}

.app-head {
  align-items: stretch;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
}

.search-field {
  flex: 1 1 240px;
  min-width: 180px;
  max-width: 300px;
  height: 40px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

select,
input,
textarea {
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 8px;
  background: white;
  color: var(--text);
}

.toolbar select {
  height: 40px;
  padding: 0 12px;
}

#statusFilter {
  flex: 0 0 128px;
  max-width: 128px;
}

.tool-select {
  flex: 0 0 auto;
  max-width: 170px;
  min-height: 40px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.tool-select select {
  max-width: 106px;
  height: 32px;
  border: 0;
  padding: 0 2px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  outline: 0;
}

.compact-select {
  min-width: 104px;
  max-width: 150px;
}

.compact-select select {
  max-width: 86px;
}

.table-wrap {
  width: 100%;
  overflow-x: visible;
}

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

.applications-view table {
  min-width: 0;
}

.compact table {
  min-width: 560px;
}

th {
  color: #516078;
  font-size: 11.5px;
  font-weight: 780;
  text-align: left;
  text-transform: uppercase;
  line-height: 1.25;
}

td,
th {
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  padding: 12px 8px;
  vertical-align: middle;
}

td {
  font-size: 14px;
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover {
  background: rgba(37, 99, 235, 0.035);
}

.applications-view td,
.applications-view th {
  overflow-wrap: anywhere;
}

.applications-view td:nth-child(2),
.applications-view th:nth-child(2) {
  width: 20%;
}

.applications-view td:nth-child(1),
.applications-view th:nth-child(1) {
  width: 16%;
}

.applications-view td:nth-child(3),
.applications-view th:nth-child(3) {
  width: 8.5%;
}

.applications-view td:nth-child(4),
.applications-view th:nth-child(4) {
  width: 10.5%;
}

.applications-view td:nth-child(5),
.applications-view th:nth-child(5) {
  width: 9%;
}

.applications-view td:nth-child(6),
.applications-view th:nth-child(6) {
  width: 9.5%;
}

.applications-view td:nth-child(7),
.applications-view th:nth-child(7) {
  width: 8.5%;
}

.applications-view td:nth-child(8),
.applications-view th:nth-child(8) {
  width: 7.5%;
}

.applications-view td:nth-child(9),
.applications-view th:nth-child(9) {
  width: 10.5%;
}

td span:not(.status-badge):not(.priority) {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: color-mix(in srgb, var(--status-color), white 88%);
  color: var(--status-color);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.company-cell {
  display: block;
  overflow: visible;
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.role-cell {
  display: -webkit-box;
  margin-top: 0 !important;
  overflow: hidden;
  color: var(--text) !important;
  font-size: 14px !important;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.priority {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.priority.high {
  background: #fee2e2;
  color: #b91c1c;
}

.priority.medium {
  background: #e0f2fe;
  color: #0369a1;
}

.priority.low {
  background: #ecfdf5;
  color: #047857;
}

.table-link {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}

.muted-link {
  color: var(--muted);
  font-size: 13px;
}

.row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  width: 100%;
}

.row-actions button {
  min-height: 30px;
  min-width: 0;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: #374151;
  font-size: 11.5px;
  font-weight: 750;
  white-space: nowrap;
}

.row-actions button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

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

.group-row td {
  border-bottom: 1px solid #d7dee8;
  background: #f8fafc;
  color: #111827;
  font-size: 13px;
  font-weight: 850;
  padding-top: 11px;
  padding-bottom: 11px;
}

.group-row span {
  display: inline;
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

dialog {
  width: min(860px, calc(100vw - 28px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.38);
}

.application-form,
.confirm-dialog form {
  padding: 20px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.dialog-head p {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.application-form label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 750;
}

.application-form input,
.application-form select,
.application-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  font-weight: 500;
}

.application-form textarea {
  resize: vertical;
}

.full-field {
  margin-top: 12px;
}

.dialog-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-dialog {
  width: min(420px, calc(100vw - 28px));
}

.confirm-dialog p {
  color: var(--muted);
  margin-top: 8px;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

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

@media (max-width: 820px) {
  body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.auth-pending,
  body.is-signed-out {
    overflow-y: auto;
  }

  .login-gate {
    padding: 16px;
    min-height: 100vh;
  }

  .login-card {
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "copy"
      "actions";
    gap: 24px;
    padding: 24px;
  }

  .login-brand {
    flex-wrap: wrap;
  }

  .gate-language {
    margin-left: 0;
  }

  .login-copy h1 {
    font-size: 38px;
    white-space: normal;
  }

  .login-copy p {
    font-size: 15px;
    white-space: normal;
  }

  .tracker-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 14px;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: column;
    margin-left: 0;
  }

  .sidebar-account {
    order: 3;
  }

  .sidebar-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-actions .ghost-button:last-child {
    grid-column: auto;
  }

  .cloud-profile {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .cloud-profile img {
    width: 32px;
    height: 32px;
  }

  .sidebar-note {
    display: none;
  }

  .workspace {
    padding: 14px;
    height: auto;
    overflow: visible;
  }

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

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

  .backup-actions {
    flex: 1 1 100%;
  }

  .cloud-actions {
    min-width: 180px;
    max-width: 240px;
  }

  .app-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .chart-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .search-field,
  .tool-select {
    width: 100%;
    min-width: 0;
  }

  .tool-select {
    justify-content: space-between;
  }

  .tool-select select {
    max-width: min(220px, 58vw);
  }

  .panel {
    padding: 16px;
  }

  .table-wrap {
    overflow: visible;
  }

  .applications-view table,
  .applications-view thead,
  .applications-view tbody,
  .applications-view tr,
  .applications-view td {
    display: block;
    width: 100%;
  }

  .applications-view thead {
    display: none;
  }

  .applications-view tbody {
    display: grid;
    gap: 12px;
  }

  .applications-view tbody tr {
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #f9fcff);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.07);
    overflow: hidden;
  }

  .applications-view tbody tr:hover {
    background: linear-gradient(180deg, #ffffff, #f9fcff);
  }

  .applications-view td {
    min-height: 44px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(84px, 32%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    font-size: 13px;
  }

  .applications-view td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 820;
    line-height: 1.25;
    text-transform: uppercase;
  }

  .applications-view td:nth-child(1),
  .applications-view td:nth-child(2),
  .applications-view td:nth-child(3),
  .applications-view td:nth-child(4),
  .applications-view td:nth-child(5),
  .applications-view td:nth-child(6),
  .applications-view td:nth-child(7),
  .applications-view td:nth-child(8),
  .applications-view td:nth-child(9) {
    width: 100%;
  }

  .applications-view td:last-child {
    border-bottom: 0;
  }

  .applications-view .row-actions {
    justify-content: flex-end;
  }

  .applications-view .row-actions button {
    flex: 1 1 0;
  }

  .group-row td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
  }

  .group-row td::before {
    content: "";
    display: none;
  }
}

@media (max-width: 520px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .backup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .backup-actions span {
    grid-column: 1 / -1;
  }

  .cloud-actions {
    max-width: none;
  }

  .sidebar-actions {
    grid-template-columns: 1fr;
  }

  .sidebar-actions .ghost-button:last-child {
    grid-column: auto;
  }

  .applications-view td {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 4px;
  }

  .applications-view .row-actions {
    justify-content: stretch;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dialog-actions button {
    width: 100%;
  }
}
