:root {
  --ink: #f7fbff;
  --muted: #9fb3c8;
  --line: rgba(76, 195, 241, 0.22);
  --panel: rgba(12, 20, 34, 0.9);
  --bg: #06101f;
  --accent: #e65398;
  --accent-dark: #c8397b;
  --blue: #4cc3f1;
  --yellow: #f2c94c;
  --deep: #1c4e67;
  --good: #087f5b;
  --warn: #ffb04a;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  touch-action: manipulation;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(76, 195, 241, 0.18), transparent 34%),
    linear-gradient(315deg, rgba(230, 83, 152, 0.16), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 72px),
    #06101f;
}

body:not(.authenticated) .app-header,
body:not(.authenticated) .main-tabs,
body:not(.authenticated) .tool-view {
  display: none;
}

body.authenticated .login-screen {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: rgba(7, 14, 28, 0.92);
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.login-brand img {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-message {
  color: var(--yellow);
  font-weight: 700;
  line-height: 1.45;
}

button,
input,
select,
textarea,
option {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: inherit;
}

button,
.file-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(16px, 4vw, 42px);
  background: rgba(4, 10, 20, 0.92);
  border-bottom: 1px solid var(--line);
  color: white;
  backdrop-filter: blur(14px);
}

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

.brand-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  background: transparent;
  border-radius: 8px;
  padding: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--yellow);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: 0.95;
}

h2 {
  font-size: 1.2rem;
}

.today {
  display: grid;
  gap: 5px;
  text-align: right;
}

.session-box {
  display: grid;
  gap: 7px;
  justify-items: end;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.today span {
  color: #cfcfcf;
  font-size: 0.82rem;
}

.today strong {
  font-size: 1rem;
}

.top-seller-bubble {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  width: min(960px, calc(100% - 32px));
  margin: 14px auto 0;
  border: 1px solid rgba(76, 195, 241, 0.42);
  border-radius: 999px;
  padding: 10px 18px;
  background:
    linear-gradient(135deg, rgba(76, 195, 241, 0.22), rgba(230, 83, 152, 0.24)),
    rgba(7, 14, 28, 0.88);
  box-shadow: 0 12px 38px rgba(230, 83, 152, 0.16);
  color: var(--ink);
  backdrop-filter: blur(14px);
}

.top-seller-bubble[hidden] {
  display: none;
}

.top-seller-bubble span {
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.top-seller-bubble strong {
  font-size: 1.05rem;
}

.top-seller-bubble small {
  color: #dbeafe;
  font-weight: 800;
  text-align: right;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 20px;
  width: min(1220px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.main-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
  width: min(1280px, calc(100% - 32px));
  margin: 18px auto 0;
}

.main-tab {
  border: 1px solid var(--line);
  background: rgba(12, 20, 34, 0.82);
  color: var(--ink);
}

.main-tab.active {
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: white;
  box-shadow: 0 0 24px rgba(76, 195, 241, 0.28);
}

.tool-view {
  display: none;
}

.tool-view.active {
  display: grid;
}

.label-shell,
.clients-shell,
.sellers-shell,
.ticket-shell,
.payment-shell,
.admin-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.entry-panel,
.summary-panel,
.label-panel,
.clients-panel,
.sellers-panel,
.ticket-panel,
.payment-panel,
.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(12px);
}

.seller-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.seller-category-tab {
  min-height: 40px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0 14px;
}

.seller-category-tab.active {
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: white;
}

.seller-category-content {
  display: grid;
  gap: 14px;
}

.label-products {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.label-products summary {
  cursor: pointer;
  font-weight: 800;
  min-height: 32px;
}

.label-product-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.label-product-button {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  padding: 7px;
  text-align: left;
}

.label-product-button img {
  width: 52px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.label-product-button span {
  display: grid;
  gap: 2px;
}

.label-product-button small {
  color: var(--muted);
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 20px;
}

.admin-form,
.admin-users {
  display: grid;
  gap: 14px;
  align-content: start;
}

.admin-note,
.admin-message {
  color: var(--yellow);
  font-weight: 700;
  line-height: 1.45;
}

.permission-group {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 0;
  background: rgba(255, 255, 255, 0.045);
}

.permission-group legend {
  padding: 0 8px;
  color: var(--blue);
  font-weight: 900;
}

.permission-group label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.permission-group input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
}

.permission-sellers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

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

.permission-subgroup strong {
  color: var(--blue);
}

.users-list {
  display: grid;
  gap: 10px;
}

.user-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.user-card div {
  display: grid;
  gap: 4px;
}

.user-card span,
.user-card small {
  color: var(--muted);
}

.label-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(340px, 1.15fr);
  gap: 20px;
}

.ticket-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 20px;
}

.payment-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(260px, 0.9fr);
  gap: 20px;
  align-items: center;
}

