/* =========================================================
   ADD EXPENSE MODULE CSS
   File: assets/css/pages/addExpense.css

   Purpose:
   - Premium ERP/SaaS Add Expense layout
   - 70/30 form + sticky summary panel
   - Orange ALFAA accent theme
   - Desktop-first responsive finance UI
   ========================================================= */

/* ==================== PAGE ROOT ==================== */
.expense-add-page,
.add-expense-page,
.expense-page {
  --exp-primary: #ff5a1f;
  --exp-primary-dark: #e63f12;
  --exp-primary-soft: #fff0eb;
  --exp-primary-glow: rgba(255, 90, 31, 0.22);
  --exp-text: #071338;
  --exp-muted: #64718f;
  --exp-border: #e3e8f2;
  --exp-border-strong: #cfd8e8;
  --exp-card: #ffffff;
  --exp-bg: #f8fafd;
  --exp-success: #0f9f62;
  --exp-success-bg: #e9f8f1;
  --exp-danger: #f0342f;
  --exp-danger-bg: #fff0ef;
  --exp-info: #0b63ff;
  --exp-info-bg: #eef5ff;
  --exp-shadow: 0 14px 36px rgba(11, 24, 61, 0.07);
  --exp-shadow-soft: 0 8px 22px rgba(11, 24, 61, 0.05);

  min-height: 100vh;
  background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%);
  color: var(--exp-text);
  padding: 22px 24px 96px;
  font-family: var(--font-main);
}

/* ==================== PAGE HEADER ==================== */
.expense-page-header,
.add-expense-header,
.expense-add-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.expense-page-title,
.add-expense-title,
.expense-add-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--exp-text);
}

.expense-page-subtitle,
.add-expense-subtitle,
.expense-add-subtitle {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--exp-muted);
  font-weight: 500;
}

.expense-breadcrumb,
.add-expense-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  font-size: 13px;
  color: #31405f;
  font-weight: 600;
}

.expense-back-btn,
.btn-back-expenses,
button[data-action="back-expenses"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--exp-border);
  border-radius: 12px;
  background: #fff;
  color: var(--exp-text);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--exp-shadow-soft);
  cursor: pointer;
  transition: 0.18s ease;
}

.expense-back-btn:hover,
.btn-back-expenses:hover,
button[data-action="back-expenses"]:hover {
  border-color: var(--exp-primary);
  color: var(--exp-primary-dark);
  transform: translateY(-1px);
}

/* ==================== MAIN 70/30 LAYOUT ==================== */
.expense-shell,
.expense-add-shell,
.add-expense-layout,
.expense-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: 18px;
  align-items: start;
}

.expense-main,
.expense-form-area,
.add-expense-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==================== CARD SYSTEM ==================== */
.expense-card,
.expense-form-card,
.expense-section,
.add-expense-card {
  background: var(--exp-card);
  border: 1px solid var(--exp-border);
  border-radius: 14px;
  box-shadow: var(--exp-shadow-soft);
  overflow: hidden;
}

.expense-card-header,
.expense-section-header,
.add-expense-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--exp-border);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.expense-step,
.expense-section-number {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--exp-primary), #ff2f12);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px var(--exp-primary-glow);
}

.expense-card-title,
.expense-section-title,
.add-expense-card-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 900;
  color: var(--exp-text);
}

.expense-card-subtitle,
.expense-section-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--exp-muted);
  font-weight: 600;
}

.expense-card-body,
.expense-section-body,
.add-expense-card-body {
  padding: 18px;
}

/* ==================== FORM GRID ==================== */
.expense-grid,
.expense-form-grid,
.add-expense-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 16px;
}

.expense-grid.two,
.expense-form-grid.two,
.add-expense-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.expense-grid.one,
.expense-form-grid.one,
.add-expense-grid.one {
  grid-template-columns: 1fr;
}

.expense-field,
.form-field,
.add-expense-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.expense-field.span-2,
.form-field.span-2 { grid-column: span 2; }
.expense-field.span-3,
.form-field.span-3 { grid-column: span 3; }

.expense-field label,
.add-expense-field label,
.form-field label {
  font-size: 12px;
  font-weight: 850;
  color: #273655;
  letter-spacing: -0.01em;
}

