/* Full-sheet A3 landscape directory layout v1.4.0. */
@import url("phoneboard-v1.3.0.css");

@page { size: A3 landscape; margin: 8mm 9mm; }

@media print {
  body {
    background: #fff !important;
    color: #183d37 !important;
    font-family: Arial, sans-serif;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .shell { width: 100%; max-width: none; margin: 0; }
  .masthead, .status, .login-card, .intro-row, .toolbar, .empty,
  footer, .edit, .page-tabs, .source-note, .dialog { display: none !important; }
  #board { display: block !important; }
  #employees-page[hidden], #maintenance-page[hidden] { display: block !important; }
  #employees-page { break-after: page; page-break-after: always; }
  #maintenance-page { break-before: auto; }

  .print-heading {
    display: grid;
    grid-template-columns: 16mm minmax(0, 1fr) auto;
    align-items: center;
    gap: 4mm;
    min-height: 22mm;
    margin: 0 0 4mm;
    padding: 2.5mm 4mm;
    border: 0;
    border-radius: 3mm;
    background: #173f37;
    color: #fff;
    break-after: avoid;
  }
  .print-number {
    display: grid;
    place-items: center;
    width: 15mm;
    height: 15mm;
    border-radius: 3mm;
    background: #d8eee5;
    color: #155b4f;
    font-size: 21pt;
    font-weight: 900;
  }
  .print-number-alt { background: #f1dfbd; color: #765016; }
  .print-heading .eyebrow { margin: 0 0 1mm; color: #b7ddcf; font-size: 8pt; }
  .print-heading h2 { margin: 0; color: #fff; font-size: 22pt; line-height: 1.05; letter-spacing: -.02em; }
  .print-subtitle { margin: 1.2mm 0 0; color: #e1eee8; font-size: 9pt; }
  .print-date { margin: 0 0 auto 0; color: #e1eee8; font-size: 8pt; white-space: nowrap; }
  #maintenance-page .print-heading { background: #283b47; }
  #maintenance-page .print-heading .eyebrow { color: #edcf98; }

  #groups {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, min-content);
    grid-auto-flow: column;
    align-content: start;
    gap: 3mm;
  }
  .group {
    display: block;
    width: 100%;
    margin: 0;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: .35mm solid #d8e4de;
    border-radius: 2.6mm;
    background: #fff;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .group::before, .group:hover { display: none; }
  .group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2mm;
    margin: 0;
    padding: 1.8mm 2.5mm;
    border: 0;
    border-bottom: .3mm solid #dce9e3;
    background: #e9f3ee;
  }
  .group-head h3 { margin: 0; color: #21483e; font-size: 11.2pt; line-height: 1.12; }
  .count {
    flex: 0 0 auto;
    padding: .5mm 1.3mm;
    border-radius: 99mm;
    background: #fff;
    color: #536f63;
    font-size: 7.2pt;
    font-weight: 700;
  }
  .person {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2mm;
    min-height: 0;
    padding: 1.55mm 2.2mm;
    border-bottom: .25mm solid #e8efeb;
  }
  .person:last-child { border-bottom: 0; }
  .avatar, .edit { display: none !important; }
  .person-main { display: block; min-width: 0; }
  .person-name { margin: 0; color: #203d35; font-size: 11.4pt; font-weight: 700; line-height: 1.08; }
  .person-meta { margin: .8mm 0 0; color: #6c7c75; font-size: 8.8pt; line-height: 1.15; }
  .person-meta:empty { display: none; }
  .phone-link {
    display: inline-block;
    padding: .65mm 1.2mm;
    border: .25mm solid #dbece4;
    border-radius: 1.5mm;
    background: #f2f8f5;
    color: #126b59 !important;
    font-size: 10.8pt;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    text-decoration: none !important;
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
  }

  #maintenance-groups {
    display: block;
    height: 230mm;
    columns: 5;
    column-gap: 3mm;
    column-fill: balance;
  }
  #maintenance-groups .group {
    display: inline-block;
    width: 100%;
    margin: 0 0 1.6mm;
    break-inside: avoid;
    page-break-inside: avoid;
    vertical-align: top;
  }
  #maintenance-page .group-head { padding: 1.55mm 2mm; background: #f4efe4; border-bottom-color: #e9dfcb; }
  #maintenance-page .group-head h3 { color: #51442b; font-size: 9.8pt; line-height:1.08; }
  #maintenance-page .count { color: #735b31; }
  #maintenance-page .person { padding: 1.3mm 2mm; gap:1.5mm; }
  #maintenance-page .person-name { color: #393a35; font-size: 10.3pt; line-height:1.08; }
  #maintenance-page .phone-link { padding: .55mm 1mm; border-color: #eee3ce; background: #fbf7ef; color: #805718 !important; font-size: 9.6pt; }
}
