﻿:root {
  --ink: #111827;
  --muted: #64748b;
  --page: #eef3f8;
  --panel: rgba(255, 255, 255, .94);
  --panel-border: #d8e3ef;
  --navy: #09111f;
  --navy-2: #101d33;
  --blue: #0f5f8f;
  --blue-2: #0ea5c6;
  --cyan: #38bdf8;
  --mint: #13b88a;
  --blue-soft: #e5f4ff;
  --rose-soft: #ffe8df;
  --line: #8fd3f4;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --shadow: 0 20px 50px rgba(15, 23, 42, .10);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, .08);
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(56, 189, 248, .20), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(19, 184, 138, .16), transparent 26%),
    linear-gradient(135deg, #f8fbff 0%, var(--page) 52%, #e7eef7 100%);
}
body.modal-open { overflow: hidden; }
a { color: var(--blue); text-decoration: none; font-weight: 700; }
input, select, textarea, button { font: inherit; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  padding: 10px 11px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  color: #172033;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(14, 165, 198, .14);
}
textarea { min-height: 82px; resize: vertical; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; color: #334155; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  display: flex;
  flex-direction: column;
  color: #fff;
  padding: 22px 18px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 70%, #052b3f 100%);
  box-shadow: 14px 0 45px rgba(9, 17, 31, .22);
}
.brand {
  position: relative;
  padding: 12px 12px 18px;
  margin-bottom: 18px;
  font-size: 18px;
  font-weight: 900;
}
.brand::before {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 0;
  width: 64px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
}
.sidebar nav { display: grid; gap: 8px; }
.sidebar a {
  display: block;
  color: #dbeafe;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
}
.sidebar a:hover, .sidebar a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(56, 189, 248, .22), rgba(19, 184, 138, .16));
  border-color: rgba(125, 211, 252, .32);
}
.language-switcher {
  align-self: center;
  display: flex;
  gap: 6px;
  justify-content: center;
  width: auto;
  margin-top: auto;
  margin-bottom: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.language-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  border: 1px solid rgba(125, 211, 252, .30);
  border-radius: 999px;
  padding: 5px 7px;
  background: rgba(255,255,255,.08);
  color: #dbeafe;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}
.language-option img {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.language-option.active {
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff, #dff7ff);
  border-color: rgba(56, 189, 248, .72);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.main { margin-left: 250px; padding: 28px; }
.auth-main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-language-switcher {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 1px solid #d5e6f2;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-sm);
}
.auth-language-switcher .language-option {
  color: #0f172a;
  background: #f8fbff;
  border-color: #d5e6f2;
}
.auth-card, .panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.auth-card { width: min(460px, 100%); padding: 30px; }
.auth-card form { display: grid; gap: 16px; }
.panel { padding: 19px; margin-bottom: 18px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 15px;
}
.panel-head h2 {
  margin-bottom: 0;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}
.page-head-actions {
  display: grid;
  justify-items: end;
  gap: 12px;
  width: min(760px, 100%);
}
.employee-search {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(170px, 1fr) auto;
  gap: 10px;
  align-items: end;
  width: 100%;
  padding: 12px;
  border: 1px solid #d5e6f2;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(236,248,255,.92));
  box-shadow: var(--shadow-sm);
}
.employee-search .actions {
  flex-wrap: nowrap;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 30px; line-height: 1.12; }
h2 { margin-bottom: 15px; font-size: 18px; }
p { color: var(--muted); line-height: 1.45; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  padding: 15px;
  border: 1px solid #cfe0ec;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(236, 248, 255, .90));
  box-shadow: var(--shadow-sm);
}
.kpi::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-2), var(--mint));
}
.kpi span { display: block; color: #475569; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.kpi strong { display: block; margin-top: 12px; font-size: 22px; }
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d7e6f1;
  border-radius: 8px;
  background: #fff;
}
.pagination {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #d8e3ef;
  color: #64748b;
  font-weight: 800;
}
.pagination-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #cbd8e6;
  border-radius: 7px;
  background: linear-gradient(135deg, #f8fbff, #e8eef5);
  color: #111827;
  font-weight: 900;
}
.page-button.active {
  color: #fff;
  border-color: #0ea5c6;
  background: linear-gradient(135deg, #0f5f8f, #13b88a);
  box-shadow: 0 10px 22px rgba(14, 95, 143, .18);
}
.page-button.arrow {
  min-width: 58px;
  font-size: 20px;
}
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th {
  background: linear-gradient(180deg, #145f8f, #0d4d76);
  color: #fff;
  font-weight: 900;
  text-align: left;
  padding: 10px;
  border: 1px solid #5fbde9;
  white-space: nowrap;
}
td {
  background: #fbfeff;
  padding: 9px 10px;
  border: 1px solid var(--line);
  vertical-align: middle;
}
tr:nth-child(odd) td { background: var(--blue-soft); }
td:nth-last-child(3) { background: var(--rose-soft); }
td:nth-last-child(2) { background: #dff4eb; }
td:nth-last-child(1) { background: #dcecf7; }
.grid-form { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 15px; }
.grid-form.compact { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.span-2 { grid-column: span 2; }
.form-actions, .inline-form, .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input { min-width: 190px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
  padding: 10px 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(14, 95, 143, .22);
}
.button.secondary {
  background: linear-gradient(135deg, #e8eef5, #f8fbff);
  color: #0f172a;
  box-shadow: none;
  border: 1px solid #cbd8e6;
}
.button.danger {
  background: linear-gradient(135deg, #b42318, #ef4444);
  color: #fff;
  box-shadow: 0 10px 22px rgba(180, 35, 24, .18);
}
.button.small { min-height: 32px; padding: 7px 11px; font-size: 13px; }
.hero-action {
  min-width: 190px;
  min-height: 48px;
  border-radius: 10px;
  font-size: 15px;
  background: linear-gradient(135deg, #0f5f8f, #13b88a);
}
.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.modal-shell.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 17, 31, .54);
  backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  width: min(1180px, 100%);
  max-height: min(86vh, 900px);
  overflow: auto;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,251,255,.96));
  border: 1px solid rgba(216, 227, 239, .95);
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(9, 17, 31, .34);
  padding: 22px;
  transform: translateY(14px) scale(.98);
  transition: transform .22s ease;
}
.modal-shell.is-open .modal-card {
  transform: translateY(0) scale(1);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #d8e3ef;
}
.modal-head h2 {
  margin-bottom: 4px;
  font-size: 22px;
}
.modal-head p {
  margin-bottom: 0;
}
.modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #e8eef5;
  color: #0f172a;
  cursor: pointer;
  font-weight: 900;
  font-size: 18px;
}
.modal-close:hover {
  background: #dbe7f2;
}
.employee-modal-card .grid-form {
  grid-template-columns: repeat(3, minmax(190px, 1fr));
}
.employee-profile-card {
  width: min(1120px, 100%);
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.profile-grid div {
  background: linear-gradient(135deg, #f8fcff, #edf7ff);
  border: 1px solid #d5e6f2;
  border-radius: 10px;
  padding: 12px;
}
.profile-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.profile-grid strong {
  display: block;
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.document-panel {
  border-top: 1px solid #d8e3ef;
  padding-top: 18px;
}
.document-panel h3 {
  margin: 0 0 13px;
  font-size: 17px;
}
.document-upload {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 15px;
}
.document-bulk-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d5e6f2;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fcff, #eef9ff);
}
.document-select-all {
  display: inline-flex;
  grid-template-columns: none;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #334155;
}
.document-select-all input,
.document-check input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--blue-2);
}
.document-list {
  display: grid;
  gap: 10px;
}
.document-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #eef9ff);
  border: 1px solid #d5e6f2;
  border-radius: 10px;
  padding: 12px;
}
.document-check {
  display: inline-flex;
  grid-template-columns: none;
  width: 22px;
  align-items: center;
  justify-content: center;
}
.document-card strong {
  display: block;
  margin-bottom: 4px;
}
.document-card span {
  display: block;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.doc-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .10);
}
.doc-action:hover {
  color: #fff;
  filter: brightness(1.04);
}
.doc-action.open {
  background: linear-gradient(135deg, #0f5f8f, #0ea5c6);
}
.doc-action.download {
  background: linear-gradient(135deg, #0f766e, #13b88a);
}
.empty-note {
  margin: 0;
  padding: 14px;
  border: 1px dashed #b8c8d8;
  border-radius: 10px;
  background: #f8fbff;
}
.actions { white-space: nowrap; }
.document-card .actions { justify-content: flex-end; }
.actions form { margin: 0; }
.link-danger {
  border: 0;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 7px;
  cursor: pointer;
  padding: 7px 10px;
  font-weight: 900;
}
.alert {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  box-shadow: var(--shadow-sm);
}
.alert-error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 18px; }
.simple-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 9px; }
.simple-list li {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: linear-gradient(135deg, #edf9ff, #f8fcff);
  border: 1px solid #cde7f5;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}
.simple-list form { margin: 0; }
.mini-delete {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
  line-height: 20px;
  padding: 0;
  cursor: pointer;
  font-weight: 900;
}
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-form, .employee-modal-card .grid-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .profile-grid { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
  .page-head-actions { width: 100%; justify-items: stretch; }
  .employee-search { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .document-upload { grid-template-columns: 1fr 1fr; }
  .document-upload .button { grid-column: span 2; }
}
@media (max-width: 860px) {
  .sidebar { position: static; width: auto; padding: 16px; }
  .sidebar nav { grid-template-columns: repeat(2, 1fr); }
  .main { margin-left: 0; padding: 18px; }
  .page-head { display: grid; }
  .panel-head { align-items: stretch; display: grid; }
  .employee-search { grid-template-columns: 1fr; }
  .pagination { align-items: flex-start; display: grid; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-form, .grid-form.compact, .settings-grid, .employee-modal-card .grid-form { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .profile-grid, .document-upload { grid-template-columns: 1fr; }
  .document-upload .button { grid-column: auto; }
  .document-bulk-actions { align-items: stretch; display: grid; }
  .document-card { grid-template-columns: 28px minmax(0, 1fr); }
  .document-card .actions { grid-column: 2; justify-content: flex-start; white-space: normal; }
}
@media (max-width: 560px) {
  .sidebar nav, .kpi-grid { grid-template-columns: 1fr; }
  .main { padding: 12px; }
  .panel { padding: 14px; }
}
