:root{
  --bg:#F5F6F2;
  --surface:#FFFFFF;
  --surface-soft:#FBFAF7;
  --ink:#1F2444;
  --ink-soft:#666C87;
  --ink-faint:#9498AC;
  --border:#E6E5DC;
  --marigold:#E39A38;
  --marigold-soft:#FBEDD6;
  --coral:#EE7466;
  --coral-soft:#FCE4E0;
  --teal:#3D7D71;
  --teal-soft:#DEEEE9;
  --indigo:#3E4A9E;
  --indigo-soft:#E5E7F7;
  --radius-lg:20px;
  --radius-md:14px;
  --radius-sm:9px;
  --shadow:0 2px 4px rgba(31,36,68,0.04), 0 12px 28px -14px rgba(31,36,68,0.16);
  --shadow-hover:0 6px 10px rgba(31,36,68,0.06), 0 20px 36px -16px rgba(31,36,68,0.22);
}
*{box-sizing:border-box; margin:0; padding:0;}
html{ overflow-x:hidden; max-width:100%; }
body{
  font-family:'Vazirmatn', sans-serif;
  background:var(--bg);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x:hidden;
  max-width:100%;
}
a{color:inherit; text-decoration:none;}
button{font-family:inherit; border:none; cursor:pointer; background:none;}
input,select,textarea{font-family:inherit; font-size:13.5px; min-width:0;}

.app{
  display:flex; min-height:100vh; overflow-x:hidden;
  /* transform makes .app the containing block for the fixed mobile sidebar drawer
     below, so its off-screen (translateX) closed position is clipped here instead
     of inflating body/html scrollWidth with a box that sits past the viewport. */
  transform:translateZ(0);
}

/* ambient background blob */
.blob{
  position:fixed; width:520px; height:520px; border-radius:50%;
  background:radial-gradient(circle, rgba(227,154,56,.16), rgba(238,116,102,.10) 45%, transparent 70%);
  top:-180px; left:-140px; filter:blur(10px); pointer-events:none; z-index:0;
  animation: drift 16s ease-in-out infinite alternate;
}
.blob2{
  position:fixed; width:420px; height:420px; border-radius:50%;
  background:radial-gradient(circle, rgba(62,74,158,.10), transparent 70%);
  bottom:-160px; right:-100px; filter:blur(10px); pointer-events:none; z-index:0;
  animation: drift2 20s ease-in-out infinite alternate;
}
@keyframes drift{ from{ transform:translate(0,0);} to{ transform:translate(40px,30px);} }
@keyframes drift2{ from{ transform:translate(0,0);} to{ transform:translate(-30px,-25px);} }
@media (prefers-reduced-motion: reduce){ .blob,.blob2{ animation:none; } }

/* SIDEBAR */
.sidebar{
  width:250px; flex-shrink:0; background:var(--surface); border-left:1px solid var(--border);
  padding:28px 20px; display:flex; flex-direction:column; gap:34px; z-index:2; position:relative;
}
.brand{ display:flex; align-items:center; gap:11px; padding:0 4px;}
.brand-mark{
  width:38px; height:38px; border-radius:11px;
  background:linear-gradient(145deg, var(--marigold), var(--coral));
  display:flex; align-items:center; justify-content:center;
  font-weight:800; color:#fff; font-size:16px; flex-shrink:0;
  box-shadow:0 6px 14px -4px rgba(238,116,102,.55);
}
.brand-text{ display:flex; flex-direction:column; line-height:1.35;}
.brand-text b{ font-size:15px; font-weight:700; }
.brand-text span{ font-size:11.5px; color:var(--ink-faint); }

nav{ display:flex; flex-direction:column; gap:3px; }
.nav-label{ font-size:11px; color:var(--ink-faint); font-weight:600; padding:0 12px; margin-bottom:6px; letter-spacing:.02em;}
.nav-item{
  display:flex; align-items:center; gap:11px; width:100%; text-align:right;
  padding:10px 12px; border-radius:var(--radius-sm); position:relative;
  font-size:14px; font-weight:500; color:var(--ink-soft);
  cursor:pointer; transition:background .15s, color .15s, transform .15s;
}
.nav-item svg{ width:18px; height:18px; flex-shrink:0; }
.nav-item:hover{ background:var(--surface-soft); color:var(--ink); transform:translateX(-2px); }
.nav-item.active{ background:var(--indigo-soft); color:var(--indigo); font-weight:700; }
.nav-item.active::before{
  content:''; position:absolute; right:-20px; top:50%; transform:translateY(-50%);
  width:3px; height:20px; border-radius:99px; background:var(--indigo);
}

