/* Corporate portal: the Administrator tab (admin-users.js). Builds on the maker / checker rows and buttons. */
#mainApp .cp-nav-item[data-view="admin"] { --rf-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8-7 10-4-2-7-5.5-7-10V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.btn.btn-busy { cursor: progress; opacity: .8; }
.btn.btn-busy::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: au-spin .7s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.btn-busy::before { animation-duration: 2s; } }
.au-phone-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 1.4fr); gap: 12px; }
.au-row { grid-template-columns: minmax(200px, 2fr) minmax(110px, 1fr) minmax(150px, 1.4fr) minmax(120px, 1fr); }
.au-row .mc-actions { grid-column: 1 / -1; justify-content: flex-start; }
.au-pick { cursor: pointer; }
.au-pick:hover { background: var(--bg-muted, #fafbf8); }
.au-pick:focus-visible { outline: 2px solid #8a9a2b; outline-offset: -2px; }
.au-selected { background: #f4f7e9; box-shadow: inset 3px 0 0 #8a9a2b; }
.au-check { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 13px; line-height: 1.5; cursor: pointer; }
.au-check[hidden] { display: none; }
.au-check input { margin-top: 3px; }
.au-others-box { margin-top: 18px; border: 2px solid #c9d29a; background: #fcfdf7; }
.au-you-box .mc-head { margin-bottom: 4px; }
#au-users .mc-count { white-space: nowrap; }
/* the Edit dialog: every field in a row sits on the same line, whether it is an input or a drop-down */
#auEditModal .field-row2 { align-items: end; }
#auEditModal .field-group { min-width: 0; }
#auEditModal .field-group label { display: block; min-height: 1.4em; margin-bottom: 6px; }
#auEditModal input, #auEditModal select { width: 100%; box-sizing: border-box; height: 48px; text-overflow: ellipsis; }
#auEditModal select { padding-right: 34px; }
#auEditModal .au-details { margin-top: 10px; }
#au-add .field-row2 { align-items: end; }
#au-add .field-group { min-width: 0; }
#au-add input, #au-add select { width: 100%; box-sizing: border-box; height: 48px; text-overflow: ellipsis; }
#au-add select { padding-right: 34px; }
.au-row .btn { padding: 7px 14px; font-size: 12.5px; }
.au-you { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #eef1e8; color: #4b5120; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.mc-status.au-active { background: #e5f4e8; color: #1c6b34; }
.mc-status.au-invited { background: #e6f0fb; color: #1a508b; }
.mc-status.au-blocked { background: #fde7e5; color: #a3261b; }
.mc-status.au-scheduled { background: #fff4e0; color: #9a5b00; }
.mc-status.au-revoked { background: #eceeea; color: #55594d; }
.btn.au-danger { color: #a3261b; }
.btn.au-danger-fill { background: #b42318; border-color: #b42318; color: #fff; }
.au-banner { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: #fff4e0; color: #7a4a00; font-size: 13px; line-height: 1.5; }
.au-banner[hidden], .au-step[hidden] { display: none; }
.au-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; margin: 10px 0 4px; padding: 14px; border-radius: 8px; background: var(--bg-muted, #fafbf8); border: 1px solid var(--border-color, #e8ede5); }
.au-detail span:last-child { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary, #363b21); overflow-wrap: anywhere; }
.au-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.au-file-name { font-size: 13px; color: var(--text-muted, #69715e); overflow-wrap: anywhere; }
.au-role-shown { font-weight: 700; color: var(--text-primary, #363b21); }
.au-block-fields[hidden], #auReasonField[hidden] { display: none; }
.au-block-fields .field-group { min-width: 0; }
.au-block-fields input[type="datetime-local"] { width: 100%; min-width: 0; box-sizing: border-box; }
#auReason { width: 100%; min-height: 64px; resize: vertical; box-sizing: border-box; }
@media (max-width: 900px) { .au-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .au-row { grid-template-columns: 1fr; } }
