/* ALH Translation Tracker — dark cards + muted purple borders */
.alh-tt-root{
  --bg:#0b0f1a;
  --panel:#0f1626;
  --panel2:#0c1220;
  --text:#e8ecff;
  --muted:#aab3d6;
  --muted2:#7f89b3;
  --border: rgba(140,120,255,0.35);
  --border2: rgba(140,120,255,0.22);
  --glow: rgba(140,120,255,0.18);
  --ok: rgba(68, 255, 171, 0.95);
  --bad: rgba(255, 92, 92, 0.95);
  --warn: rgba(255, 208, 90, 0.95);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Tajawal", "Noto Sans Arabic", "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 600px at 20% 10%, rgba(140,120,255,0.12), transparent 55%),
              radial-gradient(900px 500px at 80% 0%, rgba(80,120,255,0.10), transparent 60%),
              var(--bg);
  border: 1px solid var(--border2);
  border-radius: 18px;
  padding: 14px;
}

.alh-tt-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid var(--border2);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.alh-tt-topbar{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.alh-tt-brand{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.alh-tt-title{
  font-weight:800;
  letter-spacing:.2px;
  font-size:18px;
}
.alh-tt-sub{
  font-size:12px;
  color: var(--muted);
}

.alh-tt-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.alh-tt-btn{
  border:1px solid var(--border);
  background: rgba(140,120,255,0.10);
  color: var(--text);
  border-radius: 14px;
  padding: 9px 12px;
  cursor:pointer;
  transition: transform .08s ease, background .2s ease, border-color .2s ease;
  font-weight:700;
  font-size:12px;
  user-select:none;
}
.alh-tt-btn:hover{ background: rgba(140,120,255,0.16); border-color: rgba(140,120,255,0.55); }
.alh-tt-btn:active{ transform: translateY(1px); }

.alh-tt-btn.secondary{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
}
.alh-tt-btn.secondary:hover{ background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); }

.alh-tt-chip{
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 10px;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

.alh-tt-tabs{
  justify-content:center;

  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

/* Records tab: keep the page compact by showing a single table with internal scroll */
.alh-tt-records-wrap{
  max-height: 420px;
  overflow: auto;
  border:1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(0,0,0,0.14);
}
.alh-tt-records-wrap .alh-tt-table{
  margin:0;
  border:0;
}
.alh-tt-records-wrap thead th{
  position: sticky;
  top:0;
  z-index: 2;
}

.alh-tt-tab{
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 12px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.alh-tt-tab:hover{
  background: rgba(140,120,255,0.10);
  border-color: rgba(140,120,255,0.25);
  color: var(--text);
}
.alh-tt-tab.active{
  background: rgba(140,120,255,0.16);
  border-color: rgba(140,120,255,0.55);
  color: var(--text);
}

.alh-tt-grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
}

.alh-tt-col-12{ grid-column: span 12; }
.alh-tt-col-8{ grid-column: span 8; }
.alh-tt-col-6{ grid-column: span 6; }
.alh-tt-col-4{ grid-column: span 4; }
.alh-tt-col-3{ grid-column: span 3; }

@media (max-width: 1000px){
  .alh-tt-col-8,.alh-tt-col-6,.alh-tt-col-4,.alh-tt-col-3{ grid-column: span 12; }
}

.alh-tt-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:10px;
}
.alh-tt-label{
  font-size:12px;
  color: var(--muted);
  font-weight:800;
}
.alh-tt-input, .alh-tt-select, .alh-tt-textarea{
  width:100%;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(10,14,24,0.65);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  outline:none;
  font-size:13px;
}
.alh-tt-textarea{ min-height: 92px; resize: vertical; }
.alh-tt-input:focus, .alh-tt-select:focus, .alh-tt-textarea:focus{
  border-color: rgba(140,120,255,0.55);
  box-shadow: 0 0 0 3px var(--glow);
}

.alh-tt-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.alh-tt-muted{ color: var(--muted); }
.alh-tt-small{ font-size:12px; color: var(--muted2); }

/* ===== Glossary UI refinements (no layout redesign) ===== */
.alh-glo-head{ position:relative; display:flex; align-items:center; justify-content:center; padding-left:120px; }
.alh-glo-head .alh-tt-title{ margin:0; }
.alh-glo-print{
  position:absolute;
  left:0;
  top:0;
}

/* clearer section grouping backgrounds */
.alh-glo-panel{
  background: rgba(6,10,18,0.55);
  border:1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 12px;
}
.alh-glo-panel--add{ padding: 10px 12px; }
.alh-glo-panel--search{ padding: 12px; }
.alh-glo-panel--cats, .alh-glo-panel--terms{ padding: 12px; }

/* Glossary controls: unify input/select height (match search field) */
.alh-glo-controls .alh-tt-input,
.alh-glo-controls .alh-tt-select{
  height:54px;
  line-height:54px;
  padding-top:0;
  padding-bottom:0;
}

/* Center text inside glossary table columns (terms/categories) */
.alh-glo-panel--cats .alh-tt-input,
.alh-glo-panel--cats .alh-tt-select,
.alh-glo-panel--terms .alh-tt-input,
.alh-glo-panel--terms .alh-tt-select{
  text-align:center;
}

.alh-glo-panel .alh-tt-field{ margin-top:0; }

.alh-tt-table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.10);
}
.alh-tt-table th, .alh-tt-table td{
  padding: 10px 10px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  font-size:13px;
}
.alh-tt-table th{
  color: var(--muted);
  font-weight:900;
  background: rgba(255,255,255,0.03);
  text-align:start;
}
.alh-tt-table tr:last-child td{ border-bottom:none; }

