/* =====================================================
   HLG-ONE Common UI Style
   ملف ستايل مشترك لكامل المشروع
   Path suggestion: /assets/css/hlg-one-common.css
===================================================== */

:root{
  --hlg-bg:#021d23;
  --hlg-dark:#00424f;
  --hlg-teal:#006a7a;
  --hlg-gold:#d4af37;
  --hlg-gold-soft:#ffd76a;
  --hlg-white:#ffffff;
  --hlg-text:#ffffff;
  --hlg-muted:rgba(255,255,255,.70);
  --hlg-border:rgba(212,175,55,.38);
  --hlg-line:rgba(255,255,255,.09);
  --hlg-card:rgba(255,255,255,.055);
  --hlg-card-2:rgba(255,255,255,.035);
  --hlg-danger:#ef4444;
  --hlg-success:#22c55e;
  --hlg-warning:#eab308;
  --hlg-info:#38bdf8;
  --hlg-radius:18px;
  --hlg-radius-lg:24px;
  --hlg-shadow:0 18px 45px rgba(0,0,0,.22);
  --hlg-font:"Tajawal", Arial, sans-serif;
}

html{
  direction:rtl;
}

body{
  margin:0;
  font-family:var(--hlg-font);
  background:
    radial-gradient(circle at 15% 12%, rgba(0,106,122,.48), transparent 34%),
    radial-gradient(circle at 85% 82%, rgba(212,175,55,.14), transparent 36%),
    linear-gradient(145deg,#011b21 0%,#003743 48%,#021d23 100%);
  color:var(--hlg-text);
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

/* ================= COMMON LAYOUT ================= */

.layout-content,
.layout-main,
.main-content,
.page-content,
.app-content,
.content,
.content-area{
  width:100%;
  max-width:none;
}

.hlg-page{
  width:100%;
  max-width:none;
  color:var(--hlg-text);
}

.hlg-wrap{
  width:100%;
  max-width:none;
  margin:0;
  padding:18px 24px;
}

.hlg-container{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:0 16px;
}

/* ================= GLASS CARD ================= */

.hlg-card,
.card,
.cardBox,
.formGrid,
.sessionsBox,
.topbar-local{
  border:1px solid var(--hlg-line);
  border-radius:var(--hlg-radius-lg);
  background:
    linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.03)),
    linear-gradient(135deg,rgba(0,66,79,.70),rgba(0,106,122,.25));
  box-shadow:var(--hlg-shadow);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

/* ================= HEADERS ================= */

.page-head,
.hlg-page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin:0 0 16px;
}

.pageTitle,
.hlg-page-title{
  margin:0;
  font-size:30px;
  line-height:1.15;
  color:#fff;
  font-weight:900;
}

.pageSub,
.hlg-page-sub{
  margin-top:6px;
  color:var(--hlg-muted);
  font-size:14px;
  line-height:1.8;
}

/* ================= TOPBAR / USER ================= */

.layout-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:82px;
  padding:12px 16px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
}

.welcome-user{
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
}

.welcome-user-img,
.welcome-avatar{
  width:64px;
  height:64px;
  min-width:64px;
  border-radius:16px;
  object-fit:cover;
  display:block;
  border:3px solid var(--hlg-gold);
  background:#fff;
  box-shadow:0 10px 24px rgba(0,0,0,.28);
}

.welcome-text{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:3px;
  min-width:0;
}

.welcome-name{
  color:#fff;
  font-size:18px;
  font-weight:900;
  line-height:1.25;
}

.welcome-branch{
  color:rgba(255,255,255,.75);
  font-size:12px;
}

.employee-status{
  font-size:12px;
  font-weight:900;
}

.layout-topbarActions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
  margin:0;
  padding:0;
}

/* ================= PERFORMANCE BOX ================= */

.performance-box.horizontal,
.performance-box.tight{
  flex:0 0 auto;
  width:320px;
  height:54px;
  margin:0;
  padding:8px 12px;
  border-radius:16px;
  border:1px solid rgba(212,175,55,.45);
  background:
    linear-gradient(135deg,rgba(255,255,255,.08),rgba(255,255,255,.02)),
    linear-gradient(135deg,rgba(0,66,79,.8),rgba(0,106,122,.35));
  display:grid;
  grid-template-columns:1fr 72px;
  grid-template-rows:auto auto;
  align-items:center;
  gap:5px 10px;
  box-shadow:0 10px 25px rgba(0,0,0,.18);
}