.required,
.expense-required {
  color: var(--exp-primary);
  font-weight: 900;
}

.expense-field input,
.expense-field select,
.expense-field textarea,
.add-expense-field input,
.add-expense-field select,
.add-expense-field textarea,
.form-field input,
.form-field select,
.form-field textarea,
.expense-input,
.expense-select,
.expense-textarea {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--exp-border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--exp-text);
  font-size: 13px;
  font-weight: 650;
  padding: 0 13px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.expense-field textarea,
.add-expense-field textarea,
.form-field textarea,
.expense-textarea {
  min-height: 78px;
  resize: vertical;
  padding-top: 12px;
  line-height: 1.45;
}

.expense-field input:focus,
.expense-field select:focus,
.expense-field textarea:focus,
.add-expense-field input:focus,
.add-expense-field select:focus,
.add-expense-field textarea:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.expense-input:focus,
.expense-select:focus,
.expense-textarea:focus {
  border-color: var(--exp-primary);
  box-shadow: 0 0 0 4px var(--exp-primary-soft);
}

.expense-field input[readonly],
.expense-field input:disabled,
.expense-field select:disabled,
.form-field input[readonly],
.form-field input:disabled,
.form-field select:disabled {
  background: #f7f9fc;
  color: #394769;
  cursor: not-allowed;
}

.input-with-suffix,
.expense-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-suffix input,
.expense-input-group input {
  padding-right: 58px;
}

.input-suffix,
.expense-input-suffix {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #405178;
  font-weight: 850;
}

/* ==================== IMPACT PILLS / BADGES ==================== */
.expense-impact-row,
.impact-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.expense-impact-pill,
.impact-pill,
.expense-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 30px;
  padding: 7px 11px;
  border-radius: 9px;
  background: #f1f5fb;
  color: #31405f;
  font-size: 12px;
  font-weight: 850;
  border: 1px solid transparent;
}

.expense-impact-pill.active,
.impact-pill.active,
.expense-badge.orange {
  background: var(--exp-primary-soft);
  color: var(--exp-primary-dark);
  border-color: #ffd2c3;
}

.expense-badge.success,
.expense-impact-pill.inventory,
.impact-pill.inventory {
  background: var(--exp-success-bg);
  color: #08784a;
  border-color: #c9eedc;
}

.expense-badge.gray,
.expense-impact-pill.operational,
.impact-pill.operational {
  background: #f1f4f8;
  color: #43516d;
  border-color: #e2e7ef;
}

/* ==================== INVENTORY COST CARD ==================== */
.inventory-cost-card,
.expense-inventory-card,
.purchase-cost-allocation {
  border: 1px solid #b9d4ff;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 10px 26px rgba(11, 99, 255, 0.07);
  overflow: hidden;
}

.inventory-cost-card .expense-card-header,
.purchase-cost-allocation .expense-card-header {
  border-bottom-color: #d7e7ff;
  background: linear-gradient(180deg, #fafdff 0%, #f3f8ff 100%);
}

.expense-info-alert,
.info-alert,
.inventory-info-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #bdd7ff;
  background: var(--exp-info-bg);
  color: #004ac7;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.45;
}

/* ==================== ITEMS TABLE ==================== */
.expense-items-wrap,
.expense-table-wrap {
  border: 1px solid var(--exp-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.expense-items-table,
table.expense-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.expense-items-table th,
.expense-table th {
  background: #f7f9fd;
  color: #334263;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  padding: 12px;
  border-bottom: 1px solid var(--exp-border);
  text-align: left;
}

.expense-items-table td,
.expense-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--exp-border);
  vertical-align: middle;
}

.expense-items-table tr:last-child td,
.expense-table tr:last-child td {
  border-bottom: 0;
}

.expense-items-table input,
.expense-items-table select,
.expense-table input,
.expense-table select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--exp-border-strong);
  border-radius: 9px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 650;
  outline: none;
}

.expense-table-actions,
.expense-items-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--exp-border);
  background: #fbfcff;
}

.add-expense-item-btn,
.btn-add-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #ffd2c3;
  border-radius: 10px;
  background: var(--exp-primary-soft);
  color: var(--exp-primary-dark);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.remove-expense-item-btn,
