:root {
  --page-bg: #eef2f7;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --line: #d8e1ec;
  --text: #1f2937;
  --muted: #64748b;
  --admin: #1d4ed8;
  --admin-dark: #1e40af;
  --client: #0f766e;
  --client-dark: #115e59;
  --install: #7c3aed;
  --install-dark: #6d28d9;
  --success: #16a34a;
  --success-dark: #15803d;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --share: #7c3aed;
  --share-dark: #6d28d9;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--page-bg);
  color: var(--text);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body[data-theme="client"]::before {
  background-image: url("/logo.png");
  background-repeat: no-repeat;
  background-position: center 7rem;
  background-size: min(34vw, 260px);
  opacity: 0.08;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-container {
  background-color: var(--surface);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-logo-wrap {
  margin-bottom: 1.75rem;
}

.logo-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.login-logo-circle {
  width: 4.5rem;
  height: 4.5rem;
  background: linear-gradient(135deg, var(--admin), var(--client));
  font-size: 1.3rem;
}

.header-logo-circle {
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.95rem;
}

.input-field,
.form-group input,
.form-group textarea,
.form-group select,
.upload-meta-editor textarea,
.upload-meta-editor input,
.danger-grid input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cfd8e3;
  border-radius: 0.5rem;
  font-size: 1rem;
  box-sizing: border-box;
  background: var(--surface);
}

.input-field:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.upload-metaEditor textarea:focus,
.upload-metaEditor input:focus,
.upload-meta-editor textarea:focus,
.upload-meta-editor input:focus,
.danger-grid input:focus {
  outline: none;
  border-color: var(--admin);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

body[data-theme="client"] .input-field:focus,
body[data-theme="client"] .form-group input:focus,
body[data-theme="client"] .form-group textarea:focus,
body[data-theme="client"] .form-group select:focus,
body[data-theme="client"] .upload-meta-editor textarea:focus,
body[data-theme="client"] .upload-meta-editor input:focus,
body[data-theme="client"] .danger-grid input:focus {
  border-color: var(--client);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.login-button {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--admin);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.login-button:hover {
  background-color: var(--admin-dark);
}

.login-button:disabled,
.login-secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.login-secondary-button {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cfd8e3;
  border-radius: 0.5rem;
  background: #ffffff;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.login-install-button {
  width: 100%;
}

.header {
  background-color: var(--admin);
  color: #ffffff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body[data-theme="client"] .header {
  background-color: var(--client);
}

.header-logo-image {
  width: 2.5rem;
  height: 2.5rem;
  display: block;
  object-fit: cover;
  border-radius: 0.75rem;
  padding: 0.15rem;
  background-color: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.header-brand {
  display: flex;
  align-items: flex-start;
  flex: 1 1 24rem;
  gap: 0.75rem;
  min-width: 0;
}

.header h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(0.95rem, 1.65vw, 1.35rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
  gap: 0.75rem;
}

.install-button,
.logout-button,
.summary-button,
.submit-button,
.upload-button,
.modal-close-button,
.action-button,
.remove-file-button,
.danger-button {
  border: none;
  border-radius: 0.5rem;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.install-button {
  background-color: var(--install);
  color: #ffffff;
  padding: 0.5rem 1rem;
}

.install-button:hover {
  background-color: var(--install-dark);
}

.logout-button {
  background-color: var(--danger);
  color: #ffffff;
  padding: 0.5rem 1rem;
}

.logout-button:hover {
  background-color: var(--danger-dark);
}

.main-container {
  display: flex;
  min-height: calc(100vh - 72px);
}

.sidebar {
  width: 250px;
  background-color: var(--surface);
  padding: 2rem 1rem;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.sidebar-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  text-align: left;
  font-weight: 600;
  color: #475569;
  background-color: transparent;
}

.sidebar-item:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.sidebar-item.active {
  background-color: var(--admin);
  color: #ffffff;
}

.sidebar-item.active:hover {
  background-color: var(--admin-dark);
}

.content-area {
  flex-grow: 1;
  padding: 2rem;
}

.section-content {
  display: none;
}

.section-content.active {
  display: block;
}

.section-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.message-box {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  text-align: left;
  display: none;
}

.message-box.error {
  background-color: #fee2e2;
  color: #991b1b;
}

.message-box.success {
  background-color: #dcfce7;
  color: #166534;
}

.message-box.info {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.panel {
  background-color: var(--surface);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.panel-space {
  margin-bottom: 1.5rem;
}

.panel-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #334155;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.report-card {
  padding: 1rem;
  border-radius: 0.75rem;
}

.report-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.report-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 2rem;
}

.report-card-blue {
  background-color: #dbeafe;
  color: #1e3a8a;
}

.report-card-green {
  background-color: #ccfbf1;
  color: #115e59;
}

.report-card-yellow {
  background-color: #fef3c7;
  color: #92400e;
}

.report-card-red {
  background-color: #fee2e2;
  color: #991b1b;
}

.client-form-grid,
.upload-meta-editor,
.danger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #334155;
}

.submit-button,
.upload-button {
  padding: 0.75rem 1.5rem;
  background-color: var(--success);
  color: #ffffff;
}

.submit-button:hover,
.upload-button:hover {
  background-color: var(--success-dark);
}

.danger-panel {
  border: 1px solid #fecaca;
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
}

.danger-note {
  margin: 0 0 1rem;
  color: #991b1b;
  line-height: 1.5;
}

.danger-count {
  margin: 0 0 1rem;
  color: #7f1d1d;
  font-weight: 600;
}

.danger-button {
  padding: 0.75rem 1.5rem;
  background-color: var(--danger);
  color: #ffffff;
}

.danger-button:hover {
  background-color: var(--danger-dark);
}

.upload-button:disabled,
.danger-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.poster-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.poster-search-input {
  flex: 1 1 280px;
}

.poster-search-row .summary-button {
  margin: 0;
}

.table-container {
  overflow-x: auto;
  margin-top: 1rem;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background-color: var(--surface);
  border-radius: 0.5rem;
  overflow: hidden;
}

th,
td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

th {
  background-color: var(--surface-muted);
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  font-size: 0.875rem;
}

tr:last-child td {
  border-bottom: none;
}

.action-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.action-button,
.remove-file-button {
  padding: 0.45rem 0.8rem;
  font-size: 0.875rem;
}

.action-button:disabled,
.remove-file-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.action-button.edit {
  background-color: #fcd34d;
  color: #78350f;
}

.action-button.edit:hover {
  background-color: #fbbf24;
}

.action-button.toggle-active {
  background-color: #bfdbfe;
  color: #1d4ed8;
}

.action-button.toggle-active:hover {
  background-color: #93c5fd;
}

.action-button.download {
  background-color: #d6f3eb;
  color: #0f6a58;
}

.action-button.download:hover {
  background-color: #bfeadb;
}

.action-button.share {
  background-color: #ffe8c7;
  color: #b16a06;
}

.action-button.share:hover {
  background-color: #ffd9a3;
}

.action-button.delete {
  background-color: #fecaca;
  color: #991b1b;
}

.action-button.delete:hover {
  background-color: #fca5a5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.active {
  background-color: #dcfce7;
  color: #166534;
}

.status-badge.inactive {
  background-color: #fee2e2;
  color: #991b1b;
}

.status-badge.viewed {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-badge.unviewed {
  background-color: #fef3c7;
  color: #92400e;
}

.status-badge.uploaded {
  background-color: #ccfbf1;
  color: #0f766e;
}

.upload-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.summary-label {
  margin: 0;
  font-weight: 700;
  color: var(--admin);
}

.summary-spacing {
  margin-top: 1rem;
}

.summary-text {
  margin: 0.25rem 0 0;
  color: #334155;
}

.summary-text.summary-missing,
#desc_date.summary-missing,
.summary-required,
.required-mark {
  color: #991b1b;
}

.summary-required {
  margin: 0.7rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.summary-button {
  background-color: var(--admin);
  color: #ffffff;
  padding: 0.5rem 0.9rem;
}

.summary-button:hover {
  background-color: var(--admin-dark);
}

.file-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  background: #f8fafc;
}

.file-upload-area:hover {
  border-color: #94a3b8;
}

.file-upload-area.disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.file-upload-area.drag-over {
  border-color: var(--admin);
  background-color: #eff6ff;
}

.file-upload-area p {
  margin: 0;
}

.drop-help {
  margin-top: 0.5rem !important;
  color: var(--muted);
  font-size: 0.875rem;
}

#posterFileInput {
  display: none;
}

.file-list {
  margin-top: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface);
}

.upload-progress {
  margin-top: 1rem;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  background: #f8fbff;
}

.upload-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  color: #1e3a8a;
  font-size: 0.95rem;
}

.upload-progress-track {
  width: 100%;
  height: 0.8rem;
  border-radius: 999px;
  overflow: hidden;
  background: #dbeafe;
}

.upload-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #0f766e 100%);
  transition: width 0.2s ease;
}

.file-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #e2e8f0;
}

.file-list-item:last-child {
  border-bottom: none;
}

.remove-file-button {
  background-color: var(--danger);
  color: #ffffff;
}

.remove-file-button:hover {
  background-color: var(--danger-dark);
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.poster-card {
  position: relative;
  background-color: var(--surface);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.poster-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.12);
}

.poster-card-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-bottom: 1px solid #e2e8f0;
  display: block;
}

