@import url('https://cdn.jsdelivr.net/npm/vazirmatn@latest/Vazirmatn-font-face.css');
:root{
  --bg:#f7f8fa;
  --surface:#ffffff;
  --surface-soft:#f1f3f5;
  --text:#1f2933;
  --muted:#6b7280;
  --line:#e5e7eb;
  --primary:#2563eb;
  --primary-soft:#eff6ff;
  --danger:#dc2626;
  --success:#16a34a;
  --warning:#d97706;
  --radius:16px;
  --shadow:0 8px 28px rgba(15,23,42,.06);
  --font:'Vazirmatn','Vazir',Tahoma,Arial,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:12.5px;line-height:1.75}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font-family:var(--font)}
.app-shell{min-height:100vh;display:flex}
.sidebar{width:226px;background:var(--surface);color:var(--text);padding:18px;position:fixed;top:0;bottom:0;right:0;overflow:auto;border-left:1px solid var(--line);z-index:8}
.brand{font-size:15px;font-weight:800;margin-bottom:14px;padding:14px;border-radius:var(--radius);background:var(--surface-soft);text-align:center;color:#111827}
.user-mini{background:#fff;border:1px solid var(--line);padding:12px 13px;border-radius:var(--radius);margin-bottom:14px;line-height:1.8;box-shadow:0 2px 10px rgba(15,23,42,.03)}
.user-mini span{display:block;font-size:12px;color:var(--muted)}
.sidebar nav{display:grid;gap:6px}
.sidebar a{display:flex;align-items:center;min-height:42px;padding:9px 12px;border-radius:13px;color:#374151;transition:.18s;background:transparent}
.sidebar a:hover,.sidebar a.active{background:var(--primary-soft);color:var(--primary)}
.sidebar a.logout{background:#fef2f2;color:#b91c1c;margin-top:6px}
.main{margin-right:226px;flex:1;min-width:0}
.topbar{height:66px;display:flex;align-items:center;gap:12px;padding:0 22px;background:rgba(255,255,255,.88);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5;backdrop-filter:blur(10px)}
.topbar h1{font-size:15px;margin:0;font-weight:800}.menu-btn{display:none;background:#111827;color:#fff;border:0;border-radius:12px;padding:8px 12px;font-size:17px}.content{padding:16px;max-width:1220px;margin:auto}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px;margin-bottom:18px;box-shadow:var(--shadow)}.panel h2{font-size:14px;margin:0 0 14px;font-weight:800}.muted{color:var(--muted);line-height:2}.grid{display:grid;gap:14px}.stats{grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:18px}.stat-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}.stat-card span{display:block;color:var(--muted)}.stat-card strong{display:block;font-size:20px;margin:6px 0;color:#111827}.stat-card em{font-style:normal;font-size:12px;color:#9ca3af}.action-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.action-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px;transition:.18s;box-shadow:0 2px 14px rgba(15,23,42,.03)}.action-card:hover{transform:translateY(-1px);border-color:#bfdbfe;box-shadow:var(--shadow)}.action-card strong{display:block;font-size:13.5px;margin-bottom:6px}.action-card span{color:var(--muted);line-height:1.9}.action-card.disabled{opacity:.58;pointer-events:none}.role-list{display:flex;gap:8px;flex-wrap:wrap}.role-list span,.badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;background:var(--primary-soft);color:#1d4ed8;font-size:12px}.badge.success{background:#ecfdf5;color:#047857}.badge.warn{background:#fffbeb;color:#b45309}.badge.danger{background:#fef2f2;color:#b91c1c}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.form-grid .wide{grid-column:1/-1}.align-end{align-self:end}label{display:block;margin-bottom:5px;color:#374151;font-weight:700;font-size:12px}input,select,textarea{width:100%;border:1px solid #d1d5db;background:#fff;border-radius:11px;padding:8px 10px;outline:none;color:#111827}input:focus,select:focus,textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(37,99,235,.08)}button,.primary{border:0;border-radius:13px;background:var(--primary);color:#fff;padding:11px 16px;cursor:pointer;font-weight:800;min-height:42px}.primary:hover,button:hover{background:#1d4ed8}.mini{padding:7px 11px;border-radius:10px;font-size:12px;min-height:34px}.small-link{display:inline-block;background:var(--primary-soft);color:#1d4ed8;border-radius:10px;padding:6px 10px;margin:2px}.inline-form{display:inline}.table-wrap{overflow:auto;border-radius:14px;border:1px solid var(--line);background:#fff}table{border-collapse:collapse;width:100%;min-width:720px;background:#fff}th,td{padding:11px 12px;border-bottom:1px solid var(--line);text-align:right;vertical-align:middle}th{background:#fafafa;color:#4b5563;font-size:13px;font-weight:800}tr:last-child td{border-bottom:0}.alert{padding:12px 14px;border-radius:14px;margin-bottom:15px;line-height:1.9}.alert.ok{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}.alert.error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}.info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.info-grid div{background:#fafafa;border:1px solid var(--line);border-radius:14px;padding:12px}.info-grid span{display:block;color:var(--muted);margin-bottom:5px}.info-grid strong{font-size:15px}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;background:var(--bg)}.login-card{width:100%;max-width:410px;background:#fff;border:1px solid var(--line);border-radius:24px;padding:26px;box-shadow:var(--shadow)}.login-logo{text-align:center;font-size:22px;font-weight:900;margin-bottom:6px;color:#111827}.login-card .muted{text-align:center}.login-card form{display:grid;gap:11px}.login-card button{margin-top:4px}.help-box{margin-top:15px;border:1px solid #dbeafe;background:#f8fbff;color:#1e3a8a;border-radius:14px;padding:12px;line-height:2}.help-box span{display:block}.search-code{display:flex;gap:10px}.search-code input{font-size:24px;text-align:center;letter-spacing:8px;direction:ltr}.result-panel.valid{border-color:#86efac}.result-panel.invalid{border-color:#fecaca}
@media(max-width:1100px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.sidebar{transform:translateX(100%);transition:.25s;width:82%;max-width:316px;box-shadow:-10px 0 28px rgba(15,23,42,.12)}.sidebar.open{transform:translateX(0)}.main{margin-right:0}.topbar{padding:0 14px;height:62px}.menu-btn{display:block}.content{padding:14px}.stats,.action-grid,.info-grid,.form-grid{grid-template-columns:1fr}.login-card{padding:20px}.search-code{display:grid}table{min-width:0;border:0}thead{display:none}tbody,tr,td{display:block;width:100%}tr{border-bottom:10px solid var(--bg);padding:8px}td{border:0;padding:7px 4px}td:before{content:attr(data-label);display:block;color:var(--muted);font-size:12px;margin-bottom:3px}}


/* Phase 3 Leave Requests */
.top-space{margin-top:14px}
.panel-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.panel-title-row h2{margin:0}
.info-grid.compact{margin-top:12px}
.info-grid.compact div{min-height:74px}
.note-box{background:#f8fafc;border:1px solid var(--line);border-radius:14px;padding:12px;line-height:2}
.action-panel{border-color:#bfdbfe}
.danger-btn{width:100%;border:0;border-radius:13px;padding:11px 14px;background:#dc2626;color:#fff;font-weight:800;cursor:pointer}
.danger-btn:hover{background:#b91c1c}
.check-row label{display:flex;gap:8px;align-items:center;font-weight:700}
.check-row input{width:auto}
.hourly-field{display:none}
small{color:var(--muted)}
@media(max-width:700px){
  .panel-title-row{align-items:flex-start;flex-direction:column}
}


/* Phase 3 v4 professional minimal overrides */
.sidebar a{min-height:36px;padding:7px 10px;border-radius:11px;font-size:12.5px}
.user-mini{padding:10px 11px;font-size:12.5px}
.topbar{height:54px;padding:0 16px}.panel{margin-bottom:13px}.grid{gap:11px}.stats{grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:13px}.stat-card{padding:12px}.action-card{padding:14px}.form-grid{gap:10px}.table-wrap table{font-size:12px}th,td{padding:7px 8px}.badge{padding:3px 8px;font-size:11px}.small-link{display:inline-flex;align-items:center;margin:2px 3px;padding:4px 8px;border-radius:9px;background:var(--surface-soft);color:#2563eb;font-size:11.5px}.inline-form{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}.inline-form select{width:auto;min-width:90px;padding:5px 8px}.mini{border:0;border-radius:9px;padding:5px 8px;background:#2563eb;color:#fff;font-size:11.5px;cursor:pointer}.danger-mini{background:#dc2626}.tabs{display:flex;gap:6px;flex-wrap:wrap}.tabs a{padding:5px 9px;border-radius:999px;background:#f3f4f6;color:#374151;font-size:11.5px}.tiny-input{width:64px!important;padding:5px 7px!important}.panel-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.panel-title-row h2{margin:0}.top-space{margin-top:12px}.note-box{font-size:12.5px}.danger-btn{padding:9px 12px;border-radius:11px}
@media(max-width:900px){.sidebar{width:226px;transform:translateX(100%)}.main{margin-right:0}.app-shell.menu-open .sidebar{transform:translateX(0)}}
@media(max-width:700px){body{font-size:12px}.stats,.action-grid,.form-grid{grid-template-columns:1fr}.panel-title-row{align-items:flex-start;flex-direction:column}.content{padding:12px}}


/* Phase 3 v7 - clean old layout + Jalali date */
body{font-size:12px}
.content{padding:14px}
.panel{padding:14px}
.panel h2{font-size:14px}
.action-grid.compact-actions .action-card span{display:none}
.action-grid.compact-actions .action-card{min-height:64px;padding:14px}
.action-grid.compact-actions .action-card strong{font-size:13px}
.stat-card strong{font-size:18px}
input,select,textarea,button,.primary{font-size:12px}
.jalali-date-input{
  cursor:pointer;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat left 10px center;
  padding-left:38px;
}


/* Phase 3 v9 - Persian, lighter, smaller personnel UI */
body{
  font-size:11.4px;
  background:#f7f8fa;
}
.sidebar{
  width:204px;
  padding:12px;
  background:#ffffff;
}
.main{
  margin-right:204px;
}
.brand{
  font-size:12.5px;
  padding:10px 11px;
  border-radius:14px;
}
.user-mini{
  font-size:11px;
  padding:8px 9px;
  border-radius:12px;
}
.user-mini span{font-size:10px}
.sidebar a{
  min-height:30px;
  padding:5px 9px;
  border-radius:10px;
  font-size:11px;
}
.topbar{
  height:46px;
}
.topbar h1{
  font-size:12.5px;
}
.content{
  padding:12px;
}
.panel{
  padding:11px;
  border-radius:13px;
  box-shadow:0 4px 18px rgba(15,23,42,.035);
}
.panel h2{
  font-size:12.5px;
}
.stats{
  gap:8px;
}
.stat-card{
  padding:9px 10px;
  border-radius:12px;
  box-shadow:0 3px 14px rgba(15,23,42,.03);
}
.stat-card span{
  font-size:10.3px;
}
.stat-card strong{
  font-size:15px;
  margin:2px 0;
}
.action-grid{
  gap:8px;
}
.action-card{
  min-height:54px;
  padding:10px 11px;
  border-radius:12px;
  box-shadow:0 3px 14px rgba(15,23,42,.03);
}
.action-card strong{
  font-size:11.8px;
}
.action-card span,
.compact-actions .action-card span{
  display:none!important;
}
.personnel-lite-actions{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
input,select,textarea{
  padding:6px 8px;
  border-radius:9px;
  font-size:11.2px;
}
button,.primary,.danger-btn{
  min-height:32px;
  padding:6px 10px;
  border-radius:9px;
  font-size:11.2px;
}
label{
  font-size:10.8px;
}
th,td{
  padding:5px 7px;
  font-size:10.9px;
}
.badge{
  font-size:10px;
  padding:2px 7px;
}
.small-link{
  font-size:10.5px;
  padding:4px 7px;
}
.info-grid div{
  padding:8px;
  border-radius:11px;
}
.info-grid span{
  font-size:10px;
}
.info-grid strong{
  font-size:11.5px;
}
.jalali-date-input{
  font-size:11.4px;
}
.hm-jdp{
  font-size:11px;
  width:274px;
}
.hm-jdp-day{
  height:31px;
  min-height:31px;
  font-size:11px;
}
.hm-jdp-title{
  font-size:12px;
}
@media(max-width:900px){
  .main{margin-right:0}
  .sidebar{width:82%}
  .personnel-lite-actions{grid-template-columns:1fr}
}


/* Phase 3 v10 - darker icon buttons, lighter/smaller UI */
:root{
  --primary:#1f2937;
  --primary-dark:#111827;
  --success:#16a34a;
}
.primary,
button.primary,
button[name="action"][value*="approve"]{
  background:#1f2937!important;
  color:#fff!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.primary:hover,
button.primary:hover,
button[name="action"][value*="approve"]:hover{
  background:#111827!important;
}
.primary::before,
button.primary::before,
button[name="action"][value*="approve"]::before{
  content:"✓";
  font-size:12px;
  font-weight:900;
  line-height:1;
}
.danger-btn,
button[name="action"][value*="reject"]{
  background:#991b1b!important;
  color:#fff!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.danger-btn:hover,
button[name="action"][value*="reject"]:hover{
  background:#7f1d1d!important;
}
.danger-btn::before,
button[name="action"][value*="reject"]::before{
  content:"×";
  font-size:15px;
  font-weight:900;
  line-height:1;
}
.small-link{
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:#eef2f7!important;
  color:#1f2937!important;
}
.small-link::before{
  content:"›";
  font-size:14px;
  font-weight:900;
}
.action-card{
  position:relative;
  border-color:#e5e7eb;
}
.action-card::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:#374151;
  position:absolute;
  top:12px;
  left:12px;
}
.action-card:hover{
  border-color:#9ca3af;
  box-shadow:0 6px 18px rgba(15,23,42,.07);
}
.sidebar a{
  position:relative;
  font-weight:700;
}
.sidebar a::before{
  content:"";
  width:5px;
  height:5px;
  border-radius:999px;
  background:#9ca3af;
  margin-left:7px;
}
.sidebar a.active::before{
  background:#111827;
}
.badge.success,
.result-panel.valid .badge,
.info-grid .badge.success{
  background:#dcfce7!important;
  color:#166534!important;
  border:1px solid #86efac;
  font-weight:800;
}
.result-panel.valid{
  border-color:#86efac!important;
  background:#fbfffc;
}
.result-panel.valid h2{
  color:#166534;
}
.info-grid div:has(.badge.success){
  background:#f0fdf4;
  border-color:#bbf7d0;
}
body{
  font-size:11.2px;
}
.panel{
  padding:10px;
}
.info-grid{
  gap:7px;
}
.info-grid div{
  min-height:auto;
}
.stat-card strong{
  font-size:14px;
}
.search-code input{
  direction:ltr;
  text-align:center;
  letter-spacing:5px;
  font-family:monospace;
}
.hm-jdp{
  box-shadow:0 14px 34px rgba(15,23,42,.18);
}
@media(max-width:700px){
  .action-card::before{top:10px;left:10px}
}


/* Phase 3 v11 - ultra compact + 24h time picker */
body{
  font-size:10.8px!important;
  line-height:1.55!important;
  background:#f8fafc!important;
}
.sidebar{
  width:194px!important;
  padding:10px!important;
}
.main{
  margin-right:194px!important;
}
.brand{
  font-size:11.8px!important;
  padding:8px 9px!important;
  border-radius:12px!important;
  margin-bottom:8px!important;
}
.user-mini{
  font-size:10.5px!important;
  padding:7px 8px!important;
  margin-bottom:8px!important;
}
.user-mini span{font-size:9.6px!important}
.sidebar nav{gap:3px!important}
.sidebar a{
  min-height:27px!important;
  padding:4px 8px!important;
  border-radius:9px!important;
  font-size:10.5px!important;
}
.topbar{
  height:42px!important;
  padding:0 12px!important;
}
.topbar h1{
  font-size:11.8px!important;
}
.content{
  padding:9px!important;
  max-width:1100px!important;
}
.panel{
  padding:8px!important;
  margin-bottom:8px!important;
  border-radius:11px!important;
  box-shadow:0 2px 10px rgba(15,23,42,.025)!important;
}
.panel h2{
  font-size:11.7px!important;
  margin-bottom:7px!important;
}
.grid,
.stats,
.action-grid,
.form-grid,
.info-grid{
  gap:6px!important;
}
.stat-card{
  padding:7px 8px!important;
  border-radius:10px!important;
}
.stat-card span{
  font-size:9.7px!important;
}
.stat-card strong{
  font-size:13px!important;
  margin:1px 0!important;
}
.stat-card em{
  font-size:9.4px!important;
}
.action-card{
  min-height:46px!important;
  padding:8px 9px!important;
  border-radius:10px!important;
}
.action-card strong{
  font-size:10.9px!important;
}
.action-card::before{
  width:6px!important;
  height:6px!important;
  top:9px!important;
  left:9px!important;
}
.info-grid div{
  padding:6px 7px!important;
  border-radius:9px!important;
  min-height:48px!important;
}
.info-grid span{
  font-size:9.5px!important;
  margin-bottom:2px!important;
}
.info-grid strong{
  font-size:10.8px!important;
}
input,select,textarea{
  padding:5px 7px!important;
  border-radius:8px!important;
  font-size:10.7px!important;
}
label{
  font-size:10.2px!important;
  margin-bottom:3px!important;
}
button,.primary,.danger-btn{
  min-height:29px!important;
  padding:5px 9px!important;
  border-radius:8px!important;
  font-size:10.7px!important;
}
th,td{
  padding:4px 6px!important;
  font-size:10.3px!important;
}
.badge{
  font-size:9.5px!important;
  padding:2px 6px!important;
}
.small-link{
  font-size:9.8px!important;
  padding:3px 6px!important;
}
.alert{
  padding:7px 9px!important;
  margin-bottom:8px!important;
  border-radius:10px!important;
}
.note-box{
  padding:7px!important;
  border-radius:9px!important;
}
.time-24-wrap{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:4px;
  align-items:center;
  direction:ltr;
  background:#fff;
  border:1px solid #d1d5db;
  border-radius:8px;
  padding:3px 5px;
}
.time-24-wrap select{
  border:0!important;
  padding:3px 4px!important;
  text-align:center;
  direction:ltr;
  background:#fff;
  box-shadow:none!important;
}
.time-24-wrap span{
  color:#374151;
  font-weight:900;
  font-size:12px;
}
.result-panel .info-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
.result-panel .info-grid div{
  min-height:44px!important;
}
.search-code{
  gap:6px!important;
}
.search-code input{
  height:34px!important;
  font-size:18px!important;
  letter-spacing:4px!important;
}
.hm-jdp{
  transform:scale(.94);
  transform-origin:top left;
}
@media(max-width:900px){
  .main{margin-right:0!important}
  .sidebar{width:82%!important}
  .result-panel .info-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:620px){
  .stats,.action-grid,.form-grid,.info-grid,.result-panel .info-grid{grid-template-columns:1fr!important}
  .content{padding:7px!important}
}


/* Phase 3 v13 - manual 24h time input */
.time-24-wrap{display:none!important}
.time-manual-24{
  direction:ltr;
  text-align:center;
  font-family:monospace!important;
  font-weight:800;
  letter-spacing:1px;
  background:#fff;
  border:1px solid #cbd5e1!important;
  color:#111827;
}
.time-manual-24::placeholder{
  color:#9ca3af;
}
.hourly-field{
  position:relative;
}
.hourly-field::after{
  content:"۲۴";
  position:absolute;
  left:8px;
  bottom:7px;
  background:#111827;
  color:#fff;
  font-size:9px;
  font-weight:900;
  border-radius:6px;
  padding:1px 4px;
  pointer-events:none;
}


/* Phase 3 v16 - mobile readable buttons, desktop unchanged */
@media(max-width:760px){

  body{
    font-size:13px!important;
    line-height:1.7!important;
    background:#f8fafc!important;
  }

  .topbar{
    height:54px!important;
    padding:0 14px!important;
    background:#fff!important;
  }

  .topbar h1{
    font-size:15px!important;
    font-weight:900!important;
  }

  .menu-btn{
    width:46px!important;
    height:46px!important;
    min-height:46px!important;
    border-radius:14px!important;
    font-size:20px!important;
    padding:0!important;
  }

  .content{
    padding:12px!important;
  }

  /* گزارش‌های بالا خوانا بمانند */
  .stats{
    grid-template-columns:1fr!important;
    gap:10px!important;
    margin-bottom:12px!important;
  }

  .stat-card{
    min-height:84px!important;
    padding:14px 16px!important;
    border-radius:16px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    box-shadow:0 4px 16px rgba(15,23,42,.055)!important;
  }

  .stat-card span{
    font-size:13px!important;
    color:#6b7280!important;
    margin-bottom:5px!important;
    font-weight:600!important;
  }

  .stat-card strong{
    font-size:24px!important;
    line-height:1.15!important;
    color:#111827!important;
    font-weight:900!important;
  }

  /* دکمه‌های موبایل: بزرگ، خوانا، قابل لمس */
  .action-grid,
  .compact-actions,
  .personnel-lite-actions{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }

  .action-card{
    min-height:76px!important;
    padding:0 18px!important;
    border-radius:18px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:14px!important;
    position:relative!important;
    background:#fff!important;
    border:1px solid #e5e7eb!important;
    box-shadow:0 5px 18px rgba(15,23,42,.06)!important;
  }

  .action-card::before{
    position:static!important;
    content:""!important;
    width:15px!important;
    height:15px!important;
    min-width:15px!important;
    border-radius:999px!important;
    background:#1f2937!important;
    margin:0!important;
  }

  .action-card strong{
    font-size:16px!important;
    line-height:1.7!important;
    font-weight:900!important;
    color:#111827!important;
    white-space:normal!important;
  }

  .action-card span{
    display:none!important;
  }

  .action-card:active{
    transform:scale(.99);
    background:#f9fafb!important;
  }

  .panel{
    padding:13px!important;
    border-radius:16px!important;
  }

  .panel h2{
    font-size:15px!important;
  }

  input,select,textarea{
    font-size:14px!important;
    min-height:44px!important;
    padding:10px 12px!important;
    border-radius:12px!important;
  }

  label{
    font-size:13px!important;
    margin-bottom:6px!important;
  }

  button,.primary,.danger-btn{
    min-height:46px!important;
    font-size:14px!important;
    border-radius:12px!important;
    padding:10px 14px!important;
  }

  .small-link{
    font-size:13px!important;
    padding:7px 10px!important;
    border-radius:10px!important;
  }

  .badge{
    font-size:12px!important;
    padding:4px 9px!important;
  }

  .info-grid{
    grid-template-columns:1fr!important;
    gap:9px!important;
  }

  .info-grid div{
    min-height:64px!important;
    padding:12px!important;
    border-radius:14px!important;
  }

  .info-grid span{
    font-size:12px!important;
  }

  .info-grid strong{
    font-size:14px!important;
  }

  th,td{
    font-size:13px!important;
    padding:9px 8px!important;
  }
}

@media(max-width:380px){
  .action-card{
    min-height:72px!important;
    padding:0 15px!important;
  }

  .action-card strong{
    font-size:15px!important;
  }

  .stat-card strong{
    font-size:22px!important;
  }
}


/* Phase 3 v17 - overnight shift hint */
.time-help{
  display:block;
  margin-top:5px;
  color:#6b7280;
  font-size:10.5px;
  line-height:1.7;
}
@media(max-width:760px){
  .time-help{
    font-size:12px!important;
    margin-top:6px!important;
  }
}


/* Phase 3 v18 - mobile menu larger and clearer */
@media(max-width:760px){
  .sidebar{
    width:86%!important;
    max-width:340px!important;
    padding:16px 14px 18px!important;
    background:#ffffff!important;
    border-left:1px solid #e5e7eb!important;
    box-shadow:-14px 0 34px rgba(15,23,42,.12)!important;
  }

  .brand{
    border-radius:16px!important;
    padding:14px 14px!important;
    margin-bottom:12px!important;
  }

  .brand strong{
    font-size:16px!important;
    line-height:1.6!important;
  }

  .brand span{
    font-size:12px!important;
    margin-top:3px!important;
  }

  .user-mini{
    padding:12px 13px!important;
    border-radius:15px!important;
    margin-bottom:12px!important;
  }

  .user-mini b{
    font-size:15px!important;
    line-height:1.7!important;
  }

  .user-mini span{
    font-size:12px!important;
    line-height:1.8!important;
  }

  .main-nav{
    gap:7px!important;
  }

  .main-nav a{
    min-height:50px!important;
    padding:10px 14px!important;
    border-radius:14px!important;
    font-size:15px!important;
    font-weight:800!important;
    line-height:1.7!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
  }

  .main-nav a span{
    font-size:15px!important;
    font-weight:800!important;
  }

  .main-nav a::before{
    width:10px!important;
    height:10px!important;
    margin-left:10px!important;
  }

  .main-nav a.logout{
    min-height:50px!important;
    margin-top:8px!important;
  }

  .side-hint{
    display:none!important;
  }

  .menu-btn{
    width:48px!important;
    height:48px!important;
    min-height:48px!important;
    border-radius:15px!important;
    font-size:22px!important;
  }
}


/* Phase 3 v19 - REALLY LARGE mobile menu */
@media screen and (max-width:900px){

  body .sidebar{
    width:92vw!important;
    max-width:430px!important;
    min-width:300px!important;
    padding:20px 18px 24px!important;
    background:#fff!important;
    border-left:1px solid #e5e7eb!important;
    box-shadow:-18px 0 44px rgba(15,23,42,.18)!important;
  }

  body .sidebar .brand,
  body .brand{
    min-height:70px!important;
    border-radius:20px!important;
    padding:16px 18px!important;
    margin-bottom:16px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
  }

  body .sidebar .brand strong,
  body .brand strong{
    font-size:22px!important;
    line-height:1.5!important;
    font-weight:900!important;
  }

  body .sidebar .brand span,
  body .brand span{
    font-size:16px!important;
    line-height:1.6!important;
  }

  body .sidebar .user-mini,
  body .user-mini{
    min-height:82px!important;
    padding:16px 18px!important;
    border-radius:20px!important;
    margin-bottom:18px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
  }

  body .sidebar .user-mini b,
  body .user-mini b{
    font-size:20px!important;
    line-height:1.7!important;
    font-weight:900!important;
  }

  body .sidebar .user-mini span,
  body .user-mini span{
    font-size:16px!important;
    line-height:1.7!important;
    margin-top:3px!important;
  }

  body .sidebar nav,
  body .sidebar .main-nav,
  body .main-nav{
    display:grid!important;
    gap:12px!important;
  }

  body .sidebar nav a,
  body .sidebar .main-nav a,
  body .main-nav a,
  body .sidebar a{
    min-height:66px!important;
    height:auto!important;
    padding:0 18px!important;
    border-radius:20px!important;
    font-size:20px!important;
    font-weight:900!important;
    line-height:1.6!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:14px!important;
  }

  body .sidebar nav a span,
  body .sidebar .main-nav a span,
  body .main-nav a span,
  body .sidebar a span{
    font-size:20px!important;
    font-weight:900!important;
    line-height:1.6!important;
  }

  body .sidebar nav a::before,
  body .sidebar .main-nav a::before,
  body .main-nav a::before,
  body .sidebar a::before{
    content:""!important;
    width:14px!important;
    height:14px!important;
    min-width:14px!important;
    border-radius:999px!important;
    background:#111827!important;
    margin-left:0!important;
    opacity:1!important;
  }

  body .sidebar nav a.active,
  body .sidebar .main-nav a.active,
  body .main-nav a.active,
  body .sidebar a.active{
    background:#eaf4ff!important;
    color:#111827!important;
  }

  body .sidebar nav a.logout,
  body .sidebar .main-nav a.logout,
  body .main-nav a.logout,
  body .sidebar a.logout{
    min-height:66px!important;
    background:#fff1f2!important;
    color:#991b1b!important;
    margin-top:8px!important;
  }

  body .side-hint{
    display:none!important;
  }

  body .menu-btn{
    width:56px!important;
    height:56px!important;
    min-height:56px!important;
    border-radius:18px!important;
    font-size:28px!important;
    line-height:1!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  body .topbar{
    min-height:64px!important;
    height:64px!important;
    padding:0 14px!important;
  }

  body .topbar h1{
    font-size:19px!important;
    font-weight:900!important;
  }
}

@media screen and (max-width:380px){
  body .sidebar nav a,
  body .sidebar .main-nav a,
  body .main-nav a,
  body .sidebar a{
    min-height:62px!important;
    font-size:18px!important;
  }

  body .sidebar nav a span,
  body .sidebar .main-nav a span,
  body .main-nav a span,
  body .sidebar a span{
    font-size:18px!important;
  }
}


/* Phase 3 v20 - stepwise leave form + visible time display */
.leave-step-progress{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin:10px 0 14px;
}
.leave-step-progress span{
  background:#f3f4f6;
  color:#6b7280;
  border:1px solid #e5e7eb;
  border-radius:999px;
  padding:7px 8px;
  text-align:center;
  font-size:11px;
  font-weight:800;
}
.leave-step-progress span.is-active{
  background:#111827;
  color:#fff;
  border-color:#111827;
}
.leave-step-progress span.is-done{
  background:#dcfce7;
  color:#166534;
  border-color:#86efac;
}
.leave-step-block{
  transition:.18s ease;
}
.step-hidden{
  display:none!important;
}
.leave-step-form{
  align-items:end;
}
.leave-step-form .primary{
  width:auto;
  min-width:210px;
}
.time-manual-24{
  direction:ltr!important;
  text-align:center!important;
}
@media(max-width:760px){
  .leave-step-progress{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .leave-step-progress span{
    font-size:13px!important;
    padding:9px 8px!important;
  }
  .leave-step-form{
    display:block!important;
  }
  .leave-step-form .leave-step-block{
    margin-bottom:12px!important;
  }
  .leave-step-form .primary{
    width:100%!important;
    min-height:56px!important;
    font-size:17px!important;
  }
}


/* Phase 3 v21 - better hourly step form */
.leave-step-progress span{
  font-size:12px;
}
.hourly-time-panel{
  background:#f8fafc;
  border:1px solid #dbe3ef;
  border-radius:16px;
  padding:13px;
}
.hourly-title{
  margin-bottom:10px;
}
.hourly-title strong{
  display:block;
  font-size:13px;
  color:#111827;
  margin-bottom:3px;
}
.hourly-title small{
  color:#6b7280;
  line-height:1.8;
}
.hourly-time-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.hourly-time-panel .time-help{
  margin-top:8px;
}
.step-hidden{
  display:none!important;
}
@media(max-width:760px){
  .leave-step-progress span{
    font-size:14px!important;
  }
  .hourly-time-panel{
    padding:14px!important;
    border-radius:18px!important;
  }
  .hourly-title strong{
    font-size:16px!important;
  }
  .hourly-title small{
    font-size:13px!important;
  }
  .hourly-time-grid{
    grid-template-columns:1fr!important;
    gap:12px!important;
  }
}


/* Phase 3 v22 - explicit hourly time display */
td:nth-child(7){
  white-space:nowrap;
}
@media(max-width:760px){
  td:nth-child(7){
    white-space:normal!important;
    font-weight:800!important;
  }
}


/* Phase 3 v23 - hourly uses start date only */
.hourly-title small{
  color:#4b5563;
}


/* Phase 3 v25 - compact mobile request/history cards + smaller mobile menu */
@media screen and (max-width:900px){

  /* منوی موبایل: کمی کوچک‌تر از نسخه خیلی بزرگ */
  body .sidebar{
    width:88vw!important;
    max-width:380px!important;
    min-width:280px!important;
    padding:16px 14px 18px!important;
  }

  body .sidebar .brand,
  body .brand{
    min-height:58px!important;
    border-radius:17px!important;
    padding:12px 14px!important;
    margin-bottom:12px!important;
  }

  body .sidebar .brand strong,
  body .brand strong{
    font-size:18px!important;
    line-height:1.45!important;
  }

  body .sidebar .brand span,
  body .brand span{
    font-size:13px!important;
  }

  body .sidebar .user-mini,
  body .user-mini{
    min-height:66px!important;
    padding:12px 14px!important;
    border-radius:17px!important;
    margin-bottom:13px!important;
  }

  body .sidebar .user-mini b,
  body .user-mini b{
    font-size:17px!important;
    line-height:1.55!important;
  }

  body .sidebar .user-mini span,
  body .user-mini span{
    font-size:13px!important;
    line-height:1.55!important;
  }

  body .sidebar nav,
  body .sidebar .main-nav,
  body .main-nav{
    gap:8px!important;
  }

  body .sidebar nav a,
  body .sidebar .main-nav a,
  body .main-nav a,
  body .sidebar a{
    min-height:56px!important;
    padding:0 15px!important;
    border-radius:17px!important;
    font-size:17px!important;
    line-height:1.55!important;
    gap:11px!important;
  }

  body .sidebar nav a span,
  body .sidebar .main-nav a span,
  body .main-nav a span,
  body .sidebar a span{
    font-size:17px!important;
    line-height:1.55!important;
  }

  body .sidebar nav a::before,
  body .sidebar .main-nav a::before,
  body .main-nav a::before,
  body .sidebar a::before{
    width:11px!important;
    height:11px!important;
    min-width:11px!important;
  }

  body .sidebar nav a.logout,
  body .sidebar .main-nav a.logout,
  body .main-nav a.logout,
  body .sidebar a.logout{
    min-height:56px!important;
  }

  body .menu-btn{
    width:50px!important;
    height:50px!important;
    min-height:50px!important;
    border-radius:16px!important;
    font-size:24px!important;
  }

  body .topbar{
    min-height:58px!important;
    height:58px!important;
  }

  body .topbar h1{
    font-size:17px!important;
  }
}

@media(max-width:760px){

  /* جدول‌های خاص در موبایل به کارت تبدیل شوند */
  .mobile-card-table,
  .mobile-card-table thead,
  .mobile-card-table tbody,
  .mobile-card-table tr,
  .mobile-card-table td{
    display:block!important;
    width:100%!important;
  }

  .mobile-card-table thead{
    display:none!important;
  }

  .mobile-card-table{
    border-collapse:separate!important;
    border-spacing:0!important;
  }

  .mobile-card-table tbody tr{
    background:#fff!important;
    border:1px solid #e5e7eb!important;
    border-radius:15px!important;
    margin:0 0 10px!important;
    padding:8px 10px!important;
    box-shadow:0 4px 14px rgba(15,23,42,.055)!important;
    position:relative!important;
    overflow:hidden!important;
  }

  .mobile-card-table tbody tr::before{
    content:""!important;
    position:absolute!important;
    right:0!important;
    top:0!important;
    bottom:0!important;
    width:4px!important;
    background:#111827!important;
  }

  .mobile-card-table tbody td{
    border:0!important;
    padding:5px 0!important;
    font-size:13px!important;
    line-height:1.6!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    gap:12px!important;
    text-align:left!important;
    white-space:normal!important;
  }

  .mobile-card-table tbody td::before{
    color:#6b7280!important;
    font-size:11.5px!important;
    font-weight:800!important;
    white-space:nowrap!important;
    text-align:right!important;
    min-width:72px!important;
  }

  .mobile-card-table tbody td small{
    font-size:11.5px!important;
    color:#6b7280!important;
  }

  .mobile-card-table .badge{
    font-size:11.5px!important;
    padding:4px 8px!important;
  }

  /* کارت درخواست‌ها: ردیف اول شبیه هدر کارت */
  .request-table tbody tr td:nth-child(1){
    margin:-2px 0 3px!important;
    padding-bottom:7px!important;
    border-bottom:1px dashed #e5e7eb!important;
    font-weight:900!important;
    font-size:14px!important;
    text-align:left!important;
  }

  .request-table tbody tr td:nth-child(1)::before{content:"درخواست";}
  .request-table tbody tr td:nth-child(2)::before{content:"پرسنل";}
  .request-table tbody tr td:nth-child(3)::before{content:"واحد";}
  .request-table tbody tr td:nth-child(4)::before{content:"نوع";}
  .request-table tbody tr td:nth-child(5)::before{content:"حالت";}
  .request-table tbody tr td:nth-child(6)::before{content:"تاریخ";}
  .request-table tbody tr td:nth-child(7)::before{content:"ساعت";}
  .request-table tbody tr td:nth-child(8)::before{content:"وضعیت";}
  .request-table tbody tr td:nth-child(9)::before{content:"کد";}
  .request-table tbody tr td:nth-child(10)::before{content:""; min-width:0!important;}

  .request-table tbody tr td:nth-child(3),
  .request-table tbody tr td:nth-child(9){
    color:#374151!important;
    font-size:12.5px!important;
  }

  .request-table tbody tr td:nth-child(10){
    padding-top:7px!important;
    border-top:1px dashed #e5e7eb!important;
    justify-content:flex-end!important;
  }

  .request-table tbody tr td:nth-child(10) .small-link{
    width:100%!important;
    text-align:center!important;
    padding:8px 10px!important;
    font-weight:900!important;
  }

  /* تاریخچه عملیات: کم‌جا، خوانا و جدا از هم */
  .history-table tbody tr{
    padding:8px 10px!important;
    margin-bottom:8px!important;
    border-radius:14px!important;
    box-shadow:0 3px 11px rgba(15,23,42,.045)!important;
  }

  .history-table tbody tr::before{
    background:#6b7280!important;
  }

  .history-table tbody tr td{
    font-size:12.8px!important;
    padding:4px 0!important;
  }

  .history-table tbody tr td::before{
    min-width:78px!important;
  }

  .history-table tbody tr td:nth-child(1){
    font-weight:900!important;
    color:#111827!important;
    border-bottom:1px dashed #e5e7eb!important;
    padding-bottom:6px!important;
    margin-bottom:3px!important;
  }

  .history-table tbody tr td:nth-child(1)::before{content:"زمان";}
  .history-table tbody tr td:nth-child(2)::before{content:"مرحله";}
  .history-table tbody tr td:nth-child(3)::before{content:"عملیات";}
  .history-table tbody tr td:nth-child(4)::before{content:"اقدام‌کننده";}
  .history-table tbody tr td:nth-child(5)::before{content:"توضیحات";}

  .history-table tbody tr td:nth-child(5){
    color:#374151!important;
  }

  /* ردیف خالی */
  .mobile-card-table tbody tr td[colspan]{
    display:block!important;
    text-align:center!important;
    color:#6b7280!important;
    padding:12px 0!important;
  }
  .mobile-card-table tbody tr td[colspan]::before{
    content:""!important;
    min-width:0!important;
  }
}

@media(max-width:380px){
  body .sidebar{
    width:90vw!important;
  }
  body .sidebar nav a,
  body .sidebar .main-nav a,
  body .main-nav a,
  body .sidebar a{
    min-height:52px!important;
    font-size:16px!important;
    border-radius:16px!important;
  }
  body .sidebar nav a span,
  body .sidebar .main-nav a span,
  body .main-nav a span,
  body .sidebar a span{
    font-size:16px!important;
  }
}


/* Phase 4 v26 - admin/personnel/import/report UI */
.inline-form{
  display:inline-block;
  margin:0 4px;
}
button.tiny,.tiny{
  min-height:30px!important;
  padding:5px 9px!important;
  font-size:11px!important;
  border-radius:9px!important;
}
.compact-filter{
  align-items:end;
}
.personnel-edit-form label small{
  color:#9ca3af;
  font-size:10px;
  font-weight:600;
}
.public-action-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:#f8fafc;
}
.action-result{
  max-width:520px;
  width:100%;
  text-align:center;
}
.action-result h1{
  margin:0 0 12px;
  font-size:24px;
}
.action-result p{
  color:#374151;
  line-height:2;
}
.action-result.ok{
  border-top:5px solid #22c55e;
}
.action-result.error{
  border-top:5px solid #ef4444;
}
.import-preview-table td,
.personnel-admin-table td,
.report-table td{
  vertical-align:middle;
}

@media(max-width:760px){
  .personnel-admin-table tbody tr td:nth-child(1)::before{content:"نام";}
  .personnel-admin-table tbody tr td:nth-child(2)::before{content:"کد پرسنلی";}
  .personnel-admin-table tbody tr td:nth-child(3)::before{content:"کد ملی";}
  .personnel-admin-table tbody tr td:nth-child(4)::before{content:"شرکت";}
  .personnel-admin-table tbody tr td:nth-child(5)::before{content:"پست";}
  .personnel-admin-table tbody tr td:nth-child(6)::before{content:"وضعیت";}
  .personnel-admin-table tbody tr td:nth-child(7)::before{content:"عملیات";}

  .import-preview-table tbody tr td:nth-child(1)::before{content:"ردیف";}
  .import-preview-table tbody tr td:nth-child(2)::before{content:"وضعیت";}
  .import-preview-table tbody tr td:nth-child(3)::before{content:"نام";}
  .import-preview-table tbody tr td:nth-child(4)::before{content:"کد ملی";}
  .import-preview-table tbody tr td:nth-child(5)::before{content:"کد پرسنلی";}
  .import-preview-table tbody tr td:nth-child(6)::before{content:"شرکت";}
  .import-preview-table tbody tr td:nth-child(7)::before{content:"پست";}
  .import-preview-table tbody tr td:nth-child(8)::before{content:"خطا";}

  .report-table tbody tr td:nth-child(1)::before{content:"شماره";}
  .report-table tbody tr td:nth-child(2)::before{content:"پرسنل";}
  .report-table tbody tr td:nth-child(3)::before{content:"واحد";}
  .report-table tbody tr td:nth-child(4)::before{content:"نوع";}
  .report-table tbody tr td:nth-child(5)::before{content:"حالت";}
  .report-table tbody tr td:nth-child(6)::before{content:"تاریخ";}
  .report-table tbody tr td:nth-child(7)::before{content:"ساعت";}
  .report-table tbody tr td:nth-child(8)::before{content:"مدت";}
  .report-table tbody tr td:nth-child(9)::before{content:"وضعیت";}
  .report-table tbody tr td:nth-child(10)::before{content:"کد";}
  .report-table tbody tr td:nth-child(11)::before{content:"نمایش";}

  .personnel-admin-table tbody tr td:nth-child(7),
  .report-table tbody tr td:nth-child(11){
    border-top:1px dashed #e5e7eb!important;
    padding-top:8px!important;
  }

  .inline-form{
    display:inline-flex!important;
    margin-top:6px!important;
  }

  .personnel-edit-form{
    display:block!important;
  }
  .personnel-edit-form > div{
    margin-bottom:10px!important;
  }

  .public-action-page{
    padding:14px;
  }
  .action-result h1{
    font-size:20px;
  }
}


/* Phase 4 v28 - inactive personnel lock notices */
.lock-note{
  background:#fff7ed;
  border:1px solid #fed7aa;
  color:#9a3412;
  padding:10px 12px;
  border-radius:14px;
  line-height:1.8;
}


/* Phase 4 v29 - import template */
.import-help-box{
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  padding:10px 12px;
  color:#475569;
  line-height:1.8;
}


/* Phase 4 v32 - import details and final review fixes */
.import-details summary{
  cursor:pointer;
  font-weight:900;
  color:#111827;
}
.import-detail-grid{
  display:grid;
  grid-template-columns:minmax(90px,140px) 1fr;
  gap:5px 8px;
  margin-top:8px;
  padding:8px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:12px;
  max-height:220px;
  overflow:auto;
}
.import-detail-grid span{
  color:#6b7280;
  font-size:12px;
}
.import-detail-grid b{
  color:#111827;
  font-size:12px;
  font-weight:800;
}
@media(max-width:760px){
  .import-preview-table tbody tr td:nth-child(9)::before{content:"جزئیات";}
  .import-detail-grid{
    grid-template-columns:1fr;
  }
}


/* Phase 4 v33 - final five fixes */
.reject-reason-form{
  text-align:right;
}
.reject-reason-form textarea{
  width:100%;
  margin:8px 0 12px;
}
.log-body{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:8px;
  margin-top:6px;
  max-height:180px;
  overflow:auto;
  font-size:12px;
  line-height:1.8;
  text-align:right;
}
.bale-log-table details summary,
.bale-token-table details summary{
  cursor:pointer;
  font-weight:800;
}
@media(max-width:760px){
  .bale-log-table tbody tr td:nth-child(1)::before{content:"زمان";}
  .bale-log-table tbody tr td:nth-child(2)::before{content:"درخواست";}
  .bale-log-table tbody tr td:nth-child(3)::before{content:"گیرنده";}
  .bale-log-table tbody tr td:nth-child(4)::before{content:"شناسه بله";}
  .bale-log-table tbody tr td:nth-child(5)::before{content:"عنوان";}
  .bale-log-table tbody tr td:nth-child(6)::before{content:"وضعیت";}
  .bale-log-table tbody tr td:nth-child(7)::before{content:"پاسخ";}

  .bale-token-table tbody tr td:nth-child(1)::before{content:"درخواست";}
  .bale-token-table tbody tr td:nth-child(2)::before{content:"پرسنل";}
  .bale-token-table tbody tr td:nth-child(3)::before{content:"مرحله";}
  .bale-token-table tbody tr td:nth-child(4)::before{content:"عملیات";}
  .bale-token-table tbody tr td:nth-child(5)::before{content:"گیرنده";}
  .bale-token-table tbody tr td:nth-child(6)::before{content:"وضعیت";}
  .bale-token-table tbody tr td:nth-child(7)::before{content:"ساخته‌شده";}
  .bale-token-table tbody tr td:nth-child(8)::before{content:"استفاده/بسته";}

  .backup-table tbody tr td:nth-child(1)::before{content:"زمان";}
  .backup-table tbody tr td:nth-child(2)::before{content:"فایل";}
  .backup-table tbody tr td:nth-child(3)::before{content:"تعداد ردیف";}
  .backup-table tbody tr td:nth-child(4)::before{content:"کاربر";}
  .backup-table tbody tr td:nth-child(5)::before{content:"یادداشت";}
  .backup-table tbody tr td:nth-child(6)::before{content:"دانلود";}
}


/* Phase 4 v34 - Bale WebApp autologin */
.action-row{
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}


/* Phase 4 v38 - separate HR administrative requests */
.hr-payload-grid{
  margin-top:12px;
}
@media(max-width:760px){
  .hr-service-table tbody tr td:nth-child(1)::before{content:"ثبت داخلی";}
  .hr-service-table tbody tr td:nth-child(2)::before{content:"پرسنل";}
  .hr-service-table tbody tr td:nth-child(3)::before{content:"کد ملی";}
  .hr-service-table tbody tr td:nth-child(4)::before{content:"شرکت";}
  .hr-service-table tbody tr td:nth-child(5)::before{content:"وضعیت";}
  .hr-service-table tbody tr td:nth-child(6)::before{content:"تاریخ ثبت";}
  .hr-service-table tbody tr td:nth-child(7)::before{content:"اقدام";}

  .my-hr-service-table tbody tr td:nth-child(1)::before{content:"ثبت داخلی";}
  .my-hr-service-table tbody tr td:nth-child(2)::before{content:"نوع";}
  .my-hr-service-table tbody tr td:nth-child(3)::before{content:"وضعیت";}
  .my-hr-service-table tbody tr td:nth-child(4)::before{content:"تاریخ ثبت";}
  .my-hr-service-table tbody tr td:nth-child(5)::before{content:"توضیحات HR";}
  .my-hr-service-table tbody tr td:nth-child(6)::before{content:"جزئیات";}

  .hr-request-log-table tbody tr td:nth-child(1)::before{content:"زمان";}
  .hr-request-log-table tbody tr td:nth-child(2)::before{content:"اقدام";}
  .hr-request-log-table tbody tr td:nth-child(3)::before{content:"از وضعیت";}
  .hr-request-log-table tbody tr td:nth-child(4)::before{content:"به وضعیت";}
  .hr-request-log-table tbody tr td:nth-child(5)::before{content:"توضیح";}
}


/* Phase 4 v40 - five HR service request menu */
.hr-menu-grid{grid-template-columns:repeat(5,minmax(0,1fr));}
@media(max-width:1100px){.hr-menu-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:760px){.hr-menu-grid{grid-template-columns:1fr;}}


/* Phase 4 v41 - beautiful HR service requests hub */
.hr-hub-hero{
  position:relative;
  overflow:hidden;
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  padding:24px;
  border-radius:26px;
  margin-bottom:18px;
  color:#fff;
  background:
    radial-gradient(circle at 8% 20%, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(135deg,#111827 0%,#1d4ed8 55%,#0891b2 100%);
  box-shadow:0 18px 50px rgba(15,23,42,.20);
}
.hr-hub-hero::after{
  content:"";
  position:absolute;
  inset:auto -45px -80px auto;
  width:220px;
  height:220px;
  border-radius:50%;
  background:rgba(255,255,255,.12);
}
.hr-hub-hero-text{
  position:relative;
  z-index:1;
  max-width:760px;
}
.hr-hub-kicker{
  display:inline-flex;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.22);
  font-weight:900;
  font-size:12px;
  margin-bottom:10px;
}
.hr-hub-hero h2{
  margin:0 0 8px;
  font-size:28px;
  font-weight:950;
  letter-spacing:-.6px;
}
.hr-hub-hero p{
  margin:0;
  font-size:14px;
  line-height:2;
  color:rgba(255,255,255,.88);
}
.hr-hub-hero-actions{
  position:relative;
  z-index:1;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.hero-action{
  display:inline-flex;
  min-height:44px;
  align-items:center;
  justify-content:center;
  padding:9px 16px;
  border-radius:15px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22);
  color:#fff;
  font-weight:900;
  white-space:nowrap;
}
.hero-action.primary{
  background:#fff;
  color:#1d4ed8;
}
.hr-hub-summary{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.hub-summary-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:22px;
  padding:16px;
  box-shadow:0 10px 26px rgba(15,23,42,.06);
  position:relative;
  overflow:hidden;
}
.hub-summary-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:6px;
  background:#2563eb;
}
.hub-summary-card.pending::before{background:#f59e0b}
.hub-summary-card.approved::before{background:#16a34a}
.hub-summary-card.rejected::before{background:#dc2626}
.hub-summary-card.today::before{background:#7c3aed}
.hub-summary-card span{
  display:block;
  color:#6b7280;
  font-weight:800;
}
.hub-summary-card strong{
  display:block;
  font-size:24px;
  font-weight:950;
  color:#111827;
  margin-top:6px;
}
.hr-hub-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.hr-hub-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:26px;
  padding:16px;
  min-height:235px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  box-shadow:0 10px 30px rgba(15,23,42,.07);
  transition:.18s ease;
  position:relative;
  overflow:hidden;
}
.hr-hub-card::after{
  content:"";
  position:absolute;
  top:-45px;
  left:-45px;
  width:120px;
  height:120px;
  border-radius:40px;
  opacity:.11;
  transform:rotate(20deg);
}
.hr-hub-card.job::after{background:#2563eb}
.hr-hub-card.guarantee::after{background:#0891b2}
.hr-hub-card.checkbook::after{background:#7c3aed}
.hr-hub-card.advance::after{background:#f59e0b}
.hr-hub-card.loan::after{background:#16a34a}
.hr-hub-card:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 46px rgba(15,23,42,.12);
  border-color:#c7d2fe;
}
.hub-card-top{
  display:flex;
  gap:12px;
  align-items:flex-start;
  position:relative;
  z-index:1;
}
.hub-card-icon{
  width:54px;
  height:54px;
  border-radius:19px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
  background:#f8fafc;
  border:1px solid #eef2f7;
  box-shadow:inset 0 -6px 14px rgba(15,23,42,.04);
  flex:0 0 auto;
}
.hub-card-top b{
  display:block;
  font-size:15px;
  font-weight:950;
  color:#111827;
  margin-bottom:4px;
}
.hub-card-top span{
  display:block;
  color:#6b7280;
  line-height:1.9;
  font-size:12px;
}
.hub-card-numbers{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin:16px 0 12px;
  position:relative;
  z-index:1;
}
.hub-card-numbers div{
  background:#f8fafc;
  border:1px solid #eef2f7;
  border-radius:16px;
  padding:9px 8px;
  text-align:center;
}
.hub-card-numbers small{
  display:block;
  color:#6b7280;
  font-weight:800;
  font-size:11px;
}
.hub-card-numbers strong{
  display:block;
  font-size:18px;
  font-weight:950;
  color:#111827;
  margin-top:3px;
}
.hub-progress{
  height:9px;
  background:#eef2f7;
  border-radius:999px;
  overflow:hidden;
  position:relative;
  z-index:1;
}
.hub-progress i{
  display:block;
  height:100%;
  min-width:5px;
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb,#06b6d4);
}
.hub-card-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:14px;
  color:#2563eb;
  font-weight:950;
  position:relative;
  z-index:1;
}
.hub-card-footer em{
  font-style:normal;
}
.hub-card-footer span{
  direction:ltr;
  font-size:18px;
}
.hr-hub-bottom{
  display:grid;
  grid-template-columns:minmax(0,1fr) 310px;
  gap:18px;
}
.hr-hub-latest,
.hr-hub-guide{
  margin-bottom:0;
}
.guide-step{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px;
  border:1px solid #eef2f7;
  border-radius:17px;
  background:#f8fafc;
  margin-bottom:10px;
}
.guide-step b{
  width:30px;
  height:30px;
  border-radius:12px;
  background:#111827;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.guide-step span{
  color:#374151;
  line-height:1.9;
  font-weight:800;
}
@media(max-width:1180px){
  .hr-hub-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .hr-hub-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
  .hr-hub-bottom{grid-template-columns:1fr}
}
@media(max-width:820px){
  .hr-hub-hero{
    padding:20px;
    flex-direction:column;
    align-items:stretch;
  }
  .hr-hub-hero h2{font-size:22px}
  .hr-hub-hero-actions{justify-content:stretch}
  .hero-action{flex:1}
  .hr-hub-grid{grid-template-columns:1fr}
  .hr-hub-summary{grid-template-columns:1fr}
  .hr-hub-card{
    min-height:auto;
  }
  .hub-card-top b{font-size:16px}
  .hub-card-top span{font-size:13px}
  .hr-latest-table tbody tr td:nth-child(1)::before{content:"ثبت";}
  .hr-latest-table tbody tr td:nth-child(2)::before{content:"نوع";}
  .hr-latest-table tbody tr td:nth-child(3)::before{content:"پرسنل";}
  .hr-latest-table tbody tr td:nth-child(4)::before{content:"کد ملی";}
  .hr-latest-table tbody tr td:nth-child(5)::before{content:"وضعیت";}
  .hr-latest-table tbody tr td:nth-child(6)::before{content:"زمان";}
  .hr-latest-table tbody tr td:nth-child(7)::before{content:"بررسی";}
}


/* Phase 4 v43 - full visual polish */
:root{
  --bg:#eef3fb;
  --surface:#ffffff;
  --surface-soft:#f8fafc;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --primary:#1d4ed8;
  --primary-2:#0891b2;
  --primary-soft:#eff6ff;
  --danger:#dc2626;
  --success:#16a34a;
  --warning:#d97706;
  --radius:20px;
  --shadow:0 16px 42px rgba(15,23,42,.08);
}
body{
  background:
    radial-gradient(circle at 7% 8%, rgba(37,99,235,.10), transparent 28%),
    radial-gradient(circle at 95% 15%, rgba(8,145,178,.10), transparent 25%),
    linear-gradient(180deg,#f8fafc 0%,#eef3fb 100%);
  color:var(--text);
}
.sidebar{
  width:250px;
  padding:18px 14px;
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(18px);
  border-left:1px solid rgba(226,232,240,.9);
  box-shadow:-12px 0 36px rgba(15,23,42,.05);
}
.main{margin-right:250px}
.brand{
  background:linear-gradient(135deg,#0f172a,#1d4ed8);
  color:#fff;
  padding:16px 14px;
  text-align:right;
  box-shadow:0 16px 30px rgba(37,99,235,.16);
}
.brand b{display:block;font-size:15px;font-weight:950}
.brand span{display:block;font-size:11px;color:rgba(255,255,255,.76);margin-top:3px}
.user-mini{
  display:grid;
  grid-template-columns:42px 1fr;
  align-items:center;
  gap:9px;
  padding:12px;
  border-radius:20px;
  background:linear-gradient(180deg,#fff,#f8fafc);
}
.user-mini i{
  width:42px;height:42px;border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  background:#eff6ff;color:#1d4ed8;font-style:normal;font-weight:950;
}
.user-mini b{display:block;font-size:13px;line-height:1.5}
.user-mini span{grid-column:2;color:#64748b;font-size:11px;margin-top:-6px}
.sidebar nav{gap:5px}
.sidebar a{
  min-height:43px;
  border:1px solid transparent;
  font-weight:800;
  color:#334155;
  position:relative;
  overflow:hidden;
}
.sidebar a::before{
  content:"";
  width:7px;height:7px;border-radius:50%;
  background:#cbd5e1;
  margin-left:9px;
  flex:0 0 auto;
}
.sidebar a:hover,.sidebar a.active{
  background:linear-gradient(90deg,#eff6ff,#f0f9ff);
  color:#1d4ed8;
  border-color:#dbeafe;
}
.sidebar a.active::before{background:#1d4ed8;box-shadow:0 0 0 5px rgba(37,99,235,.10)}
.sidebar a.logout{
  border-color:#fee2e2;
  background:linear-gradient(90deg,#fff,#fef2f2);
}
.sidebar a.logout::before{background:#ef4444}
.topbar{
  height:72px;
  background:rgba(255,255,255,.76);
  backdrop-filter:blur(18px);
  border-bottom:1px solid rgba(226,232,240,.88);
  justify-content:space-between;
}
.topbar-title{display:flex;flex-direction:column}
.topbar h1{font-size:17px;font-weight:950;letter-spacing:-.2px}
.topbar-title span{font-size:11px;color:#64748b;font-weight:800;margin-top:2px}
.topbar-tools{display:flex;gap:8px;align-items:center}
.topbar-tools a{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:38px;padding:7px 12px;border-radius:14px;
  background:#fff;border:1px solid #e2e8f0;color:#1e293b;font-weight:900;
  box-shadow:0 4px 14px rgba(15,23,42,.04);
}
.topbar-tools a:first-child{background:#1d4ed8;color:#fff;border-color:#1d4ed8}
.content{padding:20px;max-width:1320px}
.panel{
  border:1px solid rgba(226,232,240,.95);
  border-radius:24px;
  padding:18px;
  box-shadow:0 12px 38px rgba(15,23,42,.06);
}
.panel h2{font-size:15px;font-weight:950;color:#0f172a}
.panel-title-row{
  display:flex;justify-content:space-between;align-items:center;gap:12px;
}
.dashboard-hero{
  display:flex;
  justify-content:space-between;
  align-items:stretch;
  gap:18px;
  border-radius:30px;
  padding:24px;
  margin-bottom:18px;
  color:#fff;
  background:
    radial-gradient(circle at 10% 16%,rgba(255,255,255,.18),transparent 28%),
    linear-gradient(135deg,#0f172a 0%,#1d4ed8 55%,#0891b2 100%);
  box-shadow:0 22px 55px rgba(37,99,235,.18);
  overflow:hidden;
  position:relative;
}
.dashboard-hero::after{
  content:"";
  position:absolute;
  left:-70px;bottom:-90px;width:260px;height:260px;border-radius:80px;
  background:rgba(255,255,255,.10);
  transform:rotate(25deg);
}
.dashboard-hero>div{position:relative;z-index:1}
.hero-eyebrow{
  display:inline-flex;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.22);
  font-weight:900;
  margin-bottom:10px;
}
.dashboard-hero h2{
  margin:0 0 8px;
  font-size:28px;
  font-weight:950;
}
.dashboard-hero p{
  margin:0;
  color:rgba(255,255,255,.84);
  line-height:2;
}
.dashboard-hero-metrics{
  display:grid;
  grid-template-columns:repeat(2,minmax(120px,1fr));
  gap:10px;
  min-width:310px;
}
.dashboard-hero-metrics a{
  padding:14px;
  border-radius:20px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.20);
  color:#fff;
}
.dashboard-hero-metrics small{display:block;color:rgba(255,255,255,.72);font-weight:800}
.dashboard-hero-metrics b{display:block;font-size:18px;font-weight:950;margin-top:4px}
.stats{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}
.stat-card{
  border:1px solid #e2e8f0;
  border-radius:23px;
  padding:18px;
  position:relative;
  overflow:hidden;
}
.stat-card::after{
  content:"";
  position:absolute;
  width:90px;height:90px;border-radius:34px;
  background:linear-gradient(135deg,rgba(37,99,235,.12),rgba(8,145,178,.10));
  left:-25px;top:-35px;transform:rotate(20deg);
}
.stat-card span,.stat-card strong,.stat-card em{position:relative;z-index:1}
.stat-card strong{font-size:24px;font-weight:950}
.action-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.action-card{
  min-height:112px;
  border-radius:24px;
  border:1px solid #e2e8f0;
  background:linear-gradient(180deg,#fff,#f8fafc);
  display:flex;
  flex-direction:column;
  justify-content:center;
  position:relative;
  overflow:hidden;
}
.action-card::before{
  content:"";
  width:44px;height:44px;border-radius:18px;
  background:linear-gradient(135deg,#dbeafe,#cffafe);
  margin-bottom:10px;
}
.action-card::after{
  content:"←";
  position:absolute;
  left:16px;bottom:12px;
  color:#1d4ed8;font-weight:950;font-size:18px;
  direction:ltr;
}
.action-card strong{font-size:15px;font-weight:950;color:#0f172a}
.action-card span{font-size:12px;color:#64748b;line-height:1.9}
.action-card:hover{
  transform:translateY(-3px);
  box-shadow:0 18px 45px rgba(15,23,42,.10);
  border-color:#bfdbfe;
}
input,select,textarea{
  border-radius:14px;
  border-color:#cbd5e1;
  padding:10px 12px;
  background:#fff;
}
input:focus,select:focus,textarea:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}
button,.primary,.danger-btn,.small-link{
  border-radius:14px!important;
  font-weight:950!important;
}
.primary{
  background:linear-gradient(135deg,#1d4ed8,#0891b2);
  box-shadow:0 10px 24px rgba(37,99,235,.18);
}
.table-wrap{
  border:1px solid #e2e8f0;
  border-radius:20px;
  overflow:hidden;
}
table{border-collapse:separate;border-spacing:0}
th{
  background:#f8fafc!important;
  color:#334155;
  font-weight:950;
}
td,th{border-bottom:1px solid #eef2f7!important}
tr:last-child td{border-bottom:0!important}
tr:hover td{background:#fafcff}
.badge{
  min-height:27px;
  font-weight:950;
  border:1px solid transparent;
}
.badge.ok,.badge.success{background:#ecfdf5;color:#047857;border-color:#bbf7d0}
.badge.warn{background:#fffbeb;color:#b45309;border-color:#fde68a}
.badge.danger{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.alert{
  border-radius:18px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1e40af;
  font-weight:850;
}
.alert.ok{border-color:#bbf7d0;background:#ecfdf5;color:#047857}
.alert.error{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
.note-box{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:18px;
  padding:14px;
  line-height:2.1;
}
.dashboard-split{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin-top:18px;
}
.clean-list{
  display:grid;
  gap:10px;
}
.clean-list a,.empty-state{
  display:grid;
  grid-template-columns:1fr auto;
  gap:4px 12px;
  padding:13px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:17px;
}
.clean-list a b{font-weight:950;color:#0f172a}
.clean-list a span{color:#64748b;font-size:12px}
.clean-list a em{grid-row:1/3;grid-column:2;font-style:normal;color:#64748b;font-size:11px;align-self:center}
.empty-state{color:#64748b;font-weight:850;display:block;text-align:center}
.login-page{
  min-height:calc(100vh - 40px);
  display:grid;
  place-items:center;
}
.login-card{
  width:min(460px,100%);
  padding:28px;
  border-radius:30px;
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(18px);
  box-shadow:0 25px 70px rgba(15,23,42,.14);
  border:1px solid rgba(226,232,240,.9);
}
.login-logo{
  font-size:24px;
  font-weight:950;
  color:#0f172a;
  margin-bottom:8px;
}
.login-feature-row{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin:14px 0;
}
.login-feature-row span{
  padding:6px 10px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:900;
  font-size:11px;
}
.help-box{
  border-radius:18px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}
.hr-hub-hero,.hr-hub-card,.hub-summary-card{
  box-shadow:0 18px 50px rgba(15,23,42,.08);
}
.hr-hub-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
}
@media(max-width:1180px){
  .stats{grid-template-columns:repeat(3,minmax(0,1fr))}
  .action-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dashboard-split{grid-template-columns:1fr}
}
@media(max-width:900px){
  .sidebar{
    width:88vw;
    max-width:390px;
    transform:translateX(105%);
    transition:.25s ease;
  }
  body.menu-open .sidebar{transform:translateX(0)}
  .main{margin-right:0}
  .menu-btn{display:inline-flex}
  .topbar-tools{display:none}
  .content{padding:14px}
  .dashboard-hero{flex-direction:column;padding:20px}
  .dashboard-hero h2{font-size:22px}
  .dashboard-hero-metrics{min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))}
  .stats,.action-grid{grid-template-columns:1fr}
  .panel{padding:15px;border-radius:22px}
}
@media(max-width:520px){
  .dashboard-hero-metrics{grid-template-columns:1fr}
  .clean-list a{grid-template-columns:1fr}
  .clean-list a em{grid-column:auto;grid-row:auto}
}


/* Phase 4 v44 - softer minimal UI, smaller typography */
:root{
  --bg:#f5f7fb;
  --surface:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e6eaf0;
  --primary:#2563eb;
  --primary-2:#0ea5e9;
  --radius:17px;
  --shadow:0 8px 24px rgba(15,23,42,.055);
}
html{
  font-size:14px;
}
body{
  background:#f5f7fb;
  color:#111827;
  font-size:13px;
  line-height:1.75;
}
.content{
  padding:16px;
  max-width:1280px;
}
.sidebar{
  width:238px;
  padding:14px 12px;
  background:#fff;
  box-shadow:0 0 0 1px rgba(230,234,240,.9);
}
.main{
  margin-right:238px;
}
.brand{
  padding:13px 12px;
  border-radius:18px;
  box-shadow:none;
  background:linear-gradient(135deg,#172033,#2563eb);
}
.brand b{
  font-size:13px;
}
.brand span{
  font-size:10.5px;
}
.user-mini{
  padding:9px;
  border-radius:17px;
  background:#f8fafc;
}
.user-mini i{
  width:36px;
  height:36px;
  border-radius:14px;
  font-size:13px;
}
.user-mini b{
  font-size:12px;
}
.user-mini span{
  font-size:10.5px;
}
.sidebar a{
  min-height:38px;
  padding:8px 10px;
  border-radius:13px;
  font-size:12.5px;
}
.sidebar a::before{
  width:6px;
  height:6px;
  margin-left:8px;
}
.topbar{
  height:62px;
  padding:0 16px;
  background:rgba(255,255,255,.88);
}
.topbar h1{
  font-size:15px;
}
.topbar-title span{
  font-size:10.5px;
}
.topbar-tools a{
  min-height:34px;
  padding:6px 10px;
  border-radius:12px;
  font-size:12px;
  box-shadow:none;
}
.panel{
  padding:14px;
  border-radius:19px;
  box-shadow:0 6px 18px rgba(15,23,42,.045);
  border-color:#e6eaf0;
}
.panel h2{
  font-size:13.5px;
  margin-bottom:10px;
}
.panel-title-row{
  margin-bottom:8px;
}
.dashboard-hero,
.hr-hub-hero{
  padding:18px;
  border-radius:22px;
  margin-bottom:14px;
  box-shadow:0 10px 28px rgba(37,99,235,.11);
  background:linear-gradient(135deg,#111827 0%,#2563eb 58%,#0ea5e9 100%);
}
.dashboard-hero::after,
.hr-hub-hero::after{
  opacity:.65;
}
.hero-eyebrow,
.hr-hub-kicker{
  padding:5px 10px;
  font-size:10.5px;
}
.dashboard-hero h2,
.hr-hub-hero h2{
  font-size:22px;
  margin-bottom:5px;
}
.dashboard-hero p,
.hr-hub-hero p{
  font-size:12.5px;
  line-height:1.9;
}
.dashboard-hero-metrics{
  min-width:280px;
  gap:8px;
}
.dashboard-hero-metrics a{
  padding:10px 12px;
  border-radius:16px;
}
.dashboard-hero-metrics small{
  font-size:10.5px;
}
.dashboard-hero-metrics b{
  font-size:15px;
}
.stats,
.hr-hub-summary{
  gap:10px;
  margin-bottom:14px;
}
.stat-card,
.hub-summary-card{
  padding:13px;
  border-radius:17px;
  box-shadow:0 5px 16px rgba(15,23,42,.04);
}
.stat-card strong,
.hub-summary-card strong{
  font-size:20px;
}
.stat-card span,
.hub-summary-card span,
.stat-card em{
  font-size:11.5px;
}
.action-grid,
.hr-hub-grid{
  gap:10px;
}
.action-card{
  min-height:92px;
  padding:13px;
  border-radius:18px;
  box-shadow:none;
}
.action-card::before{
  width:34px;
  height:34px;
  border-radius:13px;
  margin-bottom:7px;
}
.action-card strong{
  font-size:13px;
}
.action-card span{
  font-size:11.5px;
}
.action-card::after{
  left:13px;
  bottom:10px;
  font-size:15px;
}
.hr-hub-card{
  min-height:202px;
  padding:13px;
  border-radius:20px;
  box-shadow:0 6px 18px rgba(15,23,42,.045);
}
.hub-card-icon{
  width:44px;
  height:44px;
  border-radius:15px;
  font-size:22px;
}
.hub-card-top{
  gap:10px;
}
.hub-card-top b{
  font-size:13px;
}
.hub-card-top span{
  font-size:11.2px;
  line-height:1.75;
}
.hub-card-numbers{
  gap:6px;
  margin:12px 0 9px;
}
.hub-card-numbers div{
  padding:7px 6px;
  border-radius:13px;
}
.hub-card-numbers small{
  font-size:10px;
}
.hub-card-numbers strong{
  font-size:15px;
}
.hub-progress{
  height:7px;
}
.hub-card-footer{
  margin-top:10px;
  font-size:12px;
}
.hr-hub-bottom,
.dashboard-split{
  gap:12px;
  margin-top:12px;
}
input,
select,
textarea{
  border-radius:12px;
  padding:8px 10px;
  font-size:12.5px;
}
label{
  font-size:12px;
  margin-bottom:5px;
}
button,
.primary,
.danger-btn,
.small-link{
  border-radius:12px!important;
  font-size:12px!important;
  min-height:34px;
}
.small-link{
  padding:6px 10px;
}
.table-wrap{
  border-radius:16px;
}
table{
  font-size:12px;
}
th{
  font-size:11.5px;
  padding:10px 9px!important;
}
td{
  padding:9px!important;
}
.badge{
  min-height:24px;
  padding:4px 8px;
  font-size:11px;
  border-radius:999px;
}
.note-box,
.alert,
.help-box{
  border-radius:15px;
  padding:11px 12px;
  font-size:12.2px;
}
.detail-grid{
  gap:9px;
}
.detail-grid div{
  padding:11px;
  border-radius:15px;
}
.detail-grid span{
  font-size:10.5px;
}
.detail-grid b{
  font-size:12.5px;
}
.form-grid{
  gap:11px;
}
.login-card{
  max-width:420px;
  padding:22px;
  border-radius:24px;
  box-shadow:0 16px 48px rgba(15,23,42,.10);
}
.login-logo{
  font-size:20px;
}
.login-feature-row span{
  font-size:10.5px;
  padding:5px 9px;
}
.clean-list a,
.empty-state{
  padding:10px;
  border-radius:14px;
}
.clean-list a b{
  font-size:12.5px;
}
.clean-list a span,
.clean-list a em{
  font-size:10.8px;
}
.guide-step{
  padding:9px;
  border-radius:14px;
}
.guide-step b{
  width:26px;
  height:26px;
  border-radius:10px;
  font-size:11px;
}
.guide-step span{
  font-size:11.5px;
}
.hr-menu-grid{
  gap:10px;
}
@media(max-width:900px){
  html{
    font-size:13.5px;
  }
  body{
    font-size:12.5px;
  }
  .sidebar{
    width:84vw;
    max-width:350px;
  }
  .main{
    margin-right:0;
  }
  .content{
    padding:11px;
  }
  .topbar{
    height:58px;
    padding:0 12px;
  }
  .topbar h1{
    font-size:14px;
  }
  .dashboard-hero,
  .hr-hub-hero{
    padding:15px;
    border-radius:19px;
  }
  .dashboard-hero h2,
  .hr-hub-hero h2{
    font-size:19px;
  }
  .panel{
    padding:12px;
    border-radius:17px;
  }
  .hr-hub-card{
    min-height:auto;
  }
}


/* Phase 4 v45 - leave balance import */
.morkhasi-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px;
  border-radius:22px;
  margin-bottom:14px;
  background:linear-gradient(135deg,#0f172a,#2563eb);
  color:#fff;
  box-shadow:0 10px 28px rgba(37,99,235,.12);
}
.morkhasi-hero span{
  display:inline-flex;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.18);
  font-size:11px;
  font-weight:900;
}
.morkhasi-hero h2{
  margin:8px 0 5px;
  font-size:20px;
  font-weight:950;
}
.morkhasi-hero p{
  margin:0;
  color:rgba(255,255,255,.84);
  font-size:12.5px;
  line-height:1.9;
}
.morkhasi-hero form{
  flex:0 0 auto;
}
.morkhasi-help{
  margin-top:12px;
}
.confirm-row{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:14px;
  flex-wrap:wrap;
}
.morkhasi-preview-panel{
  border-color:#bfdbfe;
  box-shadow:0 10px 28px rgba(37,99,235,.07);
}
.morkhasi-preview-table th,
.morkhasi-preview-table td,
.morkhasi-table th,
.morkhasi-table td{
  white-space:nowrap;
}
@media(max-width:760px){
  .morkhasi-hero{
    flex-direction:column;
    align-items:stretch;
  }
  .morkhasi-hero form button{
    width:100%;
  }
  .morkhasi-preview-table tbody tr td:nth-child(1)::before{content:"ردیف";}
  .morkhasi-preview-table tbody tr td:nth-child(2)::before{content:"نام اکسل";}
  .morkhasi-preview-table tbody tr td:nth-child(3)::before{content:"کد پرسنلی";}
  .morkhasi-preview-table tbody tr td:nth-child(4)::before{content:"کد ملی";}
  .morkhasi-preview-table tbody tr td:nth-child(5)::before{content:"مانده";}
  .morkhasi-preview-table tbody tr td:nth-child(6)::before{content:"استفاده‌شده";}
  .morkhasi-preview-table tbody tr td:nth-child(7)::before{content:"سال/ماه";}
  .morkhasi-preview-table tbody tr td:nth-child(8)::before{content:"وضعیت";}
  .morkhasi-preview-table tbody tr td:nth-child(9)::before{content:"پیام";}

  .morkhasi-table tbody tr td:nth-child(1)::before{content:"شناسه";}
  .morkhasi-table tbody tr td:nth-child(2)::before{content:"پرسنل";}
  .morkhasi-table tbody tr td:nth-child(3)::before{content:"کد پرسنلی";}
  .morkhasi-table tbody tr td:nth-child(4)::before{content:"کد ملی";}
  .morkhasi-table tbody tr td:nth-child(5)::before{content:"تاریخ";}
  .morkhasi-table tbody tr td:nth-child(6)::before{content:"رفته";}
  .morkhasi-table tbody tr td:nth-child(7)::before{content:"مانده";}
}


/* Phase 4 v46 - leave balance list and transaction fix */
.morkhasi-hero form{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}
.morkhasi-hero .hero-action{
  background:rgba(255,255,255,.15);
  color:#fff;
  border-color:rgba(255,255,255,.22);
}
@media(max-width:760px){
  .morkhasi-list-table tbody tr td:nth-child(1)::before{content:"پرسنل";}
  .morkhasi-list-table tbody tr td:nth-child(2)::before{content:"کد پرسنلی";}
  .morkhasi-list-table tbody tr td:nth-child(3)::before{content:"کد ملی";}
  .morkhasi-list-table tbody tr td:nth-child(4)::before{content:"وضعیت رکورد";}
  .morkhasi-list-table tbody tr td:nth-child(5)::before{content:"تاریخ";}
  .morkhasi-list-table tbody tr td:nth-child(6)::before{content:"رفته";}
  .morkhasi-list-table tbody tr td:nth-child(7)::before{content:"مانده";}
}


/* Phase 4 v47 - morkhasi skipped details */
.morkhasi-skip-panel{
  border-color:#fecaca;
  background:linear-gradient(180deg,#fff,#fffafa);
}
@media(max-width:760px){
  .morkhasi-skip-table tbody tr td:nth-child(1)::before{content:"شناسه";}
  .morkhasi-skip-table tbody tr td:nth-child(2)::before{content:"نام";}
  .morkhasi-skip-table tbody tr td:nth-child(3)::before{content:"کد پرسنلی";}
  .morkhasi-skip-table tbody tr td:nth-child(4)::before{content:"کد ملی";}
  .morkhasi-skip-table tbody tr td:nth-child(5)::before{content:"علت";}
}


/* Phase 4 v48 - morkhasi date picker and Excel header fix */
#report_date.jalali-date-input{
  cursor:pointer;
  background:#fff;
}
#report_date.jalali-date-input::placeholder{
  color:#94a3b8;
}


/* Phase 4 v49 - Excel parser + improved Jalali calendar */
#report_date.jalali-date-input,
.jalali-date-input{
  cursor:pointer;
}


/* Phase 4 v50 - Bale personnel report */
.bale-report-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px;
  border-radius:22px;
  margin-bottom:14px;
  background:linear-gradient(135deg,#111827,#2563eb);
  color:#fff;
  box-shadow:0 10px 28px rgba(37,99,235,.12);
}
.bale-report-hero span{
  display:inline-flex;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.18);
  font-size:11px;
  font-weight:900;
}
.bale-report-hero h2{
  margin:8px 0 5px;
  font-size:20px;
  font-weight:950;
}
.bale-report-hero p{
  margin:0;
  color:rgba(255,255,255,.84);
  font-size:12.5px;
  line-height:1.9;
}
.bale-report-hero .hero-action{
  background:#fff;
  color:#1d4ed8;
  border-color:#fff;
}
.quick-filter-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}
.small-link.active-filter{
  background:#1d4ed8!important;
  color:#fff!important;
  border-color:#1d4ed8!important;
}
@media(max-width:760px){
  .bale-report-hero{
    flex-direction:column;
    align-items:stretch;
  }
  .bale-report-hero .hero-action{
    width:100%;
  }
  .bale-personnel-table tbody tr td:nth-child(1)::before{content:"نام";}
  .bale-personnel-table tbody tr td:nth-child(2)::before{content:"کد پرسنلی";}
  .bale-personnel-table tbody tr td:nth-child(3)::before{content:"کد ملی";}
  .bale-personnel-table tbody tr td:nth-child(4)::before{content:"شرکت";}
  .bale-personnel-table tbody tr td:nth-child(5)::before{content:"سمت";}
  .bale-personnel-table tbody tr td:nth-child(6)::before{content:"وضعیت بله";}
  .bale-personnel-table tbody tr td:nth-child(7)::before{content:"شناسه بله";}
}
