:root {
  --brand-900: #083761;
  --brand-800: #0a4d85;
  --brand-700: #126cb5;
  --brand-600: #1689cf;
  --brand-100: #e9f6ff;
  --accent-red: #b51920;
  --accent-gold: #e5b341;
  --ink: #142235;
  --muted: #5d6d7f;
  --line: #d7e4ee;
  --panel: #ffffff;
  --soft: #f3f7fb;
  --ok: #167c59;
  --warn: #a66b00;
  --danger: #b3261e;
  --shadow: 0 18px 42px rgba(6, 48, 86, 0.12);
  --soft-shadow: 0 8px 24px rgba(6, 48, 86, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #ffffff;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.home {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 248, 255, 0.96) 46%, rgba(255, 249, 241, 0.78) 100%),
    linear-gradient(90deg, rgba(0, 57, 166, 0.06), rgba(255, 255, 255, 0.88) 48%, rgba(213, 43, 30, 0.07));
}

.home::before {
  content: "";
  position: absolute;
  top: 76px;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #ffffff 0 18%, #0039a6 18% 36%, #d52b1e 36% 54%, #de2910 54% 78%, #ffde00 78% 100%);
  opacity: 0.88;
  z-index: 0;
}

.home::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 155px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 6%, rgba(6, 59, 112, 0.08) 6% 12%, transparent 12% 15%, rgba(6, 59, 112, 0.1) 15% 21%, transparent 21% 24%, rgba(6, 59, 112, 0.08) 24% 34%, transparent 34% 50%, rgba(181, 25, 32, 0.08) 50% 55%, transparent 55% 58%, rgba(181, 25, 32, 0.1) 58% 68%, transparent 68% 71%, rgba(181, 25, 32, 0.08) 71% 88%, transparent 88% 100%),
    linear-gradient(to top, rgba(6, 59, 112, 0.14), rgba(6, 59, 112, 0));
  clip-path: polygon(0 100%, 0 78%, 6% 78%, 6% 56%, 9% 56%, 9% 42%, 11% 42%, 11% 30%, 13% 42%, 15% 42%, 15% 58%, 20% 58%, 20% 38%, 22% 38%, 22% 25%, 24% 38%, 27% 38%, 27% 62%, 34% 62%, 34% 78%, 49% 78%, 49% 68%, 54% 68%, 54% 48%, 57% 48%, 57% 36%, 60% 48%, 64% 48%, 64% 64%, 73% 64%, 73% 44%, 76% 44%, 76% 32%, 79% 44%, 82% 44%, 82% 68%, 91% 68%, 91% 82%, 100% 82%, 100% 100%);
  z-index: 0;
}

.home > * {
  position: relative;
  z-index: 1;
}

.homeTop {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6vw;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  z-index: 30;
}

.minimalBrand strong {
  color: var(--brand-900);
  font-size: 20px;
  letter-spacing: 0;
}

.minimalBrand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  object-position: center;
}

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

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  object-position: center;
}

.brandText strong {
  display: block;
  color: var(--brand-900);
  font-size: 18px;
}

.brandText span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.homeNav {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.homeNav a {
  color: var(--brand-900);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.topLogin {
  position: relative;
}

.topLoginToggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--brand-800), var(--brand-700));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.topLoginToggle:hover,
.topLogin:focus-within .topLoginToggle {
  background: linear-gradient(135deg, #b51920, #8f1f18);
}

.compactLoginForm {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 330px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  z-index: 40;
}

.compactLoginForm .field label {
  font-size: 12px;
}

.compactLoginForm .btn {
  width: 100%;
}

.compactForgot {
  font-size: 12px;
  min-height: 34px;
}

.loginError {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.homeMain {
  display: block;
  align-items: center;
  padding: 58px 6vw 86px;
}

.workspaceHome {
  min-height: calc(86vh - 136px);
}

.workspaceHero {
  max-width: 920px;
}

.heroCopy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border-left: 4px solid #d52b1e;
  background: rgba(255, 255, 255, 0.78);
  color: var(--brand-700);
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 12px;
}

h1 {
  color: var(--brand-900);
  font-size: 58px;
  line-height: 1.04;
  margin: 0 0 18px;
  letter-spacing: 0;
}

.lead {
  color: #33465c;
  font-size: 18px;
  line-height: 1.72;
  margin: 0 0 26px;
  max-width: 780px;
}

.heroMetrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 560px;
}

