/* Hiring module (Components/Pages/Hiring). The look follows the reference screens supplied for this module:
   cards with an orange title rule, colour "Total" tiles, beige fields and table heads, a Status + Submit pair per row,
   a round expand icon that opens a details list, schedule cards with a green top edge, orange and gold buttons.
   Everything is scoped to .hir-ui so the rest of the app keeps its own theme. */

.hir-ui {
    --hir-accent: #C96442;
    --hir-accent-dark: #B3533A;
    --hir-gold: #C58A2E;
    --hir-gold-dark: #A9741F;
    --hir-line: #ECE6DD;
    --hir-soft: #FBF8F4;
    --hir-ink: #2B2522;
    --hir-stripe: #EEF1F4;
}

/* card title with the orange rule */
.hir-ui .hir-card-title { font-size: 16px; font-weight: 700; color: var(--hir-ink); margin: 0 0 18px; padding: 2px 0 14px; border-bottom: 1px solid var(--hir-accent); }

/* fields */
.hir-ui label { font-size: 13px; font-weight: 600; color: #3B3431; margin-bottom: 5px; }
.hir-ui .form-control, .hir-ui .form-select { background-color: var(--hir-soft); border: 1px solid var(--hir-line); border-radius: 8px; font-size: 13.5px; color: var(--hir-ink); min-height: 38px; }
.hir-ui .form-control:focus, .hir-ui .form-select:focus { border-color: var(--hir-accent); box-shadow: 0 0 0 3px rgba(201, 100, 66, .14); background-color: #fff; }
.hir-ui .form-control:disabled, .hir-ui .form-select:disabled { background-color: var(--hir-soft); color: #8A817B; opacity: 1; }
.hir-ui .form-group { margin-bottom: 14px; }
.hir-required::after { content: " *"; color: #DC2626; }
.hir-ui .hir-form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* buttons */
.hir-ui .hir-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--hir-accent); border: 1px solid var(--hir-accent); color: #fff; border-radius: 6px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; line-height: 1.3; cursor: pointer; white-space: nowrap; text-decoration: none; }
.hir-ui .hir-btn:hover { background: var(--hir-accent-dark); border-color: var(--hir-accent-dark); color: #fff; }
.hir-ui .hir-btn:disabled { opacity: .55; cursor: default; }
.hir-ui .hir-btn-lg { padding: 10px 16px; border-radius: 8px; font-size: 13.5px; }
.hir-ui .hir-btn-gold { background: var(--hir-gold); border-color: var(--hir-gold); }
.hir-ui .hir-btn-gold:hover { background: var(--hir-gold-dark); border-color: var(--hir-gold-dark); }
.hir-ui .hir-btn-light { background: #fff; color: var(--hir-ink); border-color: #D9D1C7; }
.hir-ui .hir-btn-light:hover { background: var(--hir-soft); color: var(--hir-ink); border-color: #D9D1C7; }
.hir-ui .hir-btn-danger { background: #fff; color: #B42318; border-color: #EBB9B2; }
.hir-ui .hir-btn-danger:hover { background: #FDF1EF; color: #912018; border-color: #EBB9B2; }

/* filters above a list, and the button bar under them */
.hir-ui .hir-filters { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.hir-ui .hir-filters .form-group { margin: 0; width: 330px; max-width: 100%; }
.hir-ui .hir-actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid #E5E5E5; }
.hir-ui .hir-actionbar .hir-spacer { flex: 1; }

/* "Total List" tiles */
.hir-ui .hir-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.hir-ui .hir-tile { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 8px; padding: 20px 18px; color: #fff; min-height: 84px; }
.hir-ui .hir-tile-label { font-size: 13.5px; font-weight: 600; }
.hir-ui .hir-tile-value { font-size: 22px; font-weight: 700; line-height: 1.1; margin-top: 4px; }
.hir-ui .hir-tile-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.hir-ui .hir-tile-blue { background: #9499FF; }
.hir-ui .hir-tile-blue .hir-tile-icon { background: #7C83FF; }
.hir-ui .hir-tile-pink { background: #FF9EC2; }
.hir-ui .hir-tile-pink .hir-tile-icon { background: #D97757; }
.hir-ui .hir-tile-peach { background: #FFB88C; }
.hir-ui .hir-tile-peach .hir-tile-icon { background: #FF9D5C; }

/* tables */
.hir-ui .hir-grid-wrap { overflow-x: auto; }
.hir-ui .hir-grid { width: 100%; border-collapse: collapse; background: #fff; color: var(--hir-ink); font-size: 13.5px; }
.hir-ui .hir-grid > thead > tr > th { background: var(--hir-soft); border: 1px solid var(--hir-line); padding: 10px 8px; font-weight: 700; text-align: left; white-space: nowrap; }
.hir-ui .hir-grid > tbody > tr > td { border: 1px solid var(--hir-line); padding: 9px 8px; vertical-align: middle; background: #fff; }
.hir-ui .hir-grid > tbody > tr.hir-alt > td { background: var(--hir-stripe); }
.hir-ui .hir-grid > tbody > tr.hir-open > td { background: #E8E1DC; }
.hir-ui .hir-grid > tbody > tr.hir-detail > td { background: #fff; padding: 4px 10px 14px; }
.hir-ui .hir-grid .hir-col-check { width: 90px; }
.hir-ui .hir-grid .hir-col-check label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; font-size: 13.5px; color: var(--hir-ink); cursor: pointer; }
.hir-ui .hir-grid .hir-col-submit { width: 80px; text-align: center; }
.hir-ui .hir-grid .hir-col-icon { width: 46px; text-align: center; }
.hir-ui .hir-grid .hir-col-actions { width: 1%; white-space: nowrap; text-align: center; }
.hir-ui .hir-grid input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--hir-accent); vertical-align: middle; }
.hir-ui .hir-grid .hir-status { width: 150px; min-height: 31px; height: 31px; padding: 3px 28px 3px 9px; font-size: 13px; border-radius: 6px; }
.hir-ui .hir-empty { text-align: center; color: #6B7280; padding: 28px 12px; }
.hir-ui .hir-link { color: var(--hir-accent); text-decoration: none; }
.hir-ui .hir-link:hover { color: var(--hir-accent-dark); text-decoration: underline; }
.hir-ui .hir-icon-btn { border: 0; background: none; padding: 0 5px; color: #6B5F57; cursor: pointer; font-size: 14px; }
.hir-ui .hir-icon-btn:hover { color: var(--hir-accent); }
.hir-ui .hir-icon-btn.danger:hover { color: #B42318; }

/* round expand icon and the details list it opens */
.hir-ui .hir-expand { width: 17px; height: 17px; border-radius: 50%; border: 0; padding: 0; background: var(--hir-accent); color: #fff; font-size: 14px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; vertical-align: middle; }
.hir-ui .hir-expand.open { background: #FF1931; }
.hir-ui .hir-expand.pink { background: #F7A1C4; }
.hir-ui .hir-expand.pink.open { background: #E8679A; }
.hir-ui .hir-dl > div { padding: 10px 0; border-bottom: 1px solid #D9E3EC; font-size: 13.5px; }
.hir-ui .hir-dl > div:last-child { border-bottom: 0; }
.hir-ui .hir-dl b { font-weight: 700; margin-right: 4px; }
.hir-ui .hir-dl .form-control, .hir-ui .hir-dl .form-select { margin-top: 6px; max-width: 560px; }
.hir-ui .hir-dl .hir-dl-actions { display: flex; gap: 8px; }

/* interview schedule cards */
.hir-ui .hir-sched-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.hir-ui .hir-sched { display: flex; flex-direction: column; background: #fff; border: 1px solid #E3E3E3; border-top: 3px solid #28A745; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); color: var(--hir-ink); }
.hir-ui .hir-sched-title { text-align: center; font-weight: 700; font-size: 13.5px; text-transform: uppercase; letter-spacing: .02em; padding: 14px 10px; border-bottom: 1px solid #EEEEEE; }
.hir-ui .hir-sched-date { display: flex; align-items: center; justify-content: space-around; padding: 18px 10px; border-bottom: 1px solid #EEEEEE; }
.hir-ui .hir-sched-day { font-size: 38px; font-weight: 700; line-height: 1; }
.hir-ui .hir-sched-when { font-size: 13px; line-height: 1.5; }
.hir-ui .hir-sched-count { text-align: center; padding: 18px 10px; border-bottom: 1px solid #EEEEEE; font-size: 13px; }
.hir-ui .hir-sched-count b { font-size: 30px; margin-right: 4px; vertical-align: middle; }
.hir-ui .hir-sched-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; }
.hir-ui .hir-sched-foot i { font-size: 26px; color: #1F1F1F; }
.hir-ui .hir-sched-foot div { text-align: right; font-size: 13px; line-height: 1.5; }
.hir-ui .hir-sched-foot div b { display: block; }

/* status badges */
.hir-muted { color: #6B7280; font-size: 12.5px; }
.hir-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #F3F4F6; color: #374151; }
.hir-badge-new { background: #E0EAFF; color: #1D4ED8; }
.hir-badge-shortlisted { background: #E0F2FE; color: #0369A1; }
.hir-badge-interview, .hir-badge-scheduled { background: #FEF3C7; color: #92400E; }
.hir-badge-selected, .hir-badge-offeraccepted, .hir-badge-accepted { background: #DCFCE7; color: #166534; }
.hir-badge-offered, .hir-badge-issued { background: #EDE9FE; color: #5B21B6; }
.hir-badge-rejected, .hir-badge-notselected, .hir-badge-offerrejected { background: #FEE2E2; color: #991B1B; }

/* offer letter preview / print */
.hir-letter { background: #fff; border: 1px solid #E4E8F1; border-radius: 8px; padding: 40px 48px; max-width: 820px; margin: 0 auto; color: #111827; font-size: 14.5px; line-height: 1.65; }
.hir-letter-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #C96442; padding-bottom: 12px; margin-bottom: 20px; }
.hir-letter-company { font-size: 18px; font-weight: 800; }
.hir-letter-meta { text-align: right; font-size: 13px; color: #374151; }
.hir-letter-title { text-align: center; font-weight: 800; letter-spacing: .08em; margin: 4px 0 18px; }
.hir-letter-body { white-space: pre-wrap; }
.hir-letter-sign { display: flex; justify-content: space-between; margin-top: 56px; font-size: 13.5px; }
.hir-letter-sign div { border-top: 1px solid #9CA3AF; padding-top: 6px; min-width: 200px; text-align: center; }

/* printing the page while an offer letter is open prints only the letter */
@media print {
    body:has(.hir-letter) * { visibility: hidden !important; }
    body:has(.hir-letter) .hir-letter, body:has(.hir-letter) .hir-letter * { visibility: visible !important; }
    body:has(.hir-letter) .hir-letter { position: absolute; left: 0; top: 0; width: 100%; max-width: none; border: none; padding: 24px; }
}