.sidebar-foot{
  margin-top:auto; padding-top:18px; border-top:1px solid var(--border);
  display:flex; align-items:center; gap:10px;
}
.avatar{
  width:34px; height:34px; border-radius:50%; background:var(--indigo); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; flex-shrink:0;
}
.sidebar-foot .who{ line-height:1.3; }
.sidebar-foot .who b{ font-size:13px; display:block; }
.sidebar-foot .who span{ font-size:11px; color:var(--ink-faint); }

/* MAIN */
.main{ flex:1; min-width:0; padding:32px 40px 60px; max-width:1180px; position:relative; z-index:1; }
.topbar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:28px; }
.topbar h1{ font-size:22px; font-weight:800; }
.topbar .sub{ font-size:13px; color:var(--ink-faint); margin-top:4px; font-weight:500;}
.today-pill{
  background:var(--surface); border:1px solid var(--border); border-radius:999px;
  padding:8px 16px; font-size:12.5px; color:var(--ink-soft); font-weight:600;
  display:flex; align-items:center; gap:7px;
}
.today-pill b{ color:var(--indigo); }

.btn-primary{
  display:flex; align-items:center; gap:8px;
  background:linear-gradient(135deg, var(--indigo), #4E5BC4);
  color:#fff; font-size:13px; font-weight:700; padding:11px 20px; border-radius:11px;
  box-shadow:0 8px 18px -8px rgba(62,74,158,.55);
  transition:transform .15s, box-shadow .15s;
}
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 12px 22px -8px rgba(62,74,158,.6); }
.btn-primary svg{ width:15px; height:15px; }
.btn-primary:disabled{ opacity:.6; cursor:not-allowed; transform:none !important; }
.btn-primary.btn-feedback-success, .btn-ghost.btn-feedback-success{
  background:var(--teal) !important; color:#fff !important; opacity:1 !important;
}
.btn-primary.btn-feedback-error, .btn-ghost.btn-feedback-error{
  background:var(--coral) !important; color:#fff !important; opacity:1 !important;
}
.btn-ghost{
  background:var(--surface); border:1px solid var(--border); color:var(--ink-soft);
  font-size:12.5px; font-weight:700; padding:9px 16px; border-radius:10px;
}

/* VIEWS */
.view{ display:none; }
.view.active{ display:block; animation:fadeUp .4s ease; }
@keyframes fadeUp{ from{ opacity:0; transform:translateY(10px);} to{ opacity:1; transform:translateY(0);} }
@media (prefers-reduced-motion: reduce){ .view.active{ animation:none; } }

/* STAT CARDS */
.stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:32px; }
.stat-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:18px 20px; box-shadow:var(--shadow); transition:transform .18s, box-shadow .18s;
  opacity:0; animation:pop .5s ease forwards;
}
.stat-card:nth-child(1){ animation-delay:.02s; }
.stat-card:nth-child(2){ animation-delay:.08s; }
.stat-card:nth-child(3){ animation-delay:.14s; }
.stat-card:nth-child(4){ animation-delay:.2s; }
@keyframes pop{ from{ opacity:0; transform:translateY(8px) scale(.98);} to{ opacity:1; transform:translateY(0) scale(1);} }
@media (prefers-reduced-motion: reduce){ .stat-card{ opacity:1; animation:none; } }
.stat-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-hover); }
.stat-card .top{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:14px;}
.stat-icon{ width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; }
.stat-icon svg{ width:17px; height:17px; }
.stat-card .num{ font-size:26px; font-weight:800; line-height:1; }
.stat-card .label{ font-size:12.5px; color:var(--ink-faint); margin-top:6px; font-weight:600;}
.trend{ font-size:11.5px; font-weight:700; padding:3px 8px; border-radius:999px; }
.trend.up{ background:var(--teal-soft); color:var(--teal); }
.trend.warn{ background:var(--coral-soft); color:var(--coral); }

.section-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.section-head h2{ font-size:15.5px; font-weight:700; }
.section-head .link{ font-size:12.5px; color:var(--indigo); font-weight:600; }

