:root {
  --primary: #c0392b;
  --secondary: #2c3e50;
  --light: #ecf0f1;
  --success: #27ae60;
  --danger: #e74c3c;
  --warning: #f39c12;
  --gf: #8e44ad;
  --nfs: #2980b9;
  --rs: #16a085;
  --azubi: #d35400;
  --extern: #e67e22;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f6f7;
  margin: 0;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1800px;
  margin: auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
  color: var(--secondary);
}

.nav-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--light);
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.nav-tabs button,
.action-btn {
  padding: 9px 15px;
  background: var(--secondary);
  color: #fff;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.nav-tabs button.active {
  background: var(--primary);
}

.action-btn {
  background: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.controls {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  align-items: center;
  flex-wrap: wrap;
}

select,
input[type="text"],
input[type="password"],
input[type="number"] {
  padding: 7px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.plan-wrap {
  overflow: auto;
  border: 1px solid #ccc;
  max-height: 72vh;
}

#planTable {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  margin: 0;
}

#planTable th,
#planTable td {
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 4px;
  text-align: center;
  white-space: nowrap;
}

#planTable thead th {
  position: sticky;
  top: 0;
  background: var(--secondary);
  color: #fff;
  z-index: 4;
}

#planTable .employee-col {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
  text-align: left;
  min-width: 240px;
}

#planTable thead .employee-col {
  background: var(--secondary);
  z-index: 7;
}

#planTable .day-col {
  min-width: 92px;
  padding: 0;
}

.day-column-toggle {
  width: 100%;
  min-height: 36px;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.day-column-toggle:hover,
.day-column-toggle[aria-pressed="true"] {
  background: #fff0b3;
  color: #4e3b00;
}

#planTable .marked-column {
  box-shadow: inset 0 0 0 2px #d7a500;
  background-color: #fff8dc;
}

.emp-name {
  font-weight: bold;
  cursor: help;
}

.emp-name:focus-visible {
  outline: 2px solid #6d8db8;
  outline-offset: 2px;
}

.employee-shift-tooltip {
  position: fixed;
  z-index: 1000;
  width: 170px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #23334d;
  box-shadow: 0 8px 24px rgba(23, 43, 77, .2);
  font-size: 12px;
  pointer-events: none;
}

.employee-shift-tooltip[hidden] {
  display: none;
}

.employee-shift-tooltip-title {
  display: block;
  margin-bottom: 6px;
  color: var(--secondary);
}

.employee-shift-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
  color: #52627a;
}

.emp-quali {
  font-size: 11px;
  margin-top: 3px;
}

.badge {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
}