.alh-tt-kpi{
  min-height: 86px;

  display:flex;
  flex-direction:column;
  gap:6px;
  padding: 12px;
  border-radius: 16px;
  border:1px solid var(--border2);
  background: rgba(255,255,255,0.02);
}
.alh-tt-kpi .k{ color: var(--muted); font-size:12px; font-weight:900; }
.alh-tt-kpi .v{
  text-align:center;
 font-size:18px; font-weight:900; letter-spacing:.2px; }

.alh-tt-progress{
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.08);
}
.alh-tt-progress > div{
  height:100%;
  width:0%;
  background: rgba(140,120,255,0.55);
}

/* Per-project progress bars */
.alh-tt-progress.done > div{ background: rgba(68,255,171,0.55); }
.alh-tt-projbars-wrap{
  margin-top: 10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height: 260px;
  overflow:auto;
  padding-right: 4px;
}
.alh-tt-projbar-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:6px;
}
.alh-tt-projbar-name{ font-weight:900; font-size:12px; color: rgba(240,240,255,0.92); }
.alh-tt-projbar-meta{ font-weight:800; font-size:12px; color: var(--muted); }

.alh-tt-alert{
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight:800;
  font-size:12px;
}
.alh-tt-alert.ok{ border-color: rgba(68,255,171,0.22); background: rgba(68,255,171,0.06); color: rgba(200,255,230,0.98); }
.alh-tt-alert.bad{ border-color: rgba(255,92,92,0.22); background: rgba(255,92,92,0.06); color: rgba(255,220,220,0.98); }
.alh-tt-alert.warn{ border-color: rgba(255,208,90,0.22); background: rgba(255,208,90,0.06); color: rgba(255,240,210,0.98); }

.alh-tt-split{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.alh-tt-split > *{ flex: 1 1 260px; }

.alh-tt-hr{ height:1px; background: rgba(255,255,255,0.08); margin: 12px 0; }

.alh-tt-dir-rtl{ direction: rtl; }
.alh-tt-dir-ltr{ direction: ltr; }

.alh-tt-table.center th, .alh-tt-table.center td{ text-align:center; }

.alh-tt-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size:12px;
  font-weight:900;
}

.alh-tt-input,.alh-tt-select{ width:100%; box-sizing:border-box; }