/* TEAM ROW (dashboard) */
.team-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:34px; }
.person-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:18px; box-shadow:var(--shadow); position:relative; transition:transform .18s, box-shadow .18s;
}
.person-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-hover); }
.person-card.locked{ background:var(--surface-soft); }
.lock-badge{
  position:absolute; top:14px; left:14px; background:var(--indigo-soft); color:var(--indigo);
  font-size:10px; font-weight:700; padding:4px 8px; border-radius:999px; display:flex; align-items:center; gap:4px;
}
.lock-badge svg{ width:10px; height:10px; }
.person-head{ display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.p-avatar{
  width:40px; height:40px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; color:#fff;
}
.person-head b{ font-size:14px; font-weight:700; display:block; }
.person-head span{ font-size:11.5px; color:var(--ink-faint); }
.ring-wrap{ display:flex; align-items:center; gap:14px; }
.ring-wrap .num-side{ line-height:1.3; }
.ring-wrap .pct{ font-size:20px; font-weight:800; }
.ring-wrap .task-count{ font-size:11.5px; color:var(--ink-faint); font-weight:600; }
.ring-progress{ transition:stroke-dashoffset 1.1s cubic-bezier(.4,0,.2,1); }

/* PANEL / TABLE */
.panel{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  box-shadow:var(--shadow); overflow:hidden; margin-bottom:34px;
}
table{ width:100%; border-collapse:collapse; }
thead th{
  text-align:right; font-size:11.5px; color:var(--ink-faint); font-weight:700;
  padding:14px 20px; background:var(--surface-soft); border-bottom:1px solid var(--border);
}
tbody td{ padding:15px 20px; font-size:13.5px; border-bottom:1px solid var(--border); vertical-align:middle; }
tbody tr:last-child td{ border-bottom:none; }
tbody tr{ transition:background .12s; }
tbody tr:hover{ background:var(--surface-soft); }
.who-cell{ display:flex; align-items:center; gap:9px; }
.who-dot{ width:26px; height:26px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; }
.task-title{ font-weight:600; }
.task-desc{ font-size:11.5px; color:var(--ink-faint); margin-top:2px; }
.badge{ font-size:11px; font-weight:700; padding:4px 11px; border-radius:999px; display:inline-block; }
.badge.done{ background:var(--teal-soft); color:var(--teal); }
.badge.progress{ background:var(--marigold-soft); color:var(--marigold); }
.badge.pending{ background:#EFEFEA; color:var(--ink-soft); }
.prog-bar{ width:90px; height:6px; background:#EDECE4; border-radius:99px; overflow:hidden; }
.prog-bar > div{ height:100%; border-radius:99px; background:var(--indigo); transition:width 1s ease; }
.deadline{ font-weight:600; }
.deadline.soon{ color:var(--coral); }

/* BOTTOM GRID (dashboard) */
.bottom-grid{ display:grid; grid-template-columns:1.3fr 1fr; gap:20px; }
.activity-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:22px; box-shadow:var(--shadow);
}
.activity-card h3{ font-size:15px; font-weight:700; margin-bottom:16px; }
.activity-item{ display:flex; gap:11px; padding:10px 0; border-bottom:1px solid var(--border); }
.activity-item:last-child{ border-bottom:none; padding-bottom:0; }
.act-dot{ width:7px; height:7px; border-radius:50%; margin-top:6px; flex-shrink:0; }
.act-text{ font-size:12.8px; line-height:1.6; }
.act-text b{ font-weight:700; }
.act-time{ font-size:11px; color:var(--ink-faint); margin-top:1px; }

/* FORM CARD (shared: add task / add employee) */
.form-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  box-shadow:var(--shadow); padding:24px; margin-bottom:28px; overflow:hidden;
  max-height:0; opacity:0; padding-top:0; padding-bottom:0; transition:max-height .35s ease, opacity .3s ease, padding .35s ease;
}
.form-card.open{ max-height:900px; opacity:1; padding-top:24px; padding-bottom:24px; }
.form-card.static{ max-height:none; opacity:1; padding-top:24px; padding-bottom:24px; }
.form-card h3{ font-size:15px; font-weight:700; margin-bottom:18px; }
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }
.form-grid.full{ grid-template-columns:1fr; }
.field label{ display:block; font-size:12px; font-weight:700; color:var(--ink-soft); margin-bottom:7px; }
.field input, .field select, .field textarea{
  width:100%; border:1px solid var(--border); border-radius:10px; padding:10px 13px;
  background:var(--surface-soft); color:var(--ink); outline:none; transition:border-color .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--indigo); background:var(--surface); }
