/*
 * LIT-CRM SECURITY RULE — Do NOT create or modify any file
 * that restricts Super Admin from access.
 *
 * Accounting module additive theme.
 * Scoped to .accounting-page and .accounting-* selectors to avoid collisions.
 */

.accounting-page {
  width: 100%;
}

.accounting-shell {
  padding: 24px;
  max-width: 1180px;
  margin: 0 auto;
}

.accounting-hero,
.accounting-panel,
.accounting-feedback,
.accounting-table-card {
  margin-bottom: 16px;
}

.accounting-card {
  height: 100%;
}

.accounting-card .card-body,
.accounting-hero .card-body,
.accounting-panel .card-body,
.accounting-feedback .card-body,
.accounting-table-card .card-body {
  padding: 20px;
}

.accounting-hero-row,
.accounting-toolbar,
.accounting-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.accounting-heading {
  margin: 0 0 8px;
  font-size: 1.85rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--text);
}

.accounting-subheading {
  margin: 0 0 6px;
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
}

.accounting-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.accounting-lead,
.accounting-copy,
.accounting-help,
.accounting-meta {
  color: var(--muted);
}

.accounting-lead {
  margin: 0;
  max-width: 820px;
  line-height: 1.65;
}

.accounting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.accounting-card {
  position: relative;
  overflow: hidden;
}

.accounting-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: .9;
}

.accounting-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

.accounting-card .accounting-copy {
  margin: 0;
  line-height: 1.6;
  flex: 1 1 auto;
}

.accounting-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.accounting-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 700;
  background: rgba(148, 163, 184, .12);
  color: #475569;
}

.accounting-status-badge.is-success {
  background: rgba(22, 163, 74, .12);
  color: #166534;
}

.accounting-status-badge.is-error {
  background: rgba(220, 38, 38, .12);
  color: #991b1b;
}

.accounting-page .btn {
  min-height: 42px;
}

.accounting-page .btn.btn-primary,
.accounting-page .btn.btn-secondary,
.accounting-page .btn.btn-danger,
.accounting-page .btn.btn-success {
  text-decoration: none;
}

.accounting-page .btn.btn-success {
  background: rgba(22, 163, 74, 1);
  color: #fff;
  box-shadow: 0 14px 28px rgba(22, 163, 74, .22);
}

.accounting-page .btn.btn-success:hover {
  background: rgba(21, 128, 61, 1);
}

.accounting-panel .card-body > form {
  margin: 0;
}

.accounting-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.accounting-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.accounting-label {
  font-weight: 700;
  color: var(--text);
}

.accounting-page input[type="text"],
.accounting-page input[type="date"],
.accounting-page input[type="month"],
.accounting-page input[type="file"],
.accounting-page select,
.accounting-page textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .85rem 1rem;
  background: rgba(249, 250, 251, 1);
  color: var(--text);
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}

.accounting-page input[type="file"] {
  padding: .72rem .85rem;
  background: #fff;
}

.accounting-page textarea {
  min-height: 112px;
  resize: vertical;
}

.accounting-page input:focus,
.accounting-page select:focus,
.accounting-page textarea:focus {
  border-color: rgba(43, 181, 155, .55);
  box-shadow: 0 0 0 5px rgba(43, 181, 155, .12);
  background: #fff;
}

.accounting-help {
  margin-top: 4px;
  font-size: .88rem;
  line-height: 1.55;
}

.accounting-feedback {
  border-left: 4px solid var(--accent);
}

.accounting-feedback.is-success {
  border-left-color: #16a34a;
}

.accounting-feedback.is-error {
  border-left-color: #dc2626;
}

.accounting-feedback .card-body {
  font-weight: 600;
}

.accounting-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.accounting-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .95rem;
}

.accounting-table th,
.accounting-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, .95);
}

.accounting-table th {
  text-align: left;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #475569;
  background: rgba(248, 250, 252, .95);
}

.accounting-table tbody tr:hover td {
  background: rgba(248, 250, 252, .85);
}

.accounting-table .accounting-cell-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.accounting-empty-state {
  padding: 18px 0 4px;
  color: var(--muted);
}

.accounting-inline-code {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  color: #334155;
  font-size: .84rem;
}

.accounting-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.accounting-summary-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(248, 250, 252, .92);
}

.accounting-summary-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.accounting-summary-value {
  display: block;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .accounting-shell {
    padding: 18px;
  }

  .accounting-heading {
    font-size: 1.55rem;
  }

  .accounting-hero-row,
  .accounting-toolbar,
  .accounting-actions {
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .accounting-shell {
    padding: 14px;
  }

  .accounting-card .card-body,
  .accounting-hero .card-body,
  .accounting-panel .card-body,
  .accounting-feedback .card-body,
  .accounting-table-card .card-body {
    padding: 16px;
  }

  .accounting-page .btn {
    width: 100%;
  }

  .accounting-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .accounting-status-badge {
    justify-content: center;
  }
}

/* HR Portal additive styles */
.hr-page {
  width: 100%;
}

.hr-grid {
  margin-bottom: 16px;
}

.hr-grid-2 {
  grid-template-columns: 1.2fr .8fr;
  margin-bottom: 16px;
}

.hr-form-grid .accounting-field-span-2,
.accounting-field-span-2 {
  grid-column: 1 / -1;
}

.hr-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.hr-page select[multiple] {
  min-height: 124px;
}

.hr-page .accounting-status-badge {
  vertical-align: middle;
}

@media (max-width: 900px) {
  .hr-grid-2 {
    grid-template-columns: 1fr;
  }
}
