* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  background: linear-gradient(to bottom right, #0f0f0f, #1a1a1a);
  color: #f1c40f;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
  max-width: 1000px;
  margin: auto;
  background: #1e1e1e;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

h1,
h2,
h3 {
  text-align: center;
  margin: 0 0 20px;
  color: #f1c40f;
}

.card {
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 12px;
  border: 1px solid #444;
  background: #2c2c2c;
  color: #f1f1f1;
  font-size: 16px;
  transition: 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #f1c40f;
  background-color: #333;
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.2);
}

button {
  padding: 12px 16px;
  margin: 8px 0;
  border-radius: 12px;
  border: none;
  background: #f1c40f;
  color: #121212;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

button:hover {
  background: #ffe066;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(241, 196, 15, 0.18);
}

button.secondary {
  background: #3a3a3a;
  color: #f1f1f1;
}

button.secondary:hover {
  background: #4a4a4a;
}

.delete-btn {
  background: rgba(112, 53, 53, 0.28);
  color: #df9a9a;
  border: 1px solid rgba(201, 96, 96, 0.2);
  border-radius: 14px;
  padding: 0 18px;
  height: 42px;
  margin: 0;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  background: rgba(132, 61, 61, 0.36);
  box-shadow: none;
}

.success {
  color: #7dff9b;
}

.error {
  color: #ff8d8d;
}

small {
  color: #d8d8d8;
}

.modal {
  display: none;
  position: fixed;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  padding: 30px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal.show {
  display: block;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 160px;
  overflow-y: auto;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 10px;
  padding: 10px;
  margin-top: 10px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.checkbox-group input[type='checkbox'] {
  width: auto;
  margin: 0 8px 0 0;
}

#controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

#controls input[type='text'],
#controls select {
  flex: 1;
  min-width: 200px;
}

ul {
  padding: 0;
  list-style: none;
}

ul li {
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
}

.upload-list li {
  padding: 10px;
  margin: 8px 0;
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.job-actions button,
.job-actions form {
  width: auto;
}

.job-actions form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.job-actions input[type='file'] {
  width: auto;
  max-width: 260px;
}

.nav-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  background: #f1c40f;
  color: #121212;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.25s ease;
}

.nav-links a:hover {
  background: #ffe066;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(241, 196, 15, 0.18);
}

.nav-links a.secondary-link {
  background: #333;
  color: #f1f1f1;
}

.nav-links a.secondary-link:hover {
  background: #4a4a4a;
}

.dashboard-container {
  max-width: 760px;
  margin: 60px auto;
}

.dashboard-card {
  padding: 30px;
}

.nav-links.vertical-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.dashboard-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 88px;
  padding: 18px;
  border-radius: 14px;
  background: #f1c40f;
  color: #121212;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  transition: all 0.25s ease;
}

.dashboard-link:hover {
  background: #ffe066;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(241, 196, 15, 0.18);
}

.dashboard-link.secondary-link {
  background: #333;
  color: #f1f1f1;
}

.dashboard-link.secondary-link:hover {
  background: #4a4a4a;
}

.link-icon {
  font-size: 26px;
  line-height: 1;
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.user-list {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #242424;
  border: 1px solid #333;
  border-radius: 12px;
}

.user-row strong {
  color: #f1c40f;
}

.muted {
  margin-top: 4px;
  color: #cfcfcf;
  font-size: 14px;
}

.status-msg {
  margin-top: 12px;
  font-weight: 600;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.confirm-modal.hidden {
  display: none;
}

.confirm-box {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 28px;
  background: linear-gradient(180deg, #242424 0%, #1b1b1b 100%);
  border: 1px solid #3a3a3a;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.confirm-icon {
  font-size: 42px;
  margin-bottom: 10px;
}

.confirm-box h3 {
  margin: 0 0 10px;
  color: #f1c40f;
  font-size: 32px;
}

.confirm-box p {
  margin: 0;
  color: #f1f1f1;
  line-height: 1.5;
  font-size: 17px;
}

.confirm-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 24px;
}

.confirm-actions button {
  width: auto !important;
  margin: 0;
  flex: 0 0 auto;
}

.secondary-btn,
.danger-btn {
  min-width: 160px;
  max-width: none;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.secondary-btn {
  background: #3a3a3a;
  color: #f1f1f1;
}

.secondary-btn:hover {
  background: #4a4a4a;
}

.danger-btn {
  background: #e74c3c;
  color: #fff;
}

.danger-btn:hover {
  background: #c0392b;
  box-shadow: 0 8px 20px rgba(231, 76, 60, 0.2);
}

.paperwork-page {
  max-width: 1320px;
  margin: 0 auto;
}

.paperwork-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.paperwork-title-wrap h1 {
  margin: 0;
  text-align: left;
}

.paperwork-upload-card,
.paperwork-list-card {
  background: linear-gradient(180deg, #1d1d1f 0%, #18181a 100%);
  border: 1px solid #2b2b2f;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.paperwork-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.paperwork-section-head h3 {
  margin: 0;
  text-align: left;
}

.paperwork-upload-form {
  display: grid;
  grid-template-columns: 280px 1fr 140px;
  gap: 18px;
  align-items: center;
}

.paperwork-title-input {
  margin: 0;
  height: 52px;
  border-radius: 16px;
}

.paperwork-file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.paperwork-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 176px;
  height: 50px;
  padding: 0 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2b2b2f 0%, #232326 100%);
  border: 1px solid #3a3a40;
  color: #e7e7e9;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.paperwork-file-btn:hover {
  border-color: #55555d;
  background: linear-gradient(180deg, #313136 0%, #27272b 100%);
}

.paperwork-selected-file {
  color: #8d8d93;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paperwork-upload-btn {
  margin: 0;
  justify-self: end;
  width: 120px;
  height: 50px;
  padding: 0 20px;
  border-radius: 16px;
  background: #caa20b;
  color: #111;
  font-size: 15px;
  font-weight: 800;
  box-shadow: none;
}

.paperwork-upload-btn:hover {
  background: #e0b812;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(202, 162, 11, 0.18);
}

.paperwork-list-wrap {
  display: block;
}

.paperwork-empty-state {
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, #202023 0%, #1a1a1d 100%);
  border: 1px solid #303036;
  color: #9d9da3;
  text-align: center;
}

.paperwork-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: 22px;
  background: linear-gradient(90deg, #212124 0%, #262629 52%, #222225 100%);
  border: 1px solid #34343a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
  cursor: pointer;
  outline: none;
}

.paperwork-item:hover,
.paperwork-item:focus-visible,
.paperwork-item.is-selected {
  border-color: rgba(241, 196, 15, 0.55);
  box-shadow:
    0 0 0 1px rgba(241, 196, 15, 0.18),
    0 0 18px rgba(241, 196, 15, 0.12),
    0 0 34px rgba(241, 196, 15, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

.paperwork-file-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.paperwork-badge-doc {
  background: rgba(56, 114, 170, 0.16);
  border: 1px solid rgba(92, 150, 211, 0.28);
  color: #9cc7f4;
}

.paperwork-badge-pdf {
  background: rgba(170, 56, 56, 0.16);
  border: 1px solid rgba(223, 92, 92, 0.26);
  color: #f1aaaa;
}

.paperwork-badge-xls {
  background: rgba(49, 138, 83, 0.16);
  border: 1px solid rgba(86, 198, 126, 0.26);
  color: #a9efbc;
}

.paperwork-badge-img {
  background: rgba(168, 124, 32, 0.16);
  border: 1px solid rgba(229, 187, 70, 0.26);
  color: #f3d27e;
}

.paperwork-badge-txt {
  background: rgba(122, 69, 171, 0.16);
  border: 1px solid rgba(177, 120, 231, 0.24);
  color: #d8b6ff;
}

.paperwork-badge-file {
  background: rgba(120, 120, 120, 0.16);
  border: 1px solid rgba(185, 185, 185, 0.18);
  color: #dbdbdb;
}

.paperwork-main {
  flex: 1;
  min-width: 0;
}

.paperwork-name {
  font-size: 17px;
  font-weight: 750;
  color: #d8d8da;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paperwork-subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: #8b8b90;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paperwork-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.paperwork-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: none;
  background: rgba(126, 105, 19, 0.22);
  border: 1px solid rgba(202, 162, 11, 0.3);
  color: #d5b54b;
}

.paperwork-open-btn:hover {
  background: rgba(126, 105, 19, 0.32);
}

@media (max-width: 900px) {
  .paperwork-upload-form {
    grid-template-columns: 1fr;
  }

  .paperwork-upload-btn {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .user-row,
  .paperwork-item {
    flex-direction: column;
    align-items: stretch;
  }

  .container {
    padding: 20px;
  }

  .paperwork-actions {
    width: 100%;
    flex-direction: column;
  }

  .paperwork-open-btn,
  .paperwork-actions .delete-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .confirm-box {
    padding: 22px;
  }

  .confirm-actions {
    flex-direction: column;
  }

  .confirm-actions button,
  .secondary-btn,
  .danger-btn {
    width: 100% !important;
  }
}