.field textarea{ resize:vertical; min-height:70px; }
.form-actions{ display:flex; gap:10px; justify-content:flex-start; margin-top:6px; }
.pin-hint{ font-size:11px; color:var(--ink-faint); margin-top:6px; }
.form-error{ font-size:12px; color:var(--coral); font-weight:700; margin-top:8px; }

/* TASKS VIEW filters */
.filter-chips{ display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.chip{
  padding:8px 16px; border-radius:999px; background:var(--surface); border:1px solid var(--border);
  font-size:12.5px; font-weight:600; color:var(--ink-soft); cursor:pointer; transition:.15s;
}
.chip.active{ background:var(--indigo); color:#fff; border-color:var(--indigo); }

/* TEAM (employees) view */
.emp-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.emp-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:20px; box-shadow:var(--shadow); transition:transform .18s, box-shadow .18s; position:relative;
}
.emp-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-hover); }
.emp-top{ display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.emp-top b{ font-size:14.5px; display:block; }
.emp-top span{ font-size:11.5px; color:var(--ink-faint); }
.emp-role-tag{ font-size:10.5px; font-weight:700; padding:4px 10px; border-radius:999px; display:inline-block; margin-bottom:12px; }
.emp-role-tag.normal{ background:var(--teal-soft); color:var(--teal); }
.emp-role-tag.restricted{ background:var(--indigo-soft); color:var(--indigo); }
.emp-meta{ display:flex; justify-content:space-between; font-size:11.5px; color:var(--ink-faint); padding-top:12px; border-top:1px solid var(--border); }
.emp-actions{ display:flex; gap:6px; }
.emp-actions button{ width:26px; height:26px; border-radius:8px; background:var(--surface-soft); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; }
.emp-actions svg{ width:13px; height:13px; color:var(--ink-faint); }

/* REPORTS view */
.report-toolbar{
  display:flex; align-items:center; gap:12px; margin-bottom:20px; flex-wrap:wrap;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:14px 18px; box-shadow:var(--shadow);
}
.report-toolbar .field{ min-width:150px; }
.report-toolbar .field label{ margin-bottom:5px; }
.report-list{ display:flex; flex-direction:column; gap:12px; }
.report-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:18px 20px; box-shadow:var(--shadow); transition:transform .15s, box-shadow .15s;
}
.report-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-hover); }
.report-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.report-who{ display:flex; align-items:center; gap:10px; }
.report-who b{ font-size:13.5px; }
.report-date{ font-size:11.5px; font-weight:700; color:var(--ink-faint); background:var(--surface-soft); padding:5px 12px; border-radius:999px; }
.report-text{ font-size:13px; color:var(--ink-soft); line-height:1.8; }
.report-tasklinks{ display:flex; gap:6px; margin-top:12px; flex-wrap:wrap; }
.report-tasklinks span{ font-size:10.5px; font-weight:700; background:var(--marigold-soft); color:var(--marigold); padding:3px 10px; border-radius:999px; }