.badge-gf { background: var(--gf); }
.badge-nfs { background: var(--nfs); }
.badge-rs { background: var(--rs); }
.badge-azubi { background: var(--azubi); }
.badge-extern { background: var(--extern); }
.badge-pa { background: #7f8c8d; }
.badge-yes { background: var(--warning); color: #fff; }
.badge-no { background: #7f8c8d; color: #fff; }

.plan-select {
  width: 88px;
  font-weight: bold;
}

.cell-RTW { background: #fdebd0; }
.cell-NEF { background: #d6eaf8; }
.cell-SKTW { background: #d5f5e3; }
.cell-O { background: #dce6ff; color: #293f78; }
.day-off { background: #f2f2f2; }

.plan-select:disabled {
  background: #eee;
  color: #999;
  cursor: not-allowed;
}

.shift-event-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: 2px;
  white-space: normal;
}

.shift-event-button {
  width: 24px;
  height: 22px;
  padding: 0;
  border: 1px solid #b7c6dc;
  border-radius: 4px;
  background: #f7f9fc;
  color: #405675;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.shift-event-button:hover {
  border-color: #718caf;
  background: #edf3fb;
}

.shift-event-button.has-event {
  border-color: #89c9ae;
  background: #e5f5ed;
  color: #176849;
}

.shift-event-button.dsm-sent {
  outline: 1px solid #25845c;
}

.event-row-setting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: #34445d;
  font-size: 12px;
  cursor: pointer;
}

.event-row-setting input {
  margin: 0;
}

.weekly-dsm-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.weekly-dsm-controls > label:first-child {
  display: grid;
  gap: 4px;
  color: #34445d;
  font-size: 12px;
  font-weight: 650;
}

.weekly-dsm-controls input[type="date"] {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #d8e0ea;
  border-radius: 6px;
  background: #fff;
  color: #23334d;
  font: inherit;
}

.weekly-dsm-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  color: #34445d;
  font-size: 12px;
  cursor: pointer;
}

.weekly-dsm-checkbox input {
  margin: 0;
}

.weekly-dsm-controls .action-btn {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}

#weeklyDsmStatus {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.shift-event-note {
  max-width: 110px;
  overflow: hidden;
  color: #42536d;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-event-dsm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #34445d;
  font-size: 13px;
  cursor: pointer;
}

.shift-event-dsm input {
  margin: 0;
}

.shift-event-dialog {
  width: min(460px, calc(100% - 28px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #23334d;
  box-shadow: 0 24px 70px rgba(15, 28, 48, .28);
}

.shift-event-dialog::backdrop {
  background: rgba(16, 29, 48, .58);
  backdrop-filter: blur(3px);
}

.shift-event-form {
  padding: 20px;
}

.shift-event-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.shift-event-dialog-header h3 {
  margin: 0 0 4px;
}

.shift-event-dialog-header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.shift-event-form > label {
  display: block;
  margin-bottom: 7px;
  color: #34445d;
  font-size: 13px;
  font-weight: 650;
}

.shift-event-form > .shift-event-dsm {
  display: inline-flex;
  margin-bottom: 0;
}

.shift-event-form textarea {
  width: 100%;
}

.shift-event-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.shift-event-dialog-actions .employee-cancel-btn {
  background: #edf1f6;
  color: #34445d;
}

.group-gf .employee-col { border-left: 7px solid var(--gf); }
.group-nfs .employee-col { border-left: 7px solid var(--nfs); }
.group-rs .employee-col { border-left: 7px solid var(--rs); }
.group-azubi .employee-col { border-left: 7px solid var(--azubi); }
.group-extern .employee-col { border-left: 7px solid var(--extern); }

.today-col {
  box-shadow: inset 0 -4px 0 var(--primary);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.status-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  background: #fafafa;
}

.status-card.ok { border-left: 6px solid var(--success); }
.status-card.bad { border-left: 6px solid var(--danger); }
.status-card.warn { border-left: 6px solid var(--warning); }

.status-title {
  font-weight: bold;
  font-size: 16px;
}

.status-ok { color: var(--success); font-weight: bold; }
.status-bad { color: var(--danger); font-weight: bold; }

.shift-line {
  margin-top: 7px;
  padding: 7px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #ddd;
}

.legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.legend span {
  padding: 5px 9px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
}

.legend-gf { background: var(--gf); }
.legend-nfs { background: var(--nfs); }
.legend-rs { background: var(--rs); }
.legend-azubi { background: var(--azubi); }
.legend-extern { background: var(--extern); }
.legend-pa { background: #7f8c8d; }

.summary {
  background: #f8f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  margin: 15px 0;
}

.small {
  font-size: 12px;
  color: #666;
}

table.normal {
  width: 100%;
  border-collapse: collapse;
}

table.normal th,
table.normal td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

table.normal th {
  background: var(--secondary);
  color: #fff;
}

.login-panel {
  max-width: 420px;
  margin: 10vh auto;
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-panel h1,
.login-panel h2 {
  margin-top: 0;
}

.login-panel .controls {
  display: block;
}

.login-panel label {
  display: block;
  margin: 12px 0 5px;
  font-weight: bold;
}

.login-panel input {
  width: 100%;
}

.login-error {
  color: var(--danger);
  min-height: 20px;
  margin-top: 12px;
}

.login-success {
  color: var(--success);
  min-height: 20px;
  margin-top: 12px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input {
  width: 100%;
}

@media (max-width: 700px) {
  body {
    padding: 5px;
  }
  .container {
    padding: 10px;
  }
  .employee-col {
    min-width: 200px !important;
  }
}

:root {
  --primary: #c43d36;
  --secondary: #172b4d;
  --light: #e8edf4;
  --success: #159570;
  --danger: #d74444;
  --warning: #df9a23;
  --surface: #ffffff;
  --muted: #64748b;
  --page: #f2f5f9;
  --line: #e4eaf1;
  --shadow: 0 12px 32px rgba(23, 43, 77, .08);
}

body {
  padding: 28px;
  background:
    radial-gradient(ellipse at 8% 0%, rgba(196, 61, 54, .07), transparent 30%),
    var(--page);
  color: #23334d;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.container {
  max-width: 1600px;
  padding: 0 30px 20px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.app-header {
  min-height: 132px;
  margin: 0 -30px 22px;
  padding: 27px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background: linear-gradient(116deg, #172b4d 0%, #233e68 70%, #314f7b 100%);
}

.app-header h1 {
  color: #fff;
  margin: 5px 0 3px;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -.7px;
}

.app-header p {
  color: #d4deec;
  margin: 0;
  font-size: 14px;
}

.eyebrow {
  color: #f5b5af;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.45px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 30px;
  background: rgba(255, 255, 255, .08);
  color: #f1f5f9;
  font-size: 13px;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #58d6a9;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(88, 214, 169, .15);
}

.nav-tabs {
  gap: 7px;
  margin: 0 -3px 25px;
  padding: 0 0 13px;
  border-bottom: 1px solid var(--line);
}

.nav-tabs button,
.action-btn {
  padding: 10px 15px;
  border-radius: 8px;
  background: #f0f3f7;
  color: #31425c;
  font-weight: 650;
  transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.nav-tabs button:hover,
.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(23, 43, 77, .12);
}

.nav-tabs button.active {
  color: #fff;
  background: var(--secondary);
}

.nav-tabs button.action-btn,
.action-btn {
  background: var(--primary);
  color: #fff;
}

.nav-tabs button.action-btn {
  margin-left: auto;
}

.tab-content h2 {
  margin: 8px 0 19px;
  font-size: 24px;
  letter-spacing: -.35px;
}

.tab-content h3 {
  font-size: 17px;
}

.controls {
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f9fbfd;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fff;
  color: #23334d;
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #6d8db8;
  box-shadow: 0 0 0 3px rgba(88, 124, 172, .15);
}

textarea {
  resize: vertical;
}

.summary {
  border-color: var(--line);
  border-radius: 10px;
  background: #f7f9fc;
  color: #52627a;
  line-height: 1.55;
}

table.normal {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  border-spacing: 0;
}

table.normal th,
table.normal td {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 11px 13px;
}

table.normal th {
  background: #233b60;
  font-size: 12px;
  letter-spacing: .2px;
}

table.normal tbody tr:nth-child(even) {
  background: #f8fafc;
}

table.normal tbody tr:last-child td {
  border-bottom: 0;
}

.plan-wrap {
  border: 1px solid #dce4ee;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(23, 43, 77, .04);
}

#planTable thead th {
  background: #233b60;
}

.employee-list-header,
.section-heading,
.audit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.employee-form-heading {
  margin: 0 0 8px;
}

.employee-form-heading h3 {
  margin: 0 0 3px;
}

.employee-form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.employee-list-header {
  margin: 26px 0 14px;
}

.employee-list-header h3,
.section-heading h3 {
  margin: 0 0 4px;
}

.employee-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1;
}

.employee-list-header input {
  width: min(100%, 330px);
}

.employee-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: min(88vh, 900px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #23334d;
  box-shadow: 0 24px 70px rgba(15, 28, 48, .28);
}

.employee-dialog::backdrop {
  background: rgba(16, 29, 48, .58);
  backdrop-filter: blur(3px);
}

.employee-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 25px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.employee-dialog-header .employee-form-heading h3 {
  margin: 0 0 4px;
}

.employee-form {
  padding: 20px 25px 24px;
}

.employee-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.employee-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #34445d;
  font-size: 13px;
  font-weight: 650;
}

.employee-field-wide {
  grid-column: 1 / -1;
}

.employee-field input,
.employee-field select,
.employee-field textarea {
  width: 100%;
}

.employee-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  align-self: center;
  min-height: 40px;
  color: #34445d;
  font-size: 13px;
  font-weight: 650;
}

.employee-checkbox input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.employee-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.employee-dialog-actions .employee-cancel-btn {
  background: #edf1f6;
  color: #34445d;
}

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 14px;
}

.employee-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 5px 17px rgba(23, 43, 77, .045);
  transition: transform .18s ease, box-shadow .18s ease;
}

.employee-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 43, 77, .1);
}

.employee-card-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
}

.employee-avatar {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #edf2f8;
  color: #2c4b74;
  font-weight: 800;
}

.employee-title {
  flex: 1;
  min-width: 0;
}

.employee-title h4 {
  margin: 0 0 2px;
  overflow: hidden;
  color: var(--secondary);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button,
.text-button {
  border: 0;
  background: transparent;
  color: #738198;
  cursor: pointer;
}

.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.icon-button:hover,
.text-button:hover {
  background: #f0f3f7;
  color: var(--secondary);
}

.employee-badges {
  min-height: 27px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  flex-wrap: wrap;
}

.employee-badges .badge {
  padding: 5px 8px;
  border-radius: 20px;
}

.badge-extra {
  color: #285d73;
  background: #dff2f5;
}

.employee-details {
  display: grid;
  gap: 9px;
  padding: 14px 0;
  color: #33445d;
}

.employee-details > div:not(.employee-empty) {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.employee-details span {
  color: var(--muted);
  font-size: 11px;
}

.employee-details strong {
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.employee-empty,
.empty-state {
  padding: 14px;
  color: var(--muted);
  text-align: center;
}

.employee-comment {
  max-height: 75px;
  margin: 0 0 13px;
  padding: 10px;
  overflow: auto;
  border-radius: 7px;
  background: #f7f9fc;
  color: #5b6880;
  font-size: 12px;
  white-space: pre-wrap;
}

.employee-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.employee-card-actions .action-btn {
  padding: 8px 11px;
  font-size: 12px;
}

.text-button {
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
}

.evaluation-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
  padding: 9px 12px;
  font-weight: 650;
}

.evaluation-controls > label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #495b73;
  font-size: 13px;
}

.evaluation-controls [hidden] {
  display: none;
}

.evaluation-controls input[type="date"] {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fff;
  color: #23334d;
  font: inherit;
}

.whiteboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 8px 0 18px;
}

.whiteboard-heading h2 {
  margin: 0 0 5px;
}

.whiteboard-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.whiteboard-form {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfd;
}

.whiteboard-form > label {
  color: #34445d;
  font-size: 12px;
  font-weight: 650;
}

.whiteboard-form > input,
.whiteboard-form > textarea {
  width: 100%;
}

.whiteboard-form textarea {
  min-height: 110px;
}

.whiteboard-form-actions,
.whiteboard-note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.whiteboard-form-actions {
  margin-top: 5px;
}

.whiteboard-form-actions [hidden] {
  display: none;
}

.whiteboard-form .employee-cancel-btn {
  background: #edf1f6;
  color: #34445d;
}

.whiteboard-notes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

.whiteboard-note {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid #d59a36;
  border-radius: 8px;
  background: #fff;
}

.whiteboard-note h3 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.whiteboard-note p {
  min-height: 40px;
  margin: 0 0 12px;
  color: #52627a;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.whiteboard-note-actions {
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.whiteboard-delete {
  color: #b43d37;
}

.evaluation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.evaluation-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.evaluation-stat span {
  color: var(--muted);
  font-size: 12px;
}

.evaluation-stat strong {
  color: var(--secondary);
  font-size: 27px;
}

.evaluation-stat.total {
  border-top: 3px solid var(--primary);
}

.evaluation-stat.rtw {
  border-top: 3px solid #d78137;
}

.evaluation-stat.nef {
  border-top: 3px solid #4e84bd;
}

.evaluation-stat.sktw {
  border-top: 3px solid #3b9b73;
}

.chart-panel {
  margin-bottom: 20px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.section-heading {
  margin-bottom: 17px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.evaluation-chart {
  display: grid;
  gap: 11px;
  max-height: 400px;
  padding-right: 5px;
  overflow-y: auto;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(90px, 190px) 1fr 35px;
  align-items: center;
  gap: 12px;
}

.chart-name {
  overflow: hidden;
  color: #465872;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-track {
  height: 13px;
  display: flex;
  overflow: hidden;
  border-radius: 10px;
  background: #eff3f7;
}

.chart-segment {
  height: 100%;
  min-width: 0;
}

.chart-rtw {
  background-color: #d78137;
}

.chart-nef {
  background-color: #4e84bd;
}

.chart-sktw {
  background-color: #3b9b73;
}

.chart-value {
  color: var(--secondary);
  font-size: 12px;
  text-align: right;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin: 15px 0 0 202px;
  color: var(--muted);
  font-size: 11px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.audit-toolbar {
  justify-content: flex-start;
  margin: 14px 0 9px;
  color: #495b73;
  font-size: 13px;
  font-weight: 650;
}

.audit-toolbar #auditCount {
  margin-left: auto;
  font-weight: 400;
}

.audit-scroll {
  max-height: 390px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.audit-scroll table {
  min-width: 850px;
  border: 0;
  border-radius: 0;
}

.audit-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.audit-scroll td {
  vertical-align: top;
}

.audit-empty {
  padding: 24px !important;
  color: var(--muted);
  text-align: center !important;
}

.audit-success {
  background: #d9f3e8;
  color: #187453;
}

.audit-error {
  background: #fde2e2;
  color: #a62d2d;
}

.audit-warning {
  background: #fff0ce;
  color: #875c0a;
}

.audit-security {
  background: #e6eafa;
  color: #465998;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 25px -30px -20px;
  padding: 15px 30px;
  border-top: 1px solid var(--line);
  background: #f9fbfd;
  color: #75839a;
  font-size: 11px;
}

.login-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

@media (max-width: 800px) {
  body {
    padding: 12px;
  }
  .container {
    padding: 0 15px 15px;
  }
  .app-header {
    margin: 0 -15px 18px;
    padding: 22px 17px;
  }
  .nav-tabs button.action-btn {
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  .employee-list-header,
  .employee-list-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .employee-list-actions {
    width: 100%;
  }
  .employee-list-actions input {
    width: 100%;
  }
  .employee-form {
    padding: 17px;
  }
  .employee-dialog-header {
    padding: 18px 17px 14px;
  }
}

@media (max-width: 460px) {
  .employee-form-grid {
    grid-template-columns: 1fr;
  }
  .employee-field-wide {
    grid-column: auto;
  }
  .employee-dialog-actions {
    flex-direction: column-reverse;
  }
  .employee-dialog-actions button {
    width: 100%;
  }
  .evaluation-summary {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .chart-legend {
    margin-left: 0;
  }
  .app-footer {
    margin: 20px -15px -15px;
    padding: 14px 15px;
  }
}

@media (max-width: 520px) {
  .header-status {
    display: none;
  }
  .employee-list-header,
  .audit-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .employee-list-header input {
    width: 100%;
  }
  .chart-row {
    grid-template-columns: minmax(75px, 105px) 1fr 25px;
    gap: 7px;
  }
  .app-footer {
    flex-direction: column;
  }
}
