/* ============================================================
   SOFTWARE360 — INVOICE GENERATOR v2 STYLES
   Dual-mode: Simple (default) / Advanced (toggle)
   ============================================================ */

/* === PAGE LAYOUT === */
.s360-invoice-page {
  padding-top: calc(var(--nav-height) + var(--sp-6));
  padding-bottom: var(--sp-16);
  min-height: 100vh;
  background: var(--s360-snow);
}

/* === PAGE HEADER === */
.s360-invoice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding: var(--sp-6) 0 var(--sp-8);
}

.s360-invoice-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0;
}

.s360-invoice-header p {
  margin: var(--sp-1) 0 0;
  font-size: 0.95rem;
}

.s360-invoice-header__right {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}


/* === MODE TOGGLE === */
.s360-mode-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.85rem;
  font-weight: 600;
  user-select: none;
}

.s360-mode-toggle__label {
  color: var(--s360-slate);
  transition: color var(--dur-fast);
}

.s360-mode-toggle__label--adv {
  display: flex;
  align-items: center;
  gap: 4px;
}

.s360-mode-toggle__switch {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--s360-mist);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--dur-fast);
  flex-shrink: 0;
}

.s360-mode-toggle__switch[aria-checked="true"] {
  background: var(--s360-gradient-blue);
}

.s360-mode-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--s360-white);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform var(--dur-fast) var(--ease-out);
}

.s360-mode-toggle__switch[aria-checked="true"] .s360-mode-toggle__thumb {
  transform: translateX(22px);
}

[data-mode="simple"] .s360-mode-toggle__label:first-child { color: var(--s360-electric); }
[data-mode="advanced"] .s360-mode-toggle__label--adv { color: var(--s360-electric); }


/* === ADVANCED VISIBILITY === */
[data-mode="simple"] .s360-adv {
  display: none !important;
}


/* === DRAFTS DROPDOWN === */
.s360-drafts-dropdown {
  position: relative;
}

.s360-drafts-dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 100;
  min-width: 260px;
  background: var(--s360-white);
  border: 1px solid var(--s360-ice);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.s360-drafts-dropdown__list {
  max-height: 300px;
  overflow-y: auto;
}

.s360-draft-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--s360-ice);
  transition: background var(--dur-fast);
}

.s360-draft-item:hover {
  background: var(--s360-snow);
}

.s360-draft-item__info {
  font-size: 0.85rem;
  line-height: 1.4;
}

.s360-draft-item__info strong {
  color: var(--s360-midnight);
}

.s360-draft-item__info span {
  display: block;
  color: var(--s360-slate);
  font-size: 0.75rem;
}

.s360-draft-item__delete {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--s360-slate);
  flex-shrink: 0;
  transition: all var(--dur-fast);
}

.s360-draft-item__delete:hover {
  background: #FEE2E2;
  color: #EF4444;
}


/* === MAIN LAYOUT === */
.s360-invoice-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: var(--sp-8);
  align-items: start;
}


/* === FORM PANEL === */
.s360-invoice-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}


/* === COLLAPSIBLE SECTIONS === */
.s360-section-block {
  background: var(--s360-white);
  border: 1px solid var(--s360-ice);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--dur-fast);
}

.s360-section-block:focus-within {
  box-shadow: 0 0 0 2px rgba(26, 122, 255, 0.1);
}

.s360-section-block__header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--s360-midnight);
  cursor: pointer;
  user-select: none;
  transition: background var(--dur-fast);
}

.s360-section-block__header:hover {
  background: var(--s360-snow);
}

.s360-section-block__icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--s360-ice);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--s360-electric);
  flex-shrink: 0;
}

.s360-section-block__chevron {
  margin-left: auto;
  color: var(--s360-slate);
  transition: transform var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}

.s360-section-block.is-collapsed .s360-section-block__chevron {
  transform: rotate(-90deg);
}

.s360-section-block__body {
  padding: 0 var(--sp-5) var(--sp-5);
  transition: max-height var(--dur-normal) var(--ease-out), padding var(--dur-normal) var(--ease-out), opacity var(--dur-fast);
  overflow: hidden;
}

.s360-section-block.is-collapsed .s360-section-block__body {
  max-height: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}


/* === PROFILE SELECTOR BAR === */
.s360-profile-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--s360-ice);
}