.payment-card-image {
  display: block;
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.payment-info {
  display: grid;
  gap: 14px;
  align-content: center;
}

.payment-info p {
  color: var(--muted);
  font-weight: 800;
}

.payment-info strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.25rem, 4vw, 2.2rem);
}

.label-camera-box,
.ticket-camera-box {
  aspect-ratio: 1 / 1;
}

.label-photo-slots {
  display: grid;
  gap: 8px;
  width: 100%;
  height: 100%;
}

.label-camera-box.collage-mode .label-photo-slots {
  grid-template-rows: 1fr 1fr;
}

.label-photo-slot {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #eee;
}

.label-photo-slot img,
.label-photo-slot .photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.label-preview-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ticket-preview-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ticket-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(7, 14, 28, 0.7);
}

.ticket-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ticket-preview-header img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.ticket-preview p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.ticket-items-preview {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.ticket-preview-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.ticket-preview-item img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
}

.ticket-preview-item p {
  display: block;
  border-bottom: 0;
  padding: 0;
}

.ticket-remove {
  min-height: 34px;
  padding: 0 10px;
  background: #efefef;
}

body.ticket-share-capture .ticket-remove {
  display: none;
}

body.ticket-share-capture .ticket-preview-item {
  grid-template-columns: 74px 1fr;
}

.ticket-preview .ticket-thanks {
  display: block;
  border-bottom: 0;
  color: var(--accent);
  font-weight: 800;
  text-align: center;
}

.ticket-share-card {
  position: fixed;
  left: -9999px;
  top: 0;
  width: min(760px, calc(100vw - 32px));
  padding: 28px;
  border: 1px solid rgba(76, 195, 241, 0.45);
  background: #07101f;
  box-shadow: none;
  color: #f7fbff;
  z-index: -1;
}

.ticket-share-card .ticket-preview-item {
  grid-template-columns: 74px 1fr;
  background: rgba(255, 255, 255, 0.07);
}

.ticket-share-card .ticket-preview-item img {
  width: 74px;
  height: 74px;
}

.ticket-share-card .ticket-preview-header img {
  width: 96px;
  height: 96px;
}

.ticket-share-card .ticket-preview-header strong {
  font-size: 1.45rem;
}

.ticket-source {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.ticket-source summary {
  cursor: pointer;
  font-weight: 800;
  min-height: 32px;
}

.geekvenchy-ticket-sales {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.geek-ticket-item {
  display: grid;
  grid-template-columns: 24px 58px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.geek-ticket-item input {
  width: 20px;
  min-height: 20px;
}

.geek-ticket-item img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
}

.geek-ticket-item span {
  display: grid;
  gap: 3px;
}

.geek-ticket-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

#labelOutputCanvas {
  width: 100%;
  max-height: 72vh;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  object-fit: contain;
}

.label-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.label-settings-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 9px;
}