.alh-tt-table{ width:100%; table-layout:fixed; }

.alh-tt-pages{ display:flex; justify-content:center; gap:8px; flex-wrap:wrap; margin-top:12px; }
.alh-tt-page-btn{ padding:8px 12px; border-radius:14px; cursor:pointer; border:1px solid rgba(150,110,255,.35); background:rgba(20,22,35,.6); color:#e7e4ff; }
.alh-tt-page-btn.active{ background:rgba(120,80,255,.25); border-color:rgba(190,150,255,.55); }
.alh-tt-tag{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:14px; border:1px solid rgba(150,110,255,.25); background:rgba(14,16,25,.55); }
.alh-tt-inline{ display:flex; justify-content:center; gap:10px; flex-wrap:wrap; }
.alh-tt-select.small{ max-width:260px; }
.alh-tt-ellipsis{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.alh-tt-statbar{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:12px; margin-top:12px; }
@media (max-width: 1100px){ .alh-tt-statbar{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px){ .alh-tt-statbar{ grid-template-columns: 1fr; } }
.alh-tt-stat{ border:1px solid rgba(150,110,255,.25); background:rgba(14,16,25,.55); border-radius:18px; padding:14px; text-align:center; }

/* Glossary stats cards: darker bluish panel (match the provided mini screenshot) */
.alh-glo-panel .alh-tt-stat{
  background: linear-gradient(180deg, rgba(20,26,58,0.72), rgba(10,14,30,0.72));
}
.alh-tt-stat .k{ font-size:12px; opacity:.85; }
.alh-tt-stat .v{ font-size:28px; font-weight:800; margin-top:6px; }

/* Search "Result" card text was too large (e.g., تحقيق الهدف / متبقي / عجز). */
.alh-tt-stat.alh-tt-result-card .alh-tt-result-text{
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
}

.alh-tt-pill{ display:inline-flex; align-items:center; justify-content:center; padding:6px 10px; border-radius:999px; font-weight:700; border:1px solid rgba(150,110,255,.25); background:rgba(14,16,25,.55); }
.alh-tt-pill.good{ border-color:rgba(70,200,120,.45); background:rgba(70,200,120,.12); }
.alh-tt-pill.bad{ border-color:rgba(255,90,90,.45); background:rgba(255,90,90,.12); }
.alh-tt-pill.warn{ border-color:rgba(255,200,60,.45); background:rgba(255,200,60,.12); color:#fff0c0; }
.alh-tt-table td.center, .alh-tt-table th.center{ text-align:center !important; }

/* Search UI polish */
.alh-tt-search-actions{ display:flex; justify-content:center; width:100%; margin-top:12px; }
.alh-tt-search-run{ width:min(420px, 100%); min-height:46px; }
.alh-tt-inline input.alh-tt-input, .alh-tt-inline select.alh-tt-select{ height:46px; }
.alh-tt-inline input.alh-tt-input{ text-align:center; }
.alh-tt-inline select.alh-tt-select{ padding-top:0; padding-bottom:0; }
.alh-tt-table th, .alh-tt-table td{ text-align:center; }

/* Search result full-card background */
.alh-tt-result-card{ position:relative; overflow:hidden; text-align:center; }
.alh-tt-result-card .k{ text-align:center !important; }
.alh-tt-result-card .alh-tt-result-text{ font-weight:900; font-size:34px; line-height:1.1; text-align:center !important; padding-top:6px; }
.alh-tt-result-card.good{
  border-color: rgba(70,200,120,.55) !important;
  background: radial-gradient(800px 260px at 50% 40%, rgba(70,200,120,.22), rgba(10,12,18,.65) 60%) !important;
  box-shadow: 0 0 0 1px rgba(70,200,120,.22), 0 0 36px rgba(70,200,120,.18) inset;
}
.alh-tt-result-card.bad{
  border-color: rgba(255,90,90,.55) !important;
  background: radial-gradient(800px 260px at 50% 40%, rgba(255,90,90,.22), rgba(10,12,18,.65) 60%) !important;
  box-shadow: 0 0 0 1px rgba(255,90,90,.22), 0 0 36px rgba(255,90,90,.18) inset;
}
.alh-tt-result-card.warn{
  border-color: rgba(255,200,60,.55) !important;
  background: radial-gradient(800px 260px at 50% 40%, rgba(255,200,60,.20), rgba(10,12,18,.65) 60%) !important;
  box-shadow: 0 0 0 1px rgba(255,200,60,.20), 0 0 36px rgba(255,200,60,.16) inset;
}

.alh-tt-search-row .alh-tt-input,.alh-tt-search-row .alh-tt-select{height:46px;line-height:46px;text-align:center;}

/* Table status pill fixed size */
.alh-tt-table .alh-tt-pill{
  min-width: 170px;
  height: 44px;
  padding: 0 16px;
  border-radius: 14px; /* مستطيل ناعم */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: .2px;
}
.alh-tt-table .alh-tt-pill.good,
.alh-tt-table .alh-tt-pill.bad,
.alh-tt-table .alh-tt-pill.warn{
  box-shadow: 0 0 24px rgba(0,0,0,.25) inset;
}


/* status pill margin RIGHT (RTL explicit) */
.alh-tt-table .alh-tt-pill{
  margin-right: 12px; /* إزاحة لليمين */
  margin-left: 0;
}

.alh-tt-table td.status{
  padding-right: 18px; /* إزاحة العمود نفسه لليمين */
}

/* search table status shift RIGHT (target only search results table) */
.alh-tt-search-table td:nth-child(6){
  text-align: right !important;
  padding-right: 22px;
}
.alh-tt-search-table td:nth-child(6) .alh-tt-pill{
  margin-right: 0;
}

/* Table status pill fixed size */
.alh-tt-table .alh-tt-pill{min-width:170px;height:44px;padding:0 16px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;font-weight:800;}

/* Force status pills to the RIGHT edge in search results table (robust) */
.alh-tt-table td:last-child{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  padding-right:22px !important;
  padding-left:10px !important;
}
.alh-tt-table td:last-child .alh-tt-pill{
  margin: 0 !important;
}

/* Charts */
.alh-tt-chart-wrap{
  width: 100%;
  border: 1px solid rgba(160,110,255,.22);
  border-radius: 18px;
  padding: 12px;
  background: rgba(10,12,18,.35);
  box-shadow: 0 0 0 1px rgba(160,110,255,.10), 0 0 36px rgba(160,110,255,.10) inset;
}
.alh-tt-chart-canvas{
  width: 100%;
  height: 320px;
  display: block;
}


/* --- Vacations/Meetings table row alignment (keep rows on one level) --- */
.alh-tt-table th,
.alh-tt-table td{
  vertical-align: middle;
}

.alh-tt-search-table td{
  padding-top: 12px;
  padding-bottom: 12px;
}

.alh-tt-input, .alh-tt-select{
  min-height: 44px;
  box-sizing: border-box;
}

.alh-tt-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 34px;
}


/* Records table: center 'Done' values under header */
.alh-tt-table th.alh-tt-th-done,
.alh-tt-table td.alh-tt-td-done{
  text-align: center;
}
.alh-tt-table td.alh-tt-td-done .alh-tt-done-num{
  display: block;
  width: 100%;
  text-align: center;
}


/* === Vacations redesign (cards / equal fields / horizontal) === */
.alh-tt-vac-types-table,
.alh-tt-vac-list-table,
.alh-tt-meetings-table{
  width:100%;
  border-collapse:separate !important;
  border-spacing:0 10px; /* space between rows as cards */
}

.alh-tt-vac-types-table thead tr,
.alh-tt-vac-list-table thead tr,
.alh-tt-meetings-table thead tr{
  display:grid;
  align-items:center;
  gap:10px;
  background: linear-gradient(180deg, rgba(140,120,255,0.10), rgba(255,255,255,0.02));
  border:1px solid var(--border2);
  border-radius:14px;
  padding:10px 12px;
}

.alh-tt-vac-types-table tbody tr,
.alh-tt-vac-list-table tbody tr,
.alh-tt-meetings-table tbody tr{
  display:grid;
  align-items:center;
  gap:10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.012));
  border:1px solid var(--border2);
  border-radius:14px;
  padding:12px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

.alh-tt-vac-types-table tbody tr:hover,
.alh-tt-vac-list-table tbody tr:hover,
.alh-tt-meetings-table tbody tr:hover{
  border-color: var(--border);
  box-shadow: 0 10px 24px rgba(0,0,0,.35), 0 0 0 1px rgba(140,120,255,0.14) inset;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.016));
}

