.document-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.document {
  padding: 24px;
  text-align: left;
}

.document .icon {
  color: var(--blue);
  width: 28px;
  height: 28px;
  margin-bottom: 22px;
}

.document p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}

/* Account profile */

.account-profile {
  padding: 28px;
}

.account-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.account-profile-head h2 {
  margin: 0;
}

.account-profile-body {
  display: grid;
  grid-template-columns: 170px 620px;
  gap: 42px;
  align-items: start;
}

.account-avatar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.account-avatar {
  width: 118px;
  height: 118px;
  flex: 0 0 118px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--nav-icon);
  color: var(--text-soft);
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -1px;
}

.account-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar-button {
  width: 100%;
}

.account-profile-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 620px;
  min-width: 0;
}

.account-field {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 0;
}

.account-field-label {
  padding-top: 11px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.account-field input {
  width: 100%;
}

.account-field input:disabled {
  color: var(--field-disabled-text);
  background: var(--field-disabled);
  border-color: var(--field-border);
  opacity: 1;
  -webkit-text-fill-color: var(--field-disabled-text);
}

.account-field-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.account-id-field {
  min-height: 40px;
  align-items: center;
}

.account-id-field .account-field-label {
  padding-top: 0;
}

.account-id-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--text-soft);
  font-size: 12px;
}

.account-copy {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.account-copy:hover {
  background: var(--surface-hover);
  color: var(--blue);
}

.account-copy .icon {
  width: 15px;
  height: 15px;
}

.account-password {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

@media (max-width: 800px) {
  .account-profile-form {
    width: 100%;
  }

  .account-profile-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-profile-head .btn {
    width: 100%;
  }

  .account-profile-body {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .account-avatar-column {
    align-items: flex-start;
  }

  .account-avatar-button {
    width: auto;
  }

  .account-field {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .account-field-label {
    padding-top: 0;
  }

  .account-password {
    grid-template-columns: 1fr;
  }

  .account-password .btn {
    width: 100%;
  }
}

/* Notice / help */

.notice {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--calendar-today-head);
  color: var(--shift-muted);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.help {
  max-width: 800px;
  padding: 30px;
}

.help h2 {
  margin: 24px 0 10px;
}

.help h2:first-child {
  margin-top: 0;
}

.help p {
  font-size: 13px;
  color: var(--text-secondary);
}

.mobile-menu {
  display: none;
}

.read {
  opacity: 0.6;
}

.document-content {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.footer-note {
  margin-top: 26px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.app-footer {
  padding: 26px 24px 20px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

/* Company settings */

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-stack > .card {
  padding: 26px 32px;
}

.settings-stack .card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.settings-stack .card-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.3;
}

.settings-stack .card-head p {
  max-width: 680px;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.settings-stack form {
  width: 100%;
  max-width: 680px;
}

.settings-stack .field {
  margin: 0;
}

.settings-stack .field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
}

.settings-stack .field input {
  width: 100%;
}

.settings-stack .form-actions {
  display: flex;
  align-items: center;
  margin-top: 16px;
}

/* Branches */

#branches-list {
  border-top: 1px solid var(--line);
}

.branch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.branch-row {
  border-bottom: 1px solid var(--line);
}

.branch-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.branch-info strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.branch-info span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.branch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.branch-actions .btn {
  min-width: 92px;
}

.empty-inline {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 22px 0 4px;
}

.empty-inline strong {
  font-size: 14px;
}

.empty-inline span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .settings-stack {
    gap: 16px;
  }

  .settings-stack > .card {
    padding: 22px 20px;
  }

  .settings-stack .card-head {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .settings-stack .card-head .btn {
    width: 100%;
  }

  .branch-row {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    padding: 18px 0;
  }

  .branch-actions {
    width: 100%;
  }

  .branch-actions .btn {
    flex: 1;
    min-width: 0;
  }
}

/* Account sessions */

.account-sessions {
  padding: 28px 32px;
}

.account-sessions-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.account-sessions-head h2 {
  margin: 0 0 6px;
}

.account-sessions-head p {
  margin: 0;
}

.account-session-list {
  border-top: 1px solid var(--line);
}

.account-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.account-session-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.account-session-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--nav-icon);
  color: var(--blue);
}

.account-session-icon svg {
  width: 20px;
  height: 20px;
}

.account-session-info {
  min-width: 0;
}

.account-session-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 7px;
}

.account-session-title strong {
  font-size: 14px;
}

.account-session-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 12px;
}

.account-session.current .account-session-icon {
  background: var(--nav-active);
}

.account-sessions .badge.green {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--shift-done-bg);
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
}

.account-sessions .empty-inline {
  padding: 22px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-sessions .empty-inline span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .account-sessions {
    padding: 22px 20px;
  }

  .account-sessions-head {
    flex-direction: column;
  }

  .account-sessions-head > .btn {
    width: 100%;
  }

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

  .account-session > .btn {
    width: 100%;
  }

  .account-session-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
.account-settings-list {
  padding: 0 24px 24px;
}

.account-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 8px;
}

.account-setting-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
}

.account-setting-row p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.account-switch {
  position: relative;
  width: 44px;
  height: 24px;
  padding: 0;
  flex: 0 0 44px;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background 0.2s ease;
}