.performance-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:12px;
  font-weight:900;
  margin:0;
  color:#fff;
}

.performance-title strong{
  color:var(--hlg-gold-soft);
  font-size:15px;
}

.performance-progress{
  grid-column:1 / 2;
  height:6px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.13);
}

.performance-progress span{
  display:block;
  height:100%;
  border-radius:999px;
  transition:width .35s ease;
}

.performance-points{
  grid-column:2 / 3;
  grid-row:1 / 3;
  text-align:center;
  font-size:11px;
  font-weight:900;
  color:#fff;
  padding:7px 8px;
  border-radius:12px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.1);
}

.performance-owner-line{
  grid-column:1 / 3;
  text-align:center;
  color:var(--hlg-gold-soft);
  font-weight:900;
  font-size:13px;
}

/* ================= BUTTONS ================= */

.hlg-btn,
.btn,
.btnLink,
.btnPrimary,
.saveBtn,
.pickBtn,
button.hlg-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:0 16px;
  border-radius:14px;
  font-family:inherit;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
  transition:.18s ease;
  border:1px solid rgba(255,255,255,.10);
}

.hlg-btn-primary,
.btnPrimary,
.btnLink,
.saveBtn{
  background:linear-gradient(135deg,#ffd76a,#d4af37);
  color:#10262d;
  border-color:rgba(212,175,55,.35);
  box-shadow:0 12px 24px rgba(212,175,55,.18);
}

.hlg-btn-soft,
.btn,
.pickBtn{
  background:rgba(255,255,255,.06);
  color:#fff;
}

.hlg-btn:hover,
.btn:hover,
.btnLink:hover,
.btnPrimary:hover,
.saveBtn:hover,
.pickBtn:hover{
  transform:translateY(-2px);
  filter:brightness(1.05);
}

/* ================= FORMS ================= */

input,
select,
textarea{
  font-family:inherit;
}

.hlg-form-grid,
.form3,
.grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.row{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}

label{
  color:#fff;
  font-weight:900;
}

input,
select,
textarea{
  width:100%;
  border-radius:14px;
  border:1px solid var(--hlg-line);
  background:rgba(255,255,255,.055);
  color:#fff;
  outline:none;
  transition:.18s ease;
}

input,
select{
  min-height:44px;
  padding:0 14px;
}

textarea{
  min-height:130px;
  padding:12px 14px;
  resize:vertical;
  line-height:1.8;
}

input::placeholder,
textarea::placeholder{
  color:rgba(255,255,255,.45);
}

select option{
  background:#0b1f26;
  color:#fff;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(212,175,55,.55);
  box-shadow:0 0 0 4px rgba(212,175,55,.12);
  background:rgba(255,255,255,.075);
}

.span-2{ grid-column:span 2; }
.span-3{ grid-column:1 / -1; }

/* ================= MESSAGES ================= */

.msg,
.err,
.okBox{
  padding:11px 14px;
  border-radius:14px;
  border:1px solid var(--hlg-line);
  background:rgba(255,255,255,.055);
  line-height:1.8;
}

.msg.ok,
.okBox{
  border-color:rgba(52,211,153,.25);
  background:rgba(6,95,70,.18);
  color:#d1fae5;
}

.msg.err,
.err{
  border-color:rgba(248,113,113,.25);
  background:rgba(127,29,29,.18);
  color:#fecaca;
}

.muted{
  color:var(--hlg-muted);
  font-size:14px;
  line-height:1.7;
}

/* ================= TABLES ================= */

.hlg-table-wrap,
.sessionTableWrap{
  overflow:auto;
  border:1px solid var(--hlg-line);
  border-radius:14px;
  background:rgba(255,255,255,.03);
}

.hlg-table,
.sessionTable{
  width:100%;
  border-collapse:collapse;
  min-width:850px;
}

.hlg-table th,
.hlg-table td,
.sessionTable th,
.sessionTable td{
  padding:12px 10px;
  border-bottom:1px solid var(--hlg-line);
  text-align:right;
  white-space:nowrap;
}

.hlg-table th,
.sessionTable th{
  background:rgba(255,255,255,.04);
  font-weight:900;
  color:rgba(255,255,255,.72);
  font-size:13px;
}

/* ================= PILLS ================= */

.pill,
.tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--hlg-line);
  background:rgba(255,255,255,.06);
  font-weight:900;
  font-size:12px;
}