.alh-tt-vac-types-table tbody tr:focus-within,
.alh-tt-vac-list-table tbody tr:focus-within,
.alh-tt-meetings-table tbody tr:focus-within{
  border-color: rgba(140,120,255,0.65);
  box-shadow: 0 14px 34px rgba(0,0,0,.42), 0 0 0 2px rgba(140,120,255,0.22) inset;
}

/* Remove default table borders */
.alh-tt-vac-types-table th, .alh-tt-vac-types-table td,
.alh-tt-vac-list-table th, .alh-tt-vac-list-table td,
.alh-tt-meetings-table th, .alh-tt-meetings-table td{
  border:0 !important;
  padding:0 !important;
  background: transparent !important;
}

/* Column layouts */
.alh-tt-vac-types-table thead tr,
.alh-tt-vac-types-table tbody tr{
  grid-template-columns: 1fr 150px;
}

.alh-tt-vac-list-table thead tr,
.alh-tt-vac-list-table tbody tr{
  grid-template-columns: 1.55fr 1fr 1fr 1fr 0.75fr 150px;
}

.alh-tt-meetings-table thead tr,
.alh-tt-meetings-table tbody tr{
  grid-template-columns: 1.6fr 1fr 0.75fr 150px;
}

/* Make inputs/selects equal and full-width */
.alh-tt-vac-types-table .alh-tt-input,
.alh-tt-vac-list-table .alh-tt-input,
.alh-tt-meetings-table .alh-tt-input,
.alh-tt-vac-types-table .alh-tt-select,
.alh-tt-vac-list-table .alh-tt-select{
  width:100% !important;
  height:46px;
  line-height:46px;
  border-radius:14px;
}

