/* AdFlow - Minimal CSS */
:root {
  --text: #1a1a1a;
  --text-muted: #666;
  --bg: #fff;
  --bg-subtle: #f8f9fa;
  --border: #e1e4e8;
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --radius: 6px;

  /* Aliases for error page */
  --color-primary: var(--primary);
  --color-text: var(--text);
  --color-text-secondary: var(--text-muted);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Login Container */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.login-container h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-container .subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.login-container .hint {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Navigation */
.navbar {
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.navbar .logo {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
  margin-right: 2rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text);
}

.logout-form {
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: 1px solid var(--danger);
}

.btn-danger:hover {
  background: #c82333;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--bg-subtle);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.stat-card h3 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
}

/* Pending Grid */
.pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.pending-card {
  background: var(--bg);
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pending-card h3 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.pending-count {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.pending-card a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.875rem;
}

.pending-card a:hover {
  text-decoration: underline;
}

/* Section */
.section {
  margin: 2rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.section-link:hover {
  text-decoration: underline;
}

.section h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: var(--bg-subtle);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

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

.table tr:hover {
  background: var(--bg-subtle);
}

.plan-row-actions {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.plan-row-action-form {
  display: flex;
  margin: 0;
}

.plan-row-action-btn {
  min-width: 5.75rem;
  min-height: 2.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem !important;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-draft {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.badge-submitted {
  background: #fff3cd;
  color: #856404;
}

.badge-approved {
  background: #d4edda;
  color: #155724;
}

.badge-rejected {
  background: #f8d7da;
  color: #721c24;
}

.badge-expired {
  background: #6c757d;
  color: #fff;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-error {
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid;
  border-left: 4px solid;
  font-size: 0.875rem;
  line-height: 1.5;
  animation: alertSlideIn 0.2s ease-out;
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
  border-left-color: #22c55e;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
  border-left-color: #ef4444;
}

.alert-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
  border-left-color: #f59e0b;
}

@keyframes alertSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utilities */
.text-muted {
  color: var(--text-muted);
}

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

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.ledger-form--plan {
  max-width: 1140px;
}

.ledger-form--claim {
  max-width: 1120px;
}

/* Monetary layout */
.money-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.875rem;
  padding: 1rem;
  background: #fafbfc;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: var(--radius);
}

.money-summary__item {
  min-width: 0;
  padding: 0.625rem 0.75rem;
  background: var(--bg);
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: calc(var(--radius) - 1px);
}

.money-summary__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.money-summary__value {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.money-summary__value--strong {
  font-size: 1.5rem;
}

.vat-cluster {
  display: grid;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #fafbfc;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: var(--radius);
}

.vat-cluster__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.vat-cluster__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vat-cluster__meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.vat-cluster__total {
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
}

.vat-cluster__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.budget-vat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.budget-vat-grid .money-summary {
  grid-template-columns: 1fr;
  grid-column: 1 / -1;
}

.budget-vat-grid .form-hint {
  grid-column: 1 / -1;
  margin: -0.5rem 0 0;
}

/* Line item grid layout */
.line-item {
  display: grid;
  grid-template-columns: minmax(170px, 1.15fr) minmax(150px, 1fr) minmax(110px, 0.65fr) minmax(100px, 0.55fr) minmax(110px, 0.6fr) minmax(220px, 1.25fr) auto;
}

.line-item {
  gap: 0.875rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 1rem;
  background: #fcfcfd;
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: var(--radius);
}

.li-platform,
.li-channel {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.li-ex-vat,
.li-vat,
.li-notes,
.li-total {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.line-item__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.li-platform select,
.li-platform input,
.li-channel select,
.li-channel input,
.li-ex-vat input,
.li-vat input,
.li-notes input {
  width: 100%;
  box-sizing: border-box;
}

.li-ex-vat,
.li-vat,
.li-notes,
.li-total {
  min-width: 0;
}

.li-total {
  white-space: nowrap;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  justify-content: center;
}

.li-total__value {
  display: block;
}

.line-item .remove-line-item {
  align-self: center;
}

.claim-ledger {
  display: grid;
  gap: 1rem;
}

.claim-ledger__table {
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fafbfc;
}

.claim-ledger__table .table {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 980px;
}

.claim-ledger__table .table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.claim-ledger__table .table td {
  vertical-align: middle;
}

.claim-ledger__bands th {
  background: rgba(0, 102, 204, 0.04);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.claim-reference {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.claim-actual-cell {
  width: 8.5rem;
  min-width: 8.5rem;
}

.claim-actual-input {
  width: 100%;
  min-width: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.claim-output {
  font-weight: 700;
  white-space: nowrap;
}

.claim-notes {
  margin-top: 0;
}

/* HTMX loading indicator */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request.htmx-indicator {
  display: inline-block;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
  .container {
    padding: 1.5rem;
  }

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

  .line-item {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .li-ex-vat,
  .li-vat,
  .li-total,
  .li-notes {
    grid-column: 1 / -1;
  }

  .line-item .remove-line-item {
    justify-self: end;
    align-self: start;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    padding: 1rem;
    gap: 0.5rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    margin-top: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    gap: 1rem;
  }

  .logout-form {
    order: 2;
  }

  .container {
    padding: 1rem;
  }

  .stats-grid,
  .pending-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card,
  .pending-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .section-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  /* Responsive table */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    font-size: 0.8125rem;
    min-width: 600px;
  }

  .table th,
  .table td {
    padding: 0.5rem 0.625rem;
    white-space: nowrap;
  }

  .money-summary,
  .budget-vat-grid {
    grid-template-columns: 1fr;
  }

  .line-item {
    grid-template-columns: 1fr;
  }

  .li-platform,
  .li-channel,
  .li-ex-vat,
  .li-vat,
  .li-total,
  .li-notes {
    grid-column: auto;
  }

  .line-item .remove-line-item {
    justify-self: start;
  }

  .claim-ledger__table .table {
    min-width: 860px;
  }

  .claim-actual-cell {
    width: 7.5rem;
    min-width: 7.5rem;
  }

  /* Forms on mobile */
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  .btn {
    padding: 0.75rem 1rem;
    width: 100%;
    justify-content: center;
  }

  .btn-sm {
    width: auto;
    padding: 0.375rem 0.75rem;
  }

  .card {
    padding: 1rem;
  }

  .card-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Login page mobile */
  .login-container h1 {
    font-size: 2rem;
  }

  /* Error page mobile */
  .error-container {
    padding: 1.5rem;
  }

  .error-code {
    font-size: 4rem;
  }

  .error-title {
    font-size: 1.25rem;
  }

  .error-actions {
    flex-direction: column;
    width: 100%;
  }

  .error-actions .btn {
    width: 100%;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .navbar .logo {
    font-size: 1.125rem;
    margin-right: 0;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    font-size: 0.875rem;
  }

  .badge {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.375rem;
  }
}

/* Audit Log Page */
.audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.audit-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

.audit-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  padding: 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.plan-filters {
  margin-bottom: 1rem;
}

.filter-toggle {
  display: inline-block;
  cursor: pointer;
}

.plan-filters-form {
  margin-top: 0.75rem;
}

.audit-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.audit-filters label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.audit-filters select,
.audit-filters input[type="date"],
.audit-filters input[type="text"],
.audit-filters input[type="number"] {
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  min-width: 120px;
}

.audit-filters select:focus,
.audit-filters input[type="date"]:focus,
.audit-filters input[type="text"]:focus,
.audit-filters input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-action {
  font: inherit;
  font-size: 0.8125rem;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: calc(0.5rem + 0.8125rem + 0.5rem);
}

.audit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.audit-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.75rem;
}

.audit-filter-tag a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.audit-filter-tag a:hover {
  color: var(--danger);
}

/* Audit table specific */
.audit-table {
  font-size: 0.8125rem;
}

.audit-table th {
  font-size: 0.6875rem;
  padding: 0.625rem 1rem;
}

.audit-table td {
  padding: 0.625rem 1rem;
  vertical-align: middle;
}

.audit-table .col-time {
  width: 140px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.audit-table .col-actor {
  width: 200px;
}

.audit-table .col-action {
  width: 100px;
}

.audit-table .col-entity {
  width: 180px;
}

.audit-table .actor-email {
  font-weight: 500;
  color: var(--text);
}

.audit-table .actor-type {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.audit-table .entity-name {
  font-weight: 500;
  color: var(--text);
}

.audit-table .entity-type {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.audit-table .summary {
  color: var(--text-muted);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Action badges - only these need color */
.badge-action {
  display: inline-block;
  padding: 0.1875rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-action-created {
  background: #e3f2fd;
  color: #1565c0;
}

.badge-action-submitted {
  background: #fff8e1;
  color: #f57c00;
}

.badge-action-approved {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-action-rejected {
  background: #ffebee;
  color: #c62828;
}

.badge-action-revised {
  background: #f3e5f5;
  color: #7b1fa2;
}

.badge-action-updated {
  background: #eceff1;
  color: #546e7a;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 0 0.75rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}

.pagination-btn:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.pagination-btn svg {
  width: 16px;
  height: 16px;
}

/* Activity Feed */
.activity-feed {
  margin-top: 2rem;
}

.activity-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.activity-feed-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.activity-feed-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.activity-list {
  list-style: none;
  position: relative;
  padding-left: 12px;
}

.activity-list::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 0.75rem;
  bottom: 0.75rem;
  width: 2px;
  background: var(--border);
}

.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-icon svg {
  width: 12px;
  height: 12px;
  color: white;
}

.activity-icon-created { background: #1565c0; }
.activity-icon-submitted { background: #f57c00; }
.activity-icon-approved { background: #2e7d32; }
.activity-icon-rejected { background: #c62828; }
.activity-icon-revised { background: #7b1fa2; }
.activity-icon-updated { background: #546e7a; }

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: 0.8125rem;
  color: var(--text);
}

.activity-text strong {
  font-weight: 500;
}

.activity-summary {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.activity-time {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  color: var(--text-muted);
}

.activity-empty {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 1rem 0;
}

.activity-view-all {
  margin-top: 1rem;
}

.activity-view-all a {
  font-size: 0.8125rem;
  color: var(--primary);
  text-decoration: none;
}

.activity-view-all a:hover {
  text-decoration: underline;
}

/* Audit Diff */
.audit-diff {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

.audit-diff-toggle {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  user-select: none;
}

.audit-diff-list {
  margin: 0.25rem 0 0;
  padding: 0.5rem;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  border-left: 2px solid var(--primary);
}

.audit-diff-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.125rem 0;
  flex-wrap: wrap;
}

.audit-diff-row dt {
  font-weight: 500;
  min-width: 8rem;
  color: var(--text-muted);
}

.audit-diff-row dt::after {
  content: ":";
}

.audit-diff-old {
  text-decoration: line-through;
  opacity: 0.7;
}

.audit-diff-arrow {
  color: var(--text-muted);
  margin: 0 0.25rem;
}

.audit-diff-new {
  font-weight: 500;
}

/* Expired budget rows - use muted colors instead of opacity */
.expired-row {
  color: var(--text-muted);
}

.expired-row a {
  color: var(--text-muted);
}

.expired-row a:hover {
  color: var(--text);
}

/* Tabular numbers for proper column alignment */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Expired section styling */
.expired-section {
  margin-top: 2rem;
  background: var(--bg-subtle);
  padding: 1rem;
  border-radius: var(--radius);
}