.s360-profile-bar .s360-select--sm {
  flex: 1;
  padding: 5px 8px;
  font-size: 0.78rem;
  height: 32px;
}

.s360-profile-bar__btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--dur-fast);
  border: 1px solid var(--s360-ice);
  background: var(--s360-white);
  color: var(--s360-slate);
}

.s360-profile-bar__btn svg { display: block; }

.s360-profile-bar__btn:hover {
  background: var(--s360-snow);
}

.s360-profile-bar__btn--save:hover {
  border-color: var(--s360-azure);
  background: rgba(26, 122, 255, 0.06);
  color: var(--s360-electric);
}

.s360-profile-bar__btn--del:hover {
  border-color: #FCA5A5;
  background: #FEF2F2;
  color: #DC2626;
}


/* === FORM ELEMENTS === */
.s360-form-group {
  margin-bottom: var(--sp-3);
}

.s360-form-group:last-child {
  margin-bottom: 0;
}

.s360-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.s360-input-group {
  display: flex;
}

.s360-input-group .s360-input {
  flex: 1;
}


/* === LOGO UPLOAD === */
.s360-logo-upload {
  position: relative;
  width: 100%;
  height: 80px;
  border: 2px dashed var(--s360-mist);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--dur-fast);
}

.s360-logo-upload:hover,
.s360-logo-upload.drag-over {
  border-color: var(--s360-azure);
  background: rgba(77, 163, 255, 0.03);
}

.s360-logo-upload #logo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--s360-mist);
  font-size: 0.75rem;
  font-weight: 500;
}

.s360-logo-upload #logo-preview {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 6px;
}

.s360-logo-upload__clear {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--dur-fast);
}

.s360-logo-upload__clear:hover {
  background: #EF4444;
}


/* === COLOR SWATCHES === */
.s360-color-swatches {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}

.s360-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--dur-fast);
  flex-shrink: 0;
}

.s360-swatch:hover {
  transform: scale(1.15);
}

.s360-swatch--active {
  border-color: var(--s360-midnight);
  box-shadow: 0 0 0 2px var(--s360-white), 0 0 0 4px currentColor;
}

.s360-swatch--custom {
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--s360-mist);
}


/* === LINE ITEMS === */
.s360-items-header {
  display: grid;
  gap: 6px;
  padding: 4px 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--s360-slate);
  border-bottom: 1px solid var(--s360-ice);
  margin-bottom: var(--sp-2);
}

/* Simple mode grid */
[data-mode="simple"] .s360-items-header {
  grid-template-columns: 32px 1fr 60px 90px 80px 28px;
}

/* Advanced mode grid — wider with unit & discount */
[data-mode="advanced"] .s360-items-header {
  grid-template-columns: 24px 32px 1fr 55px 65px 80px 55px 80px 28px;
}

.s360-line-item {
  display: grid;
  gap: 6px;
  padding: 6px 0;
  align-items: center;
  border-bottom: 1px solid rgba(203, 213, 224, 0.2);
  transition: background var(--dur-fast);
}

.s360-line-item:hover {
  background: rgba(77, 163, 255, 0.02);
}

[data-mode="simple"] .s360-line-item {
  grid-template-columns: 32px 1fr 60px 90px 80px 28px;
}

[data-mode="advanced"] .s360-line-item {
  grid-template-columns: 24px 32px 1fr 55px 65px 80px 55px 80px 28px;
}

.s360-line-item--section {
  grid-template-columns: 1fr 28px !important;
  background: var(--s360-snow);
  border-radius: var(--radius-sm);
  margin: 4px 0;
}

.s360-line-item--section input {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--s360-electric);
  background: transparent;
}

/* Item row number */
.s360-line-item__num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--s360-mist);
  text-align: center;
}

/* Drag handle */
.s360-line-item__drag {
  cursor: grab;
  color: var(--s360-mist);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.s360-line-item__drag:active {
  cursor: grabbing;
}

.s360-line-item input,
.s360-line-item select {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.8rem;
  background: var(--s360-white);
  border: 1px solid var(--s360-ice);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast);
}

.s360-line-item input:focus,
.s360-line-item select:focus {
  border-color: var(--s360-azure);
  box-shadow: 0 0 0 2px rgba(26, 122, 255, 0.08);
}

.s360-line-item__amount {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--s360-midnight);
  text-align: right;
  padding-right: 4px;
}

