/* Sawaid / TalentSea — app design system. Modern identity: deep ink + Keppel teal + Readex Pro, RTL-first. */
:root {
  --ink: #0E181D; --ink2: #16232A; --ink3: #1D2C34; --davy: #425563;
  --teal: #6BCABA; --teal-t: #2E8C7E; --teal-d: #1F6B5F; --sand: #F3CFB3;
  --canvas: #FFFFFF; --alt: #F5F7F7; --alt2: #EDF1F2;
  --bd: #E4EAEB; --bd2: #E7ECED;
  --body: #3C4C56; --body2: #5A6B76; --muted: #8B9AA4; --muted2: #9FB1BA;
  --red: #E56A54; --amber: #E56A54; --green: #1F6B5F; --blue: #425563;
  --ease: cubic-bezier(0.2,0.7,0.2,1);
  --shadow: 0 1px 2px rgba(14,24,29,.04), 0 8px 24px rgba(14,24,29,.06);
  --shadow-lg: 0 18px 48px rgba(14,24,29,.12);
  --sidebar: 264px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Readex Pro', system-ui, 'Segoe UI', sans-serif; font-weight: 300;
  background: var(--alt); color: var(--body); -webkit-font-smoothing: antialiased; }
[dir=rtl] body { text-align: right; }
a { color: var(--teal-t); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ink); }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--teal); color: var(--ink); }
.num { font-variant-numeric: tabular-nums; }
h1,h2,h3,h4 { font-weight: 500; color: var(--ink); margin: 0; }