/* Days field center */
.alh-tt-vac-list-table td:nth-child(5) .alh-tt-input{
  text-align:center !important;
  font-weight:700;
  color: var(--muted);
}

/* Delete column: force LEFT alignment (physical left) */
.alh-tt-vac-types-table thead tr > :last-child,
.alh-tt-vac-types-table tbody tr > :last-child,
.alh-tt-meetings-table thead tr > :last-child,
.alh-tt-meetings-table tbody tr > :last-child,
.alh-tt-vac-list-table thead tr > :last-child,
.alh-tt-vac-list-table tbody tr > :last-child{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  direction:ltr; /* keep left = left even in RTL */
}

.alh-tt-vac-types-table .alh-tt-btn,
.alh-tt-vac-list-table .alh-tt-btn,
.alh-tt-meetings-table .alh-tt-btn{
  height:42px;
  padding:0 14px;
  border-radius:14px;
}

/* Custom date picker inputs (our dark popup) */
.alh-tt-datepop-input{
  direction:ltr;
  text-align:center;
  cursor:pointer;
}

/* Meetings hours: centered number */
.alh-tt-hours-input{
  text-align:center !important;
}

/* Generic centered numeric input (used in Stats - Done words) */
.alh-tt-input-center{
  text-align:center !important;
  direction:ltr;
}

/* Stats: last 10 days log - center the Done column numbers */
.alh-tt-search-table thead th,
.alh-tt-search-table tbody td{
  vertical-align: middle;
}
.alh-tt-search-table thead th:nth-child(2){
  text-align:center !important;
}
.alh-tt-search-table tbody td:nth-child(2){
  text-align:center !important;
}