.s360-line-item__remove {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--s360-mist);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.s360-line-item__remove:hover {
  background: #FEE2E2;
  color: #EF4444;
}

/* Add item buttons */
.s360-items-actions {
  display: flex;
  gap: var(--sp-2);
  padding-top: var(--sp-3);
}

.s360-add-item-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--s360-electric);
  background: rgba(26, 122, 255, 0.06);
  border: 1px dashed rgba(26, 122, 255, 0.25);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.s360-add-item-btn:hover {
  background: rgba(26, 122, 255, 0.1);
  border-color: var(--s360-azure);
}

/* Sortable ghost */
.s360-line-item.sortable-ghost {
  opacity: 0.35;
  background: var(--s360-ice);
}


/* === IMAGE ATTACHMENTS === */
.s360-attachments-upload {
  position: relative;
  width: 100%;
  height: 60px;
  border: 2px dashed var(--s360-mist);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--dur-fast);
}

.s360-attachments-upload:hover,
.s360-attachments-upload.drag-over {
  border-color: var(--s360-azure);
  background: rgba(77, 163, 255, 0.03);
}

#attachments-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--s360-mist);
  font-size: 0.78rem;
}

#attachments-placeholder strong {
  color: var(--s360-electric);
}

.s360-attachments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.s360-attachment-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--s360-ice);
  overflow: hidden;
  flex-shrink: 0;
}

.s360-attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s360-attachment-thumb__remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.s360-attachment-thumb:hover .s360-attachment-thumb__remove {
  opacity: 1;
}

.s360-attachment-thumb__remove:hover {
  background: #EF4444;
}

/* Preview: attachments separate page */
.inv-attachments-page {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px dashed #ddd;
  position: relative;
  z-index: 1;
}

.inv-attachments-page::before {
  content: 'Page 2';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 0 12px;
  font-size: 9px;
  font-weight: 700;
  color: #bbb;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.inv-attachments__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.inv-attachments__img {
  display: block;
  max-width: 80%;
  max-height: 700px;
  width: auto;
  height: auto;
  border-radius: 4px;
  border: 1px solid #eee;
}


/* === PREVIEW PANEL === */
.s360-invoice-preview-wrap {
  position: sticky;
  top: calc(var(--nav-height) + var(--sp-6));
}

.s360-invoice-preview {
  background: var(--s360-white);
  border: 1px solid var(--s360-ice);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  min-height: 600px;
  position: relative;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  color: #1a1a1a;
}


/* === PREVIEW INNER ELEMENTS === */
.inv-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-size: 5rem;
  font-weight: 900;
  color: rgba(0,0,0,0.04);
  letter-spacing: 0.1em;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.inv-header__logo {
  max-width: 140px;
  max-height: 56px;
  object-fit: contain;
  margin-bottom: 8px;
}

.inv-header__company {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
}

.inv-header__details {
  font-size: 11px;
  color: #555;
  line-height: 1.5;
}

.inv-title {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.04em;
  text-align: right;
  margin-bottom: 6px;
}

.inv-meta {
  text-align: right;
  font-size: 11px;
  color: #555;
  line-height: 1.6;
}

.inv-meta strong {
  color: #1a1a1a;
}

.inv-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 6px;
}

