.coa-page { color: #1f2937; }
.coa-print-brand { display: none; }
.coa-hero { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem; margin-bottom: 1rem; border-radius: 1.25rem; color: #fff; background: linear-gradient(135deg, #0f766e, #0d9488); }
.coa-hero h2 { margin: .25rem 0; font-weight: 800; }
.coa-hero p { margin: 0; color: rgba(255,255,255,.82); }
.coa-kicker { font-size: .78rem; letter-spacing: .08em; color: rgba(255,255,255,.74); }
.coa-system-badge { padding: .7rem 1rem; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; background: rgba(255,255,255,.14); }
.coa-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.coa-stat { padding: 1rem 1.1rem; border: 1px solid #e5e7eb; border-radius: 1rem; background: #fff; }
.coa-stat span { display: block; color: #6b7280; font-size: .82rem; }
.coa-stat strong { display: block; margin-top: .2rem; color: #0f766e; font-size: 1.5rem; }
.coa-card { border-radius: 1.1rem; }
.coa-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 220px 160px auto auto auto auto; gap: .65rem; margin-bottom: 1rem; }
.coa-search { position: relative; }
.coa-search i { position: absolute; top: .68rem; right: .8rem; color: #94a3b8; }
.coa-search input { padding-right: 2.3rem; }
.coa-table-wrap { max-height: 68vh; border: 1px solid #edf0f3; border-radius: .9rem; }
.coa-table thead { position: sticky; top: 0; z-index: 2; background: #f8fafc; }
.coa-table th { color: #64748b; font-size: .78rem; white-space: nowrap; }
.coa-table td { font-size: .86rem; vertical-align: middle; }
.coa-account-cell { display: flex; align-items: center; gap: .5rem; min-width: 360px; padding-right: calc(var(--coa-depth) * 1.35rem); }
.coa-toggle { width: 1.7rem; height: 1.7rem; border: 0; border-radius: .45rem; color: #0f766e; background: #ecfdf5; transition: transform .15s ease; }
.coa-toggle.is-open i { display: inline-block; transform: rotate(-90deg); }
.coa-toggle-placeholder { width: 1.7rem; }
.coa-code { min-width: 74px; color: #0f766e; font-family: Consolas, monospace; font-weight: 700; }
.coa-name { white-space: nowrap; }
.coa-scope, .coa-posting, .coa-group { display: inline-flex; padding: .22rem .55rem; border-radius: 999px; font-size: .74rem; white-space: nowrap; }
.coa-scope-global { color: #1d4ed8; background: #dbeafe; }
.coa-scope-branch { color: #047857; background: #d1fae5; }
.coa-scope-agency { color: #a16207; background: #fef3c7; }
.coa-posting { color: #047857; background: #ecfdf5; }
.coa-group { color: #64748b; background: #f1f5f9; }
.coa-preview { padding: .75rem; border-radius: .65rem; color: #0f766e; background: #f0fdfa; }
.coa-live-message {
  position: fixed;
  inset-block-start: 18px;
  inset-inline-end: 18px;
  z-index: 2000;
  max-width: min(420px, calc(100vw - 36px));
  padding: 11px 16px;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .2);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.coa-live-message.is-visible { opacity: 1; transform: translateY(0); }
.coa-live-message.is-success { background: #15803d; }
.coa-live-message.is-danger { background: #b91c1c; }
@media (max-width: 1100px) { .coa-toolbar { grid-template-columns: 1fr 1fr; } .coa-search { grid-column: 1 / -1; } }
@media (max-width: 700px) { .coa-stats { grid-template-columns: repeat(2, 1fr); } .coa-toolbar { grid-template-columns: 1fr; } .coa-search { grid-column: auto; } .coa-hero { align-items: flex-start; flex-direction: column; } }

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  body {
    background: #fff !important;
    color: #111827 !important;
  }

  .navbar,
  .acc-sidebar,
  .acc-mobile-menu-btn,
  .acc-sidebar-backdrop,
  .coa-hero,
  .coa-stats,
  .coa-toolbar,
  .modal,
  .btn,
  .text-end {
    display: none !important;
  }

  .app-wrapper,
  .app-content,
  .container-fluid.coa-page {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }

  .coa-print-brand {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc !important;
    break-inside: avoid;
  }

  .coa-print-company {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .coa-print-company img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    padding: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
  }

  .coa-print-company h1 {
    margin: 0;
    color: #0f172a !important;
    font-size: 18px;
    font-weight: 900;
  }

  .coa-print-company p {
    margin: 2px 0 0;
    color: #0f766e !important;
    font-size: 13px;
    font-weight: 900;
  }

  .coa-print-meta {
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 11px;
    text-align: end;
  }

  .coa-card,
  .card,
  .card-body {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .coa-table-wrap {
    max-height: none !important;
    overflow: visible !important;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
  }

  .coa-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 10.5px;
  }

  .coa-table thead {
    display: table-header-group;
    position: static !important;
  }

  .coa-table th,
  .coa-table td {
    padding: 5px 6px !important;
    border: 1px solid #cbd5e1 !important;
    color: #111827 !important;
  }

  .coa-table th {
    background: #e2e8f0 !important;
    font-weight: 900;
  }

  .coa-account-cell {
    min-width: 0;
    padding-right: calc(var(--coa-depth) * .75rem);
  }

  .coa-toggle,
  .coa-toggle-placeholder {
    display: none !important;
  }

  .coa-row.d-none {
    display: table-row !important;
  }
}
