:root {
  --bg: #f5f5f5;
  --card: #fff;
  --accent: #c9302c;
  --accent-hover: #a82824;
  --text: #333;
  --muted: #888;
  --border: #ddd;
  --link: #c9302c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Реклама */
.ad-banner {
  background: #f0f0f0;
  border: 1px dashed #ccc;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.ad-top {
  margin-bottom: 10px;
}

.ad-side {
  width: 160px;
  min-height: 400px;
  background: #f0f0f0;
  border: 1px dashed #ccc;
  padding: 15px 10px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
  flex-shrink: 0;
}

/* Header */
.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
}

.header__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.header__brand {
  font-style: italic;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.header__brand:hover {
  text-decoration: underline;
}

.header__nav a {
  font-style: italic;
  color: var(--muted);
}

.header__nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.header__right {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.header__desc {
  max-width: 1200px;
  margin: 8px auto 0;
  font-style: italic;
  color: var(--muted);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.header-lang-select {
  font-style: normal;
  justify-self: end;
  white-space: nowrap;
}

#hdr-desc-text {
  min-width: 0;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1;
}

/* Main layout */
.main-wrapper {
  display: flex;
  gap: 15px;
  max-width: 1400px;
  margin: 15px auto;
  padding: 0 10px;
}

.content {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.about-section {
  max-width: 480px;
  margin: 0 auto;
}

.about-section--wide {
  max-width: none;
  margin: 0;
}

.about-text {
  text-align: justify;
  text-indent: 4ch;
}

.about-title {
  font-size: 24px;
  margin-bottom: 15px;
}

.seo-hero {
  max-width: none;
  margin: 0 0 18px;
}

.seo-h1 {
  font-size: 22px;
  margin-bottom: 10px;
}

.seo-lead {
  color: var(--text);
  margin-bottom: 10px;
}

.seo-list {
  margin-left: 18px;
  color: var(--text);
}

.seo-list li {
  margin: 4px 0;
}

.seo-faq {
  max-width: 900px;
  margin: 18px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.seo-h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.seo-h3 {
  font-size: 14px;
  margin: 12px 0 6px;
}

.seo-faq__item p {
  color: var(--text);
}

.security-text {
  margin-top: 10px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-label {
  font-style: italic;
  color: var(--muted);
}

.contact-input,
.contact-textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
}

.contact-textarea {
  resize: vertical;
}

.contact-terms span {
  font-size: 12px;
}

/* Upload panel */
.upload-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 15px;
  background: linear-gradient(135deg, #f8f8f8, #fff);
  border-radius: 30px;
  border: 2px solid #eee;
  flex-wrap: wrap;
}

.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-upload, .btn-download {
  background: var(--accent);
  color: #fff;
  flex-direction: column;
  padding: 15px 30px;
  min-width: 120px;
}

.btn-upload:hover, .btn-download:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
}

.btn-download[disabled]:hover {
  background: var(--accent);
  transform: none;
}

.btn-icon {
  font-size: 20px;
}

.btn-edit {
  background: #fff;
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 12px;
}

.btn-edit:hover {
  background: #f5f5f5;
}

#contact-submit[disabled] {
  background: #f5f5f5;
}

#contact-submit.is-active:not([disabled]) {
  background: #d32f2f;
  border-color: #d32f2f;
  color: #fff;
}

#contact-submit.is-active:not([disabled]):hover {
  background: #b71c1c;
  border-color: #b71c1c;
}
  
.file-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 70px;
}

.file-card--hidden {
  display: none;
}

.file-icon {
  position: relative;
  width: 46px;
  height: 58px;
  border: 2px solid #2b579a;
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2b579a;
  font-weight: bold;
}

.file-icon__w {
  font-size: 18px;
  line-height: 1;
}

.file-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
  padding: 0;
}

.file-remove[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.file-name {
  max-width: 120px;
  font-size: 11px;
  text-align: center;
  color: var(--text);
  word-break: break-word;
}

.drag-hint {
  color: var(--muted);
  font-size: 12px;
  flex: 0 0 130px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow {
  font-size: 24px;
  color: #2b579a;
  margin: 0 10px;
}

/* Dropzone */
.dropzone {
  margin: 15px 0;
  padding: 20px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  text-align: center;
  color: var(--muted);
  transition: all 0.2s;
}

.dropzone--over {
  background: #fff5f5;
  border-color: #2b579a;
}

.status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.status--error {
  color: #a82824;
}

.status--ok {
  color: #2f7a2f;
}

/* Options panel */
.options-panel {
  margin-top: 15px;
  transition: all 0.3s;
}

.options-panel.collapsed {
  display: none;
}

/* Comment row */
.comment-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 10px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.comment-label {
  font-weight: bold;
  white-space: nowrap;
}

.comment-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
}

.comment-row .status {
  margin-top: 0;
  flex: 1;
}

/* GOST row */
.gost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 15px;
}

.gost-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.gost-version {
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
  margin-left: 10px;
}

.lang-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-style: italic;
  color: var(--muted);
}

.lang-select select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
}

.lang-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lang-link {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--link);
  background: #fff;
  font-style: normal;
  font-size: 12px;
  line-height: 1.4;
}

.lang-link:hover {
  text-decoration: underline;
}

.lang-link.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* Options grid */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-group {
  padding: 10px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.group-header {
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.select-all-mini {
  font-weight: normal;
  font-size: 11px;
  color: var(--link);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 6px 0;
  cursor: pointer;
  line-height: 1.5;
}

.check input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

/* Spacing group */
.spacing-group {
  display: flex;
  align-items: center;
}

.spacing-label {
  display: flex;
  align-items: center;
  gap: 15px;
  font-style: italic;
}

.spacing-select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
}

/* Debug row */
.debug-row {
  margin-top: 15px;
  padding: 10px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 4px;
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  background: #2d2d2d;
  color: #aaa;
  padding: 25px 40px;
  margin-top: 20px;
  font-size: 12px;
}

.footer.footer--single-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.footer-link--left {
  white-space: nowrap;
}

.footer-link--center {
  white-space: nowrap;
}

.footer-link--center2 {
  white-space: nowrap;
}

.footer-link--right {
  white-space: nowrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-title {
  color: #fff;
  font-weight: bold;
  margin-bottom: 5px;
  min-height: 18px;
}

.footer a {
  color: #aaa;
}

.footer a:hover {
  color: #fff;
}

.footer-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.footer-lang select {
  background: transparent;
  border: 1px solid #555;
  color: #aaa;
  padding: 5px 10px;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 1200px) {
  .ad-side { display: none; }
}

@media (max-width: 768px) {
  .upload-panel {
    flex-direction: column;
    border-radius: 15px;
  }
  
  .arrow { display: none; }
  
  .footer {
    flex-wrap: wrap;
    gap: 20px;
  }
}

