:root {
  --bg: #f6f1e8;
  --panel: rgba(255, 253, 249, 0.92);
  --ink: #000000;
  --muted: #000000;
  --accent: #2f7f61;
  --accent-dark: #206348;
  --title: #00a1a1;
  --line: rgba(18, 65, 48, 0.09);
  --soft-line: rgba(29, 42, 34, 0.06);
  --error: #b42318;
  --shadow: 0 14px 34px rgba(34, 50, 40, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(250, 247, 242, 0.18), rgba(250, 247, 242, 0.18)),
    url("/images/nennew.jpg") center / cover fixed no-repeat;
}

.page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 14px 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.topbar a {
  color: var(--title);
  text-decoration: none;
  font-weight: 700;
}

.topbar > div {
  display: none;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 252, 247, 0.84);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 12px;
}

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

h1,
h2,
h3,
.topbar strong,
.field span,
.uploader-title {
  color: var(--title);
}

.form {
  display: block;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  gap: 14px;
  align-items: stretch;
}

.right-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.mode-card,
.filter-card,
.employee-card {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--soft-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.compact-card {
  padding: 18px;
}

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

.uploader {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(11, 122, 93, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(245, 250, 247, 0.9));
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
  min-height: 210px;
}

.uploader:hover,
.uploader.dragover {
  transform: translateY(-2px);
  border-color: rgba(11, 122, 93, 0.4);
  box-shadow: 0 16px 30px rgba(11, 122, 93, 0.06);
}

.uploader input {
  display: none;
}

.uploader-title {
  font-size: 16px;
  font-weight: 700;
}

.uploader-desc {
  min-height: 48px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.uploader-action {
  display: inline-flex;
  width: fit-content;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(11, 122, 93, 0.1);
  color: var(--title);
  font-size: 12px;
  font-weight: 700;
}

.file-list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--ink);
  min-height: 52px;
  font-size: 14px;
}

.file-list li {
  margin: 6px 0;
  line-height: 1.5;
}

.employee-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.employee-card-head h3,
.filter-card h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.employee-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto;
  gap: 10px 12px;
  align-items: end;
  margin-bottom: 16px;
}

.employee-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 700;
  font-size: 14px;
}

.field-file input[type="file"] {
  padding: 11px 12px;
}

input[type="text"],
input[type="password"],
input[type="file"],
input[type="date"],
select {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(29, 42, 34, 0.16);
  border-radius: 14px;
  background: #fff;
  font-size: 14px;
}

.hint {
  margin-bottom: 0;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.search-found {
  color: #e92329;
  font-weight: 600;
}

.employee-search-matches {
  min-height: 0;
  margin-top: -2px;
  margin-bottom: 12px;
  padding: 10px 18px 0;
  border-radius: 14px;
  background: rgba(47, 127, 97, 0.05);
}

.employee-search-matches[hidden] {
  display: none;
}

.employee-preview {
  min-height: 180px;
}

.employee-preview li {
  margin-bottom: 10px;
}

.actions {
  display: flex;
  justify-content: flex-start;
}

button {
  width: fit-content;
  min-width: 180px;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(127, 151, 135, 0.15);
  color: var(--accent-dark);
}

.status.success {
  background: rgba(11, 122, 93, 0.1);
}

.status.error {
  background: rgba(180, 35, 24, 0.1);
  color: var(--error);
}

@media (max-width: 1040px) {
  .workspace-grid,
  .upload-grid,
  .employee-search-row {
    grid-template-columns: 1fr;
  }

  .uploader {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .page {
    padding-top: 16px;
  }

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

  .panel {
    border-radius: 20px;
    padding: 10px;
  }

  .actions,
  .date-grid,
  .employee-grid {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
