.tgnia-hr-search{
    display:flex;
    gap:10px;
    margin-bottom:20px;
    flex-wrap:wrap;
}
.tgnia-hr-search input, .tgnia-hr-search select{
    padding:10px 12px;
    border:1px solid #ddd;
    border-radius:10px;
    min-width:220px;
}
.tgnia-hr-search button{
    padding:10px 14px;
    border:0;
    border-radius:10px;
    background:#111;
    color:#fff;
    cursor:pointer;
}

.tgnia-profile{
    background:#fff;
    border:1px solid #eee;
    border-radius:14px;
    box-shadow:0 2px 12px rgba(0,0,0,0.06);
    padding:20px;
    margin:18px 0;
}

.tgnia-company-bar{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:12px;
    padding-bottom:12px;
    border-bottom:1px dashed #eee;
}
.tgnia-company-logo{
    width:46px;
    height:46px;
    object-fit:cover;
    border-radius:10px;
    border:1px solid #eee;
}
.tgnia-company-name{
    font-weight:800;
    font-size:16px;
}

.tgnia-id-img{
    max-width:220px;
    border-radius:10px;
    border:1px solid #eee;
}
.tgnia-emp-name{
    margin:12px 0 6px;
    font-size:20px;
}

.tgnia-grid, .tgnia-dates{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    gap:12px;
    margin-top:14px;
}
.tgnia-kv{
    background:#f7f7f7;
    border:1px solid #f0f0f0;
    border-radius:12px;
    padding:10px 12px;
}
.tgnia-kv .k{
    font-size:12px;
    opacity:0.75;
    margin-bottom:4px;
    font-weight:700;
}
.tgnia-kv .v{
    font-size:14px;
    font-weight:700;
}

.status-green{color:#27ae60}
.status-red{color:#c0392b}
.expired{border-color:#f1c0c0;background:#fff5f5}
.expired .k, .expired .v{color:#c0392b}

.tgnia-section-title{
    margin:18px 0 10px;
    font-size:16px;
    font-weight:800;
}

.tgnia-files{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
    gap:10px;
}
.tgnia-file{
    display:block;
    text-align:center;
    padding:10px;
    border-radius:12px;
    background:#f1f1f1;
    text-decoration:none;
    font-weight:800;
    color:#111;
    border:1px solid #eee;
}

.tgnia-empty{
    padding:12px;
    background:#fff8e8;
    border:1px solid #ffe1a8;
    border-radius:12px;
}

/* ===== Fix: Companies list mobile view (Admin) - PRO ===== */
@media (max-width: 768px){

  body.post-type-tgnia_company .wp-list-table{
    border:0 !important;
  }

  body.post-type-tgnia_company .wp-list-table thead{
    display:none !important;
  }

  body.post-type-tgnia_company .wp-list-table,
  body.post-type-tgnia_company .wp-list-table tbody{
    display:block !important;
    width:100% !important;
  }

  body.post-type-tgnia_company .wp-list-table tr{
    display:block !important;
    width:100% !important;
    background:#fff !important;
    border:1px solid #e5e7eb !important;
    border-radius:14px !important;
    margin:12px 10px !important;
    padding:14px 14px 8px !important;
    box-shadow:0 8px 18px rgba(0,0,0,.04) !important;
    position:relative !important;
  }

  /* checkbox أعلى يسار */
  body.post-type-tgnia_company .wp-list-table td.check-column{
    display:block !important;
    position:absolute !important;
    top:12px !important;
    left:12px !important;
    padding:0 !important;
    width:auto !important;
    border:0 !important;
    background:transparent !important;
  }

  /* كل خلية تتحول لسطر عنوان + قيمة */
  body.post-type-tgnia_company .wp-list-table td{
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:12px !important;
    width:100% !important;
    border:0 !important;
    padding:10px 0 !important;
    text-align:right !important;
    white-space:normal !important;
    word-break:break-word !important;
    border-bottom:1px dashed #eef2f7 !important;
  }

  body.post-type-tgnia_company .wp-list-table tr td:last-child{
    border-bottom:0 !important;
  }

  /* عنوان الحقل (يطلع تلقائي من data-colname) */
  body.post-type-tgnia_company .wp-list-table td::before{
    content: attr(data-colname);
    font-weight:800 !important;
    color:#6b7280 !important;
    flex:0 0 115px !important;
    max-width:115px !important;
    line-height:1.4 !important;
  }

  /* قيمة الحقل */
  body.post-type-tgnia_company .wp-list-table td > *{
    max-width:calc(100% - 125px) !important;
  }

  /* اسم الشركة (title) يكون واضح ومميز */
  body.post-type-tgnia_company .wp-list-table td.column-title{
    display:block !important;
    padding-top:6px !important;
    padding-bottom:12px !important;
    border-bottom:1px solid #eef2f7 !important;
    text-align:right !important;
  }

  body.post-type-tgnia_company .wp-list-table td.column-title::before{
    content:"" !important;
    display:none !important;
  }

  body.post-type-tgnia_company .wp-list-table td.column-title strong,
  body.post-type-tgnia_company .wp-list-table td.column-title a{
    font-weight:900 !important;
    font-size:16px !important;
    color:#1d4ed8 !important;
    text-decoration:none !important;
  }

  /* شعار الشركة: توسيط + منع التضخم */
  body.post-type-tgnia_company .wp-list-table td img{
    max-width:80px !important;
    height:auto !important;
    display:block !important;
    margin:0 auto !important;
  }

  /* إصلاح عرض الإيميل والجوال داخل RTL */
  body.post-type-tgnia_company .wp-list-table td a,
  body.post-type-tgnia_company .wp-list-table td .email,
  body.post-type-tgnia_company .wp-list-table td .phone{
    direction:ltr !important;
    unicode-bidi:plaintext !important;
    text-align:left !important;
  }

}