.label-settings {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.label-settings summary {
  cursor: pointer;
  font-weight: 800;
  min-height: 32px;
}

.label-settings-grid {
  margin-top: 12px;
}

.sales-settings {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.sales-settings summary {
  cursor: pointer;
  font-weight: 800;
  min-height: 32px;
}

.sales-settings .danger-button {
  margin-top: 10px;
  width: 100%;
}

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

.toolbar,
.camera-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.photo-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px dashed #b8b8b8;
  border-radius: 8px;
  background: #f0f0f0;
}

.photo-box video,
.photo-box img,
.photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.055);
}

.camera-actions {
  margin: 12px 0 18px;
}

.primary-button,
.save-button {
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: white;
}

.primary-button:hover,
.save-button:hover {
  filter: brightness(1.08);
}

.secondary-button,
.ghost-button,
.file-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.ghost-button {
  min-height: 38px;
  padding: 0 14px;
}

.danger-button {
  background: #2d1020;
  border: 1px solid rgba(230, 83, 152, 0.45);
  color: white;
}

.file-button {
  display: inline-grid;
  place-items: center;
  padding: 0 15px;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #dbeafe;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(76, 195, 241, 0.28);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(76, 195, 241, 0.18);
}

select:focus,
textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(76, 195, 241, 0.18);
}

textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

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

.client-create-field {
  align-content: start;
}

.client-create-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.client-create-row button {
  min-height: 46px;
  padding: 0 14px;
}

.clients-workspace {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 16px;
}

.client-entry,
.client-groups,
.client-seller-section,
.client-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 14px;
}

.client-entry h3,
.client-groups h3,
.client-seller-section h4 {
  margin: 0 0 12px;
}

.client-editor-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.client-editor-actions .danger-button {
  min-height: 46px;
  margin-top: 16px;
}

.clients-by-seller,
.client-card-list,
.client-products {
  display: grid;
  gap: 10px;
}

.client-seller-section {
  background: rgba(76, 195, 241, 0.055);
}

.client-card {
  background: rgba(7, 14, 28, 0.48);
}

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

.client-card-head strong {
  display: block;
  margin-bottom: 4px;
}

.client-card-head span,
.client-products small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.client-reminder {
  display: inline-grid;
  place-items: center;
  min-width: 104px;
  padding: 0 14px;
  text-decoration: none;
}

.client-product-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(76, 195, 241, 0.12);
  color: var(--muted);
  font-size: 0.88rem;
  padding-bottom: 7px;
}

.client-product-row:last-child {
  border-bottom: 0;
}

.client-total {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
  color: var(--yellow);
  font-weight: 900;
}

.product-client-picker {
  margin-top: 6px;
  max-width: 320px;
  color: #dbeafe;
  font-size: 0.82rem;
}

.product-client-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.product-client-summary span {
  color: var(--muted);
  font-weight: 800;
}

.product-client-edit {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.product-client-picker select {
  margin-top: 7px;
  min-height: 42px;
}

.save-button {
  width: 100%;
  margin-top: 16px;
}

.totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.tab-button.active {
  background: rgba(76, 195, 241, 0.24);
  color: white;
}

.seller-filter {
  display: none;
  margin-bottom: 12px;
}

.summary-panel.seller-view .seller-filter {
  display: grid;
}

.seller-breakdown {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.seller-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.seller-card strong {
  display: block;
  margin-bottom: 7px;
}

.seller-card span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.summary-panel.seller-view .seller-breakdown {
  display: none;
}

.totals article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.totals span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 5px;
}

.totals strong {
  font-size: 1.15rem;
}

.sales-list {
  display: grid;
  gap: 10px;
}

.seller-sections {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.seller-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
}

.seller-section-header {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(76, 195, 241, 0.08);
}

.seller-section-header h3 {
  margin: 0 0 5px;
}

.seller-section-header p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.seller-section-accounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  font-size: 0.86rem;
}

.seller-section-accounts span {
  color: var(--muted);
}