/* Clickable log row (for quick delete selection) */
.alh-tt-log-row{
  cursor:pointer;
}
.alh-tt-log-row.is-active td{
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}


/* Date inputs (custom pop): keep readable */
.alh-tt-vac-list-table .alh-tt-datepop-input,
.alh-tt-meetings-table .alh-tt-datepop-input,
.alh-tt-input.alh-tt-date{
  direction:ltr;
  text-align:center;
  font-size: 16px;
  caret-color: transparent;
}

/* Hours number: center */
.alh-tt-meetings-table .alh-tt-hours-input{
  text-align:center !important;
  direction:ltr;
}



/* --- Vacations/Meetings headers: center titles perfectly within columns --- */
.alh-tt-vac-types-table thead th,
.alh-tt-vac-list-table thead th,
.alh-tt-meetings-table thead th{
  text-align: center !important;
}

/* Ensure header titles are centered within each grid column (not just text-align) */
.alh-tt-vac-types-table thead tr > *,
.alh-tt-vac-list-table thead tr > *,
.alh-tt-meetings-table thead tr > *{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 44px;
  line-height: 1;
}

/* Keep the last (actions) header cell aligned with the delete column */
.alh-tt-vac-types-table thead tr > :last-child,
.alh-tt-vac-list-table thead tr > :last-child,
.alh-tt-meetings-table thead tr > :last-child{
  justify-content:flex-start;
}

/* Keep empty action header cell aligned and sized consistently */
.alh-tt-vac-types-table thead th:last-child,
.alh-tt-vac-list-table thead th:last-child,
.alh-tt-meetings-table thead th:last-child{
  width: 90px;
}



/* Glossary search custom autocomplete (history + suggestions) */
.alh-tt-acwrap{
  position:relative;
  width:100%;
}
.alh-tt-acbox{
  position:absolute;
  top: calc(100% + 8px);
  left:0;
  right:0;
  z-index: 50;
  background: rgba(15,22,38,0.98);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  overflow:hidden;
  max-height: 260px;
  overflow-y:auto;
}
.alh-tt-acrow{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  cursor:pointer;
  user-select:none;
}

/* Per-row direction so the delete button stays adjacent to the suggestion text.
   - For Arabic suggestions: button appears next to the word on the left side (RTL)
   - For English suggestions: default LTR layout (word then button)
*/
.alh-tt-acrow{justify-content:flex-start;}

.alh-tt-acrow.rtl{
  direction: rtl;
  justify-content: flex-end;
}
.alh-tt-acrow.rtl .alh-tt-actext{order:1;}
.alh-tt-acrow.rtl .alh-tt-acdel{order:0;}
.alh-tt-acrow:hover{
  background: rgba(140,120,255,0.08);
}
.alh-tt-actext{
  flex:1 1 auto;
  min-width:0;
  color: var(--text);
  font-size: 13px;
  text-align: start;
  /* Make mixed Arabic/English render correctly */
  unicode-bidi: plaintext;
  direction: auto;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.alh-tt-acrow.has-del .alh-tt-actext{
  flex:0 1 auto;
  max-width: calc(100% - 92px);
}

/* When RTL + has delete, keep the text from expanding and pushing the button away */
.alh-tt-acrow.rtl.has-del .alh-tt-actext{
  flex:0 1 auto;
  max-width: calc(100% - 92px);
}
.alh-tt-acdel{
  flex:0 0 auto;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,14,24,0.55);
  color: var(--muted);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  cursor:pointer;
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
}
.alh-tt-acrow:hover .alh-tt-acdel{
  opacity: 1;
}
.alh-tt-acdel:hover{
  color: var(--text);
  transform: translateY(-1px);
  border-color: var(--border);
}


/* v0.1.12.4.23 — Glossary alignment refinements (requested) */