.poster-date {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(220, 38, 38, 0.92);
  color: #ffffff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: bold;
  z-index: 2;
}

.poster-card-content {
  padding: 1rem;
}

.poster-card-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.poster-actions {
  display: flex;
  justify-content: space-around;
  gap: 0.5rem;
}

.poster-actions .action-button {
  flex: 1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(15, 23, 42, 0.72);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-content {
  position: relative;
  background-color: var(--surface);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: min(560px, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.poster-modal-content {
  width: min(800px, 100%);
}

.modal-close-button {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  color: #94a3b8;
  font-size: 1.75rem;
  line-height: 1;
}

.modal-close-button:hover {
  color: #0f172a;
}

.modal-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #334155;
}

.modal-image {
  width: 100%;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.modal-description {
  margin: 0 0 1rem;
  color: #475569;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

@media (max-width: 920px) {
  .report-grid,
  .client-form-grid,
  .upload-meta-editor,
  .danger-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .poster-search-row {
    align-items: stretch;
  }

  .poster-search-row .summary-button,
  .poster-search-row .action-button {
    flex: 1;
    text-align: center;
  }
  .header {
    padding: 1rem;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .install-button,
  .logout-button,
  .danger-button {
    flex: 1 1 10rem;
    text-align: center;
  }

  .main-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    padding: 1rem;
    flex-direction: row;
    justify-content: space-around;
    box-shadow: none;
    border-bottom: 2px solid #e2e8f0;
    gap: 0.5rem;
  }

  .sidebar-item {
    flex: 1;
    text-align: center;
    padding: 0.75rem 0.5rem;
    margin-bottom: 0;
  }

  .content-area {
    padding: 1rem;
  }

  .upload-summary-row {
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .table-container {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  table {
    min-width: 0;
    background: transparent;
  }

  tr {
    margin-bottom: 0.875rem;
    background: var(--surface);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  td {
    border-bottom: 1px solid #e2e8f0;
    padding: 0.85rem 0.95rem;
  }

  td:last-child {
    border-bottom: none;
  }

  td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .action-row {
    width: 100%;
  }

  .action-row .action-button {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .login-container {
    padding: 1.5rem;
  }

  .poster-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 1.5rem 1rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  body[data-theme="client"]::before {
    background-size: min(48vw, 190px);
    background-position: center 8rem;
  }
}

body[data-theme="login"] {
  background: #f3f5f9;
}

body[data-theme="login"]::before {
  content: none;
}

body[data-theme="login"] .login-page {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-theme="login"] .login-container {
  width: 100%;
  max-width: 500px;
  padding: 44px 50px 48px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  text-align: center;
}

body[data-theme="login"] .login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 34px;
}

body[data-theme="login"] .login-logo {
  width: min(100%, 240px);
  height: auto;
  display: block;
}

body[data-theme="login"] .login-brand-title {
  margin: 0;
  max-width: 20rem;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
}

body[data-theme="login"] .login-form {
  display: grid;
  gap: 20px;
}

body[data-theme="login"] .login-input {
  height: 62px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid #d3dae6;
  background: #ffffff;
  font-size: 17px;
  color: #1f2937;
}

body[data-theme="login"] .login-input::placeholder {
  color: #93a0b5;
}

body[data-theme="login"] .login-input:focus {
  border-color: #4a7df0;
  box-shadow: 0 0 0 4px rgba(74, 125, 240, 0.12);
}

body[data-theme="login"] .login-button {
  height: 62px;
  border: none;
  border-radius: 14px;
  background: #4a7df0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

body[data-theme="login"] .login-button:hover {
  background: #3e6ede;
}

body[data-theme="login"] .login-secondary-button {
  height: 54px;
  border-radius: 14px;
  border: 1px solid #d3dae6;
  background: #ffffff;
  color: #36515f;
  font-size: 16px;
  font-weight: 700;
}

body[data-theme="login"] .login-secondary-button:hover {
  background: #f8fafc;
}

body[data-theme="login"] .login-install-button {
  height: 62px;
  border-radius: 14px;
  background: #7c3aed;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

body[data-theme="login"] .login-install-button:hover {
  background: #6d28d9;
}

body[data-theme="login"] #loginMessage {
  margin: -4px 0 0;
  text-align: left;
}

@media (max-width: 640px) {
  body[data-theme="login"] .login-page {
    padding: 16px;
  }

  body[data-theme="login"] .login-container {
    max-width: 100%;
    padding: 32px 22px 28px;
    border-radius: 20px;
  }

  body[data-theme="login"] .login-brand {
    margin-bottom: 26px;
  }

  body[data-theme="login"] .login-logo {
    width: min(100%, 210px);
  }

  body[data-theme="login"] .login-brand-title {
    max-width: 100%;
    font-size: 1.1rem;
  }

  body[data-theme="login"] .login-input,
  body[data-theme="login"] .login-button,
  body[data-theme="login"] .login-secondary-button,
  body[data-theme="login"] .login-install-button {
    height: 56px;
    font-size: 16px;
  }
}

:root {
  --page-bg: #f7f5ef;
  --surface: #ffffff;
  --surface-muted: #fbf6ea;
  --line: #e8dcc5;
  --text: #1b1b1d;
  --muted: #6f6a60;
  --admin: #2154d2;
  --admin-dark: #183da1;
  --client: #b7791f;
  --client-dark: #8d5c0e;
  --install: #111827;
  --install-dark: #050505;
  --success: #1f8c73;
  --success-dark: #176a59;
  --danger: #d75534;
  --danger-dark: #b64224;
  --share: #d4a228;
  --share-dark: #b7791f;
  --shadow: 0 18px 38px rgba(17, 24, 39, 0.12);
}

#workspaceView {
  min-height: 100vh;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #f4d06f 0%, #b7791f 48%, #050505 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 30px rgba(17, 24, 39, 0.16);
  color: #ffffff;
}

.brand-mark span {
  font-weight: 800;
  letter-spacing: 0.12em;
  transform: translateX(0.08em);
}

.brand-logo-image {
  display: block;
  object-fit: contain;
  background: #050505;
  border: 1px solid rgba(245, 199, 91, 0.45);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.16);
}

.login-brand-logo {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  padding: 0.2rem;
  flex: 0 0 auto;
}

.header-brand-logo,
.client-menu-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  padding: 0.15rem;
  flex: 0 0 auto;
}

.login-brand-mark {
  width: 86px;
  height: 86px;
  border-radius: 28px;
  flex: 0 0 auto;
}

.login-brand-mark span {
  font-size: 1.7rem;
}

.header-brand-mark,
.client-menu-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  flex: 0 0 auto;
}

.header-brand-mark span,
.client-menu-mark span {
  font-size: 0.98rem;
}

.header {
  position: sticky;
  top: 0;
  padding: 1rem 1.4rem;
  background:
    linear-gradient(120deg, rgba(5, 5, 5, 0.96) 0%, rgba(36, 29, 14, 0.95) 58%, rgba(183, 121, 31, 0.9) 130%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 34px rgba(17, 24, 39, 0.18);
}

body[data-theme="admin"] .header {
  background:
    linear-gradient(120deg, rgba(22, 57, 144, 0.96) 0%, rgba(33, 84, 210, 0.94) 56%, rgba(89, 146, 255, 0.88) 120%);
}

.header-brand {
  gap: 0.9rem;
  align-items: center;
}

.header-brand-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.header-eyebrow {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.7);
}

.header h1 {
  font-size: clamp(1rem, 1.8vw, 1.42rem);
}

.install-button,
.logout-button,
.icon-button {
  min-height: 44px;
}

.icon-button {
  width: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.icon-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button svg circle {
  fill: currentColor;
  stroke: none;
}

.client-menu-panel {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 1rem;
  width: min(360px, calc(100vw - 2rem));
  z-index: 120;
}

.client-menu-card {
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 250, 244, 0.98);
  border: 1px solid rgba(234, 214, 189, 0.95);
  box-shadow: 0 24px 52px rgba(16, 46, 43, 0.2);
}

.client-menu-profile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid #f0dfca;
}

.client-menu-profile-copy {
  min-width: 0;
}

.client-menu-label,
.client-menu-meta {
  margin: 0;
  color: var(--muted);
}

.client-menu-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.client-menu-name {
  margin: 0.25rem 0 0.2rem;
  font-size: 1.1rem;
  color: var(--text);
}

.client-menu-meta {
  font-size: 0.92rem;
  line-height: 1.45;
}

.client-menu-actions {
  display: grid;
  gap: 0.7rem;
  padding-top: 0.95rem;
}

.client-menu-action {
  width: 100%;
  border: 1px solid #f0dfca;
  border-radius: 16px;
  background: #fff7ee;
  color: var(--text);
  font-weight: 700;
  padding: 0.9rem 1rem;
  text-align: left;
}

.client-menu-action:hover {
  background: #fff0df;
}

.client-menu-action.danger {
  background: #fff0ec;
  color: #b64224;
}

body[data-theme="login"] {
  background:
    radial-gradient(circle at top left, rgba(240, 160, 71, 0.34) 0%, rgba(240, 160, 71, 0) 42%),
    radial-gradient(circle at bottom right, rgba(15, 108, 103, 0.24) 0%, rgba(15, 108, 103, 0) 44%),
    linear-gradient(180deg, #f4efe6 0%, #f8f2e7 100%);
}

body[data-theme="login"]::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 28%);
  z-index: -1;
}

body[data-theme="login"] .login-container {
  max-width: 560px;
  padding: 42px 40px 38px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

body[data-theme="login"] .login-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2rem;
  text-align: left;
}

.login-brand-copy {
  min-width: 0;
}

.login-brand-kicker,
.login-brand-subtitle {
  margin: 0;
}

.login-brand-kicker {
  color: #b85b22;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

body[data-theme="login"] .login-brand-title {
  margin-top: 0.35rem;
  max-width: none;
  color: #173a37;
}

.login-brand-subtitle {
  margin-top: 0.55rem;
  color: var(--muted);
  line-height: 1.55;
}

body[data-theme="login"] .login-input {
  border-color: #eadfce;
  background: #fffaf4;
}

body[data-theme="login"] .login-input:focus {
  border-color: #0f6b66;
  box-shadow: 0 0 0 4px rgba(15, 107, 102, 0.12);
}

body[data-theme="login"] .login-button {
  background: linear-gradient(135deg, #0f5c58 0%, #0e756f 100%);
}

body[data-theme="login"] .login-button:hover {
  background: linear-gradient(135deg, #0b4a47 0%, #115f5a 100%);
}

body[data-theme="login"] .login-secondary-button {
  border-color: #eadfce;
  background: #ffffff;
  color: #0f4c4b;
}

body[data-theme="login"] .login-secondary-button:hover {
  background: #fffaf4;
}

body[data-theme="login"] .login-install-button {
  background: linear-gradient(135deg, #f39a2d 0%, #df6e2d 100%);
}

body[data-theme="login"] .login-install-button:hover {
  background: linear-gradient(135deg, #e68a1f 0%, #c95e20 100%);
}

body[data-theme="client"] {
  background:
    radial-gradient(circle at top left, rgba(15, 104, 100, 0.11) 0%, rgba(15, 104, 100, 0) 36%),
    radial-gradient(circle at bottom right, rgba(240, 171, 64, 0.14) 0%, rgba(240, 171, 64, 0) 28%),
    linear-gradient(180deg, #f7f1e7 0%, #fbf8f1 100%);
}

body[data-theme="client"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 84% 16%, rgba(240, 128, 48, 0.09) 0%, rgba(240, 128, 48, 0) 22%),
    radial-gradient(circle at 15% 82%, rgba(15, 104, 100, 0.09) 0%, rgba(15, 104, 100, 0) 28%);
}

.client-shell {
  padding: 1rem 1rem 7rem;
}

.client-shell-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.banner-upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.banner-upload-note {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: #fff8ef;
  border: 1px solid #f0dfca;
}

.banner-drop-area {
  margin-top: 0.2rem;
}

.banner-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.admin-banner-card,
.admin-banner-empty {
  border-radius: 22px;
  border: 1px solid #f0dfca;
  background: linear-gradient(180deg, #ffffff 0%, #fff9f2 100%);
  box-shadow: 0 14px 28px rgba(16, 55, 51, 0.08);
  overflow: hidden;
}

.admin-banner-empty {
  padding: 1.2rem;
  text-align: center;
}

.admin-banner-empty strong {
  display: block;
  margin-bottom: 0.45rem;
}

.admin-banner-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-banner-preview {
  width: 100%;
  border: none;
  background: #f4ede3;
  padding: 0;
  display: block;
}

.admin-banner-preview img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
}

.admin-banner-content {
  padding: 1rem 1rem 0;
}

.admin-banner-content h4 {
  margin: 0 0 0.35rem;
  color: var(--text);
}

.admin-banner-content p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.admin-banner-card .action-row {
  padding: 1rem;
}

.client-banner-section {
  padding: 1rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(233, 219, 198, 0.95);
  box-shadow: var(--shadow);
}

.client-banner-head {
  margin-bottom: 0.9rem;
}

.client-banner-carousel {
  overflow: hidden;
  border-radius: 24px;
  background: #163f3d;
}

.client-banner-track {
  display: flex;
  width: 100%;
  transition: transform 0.45s ease;
}

.client-banner-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  min-height: 220px;
  padding: 0;
  border: none;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(13, 58, 56, 0.92) 0%, rgba(15, 107, 102, 0.86) 56%, rgba(239, 142, 43, 0.88) 128%);
  text-align: left;
}

.client-banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.client-banner-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 17, 17, 0.12) 0%, rgba(5, 17, 17, 0.8) 100%),
    linear-gradient(135deg, rgba(15, 76, 75, 0.08) 0%, rgba(239, 142, 43, 0.14) 100%);
}

.client-banner-copy,
.client-banner-time {
  position: absolute;
  z-index: 1;
}

.client-banner-copy {
  inset: auto 1rem 1rem 1rem;
  color: #ffffff;
}

.client-banner-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.client-banner-copy h4 {
  margin: 0;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
}

.client-banner-time {
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--client);
  font-size: 0.76rem;
  font-weight: 800;
}

.client-banner-slide-empty {
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(135deg, #0c4443 0%, #116763 54%, #ef8e2b 138%);
}

.client-banner-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.client-banner-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #dbcdb8;
}

.client-banner-dot.active {
  width: 34px;
  background: linear-gradient(135deg, #0f6b66 0%, #ef8e2b 120%);
}

.client-hero,
.client-feature-shell,
.client-poster-section {
  border-radius: 28px;
}

.client-hero {
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(135deg, #0c4443 0%, #116763 54%, #ef8e2b 138%);
  box-shadow: 0 24px 50px rgba(15, 69, 67, 0.18);
}

.client-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -100px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.client-hero-copy,
.client-feature-shell,
.client-poster-section {
  position: relative;
  z-index: 1;
}

.client-kicker,
.client-section-kicker,
.client-collection-label,
.client-feature-kicker,
.help-modal-kicker {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.client-kicker,
.help-modal-kicker {
  color: rgba(255, 255, 255, 0.82);
}

.client-hero-title {
  margin: 0.45rem 0 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.client-hero-subtitle {
  margin: 0.6rem 0 0;
  max-width: 44rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.55;
}

.client-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.client-stat-card {
  padding: 0.95rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.client-stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.86rem;
}

.client-stat-value {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.client-feature-shell,
.client-poster-section {
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(233, 219, 198, 0.95);
  box-shadow: var(--shadow);
}

.client-section-copy {
  margin-bottom: 0.95rem;
}

.client-section-kicker,
.client-collection-label {
  color: #b85b22;
}

.client-section-heading {
  margin: 0.3rem 0 0;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  color: var(--text);
}

.client-section-subtitle {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.client-feature-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scroll-snap-type: x proximity;
}

.client-feature-card {
  position: relative;
  min-height: 228px;
  border: none;
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
  text-align: left;
  color: #ffffff;
  background: #163f3d;
  box-shadow: 0 18px 34px rgba(15, 58, 56, 0.16);
  scroll-snap-align: start;
}

.client-feature-card.active {
  outline: 3px solid rgba(240, 138, 43, 0.45);
  outline-offset: 0;
}

.client-feature-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.client-feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 34, 34, 0.08) 0%, rgba(9, 34, 34, 0.82) 100%),
    linear-gradient(135deg, rgba(15, 76, 75, 0.2) 0%, rgba(240, 128, 48, 0.28) 100%);
}

.client-feature-copy {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 1rem;
  display: grid;
  gap: 0.28rem;
}

.client-feature-copy h4,
.help-card strong {
  margin: 0;
}

.client-feature-copy span {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.45;
}

.client-feature-card-empty {
  min-height: 160px;
  padding: 1.25rem;
  background:
    linear-gradient(135deg, #134a49 0%, #1a7874 64%, #ef8e2b 138%);
}

.client-feature-card-empty .client-feature-copy {
  position: relative;
  inset: auto;
  padding: 0;
}

.client-poster-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.support-pill {
  border: none;
  border-radius: 999px;
  background: #fff1df;
  color: #b85b22;
  padding: 0.78rem 1rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(232, 139, 52, 0.16);
}

.support-pill:hover {
  background: #ffe7cb;
}

.support-pill-inline {
  margin-top: 1rem;
}

.client-poster-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.client-poster-card {
  background: linear-gradient(180deg, #ffffff 0%, #fff9f2 100%);
  border: 1px solid #f0dfca;
  box-shadow: 0 14px 28px rgba(16, 55, 51, 0.08);
}

.client-poster-card:hover {
  transform: translateY(-4px);
}

.client-poster-image-wrap {
  position: relative;
  padding: 0.9rem 0.9rem 0;
}

.client-poster-image {
  height: 255px;
  border-radius: 22px;
  border: none;
  box-shadow: 0 12px 26px rgba(20, 47, 45, 0.14);
}

.client-poster-chip,
.client-poster-status {
  position: absolute;
  top: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.client-poster-chip {
  left: 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--client);
}

.client-poster-status {
  right: 1.25rem;
}

.client-poster-status.new {
  background: #fff0d9;
  color: #b76a00;
}

.client-poster-status.viewed {
  background: #d6f3eb;
  color: #0f6a58;
}

.client-poster-content {
  padding: 1rem 1rem 1.05rem;
}

.client-poster-description {
  margin: 0 0 0.95rem;
  color: var(--muted);
  line-height: 1.48;
  min-height: 3.2em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.client-poster-actions {
  justify-content: flex-start;
}

.client-poster-actions .action-button {
  flex: 1;
}

.client-empty-state {
  padding: 2rem 1.2rem;
  border-radius: 24px;
  border: 1px dashed #e6cfae;
  background: linear-gradient(180deg, #fffdf9 0%, #fff5e8 100%);
  color: var(--text);
  text-align: center;
}

.client-empty-state strong {
  display: block;
  font-size: 1.05rem;
}

.client-empty-state p {
  margin: 0.7rem auto 0;
  max-width: 28rem;
  color: var(--muted);
  line-height: 1.6;
}

.client-bottom-tabs {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(92vw, 620px);
  display: flex;
  gap: 0.65rem;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(229, 214, 192, 0.95);
  border-radius: 999px;
  box-shadow: 0 22px 42px rgba(15, 48, 46, 0.16);
  z-index: 95;
}

.client-bottom-tab {
  flex: 1;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0.9rem 0.85rem;
  display: grid;
  gap: 0.12rem;
}

.client-bottom-tab.active {
  background:
    linear-gradient(135deg, rgba(15, 76, 75, 1) 0%, rgba(238, 142, 43, 1) 130%);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(15, 76, 75, 0.22);
}

.client-bottom-tab-label {
  font-weight: 800;
}

.client-bottom-tab-meta {
  font-size: 0.72rem;
  opacity: 0.84;
}

.client-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(90px + env(safe-area-inset-bottom));
  min-width: 126px;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1rem;
  background: linear-gradient(135deg, #0f6b66 0%, #ef8e2b 135%);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 20px 34px rgba(15, 76, 75, 0.24);
  z-index: 96;
}

.help-modal-content {
  width: min(760px, 100%);
  border-radius: 28px;
  padding: 1.4rem;
  background: linear-gradient(180deg, #fffdf9 0%, #fff4e6 100%);
}

.help-modal-head {
  padding-right: 2rem;
}

.help-modal-kicker {
  color: #b85b22;
}

.help-modal-summary {
  margin: 0.8rem 0 1rem;
  color: var(--muted);
  line-height: 1.6;
}

.help-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.help-card {
  border: 1px solid #eedfc8;
  border-radius: 22px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.86);
  text-align: left;
  box-shadow: 0 10px 24px rgba(24, 55, 52, 0.08);
}

.help-card:hover {
  transform: translateY(-2px);
}

.help-card-tag {
  display: inline-flex;
  margin-bottom: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: #d9f7e3;
  color: #187a5c;
  font-size: 0.72rem;
  font-weight: 800;
}

.help-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.help-modal-footnote {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.poster-modal-sheet {
  width: min(900px, 100%);
  padding: 1.2rem;
  border-radius: 28px;
  display: grid;
  gap: 1rem;
}

.poster-modal-media {
  border-radius: 24px;
  overflow: hidden;
  background: #f3efe8;
}

.poster-modal-body {
  display: grid;
  gap: 0.4rem;
}

.poster-modal-meta {
  margin: 0;
  color: #b85b22;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.poster-modal-actions {
  justify-content: stretch;
}

.poster-modal-actions .action-button {
  flex: 1;
  min-height: 48px;
}

body[data-theme="client"] .message-box {
  margin: 0;
}

@media (max-width: 900px) {
  .banner-upload-grid {
    grid-template-columns: 1fr;
  }

  .help-card-grid {
    grid-template-columns: 1fr;
  }

  .poster-modal-sheet {
    width: min(640px, 100%);
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0.95rem 1rem;
  }

  .header-actions {
    width: auto;
    justify-content: flex-end;
  }

  .client-shell {
    padding: 0.9rem 0.9rem 7.5rem;
  }

  .banner-list-head {
    flex-direction: column;
  }

  .client-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-feature-track {
    grid-auto-columns: 88%;
  }

  .client-poster-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body[data-theme="login"] .login-container {
    padding: 32px 22px 26px;
  }

  body[data-theme="login"] .login-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  body[data-theme="login"] .login-brand-title,
  .login-brand-subtitle {
    text-align: center;
  }

  .client-stat-grid {
    grid-template-columns: 1fr;
  }

  .client-feature-track {
    grid-auto-columns: 100%;
  }

  .client-fab {
    min-width: 0;
    padding-inline: 0.95rem;
  }
}

@media (max-width: 520px) {
  .client-banner-slide {
    min-height: 172px;
  }

  .client-poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-poster-image {
    height: 188px;
  }

  .client-poster-content {
    padding: 0.85rem 0.85rem 0.95rem;
  }

  .client-poster-description {
    min-height: 2.9em;
    font-size: 0.88rem;
  }

  .poster-actions.client-poster-actions {
    flex-direction: column;
  }

  .client-bottom-tabs {
    width: calc(100vw - 1rem);
    padding: 0.45rem;
    gap: 0.45rem;
  }

  .client-bottom-tab {
    padding: 0.8rem 0.4rem;
  }

  .client-fab {
    right: 0.75rem;
    bottom: calc(94px + env(safe-area-inset-bottom));
  }

  .modal-content.help-modal-content,
  .modal-content.poster-modal-sheet {
    padding: 1rem;
  }
}

