/* ══════════════════════════════════════════════════
   Companies Portal CSS — جمهورية مصر العربية - وزارة العمل
   ══════════════════════════════════════════════════ */

/* ── Fix: Cairo Font (correct paths from assets/css/) ── */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(../fonts/cairo-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(../fonts/cairo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(../fonts/cairo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Fix: form-card needs padding (shared.css has none) ── */
.form-card {
  padding: 28px 28px 24px;
}

/* ── Fix: form-card overflow clips child shadows ── */
.form-card {
  overflow: visible;
}

/* ── Status Badge ── */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 800; white-space: nowrap;
}

/* ── Posting Card ── */
.posting-card {
  background: #fff; border-radius: 16px;
  border: 1.5px solid #E8EDF5;
  padding: 20px; transition: all .25s;
  position: relative; overflow: hidden;
}
.posting-card::before {
  content: ''; position: absolute; top: 0; right: 0; left: 0; height: 4px;
  background: var(--card-accent, #1B3F6E);
}
.posting-card:hover {
  border-color: #C9922A;
  box-shadow: 0 8px 24px rgba(27,63,110,.08);
  transform: translateY(-2px);
}
.posting-card .card-title {
  font-size: 15px; font-weight: 800; color: #1B3F6E;
  margin-bottom: 6px;
}
.posting-card .card-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 12px; font-size: 12px; color: #64748B; font-weight: 600;
}
.posting-card .card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.posting-card .card-stats {
  display: flex; gap: 16px; margin-bottom: 14px;
  padding: 10px 14px; border-radius: 10px; background: #F8FAFC;
}
.posting-card .card-stats .stat-item {
  text-align: center; flex: 1;
}
.posting-card .card-stats .stat-num {
  font-size: 18px; font-weight: 900; color: #1B3F6E; display: block;
}
.posting-card .card-stats .stat-label {
  font-size: 10px; font-weight: 700; color: #94A3B8;
}
.posting-card .card-actions {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
/* Fix: don't strip btn-* colors/backgrounds — only set shared props */
.posting-card .card-actions button,
.posting-card .card-actions a {
  font-size: 11px; font-weight: 800; padding: 6px 14px;
  border-radius: 8px; cursor: pointer;
  font-family: 'Cairo', sans-serif; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; transition: all .15s;
}
/* Preserve btn-p look in card actions */
.posting-card .card-actions .btn-p {
  background: linear-gradient(135deg, #1B3F6E, #2554A0); color: #fff; border: none;
  box-shadow: 0 2px 8px rgba(27,63,110,.2);
}
.posting-card .card-actions .btn-p:hover { box-shadow: 0 4px 12px rgba(27,63,110,.3); }
.posting-card .card-actions .btn-s {
  background: #fff; color: #475569; border: 1.5px solid #CBD5E1;
}
.posting-card .card-actions .btn-s:hover { border-color: #1B3F6E; color: #1B3F6E; background: #EEF3FA; }
.posting-card .card-actions .btn-d {
  background: #FEF2F2; color: #C8102E; border: 1px solid #FECACA;
}
.posting-card .card-actions .btn-d:hover { background: #FCA5A5; color: #fff; }
.posting-card .card-actions .btn-g {
  background: #ECFDF5; color: #1A7A4A; border: 1px solid #BBF7D0;
}
.posting-card .card-actions .btn-g:hover { background: #1A7A4A; color: #fff; }

/* ── Candidate Card ── */
.candidate-card {
  background: #fff; border: 1.5px solid #E8EDF5;
  border-radius: 14px; padding: 18px;
  transition: all .25s; display: flex; align-items: flex-start; gap: 14px;
}
.candidate-card:hover {
  border-color: #C9922A;
  box-shadow: 0 4px 16px rgba(27,63,110,.08);
}
.candidate-card .cand-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, #1B3F6E, #2a5a9e);
}
.candidate-card .cand-info { flex: 1; min-width: 0; }
.candidate-card .cand-name {
  font-size: 14px; font-weight: 800; color: #1B3F6E; margin-bottom: 2px;
}
.candidate-card .cand-detail {
  font-size: 12px; color: #64748B; font-weight: 600; margin-bottom: 8px;
  line-height: 1.8;
}
.candidate-card .cand-actions {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
}
/* Fix: Candidate action buttons need proper styles */
.candidate-card .cand-actions button,
.candidate-card .cand-actions a {
  font-family: 'Cairo', sans-serif; cursor: pointer;
  font-size: 11px; font-weight: 800; padding: 5px 12px;
  border-radius: 8px; transition: all .15s;
  display: inline-flex; align-items: center; gap: 4px;
}
.candidate-card .cand-actions .btn-g {
  background: #ECFDF5; color: #1A7A4A; border: 1px solid #BBF7D0;
}
.candidate-card .cand-actions .btn-g:hover { background: #1A7A4A; color: #fff; }
.candidate-card .cand-actions .btn-d {
  background: #FEF2F2; color: #C8102E; border: 1px solid #FECACA;
}
.candidate-card .cand-actions .btn-d:hover { background: #FCA5A5; color: #fff; }
.candidate-card .cand-actions .btn-s {
  background: #fff; color: #475569; border: 1.5px solid #CBD5E1;
}
.candidate-card .cand-actions .btn-s:hover { border-color: #1B3F6E; color: #1B3F6E; }

/* ── Quick Action Card ── */
.quick-action {
  background: #fff; border: 1.5px solid #E8EDF5;
  border-radius: 16px; padding: 24px; text-align: center;
  cursor: pointer; transition: all .25s; text-decoration: none; display: block;
}
.quick-action:hover {
  border-color: #C9922A; transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(201,146,42,.12);
}
.quick-action .qa-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; font-size: 24px;
}
.quick-action .qa-title {
  font-size: 14px; font-weight: 800; color: #1B3F6E; margin-bottom: 4px;
}
.quick-action .qa-desc {
  font-size: 11px; font-weight: 600; color: #94A3B8;
}

/* ── Note Bubble ── */
.note-bubble {
  background: #EEF3FA; border-radius: 14px;
  padding: 14px 18px; margin-bottom: 10px;
}
.note-bubble.from-company { background: #EEF3FA; border-right: 3px solid #1B3F6E; }
.note-bubble .note-meta {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.note-bubble .note-sender { font-size: 11px; font-weight: 800; color: #1B3F6E; }
.note-bubble .note-time { font-size: 11px; color: #94A3B8; font-weight: 600; }
.note-bubble .note-text { font-size: 13px; color: #1a2535; line-height: 1.8; font-weight: 600; }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 48px 20px;
}
.empty-state .empty-icon {
  font-size: 48px; margin-bottom: 12px; opacity: .5;
}
.empty-state .empty-title {
  font-size: 16px; font-weight: 800; color: #64748B; margin-bottom: 6px;
}
.empty-state .empty-desc {
  font-size: 13px; color: #94A3B8; font-weight: 600;
}

/* ── Filter Pills ── */
.filter-pills {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px;
}
.filter-pill {
  padding: 6px 16px; border-radius: 10px;
  font-size: 12px; font-weight: 800; cursor: pointer;
  border: 1.5px solid #E2E8F0; background: #fff; color: #64748B;
  font-family: 'Cairo', sans-serif; transition: all .15s;
}
.filter-pill:hover { border-color: #C9922A; color: #C9922A; }
.filter-pill.active { background: #1B3F6E; color: #fff; border-color: #1B3F6E; }
.filter-pill .pill-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 6px; font-size: 10px; font-weight: 900;
  margin-right: 4px;
}
.filter-pill.active .pill-count { background: rgba(255,255,255,.2); color: #fff; }
.filter-pill:not(.active) .pill-count { background: #F1F5F9; color: #64748B; }

/* ── Info Grid ── */
.info-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid #E8EDF5; border-radius: 14px; overflow: hidden; background: #fff;
}
.info-cell {
  padding: 14px 20px;
  border-bottom: 1px solid #F1F5F9;
  border-left: 1px solid #F1F5F9;
}
.info-cell:nth-child(3n+1) { border-left: none; }
.info-cell .cell-label { font-size: 11px; font-weight: 700; color: #94A3B8; margin-bottom: 2px; }
.info-cell .cell-value { font-size: 13px; font-weight: 800; color: #1a2535; }

/* ── Tabs ── */
.tab-bar {
  display: flex; gap: 0; border-bottom: 2px solid #E8EDF5; margin-bottom: 20px;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 0 8px;
}
.tab-btn {
  padding: 12px 20px; font-size: 13px; font-weight: 800;
  color: #64748B; background: none; border: none; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  font-family: 'Cairo', sans-serif; transition: all .15s;
}
.tab-btn:hover { color: #1B3F6E; }
.tab-btn.active { color: #1B3F6E; border-bottom-color: #C9922A; }

/* ── Detail Section ── */
.detail-section {
  background: #fff; border-radius: 16px; border: 1.5px solid #E8EDF5;
  padding: 24px; margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(14,28,53,.04);
}
.detail-section .sec-heading {
  font-size: 15px; font-weight: 900; color: #1B3F6E;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 2px solid #F1F5F9;
}

/* ── Requirement/Benefit List ── */
.req-list { list-style: none; padding: 0; margin: 0; }
.req-list li {
  padding: 8px 0; border-bottom: 1px solid #F8FAFC;
  font-size: 13px; font-weight: 600; color: #334155;
  padding-right: 20px; position: relative;
}
.req-list li::before {
  content: ''; position: absolute; right: 0; top: 14px;
  width: 6px; height: 6px; border-radius: 50%; background: #C9922A;
}

/* ── Dynamic List Input ── */
.dynamic-list .list-item {
  display: flex; gap: 8px; align-items: center; margin-bottom: 6px;
}
.dynamic-list .list-item input { flex: 1; }
.remove-item {
  width: 32px; height: 32px; border-radius: 8px;
  background: #FEF2F2; border: 1px solid #FECACA; color: #DC2626;
  cursor: pointer; font-size: 16px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cairo', sans-serif; flex-shrink: 0;
}
.remove-item:hover { background: #FCA5A5; color: #fff; }
/* Fix: add-item is a sibling of .dynamic-list, not a child */
.add-item {
  font-size: 12px; font-weight: 800; color: #1B3F6E;
  background: #EEF3FA; border: 1px dashed #B8CCE4;
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  font-family: 'Cairo', sans-serif; width: 100%;
  transition: all .15s; text-align: center;
}
.add-item:hover { background: #D9E4F5; border-color: #1B3F6E; }

/* ── Rejection Alert ── */
.rejection-alert {
  background: #FEF2F2; border: 1px solid #FECACA; border-radius: 12px;
  padding: 14px 18px; margin-bottom: 16px;
}
.rejection-alert .alert-title {
  font-size: 12px; font-weight: 800; color: #DC2626; margin-bottom: 4px;
}
.rejection-alert .alert-text {
  font-size: 13px; font-weight: 600; color: #7F1D1D; line-height: 1.7;
}

/* ── Demo Badge ── */
.demo-action {
  background: #FFFBEB !important; border: 1.5px dashed #FDE68A !important; color: #92400E !important;
  font-size: 11px; font-weight: 800;
}
.demo-action:hover { background: #FEF3C7 !important; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(14,28,53,.5);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; visibility: hidden; transition: all .25s;
  backdrop-filter: blur(4px);
}
.modal-backdrop.show { opacity: 1; visibility: visible; }
.modal-box {
  background: #fff; border-radius: 18px; width: 100%; max-width: 480px;
  padding: 28px; box-shadow: 0 24px 48px rgba(14,28,53,.15);
  transform: translateY(20px) scale(.97); transition: transform .25s;
}
.modal-backdrop.show .modal-box { transform: translateY(0) scale(1); }
.modal-title {
  font-size: 16px; font-weight: 900; color: #1B3F6E;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #F1F5F9;
}

/* ── Sidebar Info Rows (job-detail, training-detail) ── */
.detail-section .info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid #F1F5F9;
}
.detail-section .info-row:last-child { border-bottom: none; }

/* ── Form Section Headers ── */
.form-card h3 {
  font-size: 14px;
}

/* ── Select Fix for RTL ── */
.form-card select.fi {
  padding-left: 38px;
}

/* ── Login Tabs ── */
.login-tabs {
  display: flex; gap: 0;
  margin-bottom: 20px; border-bottom: 2px solid #E8EDF5;
}
.login-tab {
  flex: 1; padding: 10px;
  font-size: 13px; font-weight: 800;
  background: none; border: none;
  cursor: pointer; border-bottom: 3px solid transparent;
  margin-bottom: -2px; font-family: 'Cairo', sans-serif;
  transition: all .15s; color: #94A3B8;
}
.login-tab.active { color: #1B3F6E; border-bottom-color: #C9922A; }
.login-tab:hover:not(.active) { color: #64748B; }

/* ── Company Select Card ── */
.company-select-btn {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px; margin-bottom: 8px;
  background: #F8FAFC; border: 1.5px solid #E8EDF5;
  cursor: pointer; font-family: 'Cairo', sans-serif;
  transition: all .15s; text-align: right;
}
.company-select-btn:hover { border-color: #C9922A; background: #FFFBEB; }

/* ── Dashboard Stat Card ── */
.dash-stat-card {
  background: #fff; border: 1.5px solid #E8EDF5; border-radius: 16px;
  padding: 20px; text-align: center;
  transition: all .25s;
  box-shadow: 0 2px 8px rgba(14,28,53,.03);
}
.dash-stat-card:hover {
  border-color: #C9922A;
  box-shadow: 0 6px 20px rgba(201,146,42,.1);
  transform: translateY(-2px);
}
.dash-stat-card .dsc-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; font-size: 20px;
}
.dash-stat-card .dsc-num {
  font-size: 26px; font-weight: 900; color: #1B3F6E; line-height: 1.2;
}
.dash-stat-card .dsc-label {
  font-size: 11px; font-weight: 700; color: #94A3B8; margin-top: 2px;
}

/* ── Toolbar Bar ── */
.toolbar-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  background: #fff; border: 1.5px solid #E8EDF5; border-radius: 16px;
  padding: 16px 20px; margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(14,28,53,.03);
}
.toolbar-stats {
  display: flex; gap: 20px; align-items: center;
}
.toolbar-stats .ts-item {
  text-align: center;
}
.toolbar-stats .ts-num {
  display: block; font-size: 18px; font-weight: 900; color: #1B3F6E; line-height: 1.2;
}
.toolbar-stats .ts-label {
  font-size: 10px; font-weight: 700; color: #94A3B8;
}

/* ── Jobs Sidebar Layout ── */
.jobs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}
.jobs-sidebar {
  position: sticky; top: 20px;
}
.sidebar-panel {
  background: #fff; border: 1.5px solid #E8EDF5; border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(14,28,53,.03);
}
.sidebar-title {
  font-size: 14px; font-weight: 900; color: #1B3F6E;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid #F1F5F9;
}
/* ── Sidebar Header (collapsible) ── */
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 900; color: #1B3F6E;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid #F1F5F9;
  cursor: pointer; user-select: none;
}
.sidebar-header:hover { color: #C9922A; }
.sidebar-toggle {
  font-size: 11px; color: #94A3B8; transition: color .15s;
}
.sidebar-header:hover .sidebar-toggle { color: #C9922A; }
.jobs-content {
  min-width: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .jobs-layout { grid-template-columns: 220px 1fr; gap: 14px; }
}
@media (max-width: 768px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .posting-card .card-stats { flex-wrap: wrap; }
  .posting-card .card-stats .stat-item { min-width: 60px; }
  .form-card { padding: 20px 18px 18px; }
  .tab-bar { padding: 0 4px; }
  .tab-btn { padding: 10px 14px; font-size: 12px; }
  .jobs-layout { grid-template-columns: 1fr; }
  .jobs-sidebar { position: static; }
}
@media (max-width: 640px) {
  .info-grid { grid-template-columns: 1fr; }
  .info-cell { border-left: none !important; }
  .candidate-card { flex-direction: column; align-items: stretch; }
  .candidate-card .cand-avatar { width: 36px; height: 36px; font-size: 14px; }
  .form-card { padding: 16px 14px 14px; }
  .posting-card { padding: 16px; }
  .toolbar-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .toolbar-stats { justify-content: center; }
  .toolbar-stats .ts-num { font-size: 15px; }
}