.btn-remove-item {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffd1d1;
  border-radius: 9px;
  background: #fff4f4;
  color: #d52222;
  cursor: pointer;
}

/* ==================== ATTACHMENT UPLOAD ==================== */
.expense-upload,
.expense-dropzone,
.attachment-dropzone {
  min-height: 70px;
  border: 1.5px dashed #ccd7ea;
  border-radius: 12px;
  background: #fbfcff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: #334263;
  transition: 0.18s ease;
}

.expense-upload:hover,
.expense-dropzone:hover,
.attachment-dropzone:hover {
  border-color: var(--exp-primary);
  background: var(--exp-primary-soft);
}

.expense-upload strong,
.expense-dropzone strong,
.attachment-dropzone strong {
  display: block;
  color: var(--exp-text);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 4px;
}

.expense-upload small,
.expense-dropzone small,
.attachment-dropzone small {
  color: var(--exp-muted);
  font-size: 12px;
  font-weight: 650;
}

/* ==================== STICKY SUMMARY PANEL ==================== */
.expense-summary,
.expense-summary-panel,
.add-expense-summary {
  position: sticky;
  top: 18px;
  background: #fff;
  border: 1px solid var(--exp-border);
  border-radius: 16px;
  box-shadow: var(--exp-shadow);
  overflow: hidden;
  align-self: start;
}

.expense-summary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--exp-border);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.expense-summary-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--exp-primary-soft);
  color: var(--exp-primary);
}

.expense-summary-title {
  margin: 0;
  font-size: 15px;
  font-weight: 950;
  color: var(--exp-text);
}

.expense-summary-subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  color: #51617f;
  font-weight: 650;
}

.expense-summary-body {
  padding: 18px;
}

.summary-line,
.expense-summary-line {
  padding: 12px 0;
  border-bottom: 1px solid var(--exp-border);
}

.summary-line:last-child,
.expense-summary-line:last-child {
  border-bottom: 0;
}

.summary-label,
.expense-summary-label {
  display: block;
  color: #43516d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  margin-bottom: 7px;
}

.summary-value,
.expense-summary-value {
  display: block;
  color: var(--exp-text);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.summary-value.small,
.expense-summary-value.small {
  font-size: 15px;
}

.summary-status-card,
.expense-status-card {
  border-radius: 12px;
  padding: 15px;
  margin-top: 14px;
  border: 1px solid transparent;
}

.summary-status-card.success,
.expense-status-card.success {
  background: linear-gradient(135deg, #effbf5 0%, #dff5eb 100%);
  border-color: #c8eedb;
}

.summary-status-card.danger,
.expense-status-card.danger {
  background: linear-gradient(135deg, #fff5f3 0%, #ffe8e6 100%);
  border-color: #ffc8c2;
}

.status-row,
.expense-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-title,
.expense-status-title {
  font-size: 13px;
  color: var(--exp-text);
  font-weight: 900;
}

.status-amount,
.expense-status-amount {
  text-align: right;
  font-size: 15px;
  font-weight: 950;
}

.status-amount.success { color: var(--exp-success); }
.status-amount.danger { color: var(--exp-danger); }

.status-subamount,
.expense-status-subamount {
  display: block;
  margin-top: 6px;
  text-align: right;
  color: #405178;
  font-size: 13px;
  font-weight: 850;
}

.expense-summary-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #50607d;
  font-weight: 650;
}

/* ==================== STICKY ACTION FOOTER ==================== */
.expense-action-footer,
.add-expense-footer,
.sticky-expense-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid var(--exp-border);
  border-radius: 14px;
  box-shadow: 0 -10px 30px rgba(11, 24, 61, 0.08);
  backdrop-filter: blur(14px);
}

.expense-footer-left,
.expense-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-expense,
.expense-btn {
  height: 44px;
  min-width: 128px;
  border-radius: 11px;
  border: 1px solid var(--exp-border-strong);
  background: #fff;
  color: var(--exp-text);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.18s ease;
}

.btn-expense:hover,
.expense-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--exp-shadow-soft);
}

.btn-expense.secondary,
.expense-btn.secondary {
  background: #fff;
}