.inv-status--DRAFT { background: #FEF3C7; color: #92400E; }
.inv-status--SENT { background: #DBEAFE; color: #1E40AF; }
.inv-status--PAID { background: #D1FAE5; color: #065F46; }
.inv-status--OVERDUE { background: #FEE2E2; color: #991B1B; }

.inv-divider {
  height: 3px;
  border-radius: 2px;
  margin-bottom: 24px;
}

.inv-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.inv-party__label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
}

.inv-party__name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 3px;
}

.inv-party__info {
  font-size: 11px;
  color: #555;
  line-height: 1.5;
}

/* Invoice table */
.inv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.inv-table thead th {
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--s360-white);
  text-align: left;
}

.inv-table thead th.text-right {
  text-align: right;
}

.inv-table tbody td {
  padding: 9px 10px;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.inv-table tbody tr:last-child td {
  border-bottom: none;
}

td.text-right, th.text-right {
  text-align: right;
}

.inv-table__section-header td {
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 14px !important;
  border-bottom: none !important;
}

/* Totals */
.inv-totals {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.inv-totals__table {
  width: 240px;
}

.inv-totals__row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 12px;
}

.inv-totals__row--total {
  border-top: 2px solid #1a1a1a;
  margin-top: 4px;
  padding-top: 8px;
  font-weight: 800;
  font-size: 15px;
}

.inv-totals__row--balance {
  border-top: 2px dashed #ccc;
  margin-top: 4px;
  padding-top: 6px;
  font-weight: 700;
  font-size: 14px;
}

/* Notes & footer blocks */
.inv-block {
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.inv-block__label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.inv-block__text {
  font-size: 11px;
  color: #555;
  line-height: 1.6;
  white-space: pre-line;
}

.inv-signature {
  margin-top: 32px;
  position: relative;
  z-index: 1;
}

.inv-signature__line {
  width: 200px;
  border-bottom: 1px solid #333;
  margin-bottom: 4px;
  height: 40px;
}

.inv-signature__label {
  font-size: 10px;
  color: #777;
}

.inv-qr {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.inv-footer-text {
  text-align: center;
  font-size: 10px;
  color: #999;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  position: relative;
  z-index: 1;
}

/* Preview empty state */
.inv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--s360-mist);
  text-align: center;
  gap: var(--sp-3);
}

.inv-empty svg {
  opacity: 0.3;
}


/* === ACTION BAR === */
.s360-invoice-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-6) 0 var(--sp-3);
  flex-wrap: wrap;
}


/* === KEYBOARD SHORTCUTS HINT === */
.s360-shortcuts-hint {
  font-size: 0.72rem;
  color: var(--s360-mist);
  padding-top: var(--sp-2);
}

.s360-shortcuts-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--s360-white);
  border: 1px solid var(--s360-ice);
  border-radius: 3px;
  box-shadow: 0 1px 0 var(--s360-ice);
}


/* === MOBILE PREVIEW === */
.s360-mobile-preview-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  padding: 12px 20px;
  background: var(--s360-gradient-blue);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 24px rgba(26, 122, 255, 0.35);
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform var(--dur-fast);
}

.s360-mobile-preview-btn:active {
  transform: scale(0.95);
}

.s360-mobile-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--s360-white);
  display: flex;
  flex-direction: column;
}

.s360-mobile-preview-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--s360-ice);
}

.s360-mobile-preview-overlay__header button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--s360-slate);
  cursor: pointer;
}

.s360-mobile-preview-overlay__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-6);
}

.s360-mobile-preview-overlay__actions {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--s360-ice);
}

.s360-mobile-preview-overlay__actions .s360-btn {
  flex: 1;
}


/* === FONT STYLE CLASSES (Preview) === */
.inv-font-modern { font-family: 'Inter', sans-serif; }
.inv-font-classic { font-family: 'Merriweather', 'Georgia', serif; }
.inv-font-mono { font-family: 'JetBrains Mono', monospace; }


/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .s360-invoice-layout {
    grid-template-columns: 1fr;
  }

  .s360-invoice-preview-wrap {
    position: static;
    display: none;
  }

  .s360-mobile-preview-btn {
    display: flex;
  }

  .s360-invoice-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 800;
    background: var(--s360-white);
    border-top: 1px solid var(--s360-ice);
    padding: var(--sp-3) var(--sp-4);
    justify-content: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  }

  .s360-invoice-actions .s360-btn {
    font-size: 0.8rem;
    padding: var(--sp-3) var(--sp-5);
  }

  .s360-invoice-page {
    padding-bottom: calc(var(--sp-16) + 70px);
  }

  .s360-shortcuts-hint {
    display: none;
  }
}

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

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

  .s360-line-item,
  .s360-items-header {
    font-size: 0.7rem;
  }

  [data-mode="simple"] .s360-items-header,
  [data-mode="simple"] .s360-line-item {
    grid-template-columns: 24px 1fr 50px 70px 60px 24px;
  }

  [data-mode="advanced"] .s360-items-header,
  [data-mode="advanced"] .s360-line-item {
    grid-template-columns: 20px 24px 1fr 45px 55px 60px 45px 60px 24px;
  }

  .s360-invoice-actions .s360-btn--lg {
    padding: var(--sp-2) var(--sp-4);
    font-size: 0.75rem;
  }

  .s360-invoice-preview {
    padding: 20px;
    font-size: 11px;
  }
}
