/* DealGini HR — same shell as the CRM: dark left sidebar (desktop), slim top bar, bottom tab bar (phone) */
:root { --dgs-side:210px; --dgs-top:52px; }
.dgs-side,.dgs-top,.dgs-tabbar,.dgs-sheet,.dgs-backdrop { display:none; }
body.dgs-on { --nav-h:var(--dgs-top); }
body.dgs-on .crm-nav { display:none !important; }

@media (min-width: 769px) {
  body.dgs-on .dgs-side { display:flex; flex-direction:column; position:fixed; top:0; left:0; bottom:0; width:var(--dgs-side); background:#1a2035; z-index:1100; overflow-y:auto; }
  body.dgs-on .dgs-top  { display:flex; align-items:center; gap:12px; position:fixed; top:0; left:var(--dgs-side); right:0; height:var(--dgs-top); background:#1a2035; padding:0 16px; z-index:1000; box-shadow:0 2px 10px rgba(0,0,0,.25); }
  body.dgs-on .page-wrap { margin-left:var(--dgs-side); max-width:none; }
  body.dgs-on .profile-overlay { left:var(--dgs-side); }
}
.dgs-brand { display:flex; align-items:center; gap:8px; padding:14px 14px 12px; border-bottom:1px solid rgba(255,255,255,.07); text-decoration:none; }
.dgs-brand img { height:28px; border-radius:6px; }
.dgs-brand .t { color:#fff; font-weight:800; font-size:15px; line-height:1.1; }
.dgs-brand .t b { color:#ef4444; font-weight:800; }
.dgs-brand .s { color:rgba(255,255,255,.35); font-size:10px; margin-top:1px; font-weight:500; }
.dgs-sec { padding:14px 10px 4px; }
.dgs-lbl { font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#aab4cf; padding:0 8px; margin-bottom:5px; }
.dgs-link { display:flex; align-items:center; gap:9px; padding:9px 10px; margin-bottom:2px; border-radius:10px; color:#d5dbea; text-decoration:none; font-size:14px; font-weight:500; cursor:pointer; white-space:nowrap; }
.dgs-link i { font-size:15px; width:18px; text-align:center; flex-shrink:0; }
.dgs-link:hover { background:rgba(255,255,255,.08); color:#fff; }
.dgs-link.active { background:#1a56db; color:#fff; font-weight:700; }
.dgs-user { margin-top:auto; padding:12px 14px; border-top:1px solid rgba(255,255,255,.07); display:flex; align-items:center; gap:10px; }
.dgs-av { width:32px; height:32px; border-radius:50%; background:#1a56db; color:#fff; font-weight:700; font-size:13px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.dgs-un { color:#fff; font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dgs-ur { color:rgba(255,255,255,.4); font-size:11px; }
.dgs-top .who { margin-left:auto; color:rgba(255,255,255,.8); font-size:13px; font-weight:500; }
.dgs-top .out { background:#dc2626; color:#fff; border:0; border-radius:8px; padding:7px 14px; font:700 13px 'DM Sans',sans-serif; cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
.dgs-top .ttl { color:#fff; font-weight:700; font-size:15px; }

@media (max-width: 768px) {
  body.dgs-on.dgs-phone { padding-bottom:calc(64px + 20px + env(safe-area-inset-bottom)); }
  body.dgs-on.dgs-phone .dgs-top { display:flex; align-items:center; position:fixed; top:0; left:0; right:0; height:56px; background:#1a2035; padding:0 16px; z-index:1000; gap:10px; }
  body.dgs-on.dgs-phone { --nav-h:56px; }
  body.dgs-on.dgs-phone .dgs-top .ttl { font-size:16px; }
  body.dgs-on.dgs-phone .dgs-top .out { display:none; }
  body.dgs-on:not(.dgs-phone) .crm-nav { display:flex !important; }
  body.dgs-on.dgs-phone .dgs-tabbar { display:flex; align-items:center; justify-content:space-around; position:fixed; left:0; right:0; bottom:0; z-index:1050; height:calc(64px + env(safe-area-inset-bottom)); padding:0 4px env(safe-area-inset-bottom); background:#fff; border-top:1px solid #dce3f0; box-shadow:0 -2px 12px rgba(26,32,53,.08); }
  .dgs-tab { flex:1 1 0; min-width:0; height:64px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:#5a688a; font-size:11px; font-weight:600; background:none; border:0; font-family:inherit; cursor:pointer; text-decoration:none; }
  .dgs-tab i { font-size:21px; line-height:1; }
  .dgs-tab.active { color:#1a56db; font-weight:700; }
  .dgs-backdrop { position:fixed; inset:0; background:rgba(26,32,53,.5); z-index:1290; }
  body.dgs-on.dgs-phone .dgs-backdrop.open { display:block; }
  body.dgs-on.dgs-phone .dgs-sheet { display:block; position:fixed; left:0; right:0; bottom:0; z-index:1300; background:#fff; border-radius:18px 18px 0 0; max-height:82vh; overflow-y:auto; padding:8px 16px calc(20px + env(safe-area-inset-bottom)); transform:translateY(105%); transition:transform .22s ease; box-shadow:0 -8px 30px rgba(26,32,53,.25); }
  body.dgs-on.dgs-phone .dgs-sheet.open { transform:translateY(0); }
  .dgs-grip { width:42px; height:5px; border-radius:3px; background:#dce3f0; margin:4px auto 12px; }
  .dgs-sg { font-size:11px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:#5a688a; margin:16px 0 6px; }
  .dgs-sl { display:flex; align-items:center; gap:12px; min-height:48px; padding:0 8px; border-radius:10px; color:#1a2035; text-decoration:none; font-size:15px; font-weight:600; cursor:pointer; }
  .dgs-sl i { font-size:19px; width:24px; text-align:center; color:#1a56db; }
  .dgs-sl.active { background:#e8f0fd; color:#1240a8; }
  .dgs-sl.out { color:#991b1b; margin-top:12px; border-top:1px solid #dce3f0; border-radius:0; }
  .dgs-sl.out i { color:#991b1b; }
}
/* one body size for all of HR, same as the CRM */
body.dgs-on, body.dgs-on html { font-size:14px; }

/* ═════════ PAGE POLISH — same quality as the CRM (v2) ═════════ */
body.dgs-on { font-size:14px; line-height:1.45; -webkit-font-smoothing:antialiased; }
body.dgs-on .page-wrap { padding-top:calc(var(--nav-h) + 20px); padding-left:22px; padding-right:22px; }

/* page headers */
body.dgs-on .page-hdr, body.dgs-on .page-header { margin-bottom:18px; gap:12px; }
body.dgs-on .page-hdr h1, body.dgs-on .page-header h1 { font-size:24px; font-weight:800; letter-spacing:-.01em; color:#1a2035; }
body.dgs-on .page-hdr p, body.dgs-on .page-header p { font-size:13px; color:#5a688a; }

/* cards: flat, bordered, rounded like the CRM */
body.dgs-on .card, body.dgs-on .card-surface, body.dgs-on .profile-card, body.dgs-on .emp-card { background:#fff; border:1px solid #dce3f0; border-radius:14px; box-shadow:0 1px 2px rgba(26,32,53,.04); }
body.dgs-on .card { padding:18px 20px; }
body.dgs-on .card-title, body.dgs-on .section-title, body.dgs-on .sec-ctrl-title { font-size:16px; font-weight:700; letter-spacing:-.005em; }
body.dgs-on .card-title { padding-bottom:12px; margin-bottom:14px; border-bottom:1px solid #eef2f9; }
body.dgs-on .card-title-left i, body.dgs-on .sec-ctrl-title i { color:#1a56db; }

/* KPI cards: bigger numbers, calmer labels */
body.dgs-on .stat-card, body.dgs-on .pipeline-card { border-radius:14px; padding:16px 18px; }
body.dgs-on .stat-card .num { font-size:30px; font-weight:800; }
body.dgs-on .stat-card h6 { font-size:13px; }

/* tables: readable header, zebra-free, soft hover */
body.dgs-on .tbl-wrap, body.dgs-on .tm-tblwrap { border:1px solid #dce3f0; border-radius:14px; box-shadow:none; background:#fff; }
body.dgs-on th { font-size:11.5px; font-weight:700; letter-spacing:.06em; color:#5a688a; background:#f4f7fc; padding:12px 16px; border-bottom:1px solid #dce3f0; }
body.dgs-on td { padding:13px 16px; font-size:14px; border-bottom:1px solid #eef2f9; }
body.dgs-on tr:hover td { background:#f7faff; }
body.dgs-on .tm-tbl th { font-size:11.5px; background:#f4f7fc; color:#5a688a; padding:12px 16px; }
body.dgs-on .tm-tbl td { padding:13px 16px; }

/* chips / status pills */
body.dgs-on .chip { font-size:11.5px; font-weight:700; padding:4px 10px; letter-spacing:.03em; }

/* buttons: solid, 40px, clear hierarchy */
body.dgs-on .btn, body.dgs-on .btn-outline, body.dgs-on .btn-secondary { min-height:38px; padding:8px 16px; border-radius:10px; font-size:14px; font-weight:700; letter-spacing:0; transition:background .15s, box-shadow .15s, transform .05s; }
body.dgs-on .btn:active { transform:scale(.98); }
body.dgs-on .btn:hover { opacity:1; box-shadow:0 2px 8px rgba(26,32,53,.15); }
body.dgs-on .btn-primary { background:#1a56db; } body.dgs-on .btn-primary:hover { background:#1240a8; }
body.dgs-on .btn-success { background:#059669; } body.dgs-on .btn-danger { background:#dc2626; }
body.dgs-on .btn-outline { background:#fff; border:1.5px solid #cdd6e8; color:#1a2035; }
body.dgs-on .btn-outline:hover { border-color:#1a56db; color:#1a56db; background:#f4f8ff; box-shadow:none; }
body.dgs-on .btn-sm { min-height:32px; padding:5px 12px; font-size:13px; border-radius:8px; }

/* inputs */
body.dgs-on .f-field input, body.dgs-on .f-field select, body.dgs-on .f-field textarea,
body.dgs-on .finput, body.dgs-on .search-wrap input, body.dgs-on .search-input, body.dgs-on .tm-form input, body.dgs-on select, body.dgs-on input[type=date], body.dgs-on input[type=month] {
  min-height:42px; border:1.5px solid #cdd6e8; border-radius:10px; background:#fff; font-size:14px; }
body.dgs-on .f-field input:focus, body.dgs-on .f-field select:focus, body.dgs-on .f-field textarea:focus, body.dgs-on .finput:focus, body.dgs-on .search-wrap input:focus {
  border-color:#1a56db; box-shadow:0 0 0 3px rgba(26,86,219,.12); outline:none; }
body.dgs-on .f-field label, body.dgs-on .flabel { font-size:13px; font-weight:700; color:#1a2035; }

/* filter bar + tabs */
body.dgs-on .filter-bar { gap:10px; }
body.dgs-on .inner-tabs { background:#e9eef8; border-radius:12px; padding:4px; max-width:100%; overflow-x:auto; }
body.dgs-on .inner-tab { padding:8px 16px; font-size:14px; white-space:nowrap; }
body.dgs-on .inner-tab.active { color:#1a56db; box-shadow:0 1px 3px rgba(26,32,53,.12); }

/* rows & lists */
body.dgs-on .att-row, body.dgs-on .report-row, body.dgs-on .notice-item, body.dgs-on .dir-row, body.dgs-on .holiday-row, body.dgs-on .att-hist-row { padding-top:12px; padding-bottom:12px; }
body.dgs-on .att-av { width:38px; height:38px; font-size:13px; }
body.dgs-on .att-name { font-size:15px; }
body.dgs-on .leave-item { background:#f4f7fc; border:1px solid #e3e9f5; border-radius:12px; padding:14px 16px; }
body.dgs-on .doc-item { border-radius:14px; }
body.dgs-on .empty, body.dgs-on .empty-state { padding:44px 20px; }

/* modals */
body.dgs-on .modal-bg { background:rgba(26,32,53,.55); backdrop-filter:blur(2px); }
body.dgs-on .modal-box { border-radius:18px; box-shadow:0 24px 70px rgba(26,32,53,.35); }
body.dgs-on .modal-title { font-size:19px; font-weight:800; }

/* toast */
body.dgs-on .toast { border-radius:12px; padding:12px 20px; font-size:14px; box-shadow:0 8px 24px rgba(26,32,53,.3); }

/* ═════════ PHONE ═════════ */
@media (max-width:768px) {
  body.dgs-on .page-wrap { padding:calc(var(--nav-h) + 14px) 14px 24px; }
  body.dgs-on .page-hdr, body.dgs-on .page-header { flex-direction:column; align-items:stretch; margin-bottom:14px; }
  body.dgs-on .page-hdr h1, body.dgs-on .page-header h1 { font-size:21px; }
  body.dgs-on .page-hdr-actions { width:100%; }
  body.dgs-on .page-hdr-actions .btn, body.dgs-on .page-hdr-actions select, body.dgs-on .page-hdr-actions input { flex:1 1 auto; justify-content:center; min-height:44px; }
  body.dgs-on .card { padding:14px; border-radius:14px; margin-bottom:12px; }
  body.dgs-on .card-title { font-size:15px; flex-wrap:wrap; }
  body.dgs-on .stat-row, body.dgs-on .emp-stat-row, body.dgs-on .pipeline-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  body.dgs-on .stat-card, body.dgs-on .pipeline-card { padding:14px; }
  body.dgs-on .stat-card .num { font-size:26px; }
  body.dgs-on .two-col, body.dgs-on .three-col, body.dgs-on .content-grid { grid-template-columns:1fr; gap:12px; }
  /* 44px tap targets, 16px text so iOS never zooms */
  body.dgs-on .btn, body.dgs-on .btn-outline, body.dgs-on .btn-secondary { min-height:44px; }
  body.dgs-on .btn-sm { min-height:38px; padding:7px 14px; }
  body.dgs-on input, body.dgs-on select, body.dgs-on textarea { font-size:16px !important; min-height:46px; }
  body.dgs-on .filter-bar { flex-direction:column; align-items:stretch; }
  body.dgs-on .filter-bar > *, body.dgs-on .search-wrap { width:100%; min-width:0; flex:1 1 auto; }
  body.dgs-on .sec-ctrl { flex-direction:column; align-items:stretch; }
  body.dgs-on .inner-tabs { width:100%; }
  body.dgs-on .inner-tab { flex:1 0 auto; padding:10px 14px; }
  /* tables scroll sideways instead of vanishing, where no card list exists */
  body.dgs-on .tbl-wrap, body.dgs-on .tm-tblwrap, body.dgs-on .wk-wrap { -webkit-overflow-scrolling:touch; }
  body.dgs-on .tbl-wrap table { display:table; min-width:640px; }
  body.dgs-on .tbl-wrap:has(+ .mobile-cards) table { display:none; }
  body.dgs-on .mobile-cards .emp-card { padding:14px; border-radius:14px; margin-bottom:10px; }
  body.dgs-on td, body.dgs-on th { padding:11px 12px; }
  /* modals become bottom sheets */
  body.dgs-on .modal-bg { align-items:flex-end; padding:0; }
  body.dgs-on .modal-box { max-width:100% !important; width:100%; border-radius:20px 20px 0 0; max-height:92vh; padding:20px 16px calc(24px + env(safe-area-inset-bottom)); }
  body.dgs-on .modal-footer { flex-direction:column-reverse; }
  body.dgs-on .modal-footer .btn { width:100%; justify-content:center; }
  body.dgs-on .f-grid, body.dgs-on .f-grid.cols-3, body.dgs-on .form-row-2 { grid-template-columns:1fr; }
  body.dgs-on .toast { bottom:calc(76px + env(safe-area-inset-bottom)); max-width:92vw; }
}
@media(max-width:768px){body.dgs-on .tbl-wrap:has(+ .mobile-cards){border:0;background:none}}