.heroMetrics span {
  min-height: 82px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.heroMetrics strong {
  display: block;
  color: var(--brand-900);
  font-size: 28px;
  margin-bottom: 4px;
}

.accentList {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.accentList span {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-top: 3px solid #0039a6;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--brand-900);
  font-size: 13px;
  font-weight: 700;
}

.accentList span:nth-child(2) {
  border-top-color: #d52b1e;
}

.accentList span:nth-child(3) {
  border-top-color: #de2910;
}

.accentList span:nth-child(4) {
  border-top-color: #ffde00;
}

.publicBand {
  padding: 56px 6vw;
  background: rgba(244, 249, 253, 0.82);
  border-top: 1px solid var(--line);
}

.publicBand.white {
  background: rgba(255, 255, 255, 0.88);
  padding-bottom: 132px;
}

.publicInner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

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

.serviceItem {
  min-height: 178px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.serviceItem h3,
.splitText h2 {
  color: var(--brand-900);
  margin: 0 0 10px;
}

.serviceItem p,
.splitText p,
.reasonList p,
.contactBox p,
.steps span {
  color: #33465c;
  line-height: 1.65;
}

.splitText {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 32px;
  align-items: start;
}

.reasonList,
.contactBox {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #f8fbfe;
}

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

.steps span {
  min-height: 154px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.steps strong {
  display: block;
  color: var(--brand-900);
  margin-bottom: 8px;
}

.loginCard {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.loginMark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-900);
  color: #fff;
  font-weight: 800;
  margin-bottom: 16px;
}

.loginCard h2 {
  margin: 0 0 8px;
  color: var(--brand-900);
  font-size: 26px;
}

.loginForm {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.passwordWrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
}

.passwordToggle {
  min-height: 42px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #f2f8fd;
  color: var(--brand-900);
  font-weight: 700;
}

.forgotBtn {
  width: 100%;
  margin-top: 12px;
  min-height: 38px;
  color: var(--brand-800);
  background: #f2f8fd;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.loginHint {
  font-size: 12px;
  margin: 10px 0 0;
}

.compact {
  margin-top: 16px;
}

.heroActions,
.rowActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-800));
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(18, 108, 181, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  background: linear-gradient(135deg, var(--brand-800), var(--brand-900));
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(18, 108, 181, 0.22);
}

.btn.secondary {
  background: #eef6fc;
  color: var(--brand-900);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.ghost {
  background: transparent;
  color: var(--brand-900);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.danger {
  background: linear-gradient(135deg, var(--danger), #8f1f18);
}

.btn.saved {
  background: linear-gradient(135deg, #16845f, #0d6b4d);
  box-shadow: 0 10px 22px rgba(22, 124, 89, 0.2);
}

.btn.warnSaved {
  background: linear-gradient(135deg, #b7791f, #965d12);
  box-shadow: 0 10px 22px rgba(166, 107, 0, 0.18);
}

.btn.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.homeFoot {
  padding: 20px 6vw;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.appShell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background:
    radial-gradient(circle at top right, rgba(18, 108, 181, 0.13), transparent 32%),
    linear-gradient(135deg, #eef5fb 0%, #f8fbfe 48%, #fff7f2 100%);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(8, 55, 97, 0.98), rgba(6, 42, 76, 0.98)),
    var(--brand-900);
  border-right: 0;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  box-shadow: 16px 0 34px rgba(6, 48, 86, 0.14);
}

.sideLogo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 12px;
}

.sideLogo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}

.sideLogo strong {
  color: #fff;
}

.navBtn {
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 5px;
  border: 1px solid transparent;
}

.navBtn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.navBtn.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(232, 245, 255, 0.94));
  color: var(--brand-900);
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.46);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.main {
  min-width: 0;
}

.topbar {
  height: 66px;
  border-bottom: 1px solid rgba(215, 228, 238, 0.86);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 8px 28px rgba(6, 48, 86, 0.06);
}

.userMeta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  min-width: 0;
}

.versionTag {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.content {
  padding: 26px;
}

.sectionHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 2px 2px 0;
}

.sectionHead h2 {
  margin: 0 0 5px;
  color: var(--brand-900);
  font-size: 28px;
  letter-spacing: 0;
}

.sectionHead p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.modalBox {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(215, 228, 238, 0.92);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.panel {
  padding: 18px;
}

.tablePanel {
  margin-top: 16px;
  overflow: auto;
}

.stat {
  min-height: 106px;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--brand-700);
}

.stat:nth-child(2) {
  border-top-color: var(--accent-red);
}

.stat:nth-child(3) {
  border-top-color: var(--accent-gold);
}

.stat::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -36px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: rgba(18, 108, 181, 0.08);
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  color: var(--brand-900);
  font-size: 30px;
  margin-top: 8px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid rgba(215, 228, 238, 0.86);
  vertical-align: top;
  background: rgba(255, 255, 255, 0.86);
}

th {
  color: #244760;
  background: linear-gradient(180deg, #f7fbff, #eef6fc);
  font-size: 13px;
  border-bottom: 1px solid rgba(198, 216, 229, 0.92);
}

tbody tr:hover td {
  background: #f7fbff;
}

.codeLink {
  color: var(--brand-700);
  font-weight: 700;
  background: transparent;
  padding: 0;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  align-items: center;
  background: #e8f4ff;
  color: var(--brand-900);
  font-size: 12px;
  font-weight: 700;
}

.badge.ok {
  background: #e3f7ee;
  color: var(--ok);
}

.badge.warn {
  background: #fff3d4;
  color: var(--warn);
}

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

.customerForm {
  margin-bottom: 16px;
}

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

.field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  color: #29445f;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbdbe8;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fbfdff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(18, 108, 181, 0.18);
  border-color: var(--brand-600);
  background: #fff;
}

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

.ticketPage {
  display: block;
}

.ticketTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ticketTitle h3 {
  margin: 0;
  color: var(--brand-900);
  font-size: 22px;
}

.post {
  border: 1px solid rgba(203, 219, 232, 0.96);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff, #f9fcff);
  box-shadow: 0 6px 18px rgba(6, 48, 86, 0.05);
}

.postHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(215, 228, 238, 0.7);
}