.account-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(31, 45, 61, 0.2);
  transition: transform 0.2s ease;
}

.account-switch[aria-checked='true'] {
  background: var(--blue);
}

.account-switch[aria-checked='true'] span {
  transform: translateX(20px);
}

.account-switch:disabled {
  cursor: default;
  opacity: 0.55;
}

/* Settings */

.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 620px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.settings-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  text-align: left;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.settings-nav-item .icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.settings-nav-item:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.settings-nav-item.active {
  color: var(--blue);
  background: var(--nav-active);
}

.settings-content {
  min-width: 0;
  background: var(--surface);
}

.settings-panel {
  padding: 28px 32px 34px;
}

.settings-panel[hidden] {
  display: none;
}

.settings-panel-head {
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.settings-panel-head h2 {
  margin-bottom: 6px;
}

.settings-panel-head p {
  color: var(--muted);
  font-size: 12px;
}

.settings-section {
  width: 100%;
}

.settings-divider {
  height: 1px;
  margin: 28px 0;
  background: var(--line);
}

/* Profile */

.settings-panel .account-profile-body {
  padding: 0;
}

.settings-panel .account-avatar-column {
  padding-top: 2px;
}

/* Security */

.settings-panel .account-sessions-head {
  margin-bottom: 18px;
}

.settings-panel .account-sessions-head h3 {
  margin-bottom: 6px;
}

/* Appearance */

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

.theme-option {
  position: relative;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.theme-option:hover {
  background: var(--surface-soft);
  border-color: var(--muted);
}

.theme-option.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.theme-preview {
  position: relative;
  display: grid;
  grid-template-columns: 27% 1fr;
  width: 100%;
  height: 118px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.theme-preview-sidebar {
  display: block;
}

.theme-preview-main {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 12px;
}

.theme-preview-main::before {
  content: '';
  width: 55%;
  height: 7px;
  border-radius: 4px;
}

.theme-preview-main i {
  display: block;
  width: 100%;
  height: 17px;
  border-radius: 5px;
}

.theme-preview-light {
  background: #f6f8fa;
}

.theme-preview-light .theme-preview-sidebar {
  background: #ffffff;
  border-right: 1px solid #edf0f4;
}

.theme-preview-light .theme-preview-main::before {
  background: #243347;
}

.theme-preview-light .theme-preview-main i {
  background: #ffffff;
  border: 1px solid #e5eaf0;
}

.theme-preview-dark {
  background: #11161d;
  border-color: #28323e;
}

.theme-preview-dark .theme-preview-sidebar {
  background: #181f28;
  border-right: 1px solid #28323e;
}

.theme-preview-dark .theme-preview-main::before {
  background: #edf3f8;
}

.theme-preview-dark .theme-preview-main i {
  background: #181f28;
  border: 1px solid #323e4c;
}

.theme-preview-system {
  background:
    linear-gradient(
      90deg,
      #f6f8fa 0%,
      #f6f8fa 50%,
      #11161d 50%,
      #11161d 100%
    );
}

.theme-preview-system .theme-preview-sidebar {
  background:
    linear-gradient(
      90deg,
      #ffffff 0%,
      #ffffff 50%,
      #181f28 50%,
      #181f28 100%
    );
  border-right: 1px solid var(--line);
}

.theme-preview-system .theme-preview-main::before {
  background:
    linear-gradient(
      90deg,
      #243347 0%,
      #243347 50%,
      #edf3f8 50%,
      #edf3f8 100%
    );
}

.theme-preview-system .theme-preview-main i {
  background:
    linear-gradient(
      90deg,
      #ffffff 0%,
      #ffffff 50%,
      #181f28 50%,
      #181f28 100%
    );
  border: 1px solid var(--line-strong);
}

.theme-option-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 25px;
}

.theme-option-info strong {
  font-size: 12px;
  font-weight: 600;
}

.theme-option-info small {
  color: var(--muted);
  font-size: 10px;
}

.theme-option-check {
  position: absolute;
  right: 13px;
  bottom: 18px;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.theme-option.active .theme-option-check {
  border: 4px solid var(--blue);
}

/* Settings mobile */

@media (max-width: 760px) {
  .settings-layout {
    display: block;
    min-height: 0;
    overflow: visible;
    border-radius: 16px;
  }

  .settings-nav {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 5px;
    overflow-x: auto;
    padding: 9px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }

  .settings-nav::-webkit-scrollbar {
    display: none;
  }

  .settings-nav-item {
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
    padding: 10px 12px;
  }

  .settings-nav-item .icon {
    display: none;
  }

  .settings-panel {
    padding: 22px 16px 26px;
  }

  .settings-panel-head {
    padding-bottom: 18px;
    margin-bottom: 20px;
  }

  .theme-options {
    grid-template-columns: 1fr;
  }

  .theme-preview {
    height: 105px;
  }
}

@media (max-width: 520px) {
  .settings-nav {
    margin: 0;
  }

  .settings-nav-item {
    font-size: 11px;
  }

  .settings-panel .account-profile-body {
    display: block;
  }

  .settings-panel .account-avatar-column {
    margin-bottom: 28px;
  }

  .settings-panel .account-setting-row {
    align-items: flex-start;
    gap: 16px;
  }
}