:root {
  --ink: #17202d;
  --muted: #667085;
  --line: #d6dce6;
  --panel: #ffffff;
  --page: #eef2f6;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --nav: #101927;
  --nav-soft: #182334;
  --warning: #9f6115;
  --focus: #2b7fff;
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0, #f3f5f8 260px, var(--page) 100%);
  color: var(--ink);
}

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

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  padding: 12px 16px;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c9d1dd;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
  padding: 12px 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.16);
}

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

label {
  display: block;
  margin: 16px 0 7px;
  color: #3d4755;
  font-size: 0.92rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.65rem;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  min-height: 100vh;
  gap: 24px;
  padding: 24px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--nav), var(--nav-soft));
  box-shadow: 0 18px 45px rgba(16, 25, 39, 0.18);
  color: #ffffff;
  padding: 32px;
}

.brand-block {
  display: grid;
  gap: 12px;
}

.brand-logo {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin-bottom: 4px;
}

.eyebrow,
.label {
  margin: 0 0 8px;
  color: #718096;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: #c7d0dd;
}

.hosted-by {
  margin: auto 0 0;
  padding-top: 20px;
  color: #aeb8c7;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-panel,
.session-panel,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.login-panel,
.session-panel {
  padding: 20px;
}

.admin-entry-panel {
  display: grid;
  gap: 14px;
}

.admin-entry-button,
.issue-entry-button {
  width: 100%;
}

.admin-login-form,
.issue-report-form {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 18px;
}

.admin-login-form label,
.issue-report-form label {
  color: #e8edf3;
}

.admin-login-form .result,
.issue-report-form .result {
  margin: 12px 0 0;
}

.issue-entry-panel {
  display: grid;
  gap: 14px;
}

.issue-report-form h2 {
  color: #ffffff;
  font-size: 1.25rem;
}

.issue-help {
  margin: 8px 0 0;
  color: #c7d0dd;
  font-size: 0.88rem;
  line-height: 1.45;
}

.report-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.session-panel strong,
.session-panel span {
  display: block;
}

.session-panel span {
  margin: 5px 0 16px;
  color: var(--muted);
}

.secondary {
  background: #e8edf3;
  color: #1f2937;
}

.secondary:hover {
  background: #d7dee8;
}

.danger {
  background: #9f1d1d;
  color: #ffffff;
}

.danger:hover {
  background: #7f1717;
}

.hidden {
  display: none;
}

.workspace {
  overflow: auto;
  padding: 8px 0;
}

.form-panel {
  max-width: 1040px;
  padding: 28px;
  box-shadow: 0 14px 34px rgba(16, 25, 39, 0.08);
}

.chooser-panel {
  max-width: 980px;
}

.template-panel {
  max-width: 1120px;
}

.form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  padding-bottom: 20px;
}

.unfinished-panel {
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  padding-bottom: 26px;
}

.form-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  margin-top: 20px;
}

.form-card {
  display: flex;
  min-height: 152px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #c9d1dd;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 18px;
  text-align: left;
}

.admin-download-card {
  text-decoration: none;
}

.form-card:hover {
  border-color: var(--accent);
  background: #f8fafc;
  box-shadow: 0 12px 26px rgba(16, 25, 39, 0.1);
}

.form-card strong {
  font-size: 1.08rem;
  line-height: 1.25;
}

.form-card span,
.helper-text,
.result {
  color: var(--muted);
  font-weight: 700;
}

.status-pill {
  border-radius: 999px;
  background: #eef6f4;
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 7px 12px;
  white-space: nowrap;
}

.word-workflow-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.helper-text {
  margin: 0;
}

.result {
  min-height: 22px;
}

.result.warning {
  color: var(--warning);
}

.result.success {
  color: var(--accent-strong);
}

.editor-body {
  height: 100vh;
  overflow: hidden;
  background: var(--page);
}

.editor-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  gap: 8px;
  padding: 10px;
}

.editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 14px;
}

.editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-topbar h1 {
  color: var(--ink);
  font-size: 1.18rem;
}

.editor-topbar .eyebrow {
  margin-bottom: 4px;
  font-size: 0.7rem;
}

.editor-status {
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 14px;
  left: 18px;
  min-height: 0;
  margin: 0;
  pointer-events: none;
}

.editor-status:empty {
  display: none;
}

.editor-status.warning,
.editor-status.success {
  width: fit-content;
  max-width: min(720px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(16, 25, 39, 0.14);
  padding: 10px 12px;
}

.onlyoffice-editor {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.admin-shell {
  min-height: 100vh;
  padding: 28px;
}

.admin-panel {
  max-width: 980px;
  margin: 0 auto;
}

.admin-downloads {
  margin-top: 22px;
}

.admin-log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.admin-log-heading h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.admin-table-wrap {
  width: 100%;
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.admin-log-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #ffffff;
}

.admin-log-table th,
.admin-log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

.admin-log-table th {
  background: #eef3f8;
  color: var(--ink);
  font-weight: 800;
}

.admin-log-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 780px) {
  .app-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .sidebar,
  .workspace {
    padding: 20px;
  }

  .brand-logo {
    width: min(220px, 100%);
  }

  h1 {
    font-size: 1.8rem;
  }

  .login-panel,
  .session-panel,
  .form-panel {
    padding: 18px;
  }

  label {
    margin-top: 12px;
  }

  input,
  select,
  textarea {
    padding: 11px 12px;
  }

  .form-cards {
    grid-template-columns: 1fr;
  }

  .form-heading,
  .editor-topbar {
    align-items: stretch;
    flex-direction: column;
  }
}