.btn-expense.draft,
.expense-btn.draft {
  background: #f7f9fd;
}

.btn-expense.primary,
.expense-btn.primary,
.save-expense-btn,
button[data-action="save-expense"] {
  min-width: 220px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--exp-primary) 0%, #ff3117 100%);
  box-shadow: 0 12px 26px var(--exp-primary-glow);
}

.btn-expense.primary:hover,
.expense-btn.primary:hover,
.save-expense-btn:hover,
button[data-action="save-expense"]:hover {
  box-shadow: 0 16px 34px rgba(255, 90, 31, 0.3);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .expense-shell,
  .expense-add-shell,
  .add-expense-layout,
  .expense-layout {
    grid-template-columns: 1fr;
  }

  .expense-summary,
  .expense-summary-panel,
  .add-expense-summary {
    position: relative;
    top: auto;
  }
}

@media (max-width: 900px) {
  .expense-add-page,
  .add-expense-page,
  .expense-page {
    padding: 18px 14px 90px;
  }

  .expense-page-header,
  .add-expense-header,
  .expense-add-header {
    flex-direction: column;
  }

  .expense-grid,
  .expense-form-grid,
  .add-expense-grid,
  .expense-grid.two,
  .expense-form-grid.two,
  .add-expense-grid.two {
    grid-template-columns: 1fr;
  }

  .expense-field.span-2,
  .expense-field.span-3,
  .form-field.span-2,
  .form-field.span-3 {
    grid-column: span 1;
  }

  .expense-action-footer,
  .add-expense-footer,
  .sticky-expense-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .expense-footer-left,
  .expense-footer-right {
    width: 100%;
  }

  .btn-expense,
  .expense-btn,
  .save-expense-btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .expense-items-wrap,
  .expense-table-wrap {
    overflow-x: auto;
  }

  .expense-items-table,
  table.expense-table {
    min-width: 680px;
  }
}

/* =========================================================
   EXPENSE UI PATCH: CATEGORY MODAL + SUMMARY PAYMENT SLIP
   ========================================================= */

.expense-manage-categories-btn {
  width: fit-content;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #ffd2c3;
  background: linear-gradient(135deg, #fff7f3 0%, #fff0eb 100%);
  color: var(--exp-primary-dark);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 90, 31, 0.08);
  transition: 0.18s ease;
}

.expense-manage-categories-btn:hover {
  border-color: var(--exp-primary);
  background: linear-gradient(135deg, var(--exp-primary) 0%, #ff3117 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px var(--exp-primary-glow);
}

.expense-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 19, 56, 0.48);
  backdrop-filter: blur(8px);
}

.expense-modal-backdrop.open {
  display: flex;
}

.expense-category-modal {
  width: min(620px, 100%);
  max-height: 88vh;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--exp-border);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(7, 19, 56, 0.24);
  animation: expenseModalIn 0.18s ease-out;
}

@keyframes expenseModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.expense-modal-header,
.expense-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--exp-border);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.expense-modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--exp-border);
  border-bottom: 0;
}

.expense-modal-header h3 {
  margin: 0;
  color: var(--exp-text);
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.expense-modal-header p {
  margin: 5px 0 0;
  color: var(--exp-muted);
  font-size: 12.5px;
  font-weight: 650;
}

.expense-modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--exp-border);
  border-radius: 11px;
  background: #fff;
  color: #34415f;
  cursor: pointer;
}

.expense-modal-close:hover {
  border-color: #ffc8c2;
  background: #fff4f4;
  color: #d52222;
}

.expense-modal-body {
  padding: 20px;
  max-height: calc(88vh - 145px);
  overflow: auto;
}

.category-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 16px 0;
}

.category-add-row input {
  height: 44px;
  border: 1px solid var(--exp-border-strong);
  border-radius: 11px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 650;
  outline: none;
}

.category-add-row input:focus {
  border-color: var(--exp-primary);
  box-shadow: 0 0 0 4px var(--exp-primary-soft);
}

.expense-btn.small {
  min-width: 96px;
  height: 44px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.category-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--exp-border);
  border-radius: 12px;
  background: #fbfcff;
}

.category-list-item span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #263654;
  font-size: 13px;
  font-weight: 850;
}