.biText {
  display: grid;
  gap: 8px;
  line-height: 1.55;
}

.biText .ru {
  color: #46617c;
}

.attachments,
.reviewActions {
  margin-top: 12px;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachments a,
.attachments span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eaf5ff;
  color: var(--brand-900);
  font-size: 12px;
  text-decoration: none;
  border: 1px solid rgba(18, 108, 181, 0.16);
}

.attachments a:hover {
  background: #dff0ff;
  border-color: rgba(18, 108, 181, 0.32);
}

.attachmentHint {
  color: var(--muted);
  margin-left: 6px;
}

.reviewEditor {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed rgba(18, 108, 181, 0.36);
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fbff, #ffffff);
}

.reviewAttachmentList {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.reviewAttachmentItem {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #29445f;
  font-weight: 700;
}

.reviewAttachmentItem input {
  width: auto;
}

.translateBox {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.attachmentTools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hiddenFile {
  display: none;
}

.muted {
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 52, 0.46);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 30;
}

.modalBox {
  width: min(640px, 100%);
  padding: 22px;
}

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

.modalHead h2 {
  margin: 0 0 5px;
  color: var(--brand-900);
}

.closeBtn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef6fc;
  color: var(--brand-900);
  font-size: 18px;
}

.demoUsers {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 152px;
  overflow: auto;
}

.demoUsers button {
  background: #f6fbff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  text-align: left;
  color: #28435f;
}

.notice {
  padding: 12px 14px;
  border-left: 4px solid var(--brand-700);
  background: linear-gradient(90deg, #f3f9ff, #fff);
  color: #29445f;
  margin-bottom: 14px;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 4px 14px rgba(6, 48, 86, 0.04);
}

.settingsLogo {
  width: 220px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.inquiriesPanel {
  margin-top: 16px;
}

.consultation {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .homeMain,
  .appShell,
  .grid.two,
  .grid.three,
  .serviceGrid,
  .splitText,
  .steps,
  .ticketPage {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .homeMain {
    padding-top: 22px;
  }

  h1 {
    font-size: 42px;
  }

  .heroMetrics {
    grid-template-columns: 1fr;
  }

  .topbar,
  .homeTop {
    height: auto;
    padding: 14px;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .formGrid {
    grid-template-columns: 1fr;
  }

  .brandText {
    display: none;
  }

  .homeNav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .homeNav .btn {
    flex: 1 1 auto;
    min-width: 120px;
  }

  .content {
    padding: 16px;
  }

  h1 {
    font-size: 32px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