.seller-section-accounts strong {
  color: var(--ink);
}

.seller-section-send {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-weight: 900;
}

.seller-section-products {
  display: grid;
}

.seller-product-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(76, 195, 241, 0.12);
}

.seller-product-row:last-child {
  border-bottom: 0;
}

.seller-product-row img {
  width: 58px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.seller-product-row div {
  display: grid;
  gap: 3px;
}

.seller-product-row span,
.seller-product-row small {
  color: var(--muted);
  font-size: 0.82rem;
}

.seller-product-money {
  min-width: 130px;
  text-align: right;
}

.empty-state {
  border: 1px dashed rgba(76, 195, 241, 0.32);
  border-radius: 8px;
  color: var(--muted);
  padding: 30px 16px;
  text-align: center;
  font-weight: 700;
}

.sale-card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.sale-card img {
  width: 96px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.sale-info {
  display: grid;
  gap: 5px;
}

.sale-info h3 {
  margin: 0;
  font-size: 1rem;
}

.sale-info p {
  color: var(--muted);
  font-size: 0.9rem;
}

.sale-notes {
  color: #d8e5f5;
  font-size: 0.88rem;
}

.sale-money {
  display: grid;
  gap: 6px;
  min-width: 140px;
  text-align: right;
  font-size: 0.9rem;
}

.profit {
  color: var(--good);
  font-weight: 800;
}

.loss {
  color: var(--warn);
  font-weight: 800;
}

.delete-sale {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.limited-money .sale-money,
.limited-money .totals,
.limited-money .seller-breakdown,
.limited-money .seller-section-accounts,
.limited-money .seller-product-money,
.limited-money #printButton,
.limited-money #printSellerButton {
  display: none;
}

.print-report,
.ticket-print {
  display: none;
}

@media (max-width: 900px) {
  .app-shell,
  .label-workspace,
  .clients-workspace,
  .ticket-workspace,
  .payment-workspace,
  .admin-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .today {
    text-align: left;
  }

  .brand-logo {
    width: 68px;
    height: 68px;
  }

  .main-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .top-seller-bubble {
    grid-template-columns: 1fr;
    border-radius: 8px;
  }

  .top-seller-bubble small {
    text-align: left;
  }

  .form-grid,
  .totals,
  .seller-breakdown {
    grid-template-columns: 1fr;
  }

  .client-create-row {
    grid-template-columns: 1fr;
  }

  .client-editor-actions {
    grid-template-columns: 1fr;
  }

  .client-card-head,
  .client-product-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .sale-card {
    grid-template-columns: 82px 1fr;
  }

  .sale-card img {
    width: 82px;
    height: 72px;
  }

  .sale-money {
    grid-column: 1 / -1;
    text-align: left;
  }

  .seller-section-header,
  .seller-section-accounts,
  .seller-product-row {
    grid-template-columns: 1fr;
  }

  .seller-product-row img {
    width: 100%;
    height: 150px;
  }

  .seller-product-money {
    min-width: 0;
    text-align: left;
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  @page ticket {
    size: 80mm 260mm;
    margin: 5mm;
  }

  body {
    background: white;
    font-family: Arial, Helvetica, sans-serif;
  }

  .app-header,
  .app-shell,
  .clients-shell,
  .label-shell,
  .ticket-shell,
  .payment-shell,
  .admin-shell,
  .main-tabs,
  .print-report,
  .ticket-print {
    display: none;
  }

  body:not(.ticket-print-mode) .print-report {
    display: block;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
  }

  body.ticket-print-mode .print-report {
    display: none !important;
  }

  body.ticket-print-mode .ticket-print {
    page: ticket;
    display: block;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    max-width: 72mm;
    margin: 0 auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .ticket-print-header {
    display: grid;
    justify-items: center;
    gap: 4px;
    border-bottom: 2px solid #111;
    padding-bottom: 8px;
    margin-bottom: 8px;
    text-align: center;
  }

  .ticket-print-header img {
    width: 58px;
    height: 58px;
    object-fit: contain;
  }

  .ticket-print-header h2 {
    font-size: 19px;
    margin: 0 0 2px;
    text-transform: uppercase;
  }

  .ticket-print-header p {
    font-size: 10px;
    margin: 0;
  }

  .ticket-print-client p,
  .ticket-print-info p {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #d9d9d9;
    padding: 5px 0;
    margin: 0;
    font-size: 12px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .ticket-print-client {
    border: 1px solid #111;
    border-radius: 4px;
    padding: 2px 6px;
    margin-bottom: 8px;
  }

  .ticket-print-client p {
    border-bottom: 0;
  }

  .ticket-print-items {
    display: grid;
    gap: 0;
    margin: 8px 0;
    border-top: 1px dashed #555;
  }

  .ticket-print-item {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 7px;
    align-items: start;
    break-inside: avoid;
    break-inside: avoid-page;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    border-bottom: 1px dashed #555;
    padding: 6px 0;
  }

  .ticket-print-item.no-photo {
    grid-template-columns: 1fr;
  }

  .ticket-print-photo {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border: 1px solid #aaa;
    border-radius: 4px;
  }

  .ticket-print-item-info p {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 3px;
    font-size: 11px;
    line-height: 1.25;
  }

  .ticket-print-item-info p:first-child {
    display: block;
    font-weight: 800;
  }

  .ticket-print-info {
    border-top: 2px solid #111;
    margin-top: 8px;
  }

  .ticket-print-info p:last-child {
    border-bottom: 2px solid #111;
    font-size: 14px;
    font-weight: 900;
  }

  .ticket-print-thanks {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-header {
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 3px solid #111;
    padding-bottom: 12px;
    margin-bottom: 16px;
  }

  .report-header img {
    width: 92px;
    height: 92px;
    object-fit: contain;
  }

  .report-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .report-sales {
    display: grid;
    gap: 10px;
    break-inside: auto;
  }

  .report-item {
    display: grid;
    grid-template-columns: 96px 1fr 170px;
    gap: 12px;
    break-inside: avoid;
    break-inside: avoid-page;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    border-bottom: 1px solid #d9d9d9;
    padding: 0 0 10px;
  }

  .report-item-simple {
    grid-template-columns: 96px 1fr;
  }

  .report-item img {
    width: 96px;
    height: 82px;
    object-fit: cover;
  }

  .report-item h3 {
    margin: 0 0 6px;
    font-size: 16px;
  }

  .report-item p,
  .report-footer p {
    margin: 0 0 4px;
  }

  .report-money {
    text-align: right;
  }

  .report-snapshot {
    border-top: 2px solid #111;
    margin-top: 18px;
    padding-top: 12px;
    break-inside: avoid;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .report-snapshot h3 {
    margin: 0 0 10px;
    font-size: 16px;
  }

  .report-snapshot img {
    display: block;
    width: 100%;
    max-height: 210mm;
    object-fit: contain;
    border: 1px solid #d9d9d9;
  }

  .report-footer {
    border-top: 3px solid #111;
    margin-top: 18px;
    padding-top: 12px;
    font-size: 18px;
    break-inside: avoid;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .profit-split {
    border: 2px solid #111;
    margin-top: 16px;
    padding: 12px;
    break-inside: avoid;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .profit-split h3 {
    margin: 0 0 8px;
    font-size: 18px;
  }

  .seller-send-total {
    border-top: 2px solid #111;
    margin-top: 8px;
    padding-top: 8px;
    font-weight: 800;
  }

  .report-footer p,
  .profit-split p {
    display: flex;
    justify-content: space-between;
    gap: 24px;
  }

  .no-money-report .report-footer {
    display: none;
  }

  .no-money-report .profit-split {
    display: none;
  }
}
