.issue-person-group { border-top: 0 !important; }
.android-download-link{display:block;margin:14px auto 0;text-align:center;color:var(--green);font-size:14px;font-weight:800;text-decoration:none}
.android-download-link:hover{text-decoration:underline}
.issue-person-group + .issue-person-group { margin-top: 8px !important; }

/* Bounded list views: the pager remains usable on desktop and mobile. */
.table-list-note{color:var(--muted);font-size:13px;margin:0 0 12px}
.pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:18px}
.pagination span{color:var(--muted);font-size:13px;min-width:90px;text-align:center}
.pagination button:disabled{opacity:.46;cursor:not-allowed;box-shadow:none}

/* Keep all setup actions on one deliberate right-hand column. */
.page-head>button[onclick*="canteenCreate"]{min-width:104px;margin-right:22px!important}
.node-floating-actions{right:22px!important}
.node-floating-actions .primary,.voucher-config .section-head>.primary{min-width:104px;text-align:center}
.voucher-config .section-head>.primary{margin-right:-2px}

/* Keep the redemption filters compact on one desktop line. */
.filter-card form.transactions-filter{grid-template-columns:112px 112px 136px minmax(118px,1fr) minmax(118px,1fr) 102px 84px auto!important;gap:8px!important}
.transactions-filter .filter-actions{grid-column:auto!important;display:flex!important;align-items:end;gap:6px!important;white-space:nowrap}
.transactions-filter .filter-actions .button,.transactions-filter .filter-actions button{padding-left:12px;padding-right:12px}
/* All select controls share the same arrow and the same 13px inner edge. */
select{appearance:none!important;padding-right:36px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%2317332c' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.7'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 13px center!important;background-size:12px 8px!important}

@media(max-width:1180px){
  .filter-card form.transactions-filter{grid-template-columns:repeat(4,1fr)!important}
  .transactions-filter .filter-actions{grid-column:1/-1!important}
}

@media(max-width:640px){
  .page-head>button[onclick*="canteenCreate"]{margin-right:0!important}
  .pagination{justify-content:space-between;gap:6px}
  .pagination button{padding:10px 12px}
  .filter-card form.transactions-filter{grid-template-columns:1fr 1fr!important}
  .transactions-filter .filter-actions{grid-column:1/-1!important}
}

