/*
 * shared-ui.css
 * Shared index-page UI components – toolbar, table, badges, action buttons.
 * Extracted from employees.css so every module can use the same design language.
 * Registered globally via AppAsset.
 */

/* ═══════════════════════════════════════════════════════════
   Toolbar
   ═══════════════════════════════════════════════════════════ */
.staff-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
}
.staff-toolbar-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 0 0 auto;
    align-self: flex-end;
}
.staff-toolbar-title {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.staff-toolbar-count {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}
.staff-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: flex-end;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
}
.staff-filter-field {
    min-width: 130px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.staff-filter-field > label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 0;
}
.staff-filter-bar .form-control,
.staff-filter-bar .form-select {
    font-size: 12px;
    height: 30px;
    padding: 4px 8px;
    border-color: #e2e8f0;
    border-radius: 6px;
}
.staff-filter-bar .form-control:focus,
.staff-filter-bar .form-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

/* ═══════════════════════════════════════════════════════════
   Table wrapper & table
   ═══════════════════════════════════════════════════════════ */
.staff-table-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.staff-table-wrapper .table-responsive { margin: 0; }

.staff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 0;
}
.staff-table > thead > tr > th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #cbd5e1;
    border-top: none;
    border-left: none;
    border-right: none;
    padding: 9px 12px;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.staff-table > thead > tr > th a,
.staff-table > thead > tr > th a:visited {
    color: #374151;
    text-decoration: none;
}
.staff-table > thead > tr > th a:hover { color: #1e40af; }
.staff-table > tbody > tr > td {
    padding: 9px 12px;
    border-bottom: 1px solid #e2e8f0;
    border-top: none;
    border-left: none;
    border-right: none;
    vertical-align: middle;
    color: #374151;
}
.staff-table > tbody > tr:last-child > td { border-bottom: none; }
.staff-table > tbody > tr:hover { background: #eff6ff; }

/* ═══════════════════════════════════════════════════════════
   Row action icon buttons
   ═══════════════════════════════════════════════════════════ */
.staff-act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-left: 3px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 5px;
    text-decoration: none;
    padding: 0;
    cursor: pointer;
    transition: background .15s, color .15s;
    line-height: 1;
}
.staff-act-btn:first-child { margin-left: 0; }
.staff-act-btn:hover { text-decoration: none; }
.staff-act-btn .fa,
.staff-act-btn .fas { font-size: 12px; }
.staff-act-edit  .fa  { color: #1e40af; }
.staff-act-edit:hover { background: #dbeafe; color: #1e40af; }
.staff-act-view  .fa  { color: #065f46; }
.staff-act-view:hover { background: #d1fae5; color: #065f46; }
.staff-act-archive .fa  { color: #dc2626; }
.staff-act-archive:hover { background: #f6bebe; color: #92400e; }
.staff-act-restore .fa  { color: #16a34a; }
.staff-act-restore:hover { background: #d1fae5; color: #065f46; }
.staff-act-delete  .fa  { color: #dc2626; }
.staff-act-delete:hover  { background: #fee2e2; color: #dc2626; }
.staff-act-approve .fa  { color: #059669; }
.staff-act-approve:hover { background: #d1fae5; color: #059669; }
.staff-act-deactivate .fa  { color: #6b7280; }
.staff-act-deactivate:hover { background: #f1f5f9; color: #374151; }
.staff-act-key .fa, .staff-act-key .fas  { color: #0369a1; }
.staff-act-key:hover { background: #e0f2fe; color: #0369a1; }
.staff-act-mobile .fa, .staff-act-mobile .fas { color: #d97706; }
.staff-act-mobile:hover { background: #fef9c3; color: #b45309; }
.staff-actions-cell { white-space: nowrap; text-align: right; }

/* Batch-review checkbox column */
.staff-chk-checkbox { width: 16px; height: 16px; cursor: pointer; }
.staff-chk-col { min-width: 80px; text-align: center; }

/* ═══════════════════════════════════════════════════════════
   Pagination strip
   ═══════════════════════════════════════════════════════════ */
.staff-pager-wrapper {
    padding: 12px 16px 10px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}
.staff-pager-info { font-size: 12px; color: #9ca3af; }

/* ═══════════════════════════════════════════════════════════
   Status / type pill badges  (.s-badge)
   ═══════════════════════════════════════════════════════════ */
.s-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    line-height: 1.6;
}
.s-badge-active    { background: #d1fae5; color: #065f46; }
.s-badge-archived  { background: #f1f5f9; color: #475569; }
.s-badge-approved  { background: #d1fae5; color: #065f46; }
.s-badge-rejected  { background: #fee2e2; color: #b91c1c; }
.s-badge-pending   { background: #fef9c3; color: #854d0e; }
.s-badge-inactive  { background: #f1f5f9; color: #475569; }
.s-badge-paid      { background: #d1fae5; color: #065f46; }
.s-badge-info      { background: #dbeafe; color: #1e40af; }
.s-badge-warning   { background: #fef9c3; color: #854d0e; }
.s-badge-fulltime  { background: #dbeafe; color: #1e40af; }
.s-badge-parttime  { background: #ede9fe; color: #5b21b6; }
.s-badge-contract  { background: #fce7f3; color: #9d174d; }
.s-badge-intern    { background: #f1f5f9; color: #475569; }

/* ═══════════════════════════════════════════════════════════
   Cell helpers
   ═══════════════════════════════════════════════════════════ */
.staff-idx-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e40af;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.staff-idx-name-link { font-weight: 600; color: #1e40af; text-decoration: none; }
.staff-idx-name-link:hover { text-decoration: underline; }
.staff-idx-sub   { font-size: 11px; color: #9ca3af; }
.staff-idx-muted { color: #9ca3af; }
.staff-idx-rownum { font-size: 12px; color: #9ca3af; }
.staff-idx-code {
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 11px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #374151;
    padding: 1px 6px;
    border-radius: 4px;
}