/* ---------- Auth (login) ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-hero { background: var(--ink); color: #fff; position: relative; overflow: hidden; padding: 64px 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero__glow { position: absolute; top: -180px; inset-inline-start: -120px; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(107,202,186,.22) 0%, rgba(107,202,186,0) 65%); }
.auth-hero__glow2 { position: absolute; bottom: -220px; inset-inline-end: -160px; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(31,107,95,.18) 0%, rgba(31,107,95,0) 68%); }
.auth-hero__brand { position: relative; display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; }
.auth-hero__brand .logo { width: 40px; height: 40px; border-radius: 11px; background: var(--teal); color: var(--ink);
  display: grid; place-items: center; font-weight: 700; font-size: 20px; }
.auth-hero__mid { position: relative; }
.auth-hero__mid h1 { color: #fff; font-size: clamp(28px, 3vw, 42px); line-height: 1.3; font-weight: 500; max-width: 15ch; }
.auth-hero__mid p { color: var(--muted2); font-size: 18px; line-height: 1.8; margin-top: 18px; max-width: 42ch; }
.auth-hero__foot { position: relative; color: #6F838D; font-size: 13px; }
.auth-form-side { background: var(--canvas); display: grid; place-items: center; padding: 40px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 26px; margin-bottom: 8px; }
.auth-card .sub { color: var(--muted); font-size: 15px; margin-bottom: 32px; }
.field { display: block; margin-bottom: 18px; }
.field label { display: block; font-size: 14px; color: var(--body2); margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--bd); border-radius: 12px;
  background: #FBFCFC; font-size: 15px; color: var(--ink); transition: border-color .2s ease, background .2s ease; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); background: #fff; }
.field input.ltr { direction: ltr; text-align: start; }
.alert { padding: 13px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; }
.alert--error { background: #F7E0DE; color: #B7312C; border: 1px solid #EBB5B0; }
.alert--success { background: #E8F7F4; color: var(--teal-d); border: 1px solid #BFE3DC; }
.alert--info { background: #ECF0F3; color: var(--blue); border: 1px solid #D5DDE0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  border-radius: 100px; font-size: 15px; font-weight: 500; padding: 12px 24px; cursor: pointer; line-height: 1.2;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease; white-space: nowrap; }
.btn--primary { background: var(--teal); color: var(--ink); }
.btn--primary:hover { background: var(--ink); color: #fff; transform: translateY(-1px); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--teal-t); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--bd); color: var(--body); }
.btn--ghost:hover { border-color: var(--teal); color: var(--ink); }
.btn--block { width: 100%; padding: 14px; }
.btn--sm { padding: 8px 16px; font-size: 14px; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar__brand .logo { width: 38px; height: 38px; border-radius: 11px; background: var(--teal); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 19px; }
.sidebar__brand b { font-size: 19px; font-weight: 600; }
.sidebar__brand span { font-size: 12px; color: var(--muted); display: block; }
.nav { padding: 14px 12px; flex: 1; }
.nav__group { font-size: 11px; letter-spacing: .04em; color: #57696F; text-transform: uppercase; padding: 16px 12px 8px; }
[dir=rtl] .nav__group { letter-spacing: 0; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px; color: #A9BDC5; font-size: 15px; margin-bottom: 2px; transition: background .18s ease, color .18s ease; }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.active { background: rgba(107,202,186,.14); color: var(--teal); }
.nav a .ic { width: 20px; height: 20px; flex: 0 0 auto; opacity: .9; }
.nav a .badge { margin-inline-start: auto; background: rgba(255,255,255,.1); color: #C3D0D6; font-size: 12px; padding: 2px 9px; border-radius: 100px; }
.nav a.active .badge { background: var(--teal); color: var(--ink); }
.sidebar__user { padding: 14px; border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 12px; }
.sidebar__user .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ink3); color: var(--teal); display: grid; place-items: center; font-size: 14px; flex: 0 0 auto; }
.sidebar__user .meta b { font-size: 14px; color: #fff; display: block; }
.sidebar__user .meta span { font-size: 12px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { background: rgba(255,255,255,.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--bd); position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px; padding: 14px 30px; }
.topbar h1 { font-size: 20px; }
.topbar .crumbs { font-size: 13px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.topbar .searchbox { position: relative; }
.topbar .searchbox input { width: 300px; max-width: 40vw; padding: 10px 16px; border: 1px solid var(--bd); border-radius: 100px; background: var(--alt); font-size: 14px; }
.topbar .searchbox input:focus { outline: none; border-color: var(--teal); background: #fff; }
.iconbtn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--bd); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--body2); }
.iconbtn:hover { border-color: var(--teal); color: var(--ink); }
.lang-toggle { border: 1px solid var(--bd); background: #fff; border-radius: 100px; padding: 8px 16px; font-size: 14px; cursor: pointer; color: var(--body); }
.content { padding: 30px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h2 { font-size: 26px; }
.page-head .sub { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- Cards / stats / tables ---------- */
.card { background: #fff; border: 1px solid var(--bd); border-radius: 18px; box-shadow: var(--shadow); }
.card__body { padding: 24px; }
.card__head { padding: 20px 24px; border-bottom: 1px solid var(--bd); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card__head h3 { font-size: 17px; }
.grid { display: grid; gap: 20px; }
.grid--stats { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.stat { background: #fff; border: 1px solid var(--bd); border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat__ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; background: rgba(107,202,186,.14); color: var(--teal-t); }
.stat__v { font-size: 34px; font-weight: 600; color: var(--ink); line-height: 1; }
.stat__l { color: var(--muted); font-size: 14px; margin-top: 8px; }
.stat__d { position: absolute; inset-inline-end: 20px; top: 22px; font-size: 13px; font-weight: 500; }
.stat__d.up { color: var(--green); } .stat__d.down { color: var(--red); }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tbl th { text-align: start; font-weight: 500; font-size: 13px; color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--bd); background: var(--alt); }
table.tbl td { padding: 15px 18px; border-bottom: 1px solid var(--bd2); color: var(--body); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { transition: background .15s ease; }
table.tbl tbody tr:hover { background: var(--alt); }
.avatar-cell { display: flex; align-items: center; gap: 12px; }
.avatar-cell .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--alt2); color: var(--davy); display: grid; place-items: center; font-size: 13px; flex: 0 0 auto; }
.avatar-cell b { color: var(--ink); font-weight: 500; }
.avatar-cell span { font-size: 13px; color: var(--muted); display: block; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 12px; border-radius: 100px; background: var(--alt); border: 1px solid var(--bd); color: var(--body2); }
.badge-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 12px; border-radius: 100px; }
.badge-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-green { background: #E8F7F4; color: var(--green); } .s-teal { background: #E8F7F4; color: var(--teal-t); }
.s-amber { background: #FBEFE6; color: var(--amber); } .s-red { background: #F7E0DE; color: var(--red); }
.s-blue { background: #ECF0F3; color: var(--blue); } .s-gray { background: var(--alt2); color: var(--muted); }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--alt2); display: grid; place-items: center; margin: 0 auto 16px; color: var(--muted2); }
.soon { display: inline-flex; align-items: center; gap: 8px; background: rgba(107,202,186,.12); color: var(--teal-d); font-size: 13px; padding: 6px 14px; border-radius: 100px; border: 1px solid rgba(107,202,186,.3); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .grid--stats { grid-template-columns: repeat(2,1fr); } .grid--2, .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-inline-start: 0; top: 0; width: var(--sidebar); z-index: 60; transform: translateX(-100%); }
  [dir=rtl] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: none; }
  .content { padding: 20px; }
  .topbar { padding: 12px 18px; } .topbar .searchbox { display: none; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-hero { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.menu-btn { display: none; }
@media (max-width: 860px) { .menu-btn { display: grid; } }

/* brand logo (replaces the TS monogram) */
.brand-logo { display: block; line-height: 0; }
.brand-logo img { height: 52px; width: auto; display: block; }
.brand-img { height: 42px; width: auto; display: block; }
.auth-hero__brand .brand-img { height: 58px; }
.c-dhead__logo { background: #fff !important; padding: 8px; }
.c-dhead__logo img { width: 100%; height: auto; display: block; }
