/* =========================================================================
   Required documents (2026-11-03) -- the one look of the letters every employee must print, sign and upload: the Home
   card, the Certificates strip, the Profile block and the upload window (Personal/RequiredDocs.js). Amber = still to do,
   red = returned by HR, green = received / accepted. Prefix rqd-.
   ========================================================================= */

/* ---- buttons ---- */
.rqd-btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 10px; padding: 9px 15px; font-weight: 700; font-size: 13px; line-height: 1.2; cursor: pointer; border: 1px solid transparent; text-decoration: none !important; white-space: nowrap; transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease; }
.rqd-btn:hover { transform: translateY(-1px); }
.rqd-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.rqd-btn.is-busy { position: relative; pointer-events: none; }
.rqd-btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.rqd-btn-main { background: linear-gradient(135deg, #b45309, #d97706); color: #ffffff !important; box-shadow: 0 4px 12px rgba(180, 83, 9, .25); }
.rqd-btn-main:hover { box-shadow: 0 6px 16px rgba(180, 83, 9, .32); }
.rqd-btn-ghost { background: #fffbeb; color: #92400e !important; border-color: #fcd34d; }
.rqd-btn-ghost:hover { background: #fef3c7; }
.rqd-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- the Home card ---- */
.rqd-card { display: flex; gap: 16px; align-items: center; background: #ffffff; border: 1px solid #fde68a; border-left: 6px solid #d97706; border-radius: 16px; padding: 18px 20px; margin: 0 0 14px; box-shadow: 0 6px 22px rgba(180, 83, 9, .10); position: relative; overflow: hidden; animation: rqd-in .35s ease both; }
.rqd-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, .18), rgba(251, 191, 36, 0) 70%); pointer-events: none; }
.rqd-card-icon { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; animation: rqd-pulse 2.4s ease-in-out infinite; }
.rqd-card-body { flex: 1; min-width: 0; }
.rqd-kicker { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #b45309; }
.rqd-title { font-size: 17px; font-weight: 800; color: #1f2937; margin: 2px 0 1px; }
.rqd-title-ar { font-size: 14px; color: #475569; margin-bottom: 4px; }
.rqd-sub { font-size: 13px; color: #475569; }
.rqd-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; color: #334155; }
.rqd-step { display: inline-flex; align-items: center; gap: 6px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 999px; padding: 3px 10px 3px 4px; }
.rqd-step b { width: 20px; height: 20px; border-radius: 50%; background: #d97706; color: #ffffff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.rqd-step-sep { color: #cbd5e1; font-size: 10px; }
.rqd-note { margin-top: 6px; font-size: 12.5px; color: #92400e; background: #fffbeb; border: 1px dashed #fcd34d; border-radius: 8px; padding: 5px 9px; display: inline-block; }
.rqd-note-red { color: #991b1b; background: #fef2f2; border-color: #fca5a5; }
.rqd-card .rqd-actions { flex-direction: column; align-items: stretch; flex-shrink: 0; }
.rqd-card-red { border-color: #fecaca; border-left-color: #dc2626; box-shadow: 0 6px 22px rgba(220, 38, 38, .10); }
.rqd-card-red .rqd-card-icon { background: linear-gradient(135deg, #fee2e2, #fecaca); color: #b91c1c; }
.rqd-card-red .rqd-kicker { color: #b91c1c; }
.rqd-card-red .rqd-step b { background: #dc2626; }
.rqd-card-done { border-color: #bbf7d0; border-left-color: #16a34a; box-shadow: 0 6px 22px rgba(22, 163, 74, .10); }
.rqd-card-done .rqd-card-icon { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #15803d; animation: none; }
.rqd-card-done .rqd-kicker { color: #15803d; }
@keyframes rqd-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rqd-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, .35); } 50% { box-shadow: 0 0 0 8px rgba(217, 119, 6, 0); } }

/* ---- the Certificates strip ---- */
.rqd-strip { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.rqd-strip-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border-radius: 14px; padding: 13px 16px; border: 1px solid #e2e8f0; background: #ffffff; animation: rqd-in .3s ease both; }
.rqd-strip-row.is-amber { background: linear-gradient(90deg, #fffbeb, #ffffff 60%); border-color: #fde68a; border-left: 5px solid #d97706; }
.rqd-strip-row.is-red { background: linear-gradient(90deg, #fef2f2, #ffffff 60%); border-color: #fecaca; border-left: 5px solid #dc2626; }
.rqd-strip-row.is-green { background: linear-gradient(90deg, #f0fdf4, #ffffff 60%); border-color: #bbf7d0; border-left: 5px solid #16a34a; }
.rqd-strip-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: #fef3c7; color: #b45309; flex-shrink: 0; }
.rqd-strip-row.is-red .rqd-strip-icon { background: #fee2e2; color: #b91c1c; }
.rqd-strip-row.is-green .rqd-strip-icon { background: #dcfce7; color: #15803d; }
.rqd-strip-main { flex: 1; min-width: 220px; }
.rqd-strip-title { font-weight: 800; color: #1f2937; font-size: 14.5px; }
.rqd-strip-sub { margin-top: 3px; font-size: 12.5px; color: #475569; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rqd-strip-hint { color: #64748b; }
.rqd-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #d97706; color: #ffffff; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; vertical-align: middle; }
.rqd-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 12px; }
.rqd-pill-amber { background: #fef3c7; color: #92400e; }
.rqd-pill-red { background: #fee2e2; color: #991b1b; }
.rqd-pill-green { background: #dcfce7; color: #166534; }

/* ---- the Profile block ---- */
.rqd-profile { background: #ffffff; border: 1px solid #fde68a; border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.rqd-profile-h { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #92400e; margin-bottom: 10px; }
.rqd-profile-sub { margin-left: auto; font-size: 12px; font-weight: 600; color: #94a3b8; }
.rqd-profile-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-radius: 10px; padding: 10px 12px; border: 1px solid #e2e8f0; margin-top: 8px; }
.rqd-profile-row.is-amber { border-left: 4px solid #d97706; background: #fffbeb; }
.rqd-profile-row.is-red { border-left: 4px solid #dc2626; background: #fef2f2; }
.rqd-profile-row.is-green { border-left: 4px solid #16a34a; background: #f0fdf4; }
.rqd-profile-main { min-width: 0; flex: 1; }
.rqd-profile-title { font-weight: 700; color: #1f2937; font-size: 13.5px; }
.rqd-profile-status { font-size: 12.5px; color: #475569; margin-top: 2px; }

/* ---- the upload window ---- */
.rqd-modal-backdrop { position: fixed; inset: 0; z-index: 10050; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .18s ease; }
.rqd-modal-backdrop.is-open { opacity: 1; }
.rqd-modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); background: #ffffff; border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; transform: translateY(8px); transition: transform .18s ease; }
.rqd-modal-backdrop.is-open .rqd-modal { transform: none; }
.rqd-modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: linear-gradient(135deg, #b45309, #d97706); color: #ffffff; }
.rqd-modal-h h4 { margin: 0; font-size: 16px; font-weight: 800; color: #ffffff !important; flex: 1; }
.rqd-modal-h i { color: #ffffff !important; }
.rqd-x { background: transparent; border: 0; color: #ffffff; font-size: 24px; line-height: 1; cursor: pointer; }
.rqd-modal-b { padding: 16px 18px; overflow-y: auto; }
.rqd-modal-doc { font-weight: 800; color: #1f2937; margin-bottom: 4px; }
.rqd-modal-hint { font-size: 12.5px; color: #475569; margin: 0 0 12px; }
.rqd-drop { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 14px; border: 2px dashed #fcd34d; border-radius: 14px; background: #fffbeb; color: #92400e; font-weight: 700; cursor: pointer; }
.rqd-drop i { font-size: 26px; }
.rqd-drop:hover { background: #fef3c7; }
.rqd-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rqd-badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 12px; color: #1f2937; }
.rqd-badge.is-reading { opacity: .7; }
.rqd-badge b { background: #d97706; color: #ffffff; border-radius: 999px; padding: 0 6px; font-size: 11px; }
.rqd-badge-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.rqd-badge-x { border: 0; background: #e2e8f0; color: #475569; width: 20px; height: 20px; border-radius: 50%; line-height: 18px; font-size: 14px; cursor: pointer; padding: 0; }
.rqd-badge-x:hover { background: #fecaca; color: #991b1b; }
.rqd-badge-warn { width: 100%; font-size: 12px; color: #991b1b; }
.rqd-modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid #e2e8f0; background: #f8fafc; }

@media (max-width: 640px) {
    .rqd-card { flex-wrap: wrap; }
    .rqd-card .rqd-actions { flex-direction: row; width: 100%; }
    .rqd-card .rqd-actions .rqd-btn { flex: 1; justify-content: center; }
}