/* OCR view */
.ocr-hero{
  background:linear-gradient(135deg, var(--indigo), #545FC9 55%, var(--coral));
  border-radius:var(--radius-lg); padding:26px 28px; color:#fff; margin-bottom:22px;
  box-shadow:0 14px 30px -14px rgba(62,74,158,.5);
}
.ocr-hero h2{ font-size:17px; font-weight:800; margin-bottom:6px; }
.ocr-hero p{ font-size:12.8px; opacity:.9; max-width:520px; line-height:1.7; }
.ocr-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:24px; box-shadow:var(--shadow);
}
.ocr-card h3{ font-size:15px; font-weight:700; margin-bottom:4px; }
.ocr-card p.hint{ font-size:12.5px; color:var(--ink-faint); margin-bottom:18px; }
.dropzone{
  border:1.6px dashed #D7D5C7; border-radius:var(--radius-md);
  padding:32px 20px; text-align:center; background:var(--surface-soft); transition:border-color .2s, background .2s;
  cursor:pointer;
}
.dropzone:hover{ border-color:var(--indigo); background:var(--indigo-soft); }
.dropzone svg{ width:30px; height:30px; color:var(--ink-faint); margin-bottom:10px; }
.dropzone .dz-title{ font-size:13.5px; font-weight:700; margin-bottom:4px; }
.dropzone .dz-sub{ font-size:11.5px; color:var(--ink-faint); }
.dz-btn{ display:inline-block; margin-top:14px; background:var(--indigo); color:#fff; font-size:12.5px; font-weight:700; padding:9px 20px; border-radius:999px; }
.extract-preview{ margin-top:18px; }
.extract-preview textarea{ width:100%; min-height:110px; border:1px solid var(--border); border-radius:10px; padding:12px; background:var(--surface-soft); }

/* WEEKLY MINUTES */
.input-tabs{ display:flex; gap:8px; margin-bottom:16px; }
.input-tab{
  display:flex; align-items:center; gap:8px; padding:10px 18px; border-radius:11px;
  background:var(--surface); border:1px solid var(--border); font-size:12.5px; font-weight:700; color:var(--ink-soft);
  transition:.15s;
}
.input-tab svg{ width:15px; height:15px; }
.input-tab.active{ background:var(--indigo); color:#fff; border-color:var(--indigo); }
.parsed-group{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
  padding:18px 20px; margin-bottom:14px; box-shadow:var(--shadow);
}
.parsed-group-head{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.parsed-group-head b{ font-size:14px; }
.parsed-group-head span{ font-size:11px; color:var(--ink-faint); font-weight:600; }
.parsed-task-row{ display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.parsed-task-row:last-child{ border-bottom:none; }
.parsed-task-row input[type=text]{ flex:1; min-width:0; border:1px solid transparent; border-radius:8px; padding:7px 10px; background:var(--surface-soft); font-size:13px; }
.parsed-task-row input[type=text]:focus{ border-color:var(--indigo); outline:none; }
.parsed-task-row .parsed-deadline{ width:130px; flex:none; }
@media (max-width:480px){
  .parsed-task-row input[type=text]:not(.parsed-deadline){ flex-basis:100%; }
}
.parsed-remove{ width:26px; height:26px; border-radius:8px; background:var(--coral-soft); color:var(--coral); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.parsed-remove svg{ width:12px; height:12px; }
.parsed-empty{
  text-align:center; padding:30px; color:var(--ink-faint); font-size:13px;
  background:var(--surface); border:1px dashed var(--border); border-radius:var(--radius-md);
}

/* TOP UTILITY BAR (admin) */
.util-bar{ display:flex; align-items:center; gap:12px; margin-bottom:24px; }
.util-search{
  flex:1; display:flex; align-items:center; gap:9px; background:var(--surface); border:1px solid var(--border);
  border-radius:12px; padding:10px 15px;
}
.util-search svg{ width:15px; height:15px; color:var(--ink-faint); flex-shrink:0; }
.util-search input{ border:none; background:none; outline:none; flex:1; font-size:13px; }
.util-icon-btn{
  width:40px; height:40px; border-radius:12px; background:var(--surface); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; position:relative; flex-shrink:0;
}
.util-icon-btn svg{ width:17px; height:17px; color:var(--ink-soft); }
.util-dot{ position:absolute; top:8px; left:9px; width:7px; height:7px; border-radius:50%; background:var(--coral); border:2px solid var(--surface); }

/* MOBILE TOPBAR + SIDEBAR OVERLAY (admin) */
.mobile-topbar{
  display:none; align-items:center; justify-content:space-between;
  background:var(--surface); border-bottom:1px solid var(--border);
  padding:13px 16px; position:sticky; top:0; z-index:40;
}
.hamburger-btn{ width:36px; height:36px; border-radius:10px; background:var(--surface-soft); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; }
.hamburger-btn svg{ width:18px; height:18px; }
.sidebar-overlay{ position:fixed; inset:0; background:rgba(20,22,40,.4); z-index:60; display:none; }
.sidebar-overlay.open{ display:block; }

/* EMPLOYEE APP (mobile-first) */
.employee-app{ max-width:440px; margin:0 auto; padding:0 16px 90px; position:relative; z-index:1; min-height:100vh; }
.emp-hero{
  background:linear-gradient(135deg, var(--indigo), #545FC9 60%, var(--coral));
  margin:0 -16px 20px; padding:22px 16px 26px; border-radius:0 0 28px 28px;
  box-shadow:0 14px 30px -18px rgba(62,74,158,.5);
}
.emp-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.emp-header .who{ display:flex; align-items:center; gap:12px; }
.avatar-ring{ padding:3px; border-radius:50%; background:rgba(255,255,255,.35); }
.avatar-ring .avatar{ width:46px; height:46px; font-size:16px; border:2px solid rgba(255,255,255,.6); }
.emp-greeting{ font-size:14px; font-weight:700; color:#fff; margin-bottom:4px; }
.emp-today{ font-size:11px; color:#fff; background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.3); padding:7px 13px; border-radius:999px; font-weight:600; }
.emp-stats-row{ display:flex; gap:10px; }
.emp-stat-chip{
  flex:1; display:flex; align-items:center; gap:9px; background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.25); border-radius:14px; padding:11px 13px; backdrop-filter:blur(2px);
}
.emp-stat-chip svg{ width:17px; height:17px; color:#fff; flex-shrink:0; }
.emp-stat-chip b{ font-size:15px; color:#fff; display:block; line-height:1.2; }
.emp-stat-chip span{ font-size:10px; color:rgba(255,255,255,.85); font-weight:600; }

.emp-view{ display:none; }
.emp-view.active{ display:block; animation:fadeUp .3s ease; }
.emp-task-card{
  background:var(--surface); border:1px solid var(--border); border-radius:16px;
  padding:16px 16px 14px; margin-bottom:12px; box-shadow:var(--shadow);
  border-right:4px solid var(--border); transition:transform .15s, box-shadow .15s;
}
.emp-task-card:active{ transform:scale(.99); }
.emp-task-top{ display:flex; align-items:flex-start; gap:12px; }
.emp-checkbox{ width:26px; height:26px; border-radius:9px; border:2px solid var(--border); flex-shrink:0; display:flex; align-items:center; justify-content:center; margin-top:2px; transition:.15s; }
.emp-checkbox.checked{ background:var(--teal); border-color:var(--teal); transform:scale(1.05); }
.emp-checkbox svg{ width:14px; height:14px; color:#fff; opacity:0; transition:.15s; }
.emp-checkbox.checked svg{ opacity:1; }
.emp-task-title{ font-weight:700; font-size:13.5px; }
.emp-task-meta{ font-size:11px; color:var(--ink-faint); margin-top:3px; }
.emp-progress-row{ display:flex; align-items:center; gap:10px; margin:13px 0 10px; }
.emp-progress-track{ flex:1; height:7px; border-radius:99px; background:#EDECE4; overflow:hidden; }
.emp-progress-fill{ height:100%; border-radius:99px; transition:width .5s ease; }
.emp-progress-label{ font-size:11.5px; font-weight:800; color:var(--ink-soft); min-width:32px; text-align:left; }
.emp-stage-btns{ display:flex; gap:6px; }
.stage-btn{
  flex:1; padding:7px 0; border-radius:9px; background:var(--surface-soft); border:1px solid var(--border);
  font-size:10.5px; font-weight:700; color:var(--ink-faint); transition:.15s;
}
.stage-btn.active{ background:var(--indigo); color:#fff; border-color:var(--indigo); }
.emp-task-note{ margin-top:12px; }
.emp-task-note textarea{ width:100%; border:1px solid var(--border); border-radius:10px; padding:9px 11px; background:var(--surface-soft); min-height:50px; font-size:12.5px; }
.emp-task-note .save-note{ margin-top:8px; }
.emp-report-form{ background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:18px; box-shadow:var(--shadow); margin-bottom:18px; }
.emp-report-list .report-card{ padding:14px 16px; box-shadow:none; }
.emp-bottom-nav{
  position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:440px;
  background:var(--surface); border-top:1px solid var(--border); display:flex; z-index:40; box-shadow:0 -6px 18px rgba(0,0,0,.05);
}
.emp-bottom-nav button{ flex:1; padding:12px 0 10px; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:10.5px; color:var(--ink-faint); font-weight:700; }
.emp-bottom-nav button.active{ color:var(--indigo); }
.emp-bottom-nav svg{ width:19px; height:19px; }

/* EMPLOYEE EDIT MODAL */
.edit-modal{
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); z-index:310;
  background:var(--surface); border-radius:20px; box-shadow:var(--shadow-hover);
  padding:26px; width:400px; max-width:90vw; display:none;
}
.edit-modal.open{ display:block; }
.edit-modal h3{ font-size:15.5px; font-weight:700; margin-bottom:18px; }

/* JALALI CALENDAR POPUP */
.cal-overlay{ position:fixed; inset:0; background:rgba(20,22,40,.4); z-index:300; display:none; }
.cal-overlay.open{ display:block; }
.cal-popup{
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); z-index:310;
  background:var(--surface); border-radius:18px; box-shadow:var(--shadow-hover);
  padding:18px; width:270px; display:none;
}
.cal-popup.open{ display:block; }
.cal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.cal-head b{ font-size:13px; }
.cal-head span{ font-size:13px; font-weight:700; }
.cal-year-btn{ font-size:13px; font-weight:800; color:var(--indigo); background:var(--indigo-soft); padding:3px 9px; border-radius:8px; }
.cal-head button{ width:28px; height:28px; border-radius:9px; background:var(--surface-soft); display:flex; align-items:center; justify-content:center; }
.cal-head svg{ width:14px; height:14px; }
.cal-year-grid{ display:none; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:12px; padding-bottom:12px; border-bottom:1px solid var(--border); }
.cal-year-grid.open{ display:grid; }
.cal-year-item{ text-align:center; padding:8px 0; border-radius:9px; font-size:12px; font-weight:700; cursor:pointer; color:var(--ink-soft); transition:.12s; }
.cal-year-item:hover{ background:var(--surface-soft); }
.cal-year-item.active{ background:var(--indigo); color:#fff; }
.cal-grid{ display:grid; grid-template-columns:repeat(6,1fr); gap:6px; }
.cal-day{ text-align:center; font-size:12px; font-weight:600; padding:8px 0; border-radius:9px; cursor:pointer; transition:.12s; }
.cal-day:hover{ background:var(--indigo-soft); color:var(--indigo); }
.cal-day.today{ box-shadow:inset 0 0 0 1.5px var(--indigo); }

/* LOGIN PAGE */
.login-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; position:relative; z-index:1; }
.login-card{
  width:380px; max-width:100%; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-hover); padding:30px 26px;
}
.login-brand{ display:flex; align-items:center; gap:12px; margin-bottom:22px; }
.login-brand .brand-mark{ width:44px; height:44px; font-size:18px; border-radius:13px; }
.login-brand b{ font-size:17px; }
.login-brand span{ font-size:12px; color:var(--ink-faint); }
.login-tabs{ display:flex; gap:8px; margin-bottom:20px; background:var(--surface-soft); border-radius:12px; padding:4px; }
.login-tabs button{ flex:1; padding:9px 0; border-radius:9px; font-size:12.5px; font-weight:700; color:var(--ink-soft); }
.login-tabs button.active{ background:var(--surface); color:var(--indigo); box-shadow:var(--shadow); }
.login-pane{ display:none; }
.login-pane.active{ display:block; }
.pin-dots{ display:flex; gap:10px; justify-content:center; margin:18px 0; }
.pin-dot{ width:14px; height:14px; border-radius:50%; border:2px solid var(--border); background:var(--surface-soft); transition:.15s; }
.pin-dot.filled{ background:var(--indigo); border-color:var(--indigo); }
.pin-keypad{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.pin-key{ padding:14px 0; border-radius:12px; background:var(--surface-soft); border:1px solid var(--border); font-size:17px; font-weight:700; text-align:center; }
.pin-key:active{ background:var(--indigo-soft); }
.pin-key.wide{ font-size:12px; color:var(--ink-faint); }

@media (max-width: 900px){
  .mobile-topbar{ display:flex; }
  .sidebar{
    position:fixed; top:0; right:0; height:100%; width:250px; z-index:70;
    transform:translateX(100%); transition:transform .25s ease; box-shadow:-10px 0 30px rgba(0,0,0,.15);
  }
  .sidebar.open{ transform:translateX(0); }
  .main{ padding:20px 16px 70px; }
  .stats{ grid-template-columns:repeat(2,1fr); }
  .team-grid, .emp-grid{ grid-template-columns:1fr; }
  .bottom-grid{ grid-template-columns:1fr; }
  .form-grid{ grid-template-columns:1fr; }
  .report-toolbar{ flex-direction:column; align-items:stretch; }
  .report-toolbar .field{ min-width:0; }
  .panel{ overflow-x:auto; }
  table{ min-width:600px; }
  .topbar{ flex-direction:column; align-items:stretch; gap:14px; }
  .topbar .btn-primary{ justify-content:center; }
}