.pill.done,
.tag.new{
  background:rgba(34,197,94,.14);
  border-color:rgba(34,197,94,.25);
  color:#86efac;
}

.pill.postponed,
.tag.work{
  background:rgba(245,158,11,.14);
  border-color:rgba(245,158,11,.25);
  color:#fbbf24;
}

.pill.cancelled,
.tag.danger{
  background:rgba(239,68,68,.14);
  border-color:rgba(239,68,68,.25);
  color:#fca5a5;
}

.tag.court{
  background:rgba(59,130,246,.14);
  border-color:rgba(59,130,246,.25);
  color:#60a5fa;
}

/* ================= DASHBOARD COMMON ================= */

.stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.stat{
  min-height:126px;
  padding:20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-radius:24px;
  border:1px solid var(--hlg-border);
  background:
    linear-gradient(145deg,rgba(255,255,255,.10),rgba(255,255,255,.035)),
    linear-gradient(135deg,rgba(0,66,79,.80),rgba(0,106,122,.38));
  box-shadow:var(--hlg-shadow);
  overflow:hidden;
}

.stat .value{
  font-size:38px;
  line-height:1;
  color:var(--hlg-gold-soft);
  font-weight:900;
}

.stat .label{
  margin-top:8px;
  color:#fff;
  font-size:14px;
  font-weight:800;
}

.badgeIcon{
  width:58px;
  height:58px;
  border-radius:18px;
  background:linear-gradient(145deg,rgba(255,255,255,.18),rgba(255,255,255,.05));
  border:1px solid rgba(255,215,106,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  font-size:25px;
}

/* ================= RESPONSIVE ================= */

@media(max-width:1200px){
  .stats,
  .hlg-form-grid,
  .form3,
  .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .layout-topbar{
    flex-wrap:wrap;
  }

  .performance-box.horizontal,
  .performance-box.tight{
    width:100%;
    flex:1 1 100%;
  }

  .layout-topbarActions{
    width:100%;
    flex-wrap:wrap;
  }
}

@media(max-width:700px){
  .hlg-wrap{
    padding:14px;
  }

  .stats,
  .hlg-form-grid,
  .form3,
  .grid{
    grid-template-columns:1fr;
  }

  .span-2,
  .span-3{
    grid-column:1 / -1;
  }

  .pageTitle,
  .hlg-page-title{
    font-size:24px;
  }

  .welcome-avatar,
  .welcome-user-img{
    width:54px;
    height:54px;
    min-width:54px;
  }

  .welcome-name{
    font-size:15px;
  }
}
.cases-page .cases-table,
.cases-page table{
  width:100% !important;
  border-collapse:collapse !important;
  background:rgba(255,255,255,.035) !important;
  border-radius:18px !important;
  overflow:hidden !important;
}

.cases-page th{
  background:rgba(255,255,255,.06) !important;
  color:rgba(255,255,255,.78) !important;
  font-weight:900 !important;
  padding:13px 12px !important;
}

.cases-page td{
  padding:14px 12px !important;
  border-bottom:1px solid rgba(255,255,255,.07) !important;
  color:#fff !important;
}

.cases-page tr:hover td{
  background:rgba(255,255,255,.045) !important;
}

.cases-page .btn,
.cases-page .btnLink,
.cases-page .case-btn,
.cases-page a[href*="case_add"]{
  border-radius:14px !important;
  background:linear-gradient(135deg,#ffd76a,#d4af37) !important;
  color:#10262d !important;
  font-weight:900 !important;
  box-shadow:0 12px 24px rgba(212,175,55,.18) !important;
}
