* {
  box-sizing: border-box;
}

:root {
  --primary: #5645d4;
  --primary-pressed: #4534b3;
  --navy: #0a1530;
  --navy-mid: #1a2a52;
  --ink: #1a1a1a;
  --charcoal: #37352f;
  --slate: #5d5b54;
  --stone: #a4a097;
  --surface: #f6f5f4;
  --surface-soft: #fafaf9;
  --canvas: #ffffff;
  --hairline: #e5e3df;
  --hairline-strong: #c8c4be;
  --link: #0075de;
  --danger: #e03131;
  --peach: #ffe8d4;
  --mint: #d9f3e1;
  --lavender: #e6e0f5;
  --yellow: #fef7d6;
  --success: #12833a;
  --warning: #b85c00;
  --shadow-soft: 0 14px 34px rgba(10, 21, 48, 0.08);
  --shadow-line: 0 1px 0 rgba(10, 21, 48, 0.05);
  --radius: 8px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  min-height: 56px;
  padding: 12px clamp(16px, 3vw, 32px);
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 17px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-name {
  color: #fff;
}

.brand-name:hover {
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

.nav {
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-form {
  margin: 0;
}

.nav-link,
.nav-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 14px;
  white-space: nowrap;
}

.nav-button {
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.nav-link-primary {
  color: var(--navy);
  background: #fff;
}

.page {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 56px;
}

.workspace-head,
.form-heading {
  margin-bottom: 18px;
}

.workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.workspace-title h1,
.form-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.12;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
}

.form-actions,
.book-forms {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.dark-button,
.secondary-button,
.danger-button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.primary-button:disabled,
.dark-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: wait;
  opacity: 0.68;
  box-shadow: none;
}

.primary-button {
  color: #fff;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-pressed);
  box-shadow: 0 10px 20px rgba(86, 69, 212, 0.22);
  text-decoration: none;
}

.dark-button {
  color: #fff;
  background: var(--ink);
}

.dark-button:hover {
  background: #303030;
  box-shadow: 0 10px 20px rgba(26, 26, 26, 0.18);
  text-decoration: none;
}

.secondary-button {
  color: var(--ink);
  background: transparent;
  border-color: var(--hairline-strong);
}

.secondary-button:hover {
  background: #fff;
  border-color: var(--stone);
  box-shadow: 0 8px 18px rgba(10, 21, 48, 0.08);
  text-decoration: none;
}

.danger-button {
  min-height: 32px;
  padding: 6px 10px;
  color: #fff;
  background: var(--danger);
}

.book-panel,
.form-page,
.table-shell {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.success-message {
  margin-bottom: 16px;
  padding: 10px 12px;
  color: #126b2d;
  background: #eaf8ee;
  border: 1px solid #bce8c9;
  border-radius: var(--radius);
  font-weight: 700;
}

.book-panel {
  margin-bottom: 16px;
  padding: 12px;
  box-shadow: var(--shadow-line);
}

.book-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  align-items: center;
}

.book-tab-wrap {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.book-tab-wrap.dragging,
.sidebar-book-item.dragging {
  opacity: 0.48;
}

.book-tab {
  flex: 0 0 auto;
  color: var(--charcoal);
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-weight: 600;
  white-space: nowrap;
}

.book-tab.active {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.manage-books-button {
  margin-left: auto;
}

.inline-form {
  min-width: 260px;
  display: flex;
  gap: 8px;
  flex: 1 1 320px;
}

.inline-form input,
.record-form input,
.record-form textarea,
.record-form select {
  width: 100%;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
}

.delete-book-form {
  min-width: auto;
  flex: 0 0 auto;
}

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

.summary-tile {
  min-height: 78px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  align-content: space-between;
  box-shadow: var(--shadow-line);
}

.summary-tile span {
  color: var(--slate);
  font-size: 13px;
  font-weight: 700;
}

.summary-tile strong {
  color: var(--ink);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.tint-peach {
  background: var(--peach);
}

.tint-mint {
  background: var(--mint);
}

.tint-lavender {
  background: var(--lavender);
}

.table-shell {
  overflow-x: auto;
  box-shadow: var(--shadow-soft);
}

.record-action-bar {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid #d8d5ce;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #f8f7f5 100%);
  box-shadow: var(--shadow-line);
}

.record-action-group,
.copy-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-action-group {
  padding: 8px 10px;
  border: 1px solid #cfcac2;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.copy-action-group label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.copy-action-group span {
  color: var(--navy-mid);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.copy-action-group select {
  width: 220px;
  min-height: 40px;
  border: 1px solid #b8b2a8;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #f8f7f5 100%);
  padding: 8px 34px 8px 10px;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

.copy-action-group select:focus {
  outline: 3px solid rgba(86, 69, 212, 0.18);
  border-color: var(--primary);
}

.copy-submit-button {
  color: #fff;
  background: var(--navy-mid);
  border-color: var(--navy-mid);
}

.copy-submit-button:hover {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 10px 20px rgba(10, 21, 48, 0.18);
}

.bill-table {
  min-width: 1060px;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.bill-table th,
.bill-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: break-word;
}

.bill-table th:nth-child(1),
.bill-table td:nth-child(1),
.bill-table th:nth-child(8),
.bill-table td:nth-child(8),
.bill-table th:nth-child(9),
.bill-table td:nth-child(9),
.bill-table th:nth-child(10),
.bill-table td:nth-child(10) {
  text-align: center;
}

.bill-table th:nth-child(5),
.bill-table td:nth-child(5) {
  text-align: right;
}

.amount-positive {
  color: #1aae39;
  font-weight: 700;
}

.amount-negative {
  color: #e03131;
  font-weight: 700;
}

.status-badge {
  min-width: 64px;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.status-paid {
  color: #fff;
  background: var(--success);
  border-color: #0f6f31;
  box-shadow: 0 5px 12px rgba(18, 131, 58, 0.18);
}

.status-unpaid {
  color: #7a3a00;
  background: #fff1d6;
  border-color: #e2a84f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.bill-table th {
  color: var(--slate);
  background: #fbfaf8;
  font-size: 13px;
  font-weight: 700;
}

.bill-table tbody tr:nth-child(even) {
  background: rgba(10, 21, 48, 0.022);
  box-shadow: inset 0 1px 0 rgba(10, 21, 48, 0.04);
}

.bill-table tbody tr:hover {
  background: #fbfbff;
}

.col-no {
  width: 52px;
}

.col-select {
  width: 54px;
}

.col-time {
  width: 104px;
}

.col-item {
  width: auto;
}

.col-amount {
  width: 124px;
}

.col-category {
  width: 76px;
}

.col-payee {
  width: 92px;
}

.col-status {
  width: 84px;
}

.col-image {
  width: 104px;
}

.col-action {
  width: 112px;
}

.item-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.item-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.note-wrap {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.record-note.note-collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.record-note.note-expanded {
  display: block;
  overflow: visible;
}

.note-toggle {
  width: fit-content;
  border: 0;
  padding: 0;
  color: var(--link);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.note-toggle:hover {
  text-decoration: underline;
}

.screenshot-box {
  position: relative;
  width: 76px;
  height: 56px;
  overflow: hidden;
  margin: 0 auto;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.screenshot-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.screenshot-box.empty {
  color: var(--stone);
  font-size: 13px;
  cursor: default;
}

.screenshot-count {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 20px;
  border-radius: 999px;
  padding: 1px 6px;
  color: #fff;
  background: rgba(10, 21, 48, 0.78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.small-link {
  margin-right: 8px;
  font-size: 13px;
  font-weight: 700;
}

.screenshot-link {
  border: 0;
  padding: 0;
  color: var(--link);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

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

.image-viewer {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.image-viewer::backdrop {
  background: rgba(10, 21, 48, 0.72);
}

.image-viewer-panel {
  max-height: calc(100vh - 32px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: #111827;
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.image-viewer-head {
  min-height: 48px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto 32px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.image-viewer-head span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 700;
}

.image-viewer-close {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.image-viewer-body {
  min-height: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.image-viewer-body img {
  max-width: 100%;
  max-height: calc(100vh - 132px);
  justify-self: center;
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
}

.image-viewer-nav {
  width: 44px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font: inherit;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.image-viewer-nav:disabled {
  opacity: 0.32;
  cursor: default;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.record-cards {
  display: none;
}

.record-card,
.empty-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px;
}

.record-select-line {
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 700;
}

.record-card-head,
.record-card-foot,
.record-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.record-card-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.record-no,
.record-card-meta,
.record-note {
  color: var(--slate);
  font-size: 13px;
}

.record-note {
  margin: 0;
  line-height: 1.55;
}

.record-card-foot {
  margin-top: 12px;
}

.book-modal {
  width: min(620px, calc(100% - 28px));
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--canvas);
}

.book-modal::backdrop {
  background: rgba(10, 21, 48, 0.38);
}

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

.modal-head h2 {
  margin: 0;
}

.modal-forms {
  display: grid;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.book-context-menu {
  position: fixed;
  z-index: 20;
  min-width: 136px;
  padding: 6px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--canvas);
  box-shadow: 0 12px 30px rgba(10, 21, 48, 0.16);
}

.book-context-menu button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.book-context-menu button:hover {
  background: var(--surface);
}

.danger-text {
  color: var(--danger);
}

.hidden-delete-book-form {
  display: none;
}

.sidebar-mask {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(10, 21, 48, 0.35);
}

.book-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 31;
  width: min(300px, calc(100vw - 56px));
  padding: 16px;
  background: var(--canvas);
  border-right: 1px solid var(--hairline);
  box-shadow: 16px 0 36px rgba(10, 21, 48, 0.18);
  transform: translateX(-100%);
  transition: transform 0.18s ease;
}

.book-sidebar.open {
  transform: translateX(0);
}

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

.sidebar-book-list {
  display: grid;
  gap: 8px;
}

.sidebar-book-item {
  color: var(--charcoal);
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-book-item:hover {
  text-decoration: none;
}

.sidebar-book-item.active {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.empty-row {
  height: 88px;
  color: var(--stone);
  text-align: center;
}

.form-page {
  max-width: 780px;
  padding: clamp(18px, 3vw, 28px);
}

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

.record-form label,
.upload-area {
  display: grid;
  gap: 7px;
}

.record-form label span,
.upload-area > label {
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 700;
}

.record-form textarea,
.upload-area,
.form-actions {
  grid-column: 1 / -1;
}

.upload-area {
  padding: 14px;
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.current-image-list,
.image-preview-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.current-image {
  display: grid;
  gap: 8px;
  align-content: start;
}

.current-image img {
  width: 120px;
  height: 90px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  object-fit: cover;
  object-position: top;
}

.checkbox-line {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px;
}

.checkbox-line input {
  width: auto;
}

.image-preview {
  width: 240px;
  height: 180px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  background: #fff;
}

.error-message {
  margin-bottom: 16px;
  padding: 10px 12px;
  color: #8a1f11;
  background: #fff0ed;
  border: 1px solid #ffcbc2;
  border-radius: var(--radius);
}

.auth-page {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
}

.auth-panel {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--canvas);
  box-shadow: var(--shadow-soft);
}

.auth-panel h1 {
  margin: 0 0 18px;
  font-size: 30px;
  line-height: 1.2;
}

.auth-form,
.admin-form {
  display: grid;
  gap: 12px;
}

.auth-form label,
.admin-form label {
  display: grid;
  gap: 7px;
}

.auth-form label span,
.admin-form label span {
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 700;
}

.auth-form input,
.admin-form input,
.inline-password-form input {
  width: 100%;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
}

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

.admin-panel {
  padding: 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--canvas);
  box-shadow: var(--shadow-line);
}

.admin-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.backup-actions {
  display: grid;
  gap: 12px;
}

.admin-table-shell {
  margin-top: 0;
}

.admin-table {
  min-width: 820px;
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--slate);
  background: #fbfaf8;
  font-size: 13px;
}

.inline-password-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 820px) {
  .topbar,
  .workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page {
    width: min(100% - 20px, 1240px);
    margin-top: 18px;
  }

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

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

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

  .inline-form {
    min-width: 100%;
  }

  .table-shell {
    display: none;
  }

  .record-cards {
    display: grid;
    gap: 10px;
  }

  .record-action-bar {
    align-items: stretch;
  }

  .record-action-group,
  .copy-action-group {
    width: 100%;
  }

  .copy-action-group label {
    flex: 1 1 220px;
  }

  .copy-action-group select {
    width: 100%;
  }

  .image-viewer {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .image-viewer-panel {
    max-height: calc(100vh - 20px);
  }

  .image-viewer-body {
    padding: 10px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "image"
      "nav";
  }

  .image-viewer-body img {
    grid-area: image;
    max-height: calc(100vh - 156px);
  }

  .image-viewer-nav {
    width: 48px;
    height: 42px;
  }

  .image-viewer-nav[data-image-viewer-prev] {
    grid-area: nav;
    justify-self: start;
  }

  .image-viewer-nav[data-image-viewer-next] {
    grid-area: nav;
    justify-self: end;
  }

}

@media (max-width: 520px) {
  .nav,
  .form-actions {
    width: 100%;
  }

  .nav-link,
  .primary-button,
  .dark-button,
  .secondary-button {
    flex: 0 0 auto;
  }

  .record-action-group .primary-button,
  .record-action-group .dark-button,
  .copy-action-group .secondary-button {
    flex: 1 1 auto;
  }

  .copy-action-group {
    align-items: stretch;
  }

  .copy-action-group label {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .inline-form {
    min-width: 100%;
    flex-direction: column;
  }

  .image-preview {
    width: 100%;
    max-width: 240px;
  }
}