/* Ensure top glossary labels are centered within their columns */
.alh-glo-controls .alh-tt-label.center{
  width:100%;
  text-align:center;
}

/* Make the in-table 'القسم' field (and other term row controls) match search height */
.alh-glo-panel--terms .alh-tt-input,
.alh-glo-panel--terms .alh-tt-select{
  height:54px;
  line-height:54px;
  padding-top:0;
  padding-bottom:0;
}

/* Category names should be right-aligned (restore) */
.alh-glo-panel--cats .alh-tt-input{
  text-align:right;
}



/* v0.1.12.4.25 - TRUE center for glossary header labels inside their columns */
.alh-glo-panel--search .alh-tt-label.center,
.alh-glo-panel--filters .alh-tt-label.center,
.alh-glo-panel--add .alh-tt-label.center{
  display:flex !important;
  align-items:center;
  justify-content:center;
  text-align:center !important;
  width:100% !important;
}

/* Center the 'القسم' select text inside term rows (table) */
.alh-glo-panel--terms select.alh-tt-select{
  text-align:center !important;
  text-align-last:center !important;
}
.alh-glo-panel--terms select.alh-tt-select option{
  text-align:center;
}


/* Glossary/Project small button */
.alh-tt-btn-xs{padding:8px 10px;font-size:12px;line-height:1.1;min-height:36px;height:36px}


/* Projects: keep action buttons on one line */
.alh-proj-table td:last-child{ white-space: nowrap; }
.alh-proj-table .alh-tt-btn{ white-space: nowrap; }
/* Center alignment for all Project table columns (requested) */
.alh-proj-table th,
.alh-proj-table td{ text-align: center; vertical-align: middle; }
.alh-proj-table input,
.alh-proj-table select{ text-align: center; }

/* Projects: insert analysis words button next to total words input */
.alh-proj-words-wrap{
  display:flex;
  align-items:center;
  gap:10px;
}
.alh-proj-words-wrap .alh-tt-input{ flex:1; }
.alh-proj-insert{ padding:10px 12px; }


/* v0.1.12.4.30 - Projects UX tweaks (active chip + date centering) */
.alh-tt-proj-namewrap{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  line-height:1.15;
}
.alh-tt-proj-name{
  max-width:100%;
  overflow-wrap:anywhere;
}
.alh-tt-chip-active{
  background: rgba(0, 255, 90, 0.18) !important;
  border-color: rgba(0, 255, 90, 0.55) !important;
  color: #00ff5a !important;
  box-shadow: 0 0 0 1px rgba(0,255,90,0.35), 0 0 18px rgba(0,255,90,0.25);
}

/* Center date value inside date inputs */
.alh-proj-table input[type="date"]{
  text-align:center;
}
.alh-proj-table input[type="date"]::-webkit-datetime-edit,
.alh-proj-table input[type="date"]::-webkit-date-and-time-value{
  text-align:center;
}


/* v0.1.12.4.31 - Projects: active project is indicated by green name only, and dates are truly centered */
.alh-proj-table .alh-tt-proj-name.is-active{
  color: #00ff4c !important;
  text-shadow: 0 0 10px rgba(0,255,76,.35);
}
.alh-proj-table th,
.alh-proj-table td{
  text-align: center;
}
.alh-proj-table td input[type="date"],
.alh-proj-table td input[type="number"]{
  text-align: center !important;
}
.alh-proj-table td input[type="date"]{
  direction: ltr;
}


