:root {
  --bg: #fafbfc;
  --sidebar-bg: #ffffff;
  --sidebar-border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --green-a: #294e47;
  --green-b: #007a55;
  --sidebar-width: 288px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  height: min(100vh, 900px);
  max-height: 900px;
  font-family: "Segoe UI", "Manrope", sans-serif;
  color: var(--text);
  background: #ffffff;
  overflow: hidden;
}

.icon-sprite-wrap {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100%;
  max-height: 900px;
  background: var(--bg);
}

.sidebar {
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
}

.brand {
  height: 112px;
  display: flex;
  align-items: center;
  padding: 16px 24px;
}

.brand img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  transform: scale(1.5);
  transform-origin: left center;
}

.menu {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
  flex: 1;
}

.menu-item {
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  text-decoration: none;
  color: #0f172a;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.menu-item .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.menu-item.active {
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(90deg, var(--green-a) 0%, var(--green-b) 100%);
  box-shadow: 0 10px 15px -3px rgba(41, 78, 71, 0.3), 0 4px 6px -4px rgba(41, 78, 71, 0.3);
}

.content {
  padding: 40px clamp(24px, 2.5vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 48px;
  overflow-y: auto;
  overflow-x: hidden;
  align-items: center;
}

.hero,
.stats,
.recent-docs {
  width: 100%;
  max-width: 1100px;
}

.hero {
  position: relative;
  height: 532px;
  min-height: 532px;
  border-radius: 24px;
  padding: 64px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(150.57deg, #294e47 0%, #007a55 50%, #00786f 100%);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 384px;
  height: 384px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  filter: blur(64px);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  top: 148px;
  width: 384px;
  height: 384px;
  border-radius: 999px;
  background: rgba(173, 70, 255, 0.1);
  filter: blur(64px);
}

.hero-badge,
.hero h1,
.hero p,
.hero-actions {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 14px;
  line-height: 20px;
}

.hero-badge .icon {
  width: 16px;
  height: 16px;
}

.hero h1 {
  display: block;
  opacity: 1;
  visibility: visible;
  margin: 32px 0 0;
  width: min(708px, 100%);
  font-size: 60px;
  line-height: 75px;
  font-weight: 700;
}

.hero p {
  display: block;
  opacity: 1;
  visibility: visible;
  margin: 24px 0 0;
  width: min(750px, 100%);
  font-size: 24px;
  line-height: 39px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  opacity: 1;
  visibility: visible;
  margin-top: 40px;
  gap: 16px;
}

.hero-btn {
  height: 40px;
  border-radius: 16px;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  font-size: 14px;
  line-height: 20px;
  font-family: inherit;
  cursor: pointer;
}

.hero-btn.primary {
  min-width: 215px;
  justify-content: space-between;
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-btn.ghost {
  min-width: 122px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.hero-btn .icon {
  width: 16px;
  height: 16px;
}

.stats h2,
.section-header h2 {
  margin: 0;
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
}

.stat-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

#statsStatus {
  margin-top: 12px;
  font-size: 13px;
  color: #64748b;
}

#statsStatus button {
  margin-left: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
}

.stat-card {
  position: relative;
  height: 164px;
  border-radius: 16px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
  transform-origin: center;
  background: #fff;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.stat-card.blue::before {
  background: linear-gradient(143.015deg, rgba(43, 127, 255, 0.1) 0%, rgba(0, 184, 219, 0.1) 100%);
}

.stat-card.green::before {
  background: linear-gradient(143.015deg, rgba(0, 201, 80, 0.1) 0%, rgba(0, 188, 125, 0.1) 100%);
}

.stat-card.violet::before {
  background: linear-gradient(143.015deg, rgba(173, 70, 255, 0.1) 0%, rgba(246, 51, 154, 0.1) 100%);
}

.stat-card.orange::before {
  background: linear-gradient(143.015deg, rgba(255, 105, 0, 0.1) 0%, rgba(251, 44, 54, 0.1) 100%);
}

.stat-card:hover {
  transform: scale(1.06);
  box-shadow: 0 18px 28px -8px rgba(0, 0, 0, 0.22), 0 10px 12px -8px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

.stat-title,
.stat-value,
.stat-icon {
  position: relative;
  z-index: 1;
}

.stat-title {
  display: block;
  margin: 32px 24px 8px;
  color: var(--muted);
  font-size: 18px;
  line-height: 24px;
}

.stat-value {
  display: block;
  margin: 0 24px;
  color: var(--text);
  font-size: 36px;
  line-height: 40px;
  font-weight: 700;
}

.orange .stat-title {
  max-width: 70px;
}

.stat-icon {
  position: absolute;
  right: 24px;
  top: 32px;
  width: 68px;
  height: 68px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-icon .icon {
  width: 28px;
  height: 28px;
}

.blue .stat-icon {
  background: linear-gradient(135deg, #2b7fff 0%, #00b8db 100%);
}

.green .stat-icon {
  background: linear-gradient(135deg, #00c950 0%, #00bc7d 100%);
}

.violet .stat-icon {
  background: linear-gradient(135deg, #ad46ff 0%, #f6339a 100%);
}

.orange .stat-icon {
  top: 52px;
  background: linear-gradient(135deg, #ff6900 0%, #fb2c36 100%);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.show-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
}

.show-all .icon,
.hero-btn .arrow {
  width: 16px;
  height: 16px;
}

.empty-card {
  height: 304px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px 24px;
}

.icon-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f1f5f9 0%, rgba(224, 231, 255, 0.3) 100%);
  color: #94a3b8;
}

.icon-circle .icon {
  width: 48px;
  height: 48px;
}

.empty-card h3 {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
}

.empty-card p {
  margin: 8px 0 24px;
  font-size: 16px;
  line-height: 24px;
  color: var(--muted);
}

#createFirstDoc {
  height: 36px;
  border: 0;
  border-radius: 16px;
  padding: 0 12px;
  min-width: 230px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #294e47;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

#createFirstDoc .icon {
  width: 16px;
  height: 16px;
}

.recent-list {
  min-height: 304px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.recent-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.recent-item-title {
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  color: #0f172a;
}

.recent-item-meta {
  font-size: 13px;
  line-height: 18px;
  color: #64748b;
}

.recent-item-date {
  font-size: 12px;
  line-height: 16px;
  color: #94a3b8;
}

.admin-hero,
.admin-toolbar,
.employees-grid {
  width: 100%;
  max-width: 1100px;
}

.admin-hero {
  min-height: 286px;
  border-radius: 24px;
  padding: 44px;
  color: #fff;
  background: linear-gradient(150.57deg, #294e47 0%, #007a55 50%, #00786f 100%);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.admin-hero h1 {
  margin: 26px 0 0;
  font-size: clamp(38px, 4vw, 64px);
  line-height: 1.1;
}

.admin-hero p {
  margin: 18px 0 0;
  font-size: clamp(20px, 2.2vw, 36px);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
}

.admin-toolbar {
  margin-top: -20px;
  display: grid;
  gap: 18px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-tab {
  height: 56px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 16px;
  color: #334155;
  background: linear-gradient(180deg, #f7f9fc 0%, #f0f4f7 100%);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.admin-tab .icon {
  width: 18px;
  height: 18px;
}

.admin-tab.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  box-shadow: 0 10px 15px -3px rgba(41, 78, 71, 0.3), 0 4px 6px -4px rgba(41, 78, 71, 0.3);
}

.tab-count {
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.2);
}

.admin-search-row {
  min-height: 98px;
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.12), 0 4px 6px -4px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-search {
  flex: 1;
  height: 56px;
  border-radius: 14px;
  border: 1px solid #dbe2ea;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
}

.admin-search .icon {
  width: 18px;
  height: 18px;
  color: #64748b;
}

.admin-search input {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: #0f172a;
  outline: none;
}

.add-employee-btn {
  height: 56px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  background: linear-gradient(90deg, #294e47 0%, #1a6a59 100%);
  box-shadow: 0 10px 15px -3px rgba(41, 78, 71, 0.3), 0 4px 6px -4px rgba(41, 78, 71, 0.3);
}

.add-employee-btn .icon {
  width: 16px;
  height: 16px;
}

.employees-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 24px;
}

.employee-card {
  background: #fff;
  border-radius: 16px;
  border: 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  padding: 24px;
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.employee-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.employee-card-modern {
  padding: 24px 24px 0;
}

.employee-main {
  display: grid;
  justify-items: center;
  text-align: center;
  min-height: 188px;
}

.avatar-wrap.modern {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  margin-bottom: 16px;
}

.avatar-wrap.modern .avatar-badge {
  width: 80px;
  height: 80px;
  font-size: 24px;
  line-height: 32px;
}

.employee-card-modern h3 {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  color: #0f172a;
}

.employee-card-modern .employee-middle {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #64748b;
}

.employee-card-modern .employee-role {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: #294e47;
}

.avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
}

.avatar-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.avatar-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid #fff;
}

.avatar-dot.online {
  background: #22c55e;
}

.avatar-dot.vacation {
  background: #3b82f6;
}

.employee-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
}

.employee-head p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: #64748b;
}

.employee-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.meta-item {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
}

.meta-icon .icon {
  width: 16px;
  height: 16px;
}

.meta-icon.role {
  background: linear-gradient(135deg, rgba(41, 78, 71, 0.1) 0%, rgba(0, 122, 85, 0.1) 100%);
  color: #294e47;
}

.meta-icon.email {
  background: linear-gradient(135deg, rgba(43, 127, 255, 0.1) 0%, rgba(0, 184, 219, 0.1) 100%);
  color: #2563eb;
}

.meta-icon.phone {
  background: linear-gradient(135deg, rgba(173, 70, 255, 0.1) 0%, rgba(246, 51, 154, 0.1) 100%);
  color: #9333ea;
}

.meta-icon.date {
  background: linear-gradient(135deg, rgba(255, 105, 0, 0.1) 0%, rgba(251, 44, 54, 0.1) 100%);
  color: #ea580c;
}

.meta-text {
  display: grid;
  min-width: 0;
}

.meta-main {
  font-size: 14px;
  line-height: 20px;
  color: #334155;
}

.meta-sub {
  font-size: 12px;
  line-height: 16px;
  color: #64748b;
}


.employee-foot {
  border-top: 1px solid #e2e8f0;
  padding-top: 17px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-pill {
  height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
}

.status-pill.online {
  color: #0f8a42;
  background: #dcfce7;
}

.status-pill.vacation {
  color: #2563eb;
  background: #dbeafe;
}

.employee-actions {
  display: inline-flex;
  gap: 8px;
  width: 100%;
}

.employee-actions button {
  width: 36px;
  height: 32px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #1e293b;
  cursor: pointer;
}

.employee-actions .employee-edit {
  flex: 1;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  gap: 8px;
  white-space: nowrap;
}

.employee-actions .employee-edit span {
  font-size: 14px;
  line-height: 20px;
}

.employee-actions .employee-project-access {
  flex: 1;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  gap: 8px;
  white-space: nowrap;
}

.employee-actions .employee-project-access span {
  font-size: 14px;
  line-height: 20px;
}

.employee-actions .icon {
  width: 16px;
  height: 16px;
}

.employee-actions button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.employee-modal-backdrop {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  padding: 0;
}

.employee-modal-backdrop[hidden] {
  display: none;
}

.employee-modal {
  width: min(672px, 100%);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.employee-modal-head {
  min-height: 100px;
  padding: 32px;
  background: linear-gradient(171.536deg, #294e47 0%, #007a55 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.employee-modal-head h2 {
  margin: 0;
  color: #fff;
  font-size: 30px;
  line-height: 36px;
}

.employee-modal-close {
  width: 40px;
  height: 36px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.employee-modal-form {
  padding: 56px 32px 24px;
  display: grid;
  gap: 24px;
}

.employee-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.employee-modal-field {
  display: grid;
  gap: 8px;
}

.employee-modal-form > .employee-modal-field {
  width: 100%;
}

.employee-modal-field span {
  color: #0f172a;
  font-size: 14px;
  line-height: 14px;
}

.employee-modal-field input {
  height: 36px;
  border: 1px solid #b8c2d1;
  border-radius: 16px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.employee-modal-field input::placeholder {
  color: #7a879b;
}

.employee-modal-field input:focus {
  border-color: #6b7f9b;
}

.employee-password-wrap {
  position: relative;
}

.employee-password-wrap input {
  width: 100%;
  padding-right: 44px;
}

.employee-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.employee-password-toggle:hover {
  background: #eef3f8;
  color: #334155;
}

.employee-password-toggle .icon {
  width: 16px;
  height: 16px;
}

.employee-modal-static-value {
  height: 36px;
  border: 1px solid #b8c2d1;
  border-radius: 16px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  color: #7a879b;
  font-size: 14px;
  line-height: 20px;
  background: #fff;
}

.employee-modal-error {
  min-height: 20px;
  margin: -8px 0 -8px;
  color: #dc2626;
  font-size: 13px;
  line-height: 20px;
}

.employee-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 16px;
}

.employee-modal-submit,
.employee-modal-cancel {
  height: 48px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.employee-modal-submit {
  border: 0;
  color: #fff;
  background: #294e47;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.employee-modal-submit .icon {
  width: 16px;
  height: 16px;
}

.employee-modal-cancel {
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  color: #0f172a;
}

.project-access-modal-backdrop {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  padding: 0;
}

.project-access-modal-backdrop[hidden] {
  display: none;
}

.project-access-modal {
  width: min(760px, 100%);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.project-access-modal-head {
  min-height: 88px;
  padding: 24px 28px;
  background: linear-gradient(171.536deg, #294e47 0%, #007a55 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project-access-modal-head h2 {
  margin: 0;
  color: #fff;
  font-size: 26px;
  line-height: 34px;
}

.project-access-modal-close {
  width: 40px;
  height: 36px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.project-access-modal-body {
  padding: 24px 28px;
  display: grid;
  gap: 14px;
}

.project-access-modal-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #64748b;
}

.project-access-list {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.project-access-empty {
  margin: 0;
  padding: 16px;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.project-access-select {
  display: grid;
}

.project-access-select-toggle {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project-access-select-label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.project-access-select-value {
  font-size: 13px;
  line-height: 18px;
  color: #64748b;
}

.project-access-select-menu {
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.project-access-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.project-access-option:last-child {
  border-bottom: 0;
}

.project-access-option input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #007a55;
  cursor: pointer;
}

.project-access-option-main {
  min-width: 0;
  display: grid;
}

.project-access-option-main strong {
  font-size: 14px;
  line-height: 20px;
  color: #0f172a;
  font-weight: 600;
}

.project-access-option-main small {
  font-size: 12px;
  line-height: 18px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-access-error {
  min-height: 20px;
  margin: 0;
  color: #dc2626;
  font-size: 13px;
  line-height: 20px;
}

.project-access-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-access-save,
.project-access-cancel {
  height: 44px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.project-access-save {
  border: 0;
  color: #fff;
  background: #294e47;
}

.project-access-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.project-access-cancel {
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  color: #0f172a;
}

.contractors-content {
  align-items: flex-start;
  gap: 32px;
  padding-top: 48px;
}

.contractors-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.contractors-head h1 {
  margin: 0;
  font-size: 50px;
  line-height: 1.1;
  font-weight: 700;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contractors-head p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 32px;
  line-height: 1.55;
}

.add-contractor-btn {
  height: 36px;
  min-width: 203px;
  border: 0;
  border-radius: 16px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.add-contractor-btn .icon {
  width: 16px;
  height: 16px;
}

.contractors-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 264px);
  gap: 24px;
}

.contractor-card {
  height: 290px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.contractor-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.contractor-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, #294e47 0%, #007a55 100%);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
  display: grid;
  place-items: center;
  color: #fff;
}

.contractor-card-icon .icon {
  width: 20px;
  height: 20px;
}

.contractor-card-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
}

.contractor-card-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 16px;
  line-height: 24px;
}

.contractor-card-body {
  margin-top: 20px;
}

.contractor-role {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  line-height: 20px;
}

.contractor-person {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.contractor-contact {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contractor-contact .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.contractor-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contractor-edit-btn,
.contractor-delete-btn {
  height: 32px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
}

.contractor-edit-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.contractor-delete-btn {
  width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contractor-edit-btn .icon,
.contractor-delete-btn .icon {
  width: 16px;
  height: 16px;
}

.contractor-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.32);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow: auto;
}

.contractor-modal-backdrop[hidden] {
  display: none;
}

.contractor-modal {
  width: 495px;
  min-height: 890px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fafbfc;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  padding: 24px;
  position: relative;
}

.contractor-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.contractor-modal-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 36px;
  line-height: 1.12;
  font-weight: 600;
}

.contractor-modal-head p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.contractor-modal-form {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  row-gap: 16px;
}

.contractor-field {
  display: grid;
  gap: 8px;
}

.contractor-field--full {
  grid-column: 1 / -1;
}

.contractor-field span {
  color: #0f172a;
  font-size: 14px;
  line-height: 14px;
}

.contractor-field input {
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0 12px;
  font-family: inherit;
  color: #0f172a;
  font-size: 14px;
  line-height: 20px;
  outline: none;
}

.contractor-field input:focus {
  border-color: #94a3b8;
}

.contractor-modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.contractor-btn {
  height: 36px;
  border-radius: 16px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.contractor-btn--ghost {
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  color: #0f172a;
}

.contractor-btn--primary {
  border: 0;
  background: #294e47;
  color: #fff;
}

.doc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(15, 23, 42, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.doc-modal-backdrop[hidden] {
  display: none;
}

.doc-modal {
  width: 520px;
  border-radius: 16px;
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.doc-modal-head {
  min-height: 70px;
  padding: 20px 24px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.doc-modal-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
}

.doc-modal-close {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.doc-modal-form {
  padding: 6px 24px 24px;
  display: grid;
  gap: 14px;
}

.doc-modal-field {
  display: grid;
  gap: 8px;
}

.doc-modal-field span {
  color: #0f172a;
  font-size: 14px;
  line-height: 14px;
}

.doc-modal-field input,
.doc-modal-field select {
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  color: #0f172a;
  outline: none;
}

.doc-modal-error {
  min-height: 20px;
  margin: 0;
  color: #dc2626;
  font-size: 13px;
  line-height: 20px;
}

.doc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.doc-btn {
  height: 36px;
  border-radius: 16px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.doc-btn--ghost {
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  color: #0f172a;
}

.doc-btn--primary {
  border: 0;
  background: #294e47;
  color: #fff;
}

.create-doc-content {
  align-items: center;
  gap: 12px;
  padding: 8px 12px 14px;
}

.create-doc-top {
  width: min(980px, 100%);
  flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  padding: 10px 12px 12px;
}

.create-doc-top h1 {
  margin: 0;
  font-size: 36px;
  line-height: 40px;
  font-weight: 700;
  color: #1f6052;
}

.create-doc-top p {
  margin: 4px 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.create-doc-progress-head {
  display: flex;
  justify-content: space-between;
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
}

.create-doc-progress-line {
  margin-top: 6px;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.create-doc-progress-line span {
  display: block;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
}

.create-doc-steps {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.create-doc-step {
  height: 48px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-family: inherit;
  font-size: 11px;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
  cursor: default;
}

.create-doc-step.active {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  box-shadow: 0 10px 15px -3px rgba(41, 78, 71, 0.3), 0 4px 6px -4px rgba(41, 78, 71, 0.3);
}

.create-doc-step.done {
  border: 0;
  color: #ffffff;
  background: linear-gradient(90deg, #22c55e 0%, #10b981 100%);
}

.create-doc-step.done::before {
  content: "✓ ";
  font-weight: 700;
}

.create-doc-card {
  width: min(980px, 100%);
  flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.create-doc-card-head {
  min-height: 46px;
  background: #eef7f4;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 14px;
  line-height: 20px;
}

.create-doc-index {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #1f6b5a;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
}

.create-doc-card-body {
  padding: 10px 14px 14px;
}

.create-doc-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.create-doc-subtitle-secondary {
  margin: 18px 0 0;
  color: #94a3b8;
  font-size: 14px;
  line-height: 20px;
}

.create-doc-type-switch {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.create-doc-type-switch button {
  height: 30px;
  border: 0;
  background: #f8fafc;
  color: #64748b;
  font-family: inherit;
  font-size: 12px;
}

.create-doc-type-switch button.active {
  background: #ffffff;
  color: #0f172a;
}

.passport-box {
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.passport-box h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
}

.passport-box p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.passport-upload-btn {
  margin-top: 8px;
  width: min(100%, 280px);
  min-height: 92px;
  border: 1px solid #b7d4c8;
  border-radius: 12px;
  background: linear-gradient(145deg, #f4fbf8 0%, #ecf7f2 100%);
  color: #1f5d4a;
  font-family: inherit;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.passport-upload-btn:hover {
  border-color: #7ab39b;
  background: linear-gradient(145deg, #effaf5 0%, #dff3eb 100%);
  box-shadow: 0 10px 18px rgba(16, 96, 73, 0.12);
  transform: translateY(-1px);
}

.passport-upload-btn:active {
  transform: translateY(0);
}

.passport-upload-btn:focus-visible {
  outline: 3px solid rgba(22, 163, 74, 0.25);
  outline-offset: 2px;
}

.passport-upload-btn .icon {
  width: 24px;
  height: 24px;
}

.passport-preview {
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  width: min(280px, 100%);
}

.passport-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.passport-ocr-status {
  margin-top: 8px;
  font-size: 12px;
  color: #334155;
}

.passport-ocr-warnings {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #f5d98f;
  background: #fff8db;
  color: #7a5c00;
  font-size: 12px;
  line-height: 16px;
}

.passport-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.passport-apply-btn {
  height: 30px;
  border: 1px solid #1f7a5a;
  border-radius: 8px;
  background: #ffffff;
  color: #1f7a5a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 0 10px;
  cursor: pointer;
}

.passport-clear-btn {
  height: 30px;
  border: 1px solid #e11d48;
  border-radius: 8px;
  background: #ffffff;
  color: #be123c;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 0 10px;
  cursor: pointer;
}

.create-doc-form {
  margin-top: 12px;
  display: block;
}

.create-doc-customer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.create-doc-form label {
  display: grid;
  gap: 4px;
}

.create-doc-customer-fields[hidden] {
  display: none;
}

.create-doc-form label.full {
  grid-column: 1 / -1;
}

.create-doc-form span {
  color: #0f172a;
  font-size: 12px;
  line-height: 14px;
}

.create-doc-form input {
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 10px;
  color: #0f172a;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.create-doc-form input::placeholder {
  color: #94a3b8;
}

.create-doc-contractors-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.create-doc-templates-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.create-doc-template-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
  min-height: 126px;
}

.create-doc-template-card h3 {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.create-doc-template-card h3 .icon {
  width: 16px;
  height: 16px;
}

.create-doc-template-card .description {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.create-doc-template-card .chips {
  margin-top: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.create-doc-template-card .chip {
  height: 20px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
  line-height: 20px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.create-doc-template-card .chip .icon {
  width: 12px;
  height: 12px;
}

.create-doc-fill-title {
  margin: 24px 0 0;
  color: #334155;
  font-size: 32px;
  line-height: 38px;
  font-weight: 700;
}

.create-doc-fill-form {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.create-doc-fill-group {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.create-doc-fill-group h4 {
  margin: 0;
  color: #334155;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.create-doc-fill-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.create-doc-fill-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.create-doc-fill-form label {
  display: grid;
  gap: 8px;
}

.create-doc-fill-form label.full {
  grid-column: 1 / -1;
}

.create-doc-fill-form span {
  color: #334155;
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
}

.create-doc-fill-form input {
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0 12px;
  font-family: inherit;
  color: #0f172a;
  font-size: 14px;
  line-height: 20px;
  outline: none;
}

.create-doc-fill-form textarea,
.create-doc-fill-form select {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
  font-family: inherit;
  color: #0f172a;
  font-size: 14px;
  line-height: 20px;
  outline: none;
}

.create-doc-fill-form textarea {
  min-height: 84px;
  resize: vertical;
}

.create-doc-fill-form input::placeholder {
  color: #94a3b8;
}

.create-doc-add-stage-btn,
.create-doc-remove-stage-btn {
  border-radius: 999px;
  border: 1px solid #dbe2ea;
  background: #f8fafc;
  color: #334155;
  font-family: inherit;
  font-size: 12px;
  line-height: 16px;
  height: 30px;
  padding: 0 14px;
  cursor: pointer;
}

.create-doc-add-stage-btn {
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  color: #ffffff;
  border: 0;
}

.create-doc-remove-stage-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.create-doc-payment-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.create-doc-payment-table {
  width: 100%;
  border-collapse: collapse;
}

.create-doc-payment-table th,
.create-doc-payment-table td {
  border: 1px solid #e2e8f0;
  padding: 8px;
  text-align: left;
  vertical-align: middle;
}

.create-doc-payment-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.create-doc-payment-table td input {
  width: 100%;
}

.create-doc-image-preview {
  min-height: 120px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
  padding: 6px;
}

.create-doc-image-input {
  height: auto !important;
  border: 1px solid #c9d9eb !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%) !important;
  padding: 8px !important;
  color: #334155 !important;
  font-size: 12px !important;
  line-height: 16px !important;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.create-doc-image-input::file-selector-button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  margin-right: 12px;
  cursor: pointer;
}

.create-doc-image-input::-webkit-file-upload-button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  margin-right: 12px;
  cursor: pointer;
}

.create-doc-image-input:hover {
  border-color: #94b5d6 !important;
  background: linear-gradient(180deg, #f4f9ff 0%, #edf5ff 100%) !important;
}

.create-doc-image-input:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.2);
  outline-offset: 1px;
}

.create-doc-fill-form label.is-filled .create-doc-image-input {
  border-color: #91d4b7 !important;
  background: linear-gradient(180deg, #f1fcf6 0%, #e7f8ef 100%) !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}

.create-doc-image-hint {
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
}

.create-doc-fill-form label.is-filled .create-doc-image-hint {
  color: #0f766e;
  font-weight: 600;
}

.create-doc-image-preview img {
  max-width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

@media (max-width: 960px) {
  .create-doc-fill-grid {
    grid-template-columns: 1fr;
  }

  .create-doc-fill-group-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .create-doc-image-input::file-selector-button,
  .create-doc-image-input::-webkit-file-upload-button {
    display: block;
    width: 100%;
    margin: 0 0 8px 0;
  }
}

.create-doc-contractor-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.create-doc-contractor-card h3 {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}

.create-doc-contractor-card .inn {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.create-doc-contractor-card .boss,
.create-doc-contractor-card .phone {
  margin: 16px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.create-doc-contractor-card .phone {
  margin-top: 8px;
}

.view-requisites-btn {
  margin-top: 16px;
  width: 100%;
  height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.view-requisites-btn .icon {
  width: 16px;
  height: 16px;
}

.select-contractor-btn,
.select-template-btn {
  margin-top: 10px;
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.select-contractor-btn.active,
.select-template-btn.active {
  border: 0;
  color: #ffffff;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  box-shadow: 0 10px 15px -3px rgba(41, 78, 71, 0.25), 0 4px 6px -4px rgba(41, 78, 71, 0.25);
}

.preview-box {
  margin-top: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.preview-box h4 {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}

.preview-section {
  margin-top: 12px;
}

.preview-section strong {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.preview-section div {
  margin-top: 6px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  color: #334155;
  font-size: 13px;
  line-height: 18px;
}

.preview-export-box {
  margin-top: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
}

.preview-export-box h4 {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}

.preview-export-box p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 18px;
}

.preview-export-formats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preview-export-formats button {
  height: 30px;
  border-radius: 999px;
  border: 1px solid #dbe2ea;
  background: #f8fafc;
  color: #334155;
  font-family: inherit;
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
}

.preview-export-formats button.active {
  border: 0;
  color: #ffffff;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
}

.preview-doc-names {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.preview-doc-names-title {
  margin: 0 0 8px;
  color: #334155;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.preview-doc-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.preview-doc-name-row + .preview-doc-name-row {
  margin-top: 8px;
}

.preview-doc-name-row label {
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
}

.preview-doc-name-row input {
  height: 32px;
  border: 1px solid #d5dde7;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 13px;
  padding: 0 10px;
}

.preview-download-btn {
  margin-top: 10px;
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.requisites-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.requisites-modal-backdrop[hidden] {
  display: none;
}

.requisites-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: 80vh;
  overflow: auto;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  padding: 18px 18px 14px;
}

.requisites-modal h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
  color: #0f172a;
}

.requisites-modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.requisites-grid {
  display: grid;
  gap: 8px;
}

.requisites-grid p {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #334155;
}

.requisites-grid p span {
  color: #0f172a;
  font-weight: 600;
}

.projects-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(15, 23, 42, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.projects-modal-backdrop[hidden] {
  display: none;
}

.projects-modal {
  position: relative;
  width: min(1120px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 16px;
  background: #f3f4f6;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  padding: 18px;
}

.projects-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 42px;
}

.projects-modal h3 {
  margin: 0;
  font-size: 40px;
  line-height: 1.2;
  color: #1f6a5a;
}

.projects-modal-subtitle {
  margin: 8px 0 0;
  color: #708090;
  font-size: 20px;
  line-height: 28px;
}

.projects-modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.projects-modal-add-btn {
  height: 64px;
  border: 0;
  border-radius: 18px;
  background: #0f5d4d;
  color: #ffffff;
  font-family: inherit;
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(15, 93, 77, 0.35);
}

.projects-modal-add-btn span {
  font-size: 28px;
  line-height: 1;
}

.projects-modal-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.projects-modal-item {
  border-radius: 14px;
  border: 1px solid #d8dde3;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 14px;
}

.project-card-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.project-doc-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #0f5d4d;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.project-doc-icon .icon {
  width: 16px;
  height: 16px;
}

.project-card-head h4 {
  margin: 0;
  color: #1f2937;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.project-card-head p {
  margin: 4px 0 0;
  color: #77889a;
  font-size: 13px;
  line-height: 18px;
}

.project-card-chip {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: #eef1f5;
  color: #6b7280;
  font-size: 11px;
  line-height: 16px;
  padding: 2px 8px;
}

.project-card-fields-title {
  margin-top: 10px;
  color: #1f2937;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.project-fields-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.project-field-row {
  min-height: 28px;
  border-radius: 9px;
  background: #f3f5f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
}

.project-field-label {
  color: #374151;
  font-size: 12px;
  line-height: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-field-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0f7a5a;
  display: inline-block;
}

.project-field-type {
  color: #6b7280;
  font-size: 10px;
  line-height: 14px;
  border: 1px solid #d9dee5;
  border-radius: 999px;
  padding: 1px 6px;
  background: #f8fafc;
}

.project-card-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e9ee;
  display: grid;
  gap: 8px;
}

.project-card-footer > span {
  color: #8a98a9;
  font-size: 11px;
  line-height: 14px;
}

.project-edit-btn {
  height: 32px;
  border: 1px solid #e1e6ed;
  border-radius: 999px;
  background: #f8fafc;
  color: #8b95a3;
  font-family: inherit;
  font-size: 12px;
  line-height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

button.projects-modal-item {
  cursor: default;
}

.projects-modal-empty {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.projects-page {
  width: 100%;
}

.projects-page-panel {
  width: 100%;
  max-height: none;
  overflow: visible;
}

@media (max-width: 1080px) {
  .projects-modal-list {
    grid-template-columns: 1fr;
  }

  .projects-modal h3 {
    font-size: 30px;
  }

  .projects-modal-subtitle {
    font-size: 16px;
    line-height: 22px;
  }

  .projects-modal-add-btn {
    height: 48px;
    font-size: 16px;
    line-height: 20px;
  }
}

.create-doc-actions {
  width: min(980px, 100%);
  flex-shrink: 0;
  margin-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.create-doc-nav-btn {
  height: 30px;
  border-radius: 999px;
  padding: 0 14px;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 13px;
}

.create-doc-nav-btn.ghost {
  color: #94a3b8;
  background: transparent;
}

.create-doc-nav-btn.primary {
  color: #fff;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  box-shadow: 0 10px 15px -3px rgba(41, 78, 71, 0.3), 0 4px 6px -4px rgba(41, 78, 71, 0.3);
}

.create-doc-nav-btn.primary.disabled {
  background: linear-gradient(90deg, #9ac4ba 0%, #8dc8b8 100%);
  box-shadow: none;
  pointer-events: none;
}

.create-doc-nav-btn .icon {
  width: 14px;
  height: 14px;
}

.create-doc-nav-btn .icon-left {
  transform: rotate(180deg);
}

@media (max-width: 1240px) {
  .content {
    padding: 32px 24px;
    gap: 32px;
  }

  .hero {
    height: auto;
    min-height: 532px;
    padding: 48px;
  }

  .hero h1 {
    font-size: 52px;
    line-height: 64px;
  }

  .hero p {
    font-size: 22px;
    line-height: 34px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employees-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contractors-grid {
    grid-template-columns: repeat(2, minmax(240px, 264px));
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .menu {
    margin-top: 16px;
    padding-bottom: 16px;
  }

  .content {
    align-items: stretch;
    padding: 24px 16px 32px;
  }

  .hero {
    min-height: auto;
    padding: 32px 24px;
    border-radius: 16px;
  }

  .hero h1 {
    font-size: 38px;
    line-height: 46px;
  }

  .hero p {
    font-size: 18px;
    line-height: 28px;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .admin-hero {
    border-radius: 16px;
    padding: 28px 22px;
    min-height: auto;
  }

  .admin-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .add-employee-btn {
    justify-content: center;
  }

  .employees-grid {
    grid-template-columns: 1fr;
  }

  .contractors-head {
    flex-direction: column;
    gap: 12px;
  }

  .contractors-head h1 {
    font-size: 42px;
  }

  .contractors-head p {
    font-size: 24px;
    line-height: 1.4;
  }

  .contractors-grid {
    grid-template-columns: 1fr;
  }

  .employee-modal-form {
    padding: 24px 16px 16px;
    gap: 16px;
  }

  .employee-modal-head {
    padding: 20px 16px;
    min-height: 80px;
  }

  .employee-modal-head h2 {
    font-size: 24px;
    line-height: 30px;
  }

  .employee-modal-grid,
  .employee-modal-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-access-modal-head {
    min-height: 80px;
    padding: 20px 16px;
  }

  .project-access-modal-head h2 {
    font-size: 22px;
    line-height: 28px;
  }

  .project-access-modal-body {
    padding: 20px 16px;
  }

  .project-access-select-toggle {
    height: auto;
    min-height: 52px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .project-access-option-main small {
    white-space: normal;
  }

  .project-access-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1700px) {
  .hero,
  .stats,
  .recent-docs {
    max-width: 1240px;
  }
}

@media (min-width: 1440px) {
  .admin-hero,
  .admin-toolbar,
  .employees-grid {
    max-width: 1296px;
  }

  .admin-hero {
    min-height: 332px;
    padding: 48px;
  }

  .admin-hero p {
    font-size: 44px;
    line-height: 1.2;
  }

  .admin-toolbar {
    margin-top: 8px;
  }

  .employee-card-modern {
    min-height: 300px;
  }

  .employee-main {
    min-height: 196px;
  }
}

@media (max-width: 680px) {
  .stats h2,
  .section-header h2 {
    font-size: 30px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .empty-card h3 {
    font-size: 28px;
    line-height: 34px;
  }

  .show-all {
    font-size: 13px;
  }
}

.menu-item.logout {
  margin-top: 12px;
  color: #ffffff;
  font-weight: 600;
  background: linear-gradient(90deg, var(--green-a) 0%, var(--green-b) 100%);
  box-shadow: 0 10px 15px -3px rgba(41, 78, 71, 0.3), 0 4px 6px -4px rgba(41, 78, 71, 0.3);
}

.menu-item.logout:hover {
  background: linear-gradient(90deg, var(--green-a) 0%, var(--green-b) 100%);
}

.menu-spacer {
  flex: 1;
  min-height: 24px;
}

.menu-user {
  border-radius: 16px;
  background: #d9e2e0;
  padding: 14px 14px 12px;
}

.menu-user-caption {
  display: block;
  color: #64748b;
  font-size: 24px;
  line-height: 29px;
}

.menu-user-name {
  display: block;
  margin-top: 8px;
  color: #294e47;
  font-size: 32px;
  line-height: 39px;
  font-weight: 600;
  word-break: break-word;
}

body.login-page {
  height: 100vh;
  max-height: none;
  overflow: auto;
  background: radial-gradient(140% 160% at 100% 0%, #dce7e3 0%, #eef3f1 35%, #f8fafb 100%);
}

.login-layout {
  width: min(1200px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 42px 30px;
  align-items: stretch;
}

.login-promo {
  background: linear-gradient(130.812deg, rgb(41, 78, 71) 0%, rgb(0, 122, 85) 50%, rgb(0, 120, 111) 100%);
  border-radius: 24px;
  min-height: 648px;
  padding: 48px;
  color: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.login-promo::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 256px;
  height: 256px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  filter: blur(64px);
}

.login-promo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -60px;
  width: 256px;
  height: 256px;
  border-radius: 50%;
  background: rgba(173, 70, 255, 0.1);
  filter: blur(64px);
}

.login-promo > * {
  position: relative;
  z-index: 1;
}

.promo-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
}

.promo-icon .icon {
  width: 32px;
  height: 32px;
}

.promo-logo {
  width: 128px;
  height: 69px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
}

.promo-logo img {
  display: block;
  width: 114px;
  height: 43px;
  object-fit: contain;
  opacity: 1;
}

.login-promo h1 {
  margin: 24px 0 0;
  font-size: 36px;
  line-height: 45px;
}

.login-promo > p {
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 29.25px;
  color: rgba(255, 255, 255, 0.9);
}

.promo-features {
  margin-top: 40px;
  display: grid;
  gap: 14px;
}

.promo-feature {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  min-height: 91px;
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.promo-feature h3 {
  margin: 0;
  font-size: 31px;
  line-height: 1.3;
}

.promo-feature p {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
}

.login-promo--figma {
  min-height: 552px;
  padding: 48px;
}

.login-promo--figma h1 {
  margin-top: 24px;
  font-size: 36px;
  line-height: 45px;
}

.login-promo--figma > p {
  margin-top: 16px;
  max-width: 404px;
  font-size: 18px;
  line-height: 29.25px;
}

.login-promo--figma .promo-features {
  margin-top: 40px;
  gap: 16px;
}

.login-promo--figma .promo-feature {
  min-height: 96px;
  padding: 20px;
}

.login-promo--figma .promo-feature h3 {
  font-size: 18px;
  line-height: 27px;
}

.login-promo--figma .promo-feature p {
  font-size: 14px;
  line-height: 20px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.12), 0 4px 6px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.feature-icon .icon {
  width: 20px;
  height: 20px;
}

.feature-icon.blue {
  background: linear-gradient(135deg, #2b7fff 0%, #00b8db 100%);
}

.feature-icon.violet {
  background: linear-gradient(135deg, #ad46ff 0%, #f6339a 100%);
}

.feature-icon.orange {
  background: linear-gradient(135deg, #ff6900 0%, #fb2c36 100%);
}

.login-card-wrap {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.login-card {
  width: 560px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  padding: 24px;
}

.login-card-header h2 {
  margin: 0;
  font-size: 30px;
  line-height: 36px;
  font-weight: 700;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-card-header p {
  margin: 8px 0 24px;
  font-size: 16px;
  line-height: 24px;
  color: #64748b;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 20px;
}

.field-wrap {
  height: 48px;
  border-radius: 16px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  margin-bottom: 16px;
}

.field-wrap .icon {
  width: 20px;
  height: 20px;
  color: #64748b;
}

.field-wrap input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.field-wrap input::placeholder {
  color: #64748b;
}

.password-field {
  padding-right: 8px;
}

.password-toggle {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 32px;
}

.password-toggle:hover {
  background: #e2e8f0;
  color: #334155;
}

.password-toggle:focus-visible {
  outline: 2px solid #007a55;
  outline-offset: 1px;
}

.password-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.password-row a,
.login-register a {
  color: #294e47;
  text-decoration: none;
}

.login-submit {
  margin-top: 8px;
  width: 100%;
  height: 48px;
  border-radius: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, #294e47 0%, #007a55 100%);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.login-submit .icon {
  width: 16px;
  height: 16px;
}

.login-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: #dc2626;
  font-size: 13px;
  line-height: 20px;
}

.login-register {
  margin: 14px 0 0;
  text-align: center;
  color: #64748b;
  font-size: 14px;
  line-height: 20px;
}

.login-page--figma {
  background: linear-gradient(142.122deg, #f8fafc 0%, rgba(236, 253, 245, 0.3) 50%, rgba(240, 253, 250, 0.3) 100%);
  position: relative;
}

.login-page--figma::before {
  content: "";
  position: fixed;
  right: -30px;
  top: -48px;
  width: 384px;
  height: 384px;
  border-radius: 50%;
  background: rgba(41, 78, 71, 0.05);
  filter: blur(64px);
  pointer-events: none;
}

.login-page--figma::after {
  content: "";
  position: fixed;
  left: -40px;
  bottom: 0;
  width: 384px;
  height: 384px;
  border-radius: 50%;
  background: rgba(173, 70, 255, 0.05);
  filter: blur(64px);
  pointer-events: none;
}

.login-page--figma .login-layout {
  width: min(1129px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
  grid-template-columns: 548.5px 548px;
  gap: 32px;
  align-items: center;
  align-content: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.login-page--figma .login-promo {
  min-height: 551.5px;
}

.login-page--figma .login-card-wrap {
  align-items: center;
}

.login-page--figma #loginForm.login-card {
  width: 548px;
  height: 554px;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.login-page--figma #loginForm .login-card-header {
  width: 484.5px;
  margin: 0 auto;
}

.login-page--figma #loginForm .login-card-header p {
  margin: 8px 0 46px;
}

.login-page--figma #loginForm .field-label,
.login-page--figma #loginForm .field-wrap,
.login-page--figma #loginForm .password-row,
.login-page--figma #loginForm .login-submit,
.login-page--figma #loginForm .login-error,
.login-page--figma #loginForm .login-register {
  width: 484.5px;
  margin-left: auto;
  margin-right: auto;
}

.login-page--figma #loginForm .login-submit {
  margin-top: 28px;
}

.login-page--figma #loginForm .login-error {
  margin-top: 44px;
}

.login-page--figma #loginForm .login-register {
  margin-top: auto;
}

@media (max-width: 1180px) {
  .login-layout {
    grid-template-columns: 1fr;
    width: min(660px, 100%);
    align-items: center;
  }

  .login-card {
    width: 100%;
  }
}

@media (max-width: 780px) {
  .login-layout {
    padding: 16px;
    gap: 16px;
  }

  .login-promo {
    min-height: auto;
    padding: 28px 22px;
  }

  .login-promo h1 {
    font-size: 40px;
  }

  .login-promo > p {
    font-size: 24px;
  }

  .promo-feature h3 {
    font-size: 24px;
  }

  .promo-feature p {
    font-size: 18px;
  }

  #loginForm.login-card,
  #loginForm .login-card-header,
  #loginForm .field-label,
  #loginForm .field-wrap,
  #loginForm .password-row,
  #loginForm .login-submit,
  #loginForm .login-error,
  #loginForm .login-register {
    width: 100%;
  }

  #loginForm.login-card {
    height: auto;
  }
}

@media (max-width: 1180px) {
  .login-page--figma .login-layout {
    grid-template-columns: 1fr;
    width: min(660px, 100%);
    padding: 24px 16px;
    gap: 24px;
    align-items: stretch;
  }

  .login-page--figma .login-promo,
  .login-page--figma #loginForm.login-card {
    width: 100%;
    min-height: auto;
    height: auto;
  }

  .login-page--figma #loginForm .login-card-header,
  .login-page--figma #loginForm .field-label,
  .login-page--figma #loginForm .field-wrap,
  .login-page--figma #loginForm .password-row,
  .login-page--figma #loginForm .login-submit,
  .login-page--figma #loginForm .login-error {
    width: 100%;
  }
}



/* Login page (Figma 29:596) */
body.login-v2-page {
  min-height: 100vh;
  max-height: none;
  overflow: auto;
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: linear-gradient(142.122deg, #294e47 0%, #007a55 50%, #00786f 100%);
}

.login-v2 {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  color: #fff;
  overflow: hidden;
}

.login-v2::before,
.login-v2::after {
  content: "";
  position: absolute;
  width: 384px;
  height: 384px;
  border-radius: 999px;
  filter: blur(64px);
  pointer-events: none;
}

.login-v2::before {
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.05);
}

.login-v2::after {
  left: 0;
  bottom: 0;
  background: rgba(173, 70, 255, 0.1);
}

.login-v2-logo-box,
.login-v2 h1,
.login-v2-subtitle,
.login-v2-card-wrap {
  position: relative;
  z-index: 1;
}

.login-v2-logo-box {
  width: 231px;
  height: 80px;
  border-radius: 24px;
  background: #f2f4f3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
}

.login-v2-logo-box img {
  width: 156px;
  height: 53px;
  object-fit: contain;
  display: block;
}

.login-v2 h1 {
  margin: 24px 0 0;
  font-size: 56px;
  line-height: 1.25;
  font-weight: 700;
  text-align: center;
}

.login-v2-subtitle {
  margin: 0;
  font-size: 30px;
  line-height: 1.4;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.login-v2-card-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.login-v2-card {
  width: 448px;
  min-height: 432px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.login-v2-card-head {
  height: 112px;
  padding: 24px;
  background: linear-gradient(165.964deg, #294e47 0%, #007a55 100%);
}

.login-v2-card-head h2 {
  margin: 0;
  color: #fff;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
}

.login-v2-card-head p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
}

.login-v2-label {
  margin: 56px 32px 8px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 14px;
  line-height: 14px;
  font-weight: 400;
}

.login-v2-label + .login-v2-field {
  margin-top: 0;
}

.login-v2-field {
  margin: 0 32px;
  height: 48px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  padding: 4px 12px;
}

.login-v2-field + .login-v2-label {
  margin-top: 24px;
}

.login-v2-label .icon {
  width: 16px;
  height: 16px;
  color: #475569;
  flex: 0 0 16px;
}

.login-v2-field input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

.login-v2-field input::placeholder {
  color: #64748b;
}

.login-v2-submit {
  margin: 24px 32px 0;
  width: calc(100% - 64px);
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: #294e47;
  box-shadow: 0 10px 15px 0 rgba(0, 0, 0, 0.1), 0 4px 6px 0 rgba(0, 0, 0, 0.1);
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  cursor: pointer;
}

.login-v2-submit:disabled {
  opacity: 0.75;
  cursor: default;
}

.login-v2-error {
  min-height: 20px;
  margin: 8px 32px 0;
  color: #dc2626;
  font-size: 14px;
  line-height: 20px;
}

@media (max-width: 560px) {
  .login-v2 {
    justify-content: flex-start;
    padding: 28px 12px;
  }

  .login-v2-logo-box {
    width: 190px;
    height: 66px;
  }

  .login-v2-logo-box img {
    width: 132px;
    height: 45px;
  }

  .login-v2 h1 {
    font-size: 40px;
    line-height: 1.2;
    margin-top: 18px;
  }

  .login-v2-subtitle {
    font-size: 20px;
    line-height: 1.4;
  }

  .login-v2-card-wrap {
    margin-top: 22px;
  }

  .login-v2-card {
    width: min(448px, 100%);
    min-height: 0;
  }

  .login-v2-card-head h2 {
    font-size: 28px;
  }

  .login-v2-card-head p {
    font-size: 14px;
  }

  .login-v2-label {
    margin-left: 20px;
    margin-right: 20px;
  }

  .login-v2-field {
    margin-left: 20px;
    margin-right: 20px;
  }

  .login-v2-submit {
    margin-left: 20px;
    margin-right: 20px;
    width: calc(100% - 40px);
  }

  .login-v2-error {
    margin-left: 20px;
    margin-right: 20px;
  }
}

/* UI Refactor: Projects + Templates Admin */
.ui-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.ui-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.ui-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  font-weight: 800;
  color: #12312b;
}

.ui-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: #6a7a8f;
}

.ui-card {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.ui-btn {
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0 14px;
  font: 600 14px/1 "Segoe UI", "Manrope", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.ui-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ui-btn-primary {
  background: linear-gradient(90deg, #114d40 0%, #0a7d5a 100%);
  color: #fff;
  border-color: #0d6d53;
}

.ui-btn-secondary {
  background: #fff;
  color: #334155;
  border-color: #d8e0ea;
}

.ui-btn-danger {
  background: #d92d20;
  color: #fff;
  border-color: #b42318;
}

.ui-btn-ghost-danger {
  height: 30px;
  border-radius: 8px;
  border: 1px solid #f1b9b9;
  background: #fff4f4;
  color: #b42318;
  padding: 0 10px;
  font: 600 12px/1 "Segoe UI", "Manrope", sans-serif;
  cursor: pointer;
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e9f4ef;
  color: #0b6a4d;
  border: 1px solid #cce5da;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
}

.ui-badge.muted {
  background: #f3f5f8;
  border-color: #e2e8f0;
  color: #637287;
}

.projects-screen .projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  background: #fff;
  border: 1px solid #dde5ef;
  border-radius: 14px;
  padding: 14px;
  min-height: 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.project-card-top-actions {
  display: flex;
  justify-content: flex-end;
  min-height: 26px;
}

.history-card .project-card-top-actions {
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-delete-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #f2c6c6;
  border-radius: 8px;
  background: #fff5f5;
  color: #b42318;
  font: 700 16px/1 "Segoe UI", "Manrope", sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  justify-content: center;
}

.history-delete-btn:hover {
  background: #ffe8e8;
  border-color: #eaa2a2;
}

.project-card-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  color: #0f172a;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.project-card-head p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 18px;
  color: #718096;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.project-card .project-card-head {
  display: block;
  min-width: 0;
}

.project-card-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-card-code {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: #374151;
}

.project-card-footer {
  margin-top: auto;
  border-top: 1px solid #e8edf3;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-card-footer > span {
  font-size: 12px;
  line-height: 16px;
  color: #8896a8;
}

.history-card {
  min-height: 250px;
}

.history-card .project-card-code {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  color: #536173;
}

.history-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.history-card-actions .ui-btn {
  min-height: 32px;
  padding: 0 12px;
}

.ui-badge.history-status-generated {
  background: #e7f6ef;
  border-color: #cbe9dc;
  color: #0b6a4d;
}

.ui-badge.history-status-error {
  background: #fdecec;
  border-color: #f5cccc;
  color: #b42318;
}

.ui-badge.history-status-draft {
  background: #f3f5f8;
  border-color: #e2e8f0;
  color: #637287;
}

.ui-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  color: #546274;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ui-icon-btn .icon {
  width: 16px;
  height: 16px;
}

.ui-icon-btn.danger {
  border-color: #f1b9b9;
  background: #fff4f4;
  color: #b42318;
}

.ui-empty {
  border: 1px dashed #d3dde8;
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  background: #fff;
}

.ui-empty h3 {
  margin: 0;
  font-size: 18px;
  color: #1f2937;
}

.ui-empty p {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.ui-empty-inline {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.project-skeleton {
  pointer-events: none;
}

.sk-line,
.sk-badge,
.sk-btn {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #edf2f7 25%, #f8fafc 50%, #edf2f7 75%);
  background-size: 220% 100%;
  animation: uiShimmer 1.2s linear infinite;
}

.sk-line {
  height: 14px;
}

.sk-line-lg {
  height: 18px;
  width: 75%;
}

.sk-line-sm {
  width: 56%;
}

.sk-line-xs {
  width: 40%;
}

.sk-badge {
  width: 76px;
  height: 22px;
}

.sk-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sk-btn {
  width: 110px;
  height: 30px;
}

@keyframes uiShimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.ui-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.ui-modal-backdrop[hidden] {
  display: none;
}

.ui-modal {
  width: min(680px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #dce4ee;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.2);
  padding: 16px;
  position: relative;
}

.ui-modal-lg {
  width: min(900px, 100%);
}

.ui-modal-sm {
  width: min(520px, 100%);
}

.ui-modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.ui-modal-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  color: #132d29;
}

.ui-modal-head p {
  margin: 8px 0 0;
  color: #718096;
  font-size: 14px;
  line-height: 20px;
}

.ui-form-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ui-field {
  display: grid;
  gap: 6px;
}

.ui-field-full {
  grid-column: 1 / -1;
}

.ui-field span {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: #334155;
}

.ui-field input,
.ui-field textarea,
.ui-field select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  padding: 8px 10px;
  font: 500 14px/1.3 "Segoe UI", "Manrope", sans-serif;
  color: #0f172a;
  background: #fff;
}

.ui-field textarea {
  resize: vertical;
}

.ui-field input:focus,
.ui-field textarea:focus,
.ui-field select:focus {
  outline: none;
  border-color: #0a7d5a;
  box-shadow: 0 0 0 3px rgba(10, 125, 90, 0.14);
}

.ui-modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.history-fields-meta {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.history-fields-meta span {
  font-size: 13px;
  line-height: 18px;
  color: #475569;
}

.history-fields-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  max-height: min(55vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.history-field-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
  display: grid;
  gap: 8px;
}

.history-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-field-head h4 {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
  color: #0f172a;
}

.history-field-head span {
  font-size: 11px;
  line-height: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.history-field-value {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

.history-field-download-btn {
  justify-self: flex-start;
}

.ui-file-list {
  display: grid;
  gap: 8px;
}

.ui-file-item {
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
}

.ui-file-item.ui-file-item-edit {
  align-items: flex-start;
}

.ui-file-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ui-file-export-row {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.ui-file-export-row span {
  color: #73839b;
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
}

.ui-file-export-row input {
  width: min(420px, 100%);
  height: 30px;
  border: 1px solid #d5dde7;
  border-radius: 8px;
  padding: 0 8px;
  background: #ffffff;
  color: #1f2937;
  font-family: inherit;
  font-size: 12px;
}

.ui-file-meta strong {
  display: block;
  font-size: 13px;
  line-height: 18px;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 450px;
}

.ui-file-meta small {
  display: block;
  margin-top: 2px;
  color: #73839b;
  font-size: 11px;
}

.ui-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  min-width: 220px;
  max-width: 360px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.25);
  transform: translateY(0);
  opacity: 1;
  transition: 0.2s ease;
}

.ui-toast.hide {
  opacity: 0;
  transform: translateY(8px);
}

.ui-toast-success {
  background: #0b7a58;
}

.ui-toast-error {
  background: #c43123;
}

.templates-screen {
  min-height: 100%;
}

.ui-accordion-toggle {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid #d8e2ec;
  background: #f8fafc;
  color: #1f2937;
  font: 700 14px/1 "Segoe UI", "Manrope", sans-serif;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
}

.ui-accordion-panel {
  margin-top: 12px;
  border-top: 1px solid #e6edf5;
  padding-top: 12px;
}

.templates-table-wrap {
  overflow: auto;
}

.templates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.templates-table th,
.templates-table td {
  border-bottom: 1px solid #e7edf4;
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
}

.templates-table th {
  color: #55657b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.templates-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.templates-row-skeleton {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.6fr 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #e7edf4;
}

.fields-editor-wrap {
  margin-top: 12px;
}

.fields-editor-head,
.fields-editor-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr 0.8fr 0.4fr;
  gap: 8px;
}

.fields-editor-head {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 8px;
  border-bottom: 1px solid #e8edf3;
}

.fields-editor-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.fields-editor-row input,
.fields-editor-row select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  padding: 6px 8px;
  font: 500 13px/1.2 "Segoe UI", "Manrope", sans-serif;
}

@media (max-width: 980px) {
  .projects-screen .projects-grid {
    grid-template-columns: 1fr;
  }

  .ui-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ui-form-grid {
    grid-template-columns: 1fr;
  }

  .history-fields-meta {
    grid-template-columns: 1fr;
  }

  .fields-editor-head,
  .fields-editor-row {
    grid-template-columns: 1fr;
  }
}
