body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 8px;
  background: #0e1621;
  color: #fff;
}

.hidden {
  display: none !important;
}

h2 {
  margin: 0 0 12px;
}

h4 {
  margin: 16px 0 8px;
  color: #d7e3f4;
  font-size: 15px;
  font-weight: 700;
}

p {
  margin: 0;
}

form label {
  display: block;
  margin-bottom: 12px;
}

input,
textarea,
button {
  box-sizing: border-box;
  margin-top: 6px;
  font: inherit;
}

input,
textarea {
  width: 100%;
  background: #111a26;
  color: #ffffff;
  border: 1px solid #243244;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #7f90a6;
}

input:hover,
textarea:hover {
  border-color: #30445d;
}

input:focus,
textarea:focus {
  background: #162131;
  border-color: #153e75;
  box-shadow: 0 0 0 3px rgba(21, 62, 117, 0.22);
}

textarea {
  min-height: 60px;
  resize: vertical;
}

#main {
  max-width: 100%;
}

#no-access {
  padding: 16px 8px;
}

#submitBtn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #153e75;
  color: #ffffff;
  border: 1px solid #1d4f92;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

#submitBtn:hover:not(:disabled) {
  background: #123766;
  border-color: #184785;
}

#submitBtn:active:not(:disabled) {
  background: #102f58;
  transform: translateY(1px);
}

#submitBtn:disabled {
  background: #2a3542;
  border-color: #364454;
  color: #8b98a7;
  cursor: not-allowed;
}

hr {
  border: none;
  height: 1px;
  background: #1f2d3d;
  margin: 20px 0;
  opacity: 0.9;
}

.brand-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #111a26 0%, #0f1722 100%);
  border: 1px solid #243244;
  border-radius: 16px;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  max-width: 190px;
  width: 100%;
  height: auto;
  opacity: 0.98;
}

.access-badge {
  margin: 8px 0 16px;
  padding: 10px 14px;
  background: #111a26;
  border: 1px solid #243244;
  border-radius: 12px;
  color: #d7e3f4;
  font-size: 14px;
  line-height: 1.4;
}

.access-role {
  font-weight: 700;
}

.access-role-employee {
  color: #7177f8;
}

.access-role-manager {
  color: #d66549;
}

.label-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #d7e3f4;
  font-weight: 600;
}

.label-icon,
.btn-icon,
.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.label-icon {
  width: 18px;
  height: 18px;
  color: #7177f8;
}

.btn-icon {
  width: 18px;
  height: 18px;
  color: #ffffff;
}

.label-icon svg,
.btn-icon svg,
.tab-icon svg,
.icon-btn svg {
  width: 100%;
  height: 100%;
}

.tabs-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 8px;
}

.status-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.tab-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  margin-top: 0;
  background: #17212b;
  color: #fff;
  border: 1px solid #3b4b5b;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.tab-btn:hover {
  background: #1c2734;
  border-color: #4a5f74;
}

.tab-btn:active {
  transform: translateY(1px);
}

.tab-btn.active {
  background: #0078d4;
  border-color: #0078d4;
}

.tab-icon {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.82);
}

.tab-btn.active .tab-icon {
  color: #ffffff;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 0;
  background: #17212b;
  color: #ffffff;
  border: 1px solid #243244;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  background: #1c2734;
  border-color: #355174;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.icon-btn:active {
  transform: translateY(1px);
}

.icon-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  background: #162131;
  color: #ffffff;
  border: 1px solid #243244;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

.icon-btn:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.search-panel {
  margin: 0 0 12px;
}

#request-search-input {
  width: 100%;
}

.requests-panel {
  margin-top: 12px;
}

.request-card {
  border: 1px solid #3b4b5b;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #17212b;
}