/* --- Projects: custom dark date picker --- */
.alh-tt-datepop{
  position: fixed;
  z-index: 99999;
  width: 320px;
  background: #070a12;
  border: 1px solid rgba(140,120,255,0.35);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.60);
  padding: 10px;
  display:none;
  box-sizing: border-box;
  overflow: hidden;
}
.alh-tt-datepop-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}
.alh-tt-datepop-title{
  font-weight: 800;
  font-size: 16px;
  text-align:center;
  color: #eef;
  flex:1;
}
.alh-tt-datepop-nav{
  width: 38px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(140,120,255,0.35);
  background: rgba(20,24,38,0.7);
  color:#fff;
  cursor:pointer;
}
.alh-tt-datepop-week{
  display:grid;
  grid-template-columns: repeat(7,1fr);
  gap:6px;
  margin-bottom: 6px;
  opacity: 0.9;
}
.alh-tt-datepop-week span{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 12px;
  color: rgba(230,230,255,0.85);
  padding: 6px 0;
}
.alh-tt-datepop-days{
  display:grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap:5px;
  width:100%;
  box-sizing:border-box;
}
.alh-tt-datepop-day,
.alh-tt-datepop-days .is-empty{
  min-width:0;
  width:100%;
  box-sizing:border-box;
}
.alh-tt-datepop-day{
  font-size:16px;
  height:34px;
  border-radius: 12px;
  border: 1px solid rgba(140,120,255,0.20);
  background: rgba(12,16,26,0.9);
  color: #fff;
  cursor:pointer;
  font-weight:700;
}
.alh-tt-datepop-day:hover{
  border-color: rgba(140,120,255,0.55);
  box-shadow: 0 0 0 3px rgba(140,120,255,0.10);
}
.alh-tt-datepop-days .is-empty{
  height:34px;
}

/* make project date inputs look centered and consistent */
.alh-tt-date{
  text-align:center !important;
  letter-spacing: 0.3px;
  color: rgba(140,180,255,0.95);
  font-weight: 700;
}


/* Last 10 days log: center headers and values (numbers + dates) */
.alh-tt-log-row td{
  text-align: center !important;
  vertical-align: middle;
}
.alh-tt-log-row td b{
  display: inline-block;
  width: 100%;
  text-align: center !important;
}
.alh-tt-log-row td:first-child{
  text-align: center !important;
}
.alh-tt-log-row td:last-child{
  text-align: center !important;
}


/* Message KPI (congrats/notice/warning/motivation) */
.alh-tt-msgkpi{
  min-height: 86px;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding: 12px;
  border-radius: 16px;
  border:1px solid var(--border2);
  background: rgba(255,255,255,0.02);
  position:relative;
  overflow:hidden;
}
.alh-tt-msgkpi .k{
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .2px;
  display:flex;
  align-items:center;
  gap:8px;
}
.alh-tt-msgkpi .m{
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}
.alh-tt-msgkpi.success{
  border-color: rgba(68, 255, 171, 0.35);
  background: linear-gradient(135deg, rgba(68, 255, 171, 0.10), rgba(255,255,255,0.02));
}
.alh-tt-msgkpi.warning{
  border-color: rgba(255, 208, 90, 0.35);
  background: linear-gradient(135deg, rgba(255, 208, 90, 0.10), rgba(255,255,255,0.02));
}
.alh-tt-msgkpi.danger{
  border-color: rgba(255, 92, 92, 0.35);
  background: linear-gradient(135deg, rgba(255, 92, 92, 0.10), rgba(255,255,255,0.02));
}
.alh-tt-msgkpi.info{
  border-color: rgba(140,120,255,0.35);
  background: linear-gradient(135deg, rgba(140,120,255,0.10), rgba(255,255,255,0.02));
}


/* Inline alert (used in Glossary search) */
.alh-tt-inline-alert{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(140,120,255,0.25);
  background: rgba(255,255,255,0.03);
  color: #e7e9ff;
  text-align:center;
  font-size: 13px;
}
.alh-tt-inline-alert.warn{
  border-color: rgba(255,203,77,0.35);
  background: rgba(255,203,77,0.08);
  color: #ffe7a6;
}
.alh-tt-inline-alert.bad{
  border-color: rgba(255,77,77,0.35);
  background: rgba(255,77,77,0.08);
  color: #ffd0d0;
}
.alh-tt-inline-alert.ok{
  border-color: rgba(90,255,140,0.35);
  background: rgba(90,255,140,0.08);
  color: #c9ffd9;
}