.category-list-item span i {
  color: var(--exp-primary);
}

.category-list-item button {
  width: 34px;
  height: 34px;
  border: 1px solid #ffd1d1;
  border-radius: 10px;
  background: #fff4f4;
  color: #d52222;
  cursor: pointer;
}

.category-list-item button:hover {
  background: #d52222;
  color: #fff;
}

.category-empty {
  padding: 18px;
  border: 1px dashed var(--exp-border-strong);
  border-radius: 12px;
  color: var(--exp-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.payment-slip-summary {
  padding-bottom: 0;
}

.summary-slip-dropzone {
  min-height: 104px;
  margin-top: 12px;
  border: 1.5px dashed #cfd8e8;
  border-radius: 13px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 16px;
  cursor: pointer;
  transition: 0.18s ease;
}

.summary-slip-dropzone:hover {
  border-color: var(--exp-primary);
  background: var(--exp-primary-soft);
}

.summary-slip-dropzone i {
  color: var(--exp-primary);
  font-size: 23px;
}

.summary-slip-dropzone strong {
  color: var(--exp-text);
  font-size: 12.5px;
  font-weight: 900;
}

.summary-slip-dropzone small,
.summary-slip-file {
  color: var(--exp-muted);
  font-size: 11.5px;
  font-weight: 650;
}

.summary-slip-file {
  margin: 9px 0 0;
  word-break: break-word;
}

/* Footer closer to Sale/Purchase module style: left cancel, right full CTA */
.expense-action-footer.sticky-expense-actions {
  margin-top: 14px;
  padding: 12px;
  border-radius: 13px;
}

.expense-footer-left .expense-btn.secondary {
  min-width: 210px;
}

.expense-footer-right {
  flex: 1;
}

.expense-footer-right .save-expense-btn {
  width: 100%;
  min-width: 0;
  height: 46px;
}

@media (max-width: 900px) {
  .category-add-row {
    grid-template-columns: 1fr;
  }

  .expense-footer-left .expense-btn.secondary {
    min-width: 0;
  }
}

/* =========================================================
   EXPENSE UX V9 — CURRENCY AMOUNT + SUMMARY FOOTER ONLY
   Purpose:
   - Amount is entered only in Expense Items using selected currency
   - Footer belongs to right summary panel, not full form width
   ========================================================= */

.expense-main .expense-action-footer,
.expense-main .sticky-expense-actions {
  display: none !important;
}

.add-expense-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.add-expense-summary .expense-summary-body {
  width: 100%;
}

.add-expense-summary .summary-action-footer,
.expense-summary-panel .summary-action-footer,
.expense-summary-panel .expense-action-footer.sticky-expense-actions {
  width: 100%;
  position: sticky;
  bottom: 16px;
  z-index: 28;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-top: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
}

.summary-action-footer .expense-btn,
.summary-action-footer .save-expense-btn {
  width: 100%;
  min-width: 0 !important;
  height: 44px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.summary-action-footer .expense-btn.secondary {
  background: #ffffff;
  color: #475569;
  border: 1px solid #d8e0ea;
  box-shadow: none;
}

.summary-action-footer .expense-btn.secondary:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.summary-action-footer .save-expense-btn,
.summary-action-footer .expense-btn.primary {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #ff7a32 0%, #ff5a1f 48%, #ef3f16 100%);
  box-shadow: 0 12px 26px rgba(255, 90, 31, 0.28);
}

.summary-action-footer .save-expense-btn:hover,
.summary-action-footer .expense-btn.primary:hover {
  box-shadow: 0 16px 34px rgba(255, 90, 31, 0.34);
  transform: translateY(-1px);
}

.expense-items-table th:nth-child(3),
.expense-items-table td:nth-child(3) {
  text-align: right;
}

.expense-items-table td:nth-child(3) input {
  font-weight: 800;
}

@media (max-width: 1200px) {
  .add-expense-summary .summary-action-footer,
  .expense-summary-panel .summary-action-footer {
    position: sticky;
    bottom: 12px;
  }
}

@media (max-width: 720px) {
  .add-expense-summary .summary-action-footer,
  .expense-summary-panel .summary-action-footer {
    grid-template-columns: 1fr;
  }
}
