:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe3ef;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --good: #0f766e;
  --warn: #b45309;
  --tensor-banner-from: #5b21b6;
  --tensor-banner-to: #a855f7;
  --tensor-banner-shadow: rgba(91, 33, 182, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  align-items: flex-start;
  background: linear-gradient(135deg, var(--tensor-banner-from), var(--tensor-banner-to));
  border-radius: 18px;
  box-shadow: 0 12px 28px var(--tensor-banner-shadow);
  color: #fff;
  margin-bottom: 16px;
  padding: 22px 26px;
}

.header h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
}

.header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}

.shell > .header.app-header--with-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}

.nav a {
  text-decoration: none;
  color: #0b3a8e;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  text-align: center;
}

.nav a.active {
  background: var(--accent-soft);
  border-color: #93c5fd;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.kpi {
  font-size: 1.8rem;
  margin: 6px 0 0;
  font-weight: 700;
}

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

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.tag.good {
  background: #ccfbf1;
  color: var(--good);
}

.tag.warn {
  background: #fef3c7;
  color: var(--warn);
}

button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
}

.employees-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.employee-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.employee-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
}

.employee-form-grid .full-width {
  grid-column: 1 / -1;
}

.employee-form-grid input,
.employee-form-grid select,
.employee-form-grid textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.employee-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.link-button {
  background: transparent;
  color: #1d4ed8;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.shell > .header.app-header--with-shortcuts .crm-header-shortcuts {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.shell > .header.app-header--with-shortcuts .crm-prefs-shortcut,
.shell > .header.app-header--with-shortcuts .tensor-banner-logout,
.shell > .header.app-header--with-shortcuts a.tensor-erp-launcher {
  order: 1;
}

.shell > .header.app-header--with-shortcuts .crm-prefs-shortcut {
  align-items: center;
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  height: 2.35rem;
  justify-content: center;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
  width: 2.35rem;
}

.shell > .header.app-header--with-shortcuts .crm-prefs-shortcut:hover {
  background: rgba(15, 23, 42, 0.38);
  color: #fff;
}

.shell > .header.app-header--with-shortcuts .crm-prefs-shortcut:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.shell > .header.app-header--with-shortcuts .tensor-banner-session {
  color: rgba(255, 255, 255, 0.92);
  flex-basis: 100%;
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
  max-width: none;
  order: 2;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell > .header.app-header--with-shortcuts .tensor-banner-logout {
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
}

.shell > .header.app-header--with-shortcuts .tensor-banner-logout:hover {
  background: rgba(15, 23, 42, 0.38);
  color: #fff;
}

.shell > .header.app-header--with-shortcuts a.tensor-erp-launcher {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.96);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
}

.shell > .header.app-header--with-shortcuts a.tensor-erp-launcher:hover {
  background: rgba(255, 255, 255, 0.28);
}

.shell > .header.app-header--with-shortcuts .app-header-brand {
  flex: 1;
  min-width: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 10px 6px;
  font-size: 0.95rem;
}

th {
  color: #334155;
}

ul.clean {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.clean li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

ul.clean li:last-child {
  border-bottom: 0;
}