/* Operational guardrails added in V11.1. */
.first-use-guide{margin:0 0 18px;padding:20px 22px;border:1px solid rgba(15,107,84,.18);border-radius:18px;background:linear-gradient(120deg,#f7fbf9,#eef6f1);box-shadow:0 10px 28px rgba(22,56,46,.05)}
.first-use-guide__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.first-use-guide h2{margin:3px 0 4px;color:var(--foreground-strong);font-size:21px}.first-use-guide p{margin:0;color:var(--foreground-secondary);font-size:13px}.first-use-guide__count{display:grid;place-items:center;min-width:50px;height:32px;border-radius:16px;background:var(--brand);color:#fff;font-weight:800}.first-use-guide ol{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin:18px 0 0;padding:0;list-style:none}.first-use-guide li{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;padding:10px;border:1px solid var(--border);border-radius:12px;background:#fff}.first-use-guide li>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#edf3ef;color:var(--brand);font-size:12px;font-weight:800}.first-use-guide li.is-done>span{background:var(--brand);color:#fff}.first-use-guide li b,.first-use-guide li small{display:block}.first-use-guide li b{font-size:13px;color:var(--foreground-strong)}.first-use-guide li small{margin-top:2px;color:var(--foreground-secondary);font-size:11px;line-height:1.35}.first-use-guide li .button{grid-column:1/-1;min-height:32px;padding:6px 8px;text-align:center;font-size:12px}
.issue-submit-v2:disabled{opacity:.52;cursor:not-allowed;box-shadow:none}.issue-empty-guide{display:grid;gap:9px;padding:17px;border:1px dashed var(--border-strong);border-radius:12px;background:var(--surface-subtle);color:var(--foreground-secondary)}.issue-empty-guide b{color:var(--foreground-strong)}.issue-empty-guide .button{justify-self:start}
.cards-filter-v2{margin:0 0 16px;padding:16px;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-sm)}.cards-filter-v2 form{display:flex;flex-wrap:wrap;gap:10px;align-items:end}.cards-filter-v2 form label{flex:1 1 180px;font-size:12px;font-weight:750;color:var(--foreground-secondary)}.cards-filter-v2 form input,.cards-filter-v2 form select{display:block;width:100%;margin-top:5px}.cards-selection-bar{display:flex;align-items:center;gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid var(--divider)}.cards-selection-bar label{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:750}.cards-selection-bar span{margin-right:auto;color:var(--foreground-secondary);font-size:13px}.card-select{display:flex;align-items:center;gap:6px;position:absolute;top:11px;right:11px;padding:7px 9px;border-radius:9px;background:rgba(255,255,255,.96);font-size:11px;font-weight:750;cursor:pointer}.cards-selection-bar input[type="checkbox"],.card-select input[type="checkbox"]{appearance:none;-webkit-appearance:none;flex:0 0 18px;width:18px!important;height:18px!important;margin:0!important;padding:0!important;border:1px solid #9bbcb2;border-radius:5px;background:#fff;box-shadow:none;cursor:pointer}.cards-selection-bar input[type="checkbox"]:checked,.card-select input[type="checkbox"]:checked{border-color:var(--brand);background-color:var(--brand);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.1 6.5 11.2 12.8 4.8' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;background-size:14px}.cards-selection-bar input[type="checkbox"]:focus-visible,.card-select input[type="checkbox"]:focus-visible{outline:3px solid rgba(15,107,84,.2);outline-offset:2px}.idcard-v2{position:relative;cursor:pointer;transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease,transform .16s ease}.idcard-v2:hover{border-color:#a7c9bd!important}.idcard-v2.is-selected{border:2px solid var(--brand)!important;background:#eef7f3!important;box-shadow:0 0 0 4px rgba(15,107,84,.1)!important}.idcard-v2.is-selected .card-select{background:var(--brand);color:#fff}.idcard-v2:focus-visible{outline:3px solid rgba(15,107,84,.22);outline-offset:3px}.group-disclosure-button{display:flex;align-items:center;justify-content:space-between;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.group-disclosure-button span{display:inline-flex;align-items:center;gap:6px}.group-disclosure-button:focus-visible{outline:2px solid var(--brand);outline-offset:3px;border-radius:8px}
@media print{.print-hide{display:none!important}}
@media(max-width:860px){.first-use-guide ol{grid-template-columns:1fr}.first-use-guide li{grid-template-columns:auto minmax(0,1fr) auto}.first-use-guide li .button{grid-column:auto}.cards-selection-bar{align-items:flex-start;flex-wrap:wrap}.cards-selection-bar span{margin-right:0;flex:1 1 130px}.cards-selection-bar .primary{width:100%}}

/* Android/WebView and phone browser safe-area polish. */
@media(max-width:640px){
  html{background:var(--green)}
  body{background:var(--paper)}
  .topbar{
    height:calc(56px + env(safe-area-inset-top));
    padding-top:env(safe-area-inset-top);
    background:var(--green)!important;
    box-shadow:0 1px 0 rgba(255,255,255,.06);
  }
  /* .topbar already consumes the safe-area inset; do not add it a second time. */
  .nav-toggle{
    top:50%;
    left:max(10px,env(safe-area-inset-left));
    transform:translateY(-50%);
  }
  .topbar #mainNav .drawer-actions>form:last-child{grid-column:1/-1}
  .topbar nav{
    top:calc(56px + env(safe-area-inset-top))!important;
    height:calc(100dvh - 56px - env(safe-area-inset-top))!important;
    background:var(--green)!important;
  }
  .topbar.canteen-admin-bar nav{background:var(--green)!important}
  .nav-open:after,
  .nav-backdrop{
    inset:calc(56px + env(safe-area-inset-top)) 0 0!important;
  }
  .container{
    padding-top:16px!important;
    padding-left:16px!important;
    padding-right:16px!important;
  }
  .hero-mini{
    min-height:300px!important;
    border-radius:24px!important;
    margin:8px 0 16px!important;
  }
  .hero-mini>div{
    padding:30px 24px!important;
  }
  .hero-mini h1{
    font-size:30px!important;
    line-height:1.18!important;
  }
  .hero-mini p{
    font-size:15px;
    line-height:1.75;
  }
  .stats{
    gap:10px!important;
    margin-bottom:14px!important;
  }
  .stat{
    min-height:146px;
    padding:17px 14px!important;
    border-radius:18px!important;
  }
  .stat span{
    font-size:15px;
    line-height:1.35;
  }
  .stat i{
    right:13px!important;
    top:13px!important;
    width:39px!important;
    height:39px!important;
  }
  .dashboard-alerts{
    gap:10px!important;
    margin-bottom:14px!important;
  }
}

/* Phone tables become readable cards instead of horizontal-scroll sheets. */
@media(max-width:640px){
  .table-wrap{
    overflow:visible!important;
    margin:0!important;
  }
  .table-wrap table.mobile-card-table{
    min-width:0!important;
    width:100%!important;
    border-collapse:separate!important;
    border-spacing:0 10px!important;
  }
  .table-wrap table.mobile-card-table thead{
    display:none!important;
  }
  .table-wrap table.mobile-card-table tbody,
  .table-wrap table.mobile-card-table tr,
  .table-wrap table.mobile-card-table td{
    display:block!important;
    width:100%!important;
  }
  .table-wrap table.mobile-card-table tr{
    background:#f8faf8;
    border:1px solid var(--line);
    border-radius:15px;
    padding:10px 12px;
    box-shadow:0 8px 22px rgba(22,56,46,.05);
  }
  .table-wrap table.mobile-card-table td{
    white-space:normal!important;
    border-bottom:0!important;
    padding:7px 0!important;
    display:grid!important;
    grid-template-columns:88px minmax(0,1fr);
    align-items:start;
    gap:10px;
  }
  .table-wrap table.mobile-card-table td::before{
    content:attr(data-label);
    color:var(--muted);
    font-size:12px;
    font-weight:800;
  }
  .table-wrap table.mobile-card-table td.right{
    text-align:left!important;
  }
  .table-wrap table.mobile-card-table td.face{
    font-size:18px;
  }
  .table-wrap table.mobile-card-table td.empty-row{
    display:block!important;
    text-align:center!important;
    padding:24px 8px!important;
  }
  .table-wrap table.mobile-card-table td.empty-row::before{
    content:none!important;
  }
}