.request-summary {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.request-summary-left {
  flex: 1;
  min-width: 0;
}

.request-prefix-row {
  margin-bottom: 8px;
}

.toggle-btn {
  width: auto;
  margin-top: 0;
  background: #0078d4;
  border: none;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.toggle-btn:hover {
  background: #106ebe;
}

.request-details {
  padding: 12px;
  border-top: 1px solid #3b4b5b;
}

.request-details.hidden {
  display: none !important;
}

.request-details a {
  color: #4f8cff;
  text-decoration: none;
  font-weight: 500;
}

.request-details a:hover {
  color: #3f7ae6;
  text-decoration: underline;
}

.request-details a:active {
  color: #2f66cc;
}

.request-details a:visited {
  color: #7b8fd6;
}

.request-details b {
  color: #7177f8;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.author-name {
  font-weight: 500;
  font-size: 14px;
}

.author-username {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending {
  background: #5a3d00;
  color: #ffd27a;
}

.status-approved {
  background: #1a3c2e;
  color: #8cffb0;
}

.decision-block {
  background: #1f2a36;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  border-left: 4px solid #4caf50;
}

.decision-updated {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 6px;
}

.no-decision {
  color: #ff9800;
  font-style: italic;
  padding: 8px;
  background: #2a3c1e;
  border-radius: 4px;
  margin-top: 12px;
}

.decision-textarea {
  width: 100%;
  min-height: 80px;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid #3b4b5b;
  border-radius: 4px;
  background: #1e252d;
  color: white;
  resize: vertical;
}

.save-decision-btn {
  width: auto;
  margin-top: 0;
  background: #4caf50;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.save-decision-btn:hover {
  background: #45a049;
}

.save-decision-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .top-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .top-actions {
    margin-left: 0;
  }

  .request-summary {
    flex-direction: column;
  }

  .toggle-btn {
    align-self: flex-start;
  }
}

.manager-form-control {
  margin: 0 0 14px;
}

.icon-toggle-btn {
  width: auto;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #17212b;
  color: #ffffff;
  border: 1px solid #243244;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.icon-toggle-btn:hover {
  background: #1c2734;
  border-color: #355174;
}

.icon-toggle-btn:active {
  transform: translateY(1px);
}

.icon-toggle-btn.enabled {
  background: #153e75;
  border-color: #1d4f92;
}

.icon-toggle-btn-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-toggle-btn-icon svg {
  width: 100%;
  height: 100%;
}

.comments-block {
  margin-top: 14px;
}

.comments-toggle-btn {
  width: auto;
  margin-top: 0;
  background: #1b2633;
  color: #d7e3f4;
  border: 1px solid #2a3a4f;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.comments-toggle-btn:hover {
  background: #223142;
}

.comments-content {
  margin-top: 10px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-item {
  background: #111a26;
  border: 1px solid #243244;
  border-radius: 12px;
  padding: 12px;
}

.comment-author {
  margin-bottom: 6px;
}

.comment-date {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 8px;
}

.comment-text {
  line-height: 1.45;
  color: #ffffff;
  white-space: normal;
  word-break: break-word;
}

.comments-empty {
  opacity: 0.75;
  padding: 10px 0;
}

.comment-form {
  margin-top: 10px;
}

.comment-textarea {
  width: 100%;
  min-height: 74px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #3b4b5b;
  border-radius: 10px;
  background: #1e252d;
  color: #fff;
  resize: vertical;
}

.comment-hint {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 8px;
}

.save-comment-btn {
  width: auto;
  margin-top: 0;
  background: #153e75;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.save-comment-btn:hover {
  background: #123766;
}

.save-comment-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

.comments-toggle-btn {
  width: 100%;
  margin-top: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #17212b;
  color: #d7e3f4;
  border: 1px solid #243244;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.comments-toggle-btn:hover {
  background: #1c2734;
  border-color: #355174;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.comments-toggle-btn:active {
  transform: translateY(1px);
}

.comments-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.comments-toggle-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8fb7ff;
  transition: transform 0.2s ease, color 0.2s ease;
}

.comments-toggle-icon svg {
  width: 100%;
  height: 100%;
}

.comments-toggle-btn.expanded .comments-toggle-icon {
  transform: rotate(90deg);
  color: #ffffff;
}

.comments-toggle-state {
  font-size: 12px;
  color: #8fa3ba;
  transition: color 0.2s ease;
}

.comments-toggle-btn.expanded .comments-toggle-state {
  color: #ffffff;
}

.manager-form-control {
  margin: 0 0 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.manager-access-control {
  margin: 0 0 14px;
}

.manager-access-card {
  background: #111a26;
  border: 1px solid #243244;
  border-radius: 14px;
  padding: 14px;
}

.manager-access-card label {
  display: block;
  margin: 0 0 8px;
  color: #d7e3f4;
  font-weight: 600;
}

.manager-access-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #d7e3f4;
  font-weight: 700;
}

.manager-access-comment-label {
  margin-top: 10px;
}
.manager-access-card label + input + label {
  margin-top: 10px;
}
.manager-access-card label + input  {
  margin-top: 10px;
}

.manager-access-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8fb7ff;
}

.manager-access-icon svg {
  width: 100%;
  height: 100%;
}

.manager-access-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.access-action-btn {
  width: auto;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.access-action-btn:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.access-action-btn:active {
  transform: translateY(1px);
}

.access-action-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

.access-action-btn-grant {
  background: #1f7a4c;
  border-color: #2c9a63;
}

.access-action-btn-grant:hover {
  background: #226f47;
}

.access-action-btn-revoke {
  background: #7a2f36;
  border-color: #a54550;
}

.access-action-btn-revoke:hover {
  background: #6c2930;
}

.manager-access-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #8fa3ba;
}
.access-action-btn-list {
  width: 100%;
  margin-top: 10px;
  background: #153e75;
  border-color: #1d4f92;
}

.access-action-btn-list:hover {
  background: #123766;
}


.access-action-btn-list {
  width: 100%;
  margin-top: 10px;
  background: #153e75;
  border-color: #1d4f92;
}

.access-action-btn-list:hover {
  background: #123766;
}


/* Список сотрудников с доступом */
.manager-access-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manager-access-list-item {
  padding: 12px 14px;
  background: #0f1722;
  border: 1px solid #243244;
  border-radius: 12px;
  color: #d7e3f4;
  font-size: 13px;
  line-height: 1.5;
}

.manager-access-list-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.manager-access-list-line + .manager-access-list-line {
  margin-top: 6px;
}

.manager-access-list-label {
  color: #8fa3ba;
  font-weight: 600;
  flex: 0 0 auto;
  white-space: nowrap;
}

.manager-access-list-value {
  color: #ffffff;
  word-break: break-word;
  flex: 1 1 auto;
  min-width: 0;
}

.manager-access-list-role-employee {
  color: #7177f8;
  font-weight: 700;
}

.manager-access-list-role-manager {
  color: #d66549;
  font-weight: 700;
}

@media (max-width: 640px) {
  .manager-access-list-line {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }

  .manager-access-list-label {
    min-width: 0;
  }
}


