/*
Theme Name: قالب سازمان (WPT Org Theme)
Theme URI: 
Author: 
Description: تم کامل و مستقل برای ورود، انتخاب سازمان و مدیریت کاربران (پیام‌رسان، تسک، پروژه، تقویم، فایل، حضور و غیاب، اموال و ...). دیگر به هیچ افزونه‌ی جداگانه‌ای نیاز ندارد؛ همه‌چیز داخل همین تم است.
Version: 7.0.0
Requires PHP: 7.4
Text Domain: wpt-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root{
  --wpt-bg:#F5F5F3;
  --wpt-surface:#FFFFFF;
  --wpt-ink:#242629;
  --wpt-ink-soft:#6B6E74;
  --wpt-ink-faint:#9CA0A6;
  --wpt-accent:#33475B;
  --wpt-accent-soft:#E8EBEE;
  --wpt-accent-dark:#1F2E3D;
  --wpt-success:#2E7D52;
  --wpt-success-soft:#E4F0E9;
  --wpt-warning:#96601A;
  --wpt-warning-soft:#F4EBDD;
  --wpt-danger:#A33636;
  --wpt-danger-soft:#F3E4E4;
  --wpt-line:#DEDDD8;
  --wpt-contrast:#242629;
  --wpt-radius:8px;
  color-scheme:light;
}
html[data-theme="dark"]{
  --wpt-bg:#1B1D21;
  --wpt-surface:#222427;
  --wpt-ink:#E9E9EA;
  --wpt-ink-soft:#9A9CA1;
  --wpt-ink-faint:#6B6D72;
  --wpt-accent:#8CA0B3;
  --wpt-accent-soft:rgba(140,160,179,.16);
  --wpt-accent-dark:#B7C4D0;
  --wpt-success:#5FA97D;
  --wpt-success-soft:rgba(95,169,125,.16);
  --wpt-warning:#C79A57;
  --wpt-warning-soft:rgba(199,154,87,.16);
  --wpt-danger:#C77F7F;
  --wpt-danger-soft:rgba(199,127,127,.16);
  --wpt-line:#33353A;
  --wpt-contrast:#101113;
  color-scheme:dark;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family:'Vazirmatn',sans-serif;
  background:var(--wpt-bg);
  color:var(--wpt-ink);
  -webkit-font-smoothing:antialiased;
  transition:background .15s ease,color .15s ease;
}
.wpt-mono{font-family:'JetBrains Mono',monospace;}
button{cursor:pointer;}
input,select{outline:none;}
input:focus,select:focus,button:focus-visible{box-shadow:0 0 0 3px var(--wpt-accent-soft);border-radius:6px;}
a{color:inherit;text-decoration:none;}

/* ================= shared: buttons, fields, modal, badges ================= */
.wpt-btn{border:none;border-radius:6px;font-family:inherit;font-weight:700;padding:10px 18px;font-size:13px;transition:background .12s ease,color .12s ease,border-color .12s ease;}
.wpt-btn-primary{background:var(--wpt-accent);color:#fff;}
.wpt-btn-primary:hover{background:var(--wpt-accent-dark);}
.wpt-btn-primary:disabled{opacity:.55;cursor:not-allowed;}
.wpt-btn-ghost{background:var(--wpt-surface);border:1px solid var(--wpt-line);color:var(--wpt-ink);}
.wpt-btn-ghost:hover{background:var(--wpt-bg);}
.wpt-btn-danger{background:var(--wpt-danger);color:#fff;}
.wpt-btn-danger:hover{opacity:.9;}
.wpt-btn-block{width:100%;}
.wpt-btn-sm{padding:7px 14px;font-size:12px;border-radius:6px;}

.wpt-field{margin-bottom:16px;text-align:right;}
.wpt-field label{display:block;font-size:12.5px;font-weight:600;margin-bottom:6px;color:var(--wpt-ink);}
.wpt-field input,.wpt-field select{
  width:100%;padding:10px 12px;border:1px solid var(--wpt-line);border-radius:6px;
  font-family:inherit;font-size:13px;background:var(--wpt-bg);color:var(--wpt-ink);
}
.wpt-field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.wpt-pw-wrap{position:relative;}
.wpt-pw-wrap input{padding-left:38px;}
.wpt-pw-toggle{position:absolute;left:6px;top:50%;transform:translateY(-50%);width:28px;height:28px;border:none;background:none;color:var(--wpt-ink-faint);display:flex;align-items:center;justify-content:center;border-radius:5px;}
.wpt-pw-toggle:hover{background:var(--wpt-bg);}

.wpt-avatar{border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;flex-shrink:0;background-size:cover;background-position:center;}
.wpt-avatar-lg{width:64px;height:64px;font-size:20px;}
.wpt-avatar-xl{width:84px;height:84px;font-size:26px;}
.wpt-avatar-uploader{display:flex;align-items:center;gap:18px;}
.wpt-avatar-uploader-actions{display:flex;flex-direction:column;align-items:flex-start;}
.wpt-user-menu-btn.has-photo{background-size:cover;background-position:center;color:transparent;}

.wpt-access-badge{font-size:10.5px;font-weight:700;padding:3px 10px;border-radius:20px;border:1px solid;white-space:nowrap;}
.wpt-access-owner{color:#33475B;background:#E8EBEE;border-color:#33475B33;}
.wpt-access-admin{color:#96601A;background:#F4EBDD;border-color:#96601A33;}
.wpt-access-member{color:#6B6E74;background:#EEEEEC;border-color:#6B6E7433;}
.wpt-access-viewer{color:#6B6E74;background:#EEEEEC;border-color:#6B6E7433;}

.wpt-status-pill{font-size:10.5px;font-weight:700;padding:3px 10px;border-radius:20px;white-space:nowrap;}
.wpt-status-active{color:#2E7D52;background:#E4F0E9;}
.wpt-status-invited{color:#96601A;background:#F4EBDD;}
.wpt-status-inactive{color:#A33636;background:#F3E4E4;}
.wpt-status-asset-available{color:#33475B;background:#E8EBEE;}
.wpt-status-asset-healthy{color:#2E7D52;background:#E4F0E9;}
.wpt-status-asset-needs_repair{color:#96601A;background:#F4EBDD;}
.wpt-status-asset-on_loan{color:#2E7D52;background:#E4F0E9;}
.wpt-status-asset-maintenance{color:#96601A;background:#F4EBDD;}
.wpt-status-asset-retired{color:#A33636;background:#F3E4E4;}
.wpt-status-request-pending{color:#96601A;background:#F4EBDD;}
.wpt-status-request-approved{color:#2E7D52;background:#E4F0E9;}
.wpt-status-request-rejected{color:#A33636;background:#F3E4E4;}
.wpt-status-request-return_pending{color:#96601A;background:#F4EBDD;}
.wpt-status-request-returned{color:#33475B;background:#E8EBEE;}
.wpt-status-request-cancelled{color:#6B6E74;background:#EEEEEC;}

.wpt-panel{background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:var(--wpt-radius);padding:16px 18px;}
.wpt-panel-title{font-size:13px;font-weight:700;margin-bottom:12px;}
.wpt-panel-sub{font-size:11.5px;color:var(--wpt-ink-soft);margin:-6px 0 14px;}
.wpt-request-list{display:flex;flex-direction:column;gap:12px;}
.wpt-request-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid var(--wpt-line);}
.wpt-request-row:last-child{border-bottom:none;padding-bottom:0;}
.wpt-request-info{flex:1;min-width:200px;}
.wpt-request-main{font-size:12.5px;color:var(--wpt-ink);margin-bottom:3px;}
.wpt-request-note{font-size:11.5px;color:var(--wpt-ink-soft);margin-bottom:3px;}
.wpt-request-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;}

.wpt-tabs{display:flex;gap:4px;border-bottom:1px solid var(--wpt-line);margin-bottom:20px;}
.wpt-tab{border:none;background:none;font-family:inherit;font-size:13px;font-weight:600;color:var(--wpt-ink-soft);
  padding:10px 4px;margin-left:22px;display:flex;align-items:center;gap:7px;border-bottom:2px solid transparent;margin-bottom:-1px;}
.wpt-tab:hover{color:var(--wpt-ink);}
.wpt-tab.active{color:var(--wpt-ink);border-bottom-color:var(--wpt-accent);}
.wpt-tab-count{font-size:10.5px;font-weight:700;color:var(--wpt-ink-soft);background:var(--wpt-bg);padding:2px 8px;border-radius:20px;font-family:'JetBrains Mono',monospace;}
.wpt-tab.active .wpt-tab-count{background:var(--wpt-accent-soft);color:var(--wpt-accent-dark);}

.wpt-overdue-badge{display:inline-block;margin-top:4px;font-size:10.5px;font-weight:700;color:var(--wpt-danger);background:var(--wpt-danger-soft);padding:2px 8px;border-radius:20px;}

.wpt-field-hint{display:block;font-size:11px;color:var(--wpt-ink-faint);margin-top:5px;}
.wpt-field input:disabled{opacity:.6;cursor:not-allowed;}
.wpt-color-swatches{display:flex;gap:10px;flex-wrap:wrap;}
.wpt-color-swatch{width:30px;height:30px;border-radius:8px;border:2px solid transparent;padding:0;}
.wpt-color-swatch.active{border-color:var(--wpt-ink);box-shadow:0 0 0 2px var(--wpt-surface) inset;}

.wpt-modal-overlay{position:fixed;inset:0;background:rgba(20,20,22,.42);display:none;align-items:center;justify-content:center;z-index:400;padding:20px;}
.wpt-modal-overlay.open{display:flex;}
.wpt-modal{background:var(--wpt-surface);border-radius:14px;padding:24px;width:100%;max-width:420px;max-height:88vh;overflow-y:auto;box-shadow:0 20px 50px rgba(0,0,0,.25);}
.wpt-modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;}
.wpt-modal-title{font-size:15.5px;font-weight:700;}
.wpt-modal-sub{font-size:12px;color:var(--wpt-ink-soft);}
.wpt-modal-close{border:none;background:none;font-size:18px;color:var(--wpt-ink-faint);line-height:1;}
.wpt-modal-close:hover{color:var(--wpt-ink);}
.wpt-modal-actions{display:flex;gap:10px;margin-top:20px;}
.wpt-modal-actions .wpt-btn{flex:1;}

.wpt-toast-stack{position:fixed;bottom:22px;left:22px;z-index:600;display:flex;flex-direction:column;gap:8px;}
.wpt-toast{background:var(--wpt-contrast);color:var(--wpt-bg);font-size:12.5px;font-weight:600;padding:11px 16px;border-radius:8px;box-shadow:0 10px 24px rgba(0,0,0,.2);}
.wpt-toast-danger{background:var(--wpt-danger);color:#fff;}

.wpt-hidden{display:none !important;}

/* ================= login / auth screens ================= */
.wpt-screen-center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;}
.wpt-auth-box{width:100%;max-width:380px;}
.wpt-auth-logo{width:44px;height:44px;border-radius:10px;background:var(--wpt-contrast);color:var(--wpt-bg);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:17px;margin:0 auto 18px;}
.wpt-auth-title{font-size:19px;font-weight:800;text-align:center;margin-bottom:4px;}
.wpt-auth-sub{font-size:13px;color:var(--wpt-ink-soft);text-align:center;margin-bottom:26px;}
.wpt-auth-card{background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:14px;padding:22px;}
.wpt-auth-error{display:none;background:var(--wpt-danger-soft);color:var(--wpt-danger);font-size:12px;font-weight:600;padding:10px 12px;border-radius:7px;margin-bottom:16px;text-align:right;}
.wpt-auth-error.show{display:block;}
.wpt-auth-row-between{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;font-size:12px;}
.wpt-check-line{display:flex;align-items:center;gap:6px;color:var(--wpt-ink-soft);}
.wpt-check-line input{width:14px;height:14px;}
.wpt-auth-link{color:var(--wpt-accent);font-weight:600;font-size:12px;}
.wpt-auth-link:hover{text-decoration:underline;}

/* ================= org picker screen ================= */
.wpt-org-box{width:100%;max-width:400px;text-align:center;}
.wpt-org-title{font-size:18px;font-weight:800;margin-bottom:4px;}
.wpt-org-sub{font-size:13px;color:var(--wpt-ink-soft);margin-bottom:22px;}
.wpt-org-list{display:flex;flex-direction:column;gap:8px;margin-bottom:20px;}
.wpt-org-item{
  display:flex;align-items:center;gap:12px;background:var(--wpt-surface);border:1px solid var(--wpt-line);
  border-radius:10px;padding:12px 14px;cursor:pointer;text-align:right;width:100%;transition:border-color .12s ease;
}
.wpt-org-item:hover{border-color:var(--wpt-accent);}
.wpt-org-item-icon{width:38px;height:38px;border-radius:8px;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:15px;}
.wpt-org-item-info{flex:1;min-width:0;}
.wpt-org-item-name{font-size:13.5px;font-weight:700;color:var(--wpt-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-org-item-meta{font-size:11px;color:var(--wpt-ink-faint);margin-top:2px;}
.wpt-org-item-badge{font-size:10px;font-weight:700;padding:2px 9px;border-radius:20px;background:var(--wpt-accent-soft);color:var(--wpt-accent-dark);flex-shrink:0;}
.wpt-org-create-box{border-top:1px solid var(--wpt-line);padding-top:18px;text-align:right;}
.wpt-org-empty{font-size:12.5px;color:var(--wpt-ink-faint);padding:14px 0 20px;}
.wpt-org-signout{margin-top:18px;}
.wpt-org-signout a{font-size:12px;color:var(--wpt-ink-faint);font-weight:600;}
.wpt-org-signout a:hover{color:var(--wpt-danger);}

/* ================= app shell ================= */
.wpt-app{display:flex;min-height:100vh;}
.wpt-sidebar{
  width:84px;flex-shrink:0;background:var(--wpt-surface);border-inline-end:1px solid var(--wpt-line);
  display:flex;flex-direction:column;align-items:center;padding:16px 8px;gap:14px;
  position:sticky;top:0;align-self:flex-start;
  height:100vh;overflow-y:auto;scrollbar-width:none;
}
.wpt-sidebar::-webkit-scrollbar{display:none;}
/* Sit right below the fixed global header instead of under it (desktop only —
   on mobile the sidebar becomes a fixed bottom tab bar, handled further down). */
@media (min-width:761px){
  body:has(.wpt-app) .wpt-sidebar{top:50px;height:calc(100vh - 50px);}
}
/* The sticky page topbar (title/count row) has the same "top:0" issue: it was
   sticking right at the very top of the viewport, i.e. half-hidden behind the
   fixed global header, so only its bottom sliver showed and the translucent
   background let scrolled-past rows ghost through it. Pin it below the header
   instead, on every breakpoint (mobile header is 48px, desktop is 50px). */
body:has(.wpt-app) .wpt-topbar{top:50px;}
@media (max-width:760px){
  body:has(.wpt-app) .wpt-topbar{top:48px;}
}
.wpt-rail-logo-btn{width:38px;height:38px;border-radius:8px;flex-shrink:0;border:none;
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px;color:#fff;}
.wpt-rail-nav{display:flex;flex-direction:column;align-items:center;gap:2px;width:100%;flex:1;}
.wpt-rail-item{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  width:100%;padding:9px 2px;border:none;background:none;border-radius:6px;
  color:var(--wpt-ink-faint);transition:background .12s ease,color .12s ease;
}
.wpt-rail-item:hover{background:var(--wpt-bg);color:var(--wpt-ink-soft);}
.wpt-rail-item.active{background:var(--wpt-bg);color:var(--wpt-ink);border-inline-start:2px solid var(--wpt-accent);}
.wpt-rail-item svg{width:20px;height:20px;}
.wpt-rail-label{font-size:10px;font-weight:600;line-height:1;white-space:nowrap;}
.wpt-rail-item.disabled{opacity:.35;cursor:not-allowed;}
.wpt-icon-btn{width:36px;height:36px;border-radius:7px;border:1px solid var(--wpt-line);background:var(--wpt-surface);display:flex;align-items:center;justify-content:center;color:var(--wpt-ink-soft);flex-shrink:0;}
.wpt-icon-btn:hover{background:var(--wpt-bg);}
.wpt-icon-btn svg{width:17px;height:17px;}

.wpt-user-menu-btn{width:34px;height:34px;border-radius:7px;background:var(--wpt-bg);color:var(--wpt-ink-soft);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;border:1px solid var(--wpt-line);}
.wpt-user-menu-btn:hover{border-color:var(--wpt-accent);color:var(--wpt-accent);}
.wpt-user-menu{
  position:absolute;width:220px;background:var(--wpt-surface);border:1px solid var(--wpt-line);
  border-radius:10px;box-shadow:0 12px 30px rgba(0,0,0,.15);display:none;z-index:210;overflow:hidden;
}
.wpt-user-menu.open{display:block;}
.wpt-user-menu-head{padding:12px 14px;border-bottom:1px solid var(--wpt-line);}
.wpt-user-menu-name{font-size:12.5px;font-weight:700;}
.wpt-user-menu-org{font-size:11px;color:var(--wpt-ink-faint);margin-top:2px;}
.wpt-user-menu-item{display:flex;align-items:center;gap:9px;width:100%;padding:10px 14px;background:none;border:none;font-family:inherit;font-size:12.5px;color:var(--wpt-ink);text-align:right;}
.wpt-user-menu-item:hover{background:var(--wpt-bg);}
.wpt-user-menu-item.danger{color:var(--wpt-danger);}

.wpt-main{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;}
.wpt-topbar{display:flex;align-items:center;gap:14px;padding:16px 28px;border-bottom:1px solid var(--wpt-line);background:var(--wpt-surface);flex-wrap:wrap;}
.wpt-page-title{font-size:17px;font-weight:700;}
.wpt-page-subtitle{font-size:12px;color:var(--wpt-ink-soft);margin-top:2px;}
.wpt-page-count{font-size:10.5px;font-weight:700;color:var(--wpt-ink-soft);background:var(--wpt-bg);padding:3px 9px;border-radius:20px;font-family:'JetBrains Mono',monospace;}
.wpt-topbar-spacer{margin-right:auto;}
.wpt-content{padding:26px 28px 60px;overflow-y:auto;flex:1;min-height:0;}

.wpt-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px;}
.wpt-stat-card{background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:var(--wpt-radius);padding:15px 18px;}
.wpt-stat-label{font-size:12px;color:var(--wpt-ink-soft);margin-bottom:8px;}
.wpt-stat-value{font-size:23px;font-weight:700;font-family:'JetBrains Mono',monospace;}

.wpt-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap;}
.wpt-toolbar-search{display:flex;align-items:center;gap:8px;background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:7px;padding:9px 12px;width:240px;color:var(--wpt-ink-faint);}
.wpt-toolbar-search input{border:none;background:none;font-family:inherit;font-size:12.5px;color:var(--wpt-ink);width:100%;outline:none;}
.wpt-toolbar-search svg{width:15px;height:15px;flex-shrink:0;}
.wpt-toolbar select{padding:8px 10px;border:1px solid var(--wpt-line);border-radius:7px;font-family:inherit;font-size:12.5px;background:var(--wpt-surface);color:var(--wpt-ink-soft);}
.wpt-toolbar-spacer{flex:1;}
.wpt-chip-row{display:flex;gap:8px;flex-wrap:wrap;}
.wpt-chip{border:1px solid var(--wpt-line);background:var(--wpt-surface);color:var(--wpt-ink-soft);font-family:inherit;font-size:12px;font-weight:600;padding:6px 13px;border-radius:20px;}
.wpt-chip.active{background:var(--wpt-accent);border-color:var(--wpt-accent);color:#fff;}

.wpt-user-table-wrap{background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:var(--wpt-radius);overflow:hidden;}
.wpt-user-table{width:100%;border-collapse:collapse;font-size:13px;}
.wpt-user-table th{text-align:right;font-size:11px;font-weight:700;color:var(--wpt-ink-faint);padding:12px 16px;border-bottom:1px solid var(--wpt-line);white-space:nowrap;}
.wpt-user-table td{padding:12px 16px;border-bottom:1px solid var(--wpt-line);vertical-align:middle;}
.wpt-user-table tr:last-child td{border-bottom:none;}
.wpt-user-table tr:hover td{background:var(--wpt-bg);}
.wpt-u-cell{display:flex;align-items:center;gap:10px;min-width:0;}
.wpt-u-name{font-size:13px;font-weight:700;color:var(--wpt-ink);white-space:nowrap;}
.wpt-u-email{font-size:11.5px;color:var(--wpt-ink-faint);margin-top:1px;direction:ltr;text-align:right;}
.wpt-u-role{font-size:12.5px;color:var(--wpt-ink-soft);}
.wpt-u-date{font-size:11.5px;color:var(--wpt-ink-faint);font-family:'JetBrains Mono',monospace;}
.wpt-row-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap;align-items:center;}
.wpt-row-actions button{width:28px;height:28px;border-radius:6px;border:1px solid var(--wpt-line);background:var(--wpt-surface);color:var(--wpt-ink-soft);display:flex;align-items:center;justify-content:center;}
.wpt-row-actions button.wpt-btn{width:auto;height:auto;white-space:nowrap;flex-shrink:0;}
.wpt-row-actions button:hover{background:var(--wpt-bg);color:var(--wpt-ink);}
.wpt-row-actions button.wpt-del:hover{color:var(--wpt-danger);border-color:var(--wpt-danger);}
.wpt-row-actions button.wpt-toggle-btn:hover{color:var(--wpt-success);border-color:var(--wpt-success);}
.wpt-row-actions svg{width:13px;height:13px;}

.wpt-empty-block{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:60px 20px;}
.wpt-empty-title{font-size:13.5px;font-weight:700;}
.wpt-empty-sub{font-size:12px;color:var(--wpt-ink-soft);max-width:280px;}

/* ================= تردد (attendance) ================= */
.wpt-tc-hero{text-align:center;padding:10px 0 20px;max-width:520px;margin:0 auto;}
.wpt-tc-hero-date{font-size:15px;font-weight:700;color:var(--wpt-ink);margin-bottom:26px;}
.wpt-tc-hero-row{display:flex;align-items:stretch;justify-content:center;gap:14px;margin-bottom:20px;flex-wrap:wrap;}
.wpt-tc-timer-card{background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:10px;padding:12px 26px;text-align:center;min-width:190px;display:flex;flex-direction:column;justify-content:center;}
.wpt-tc-timer-label{font-size:11px;color:var(--wpt-ink-faint);margin-bottom:6px;}
.wpt-tc-timer-value{font-size:21px;font-weight:700;color:var(--wpt-ink);letter-spacing:.03em;}
.wpt-tc-checkin-btn{
  display:flex;align-items:center;justify-content:center;gap:8px;background:var(--wpt-success);color:#fff;
  border:none;border-radius:10px;padding:14px 26px;font-family:inherit;font-size:14px;font-weight:700;min-width:150px;
}
.wpt-tc-checkin-btn:hover{opacity:.92;}
.wpt-tc-checkin-btn.checkout-mode{background:var(--wpt-warning);}
.wpt-tc-checkin-btn:disabled{opacity:.6;cursor:not-allowed;}
.wpt-tc-month-row{
  display:inline-flex;align-items:center;gap:14px;background:var(--wpt-surface);border:1px solid var(--wpt-line);
  border-radius:10px;padding:12px 22px;font-size:13px;color:var(--wpt-ink-soft);font-weight:600;
}
.wpt-tc-month-sep{color:var(--wpt-ink-faint);}

.wpt-tc-row{display:flex;align-items:center;gap:12px;padding:12px 4px;border-bottom:1px solid var(--wpt-line);}
.wpt-tc-row:last-child{border-bottom:none;}
.wpt-tc-main{flex:1;min-width:0;}
.wpt-tc-name{font-size:13px;font-weight:700;color:var(--wpt-ink);}
.wpt-tc-sub{font-size:11.5px;color:var(--wpt-ink-soft);margin-top:2px;}
.wpt-tc-done-pill{font-size:11px;font-weight:600;color:var(--wpt-accent-dark);background:var(--wpt-accent-soft);padding:5px 11px;border-radius:6px;flex-shrink:0;}

.wpt-tc-history-row{display:flex;align-items:center;gap:12px;padding:10px 4px;border-bottom:1px solid var(--wpt-line);font-size:12.5px;flex-wrap:wrap;}
.wpt-tc-history-row:last-child{border-bottom:none;}
.wpt-tc-history-date{width:96px;flex-shrink:0;color:var(--wpt-ink-soft);font-family:'JetBrains Mono',monospace;font-size:11.5px;}
.wpt-tc-history-member{width:140px;flex-shrink:0;font-weight:600;color:var(--wpt-ink);display:flex;align-items:center;gap:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-tc-history-time{flex:1;min-width:110px;color:var(--wpt-ink-soft);font-family:'JetBrains Mono',monospace;font-size:11.5px;}
.wpt-tc-history-note{flex:1;min-width:110px;color:var(--wpt-ink-faint);font-size:11.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-tc-history-actions{display:flex;gap:10px;flex-shrink:0;}
.wpt-tc-history-actions button{border:none;background:none;font-family:inherit;font-size:11.5px;font-weight:600;color:var(--wpt-ink-soft);}
.wpt-tc-history-actions button:hover{color:var(--wpt-accent);}
.wpt-tc-history-actions button.del:hover{color:var(--wpt-danger);}

.wpt-range-report-summary{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0;}
.wpt-range-report-stat{flex:1;min-width:130px;background:var(--wpt-bg);border:1px solid var(--wpt-line);border-radius:8px;padding:10px 12px;}
.wpt-range-report-stat-label{display:block;font-size:11px;color:var(--wpt-ink-faint);margin-bottom:4px;}
.wpt-range-report-stat-value{font-size:14px;font-weight:700;color:var(--wpt-ink);}
.wpt-range-report-list{border-top:1px solid var(--wpt-line);padding-top:6px;}

.wpt-tc-geo-note{font-size:11px;color:var(--wpt-ink-faint);margin-top:-8px;margin-bottom:18px;}

.wpt-toggle-row{display:flex;align-items:center;gap:10px;font-size:12.5px;font-weight:600;color:var(--wpt-ink);cursor:pointer;}
.wpt-toggle-row input[type="checkbox"]{width:16px;height:16px;accent-color:var(--wpt-accent);flex-shrink:0;}
.wpt-field textarea{
  width:100%;padding:10px 12px;border:1px solid var(--wpt-line);border-radius:6px;
  font-family:inherit;font-size:12.5px;background:var(--wpt-bg);color:var(--wpt-ink);resize:vertical;
}
.wpt-settings-sep{border:none;border-top:1px solid var(--wpt-line);margin:22px 0;}
.wpt-settings-geo-status{display:inline-block;margin-right:10px;font-size:11.5px;color:var(--wpt-ink-soft);}
.wpt-settings-actions{justify-content:flex-start;margin-top:22px;}

@media (max-width:860px){
  .wpt-stat-grid{grid-template-columns:1fr 1fr;}
  .wpt-field-row{grid-template-columns:1fr;}
  .wpt-toolbar-search{width:100%;}
  .wpt-user-table thead{display:none;}
  .wpt-user-table, .wpt-user-table tbody, .wpt-user-table tr, .wpt-user-table td{display:block;width:100%;}
  .wpt-user-table tr{border-bottom:1px solid var(--wpt-line);padding:12px 14px;}
  .wpt-user-table td{border:none;padding:5px 0;}
  .wpt-row-actions{justify-content:flex-start;margin-top:8px;}
}
@media (max-width:600px){
  .wpt-sidebar{width:64px;}
  .wpt-rail-label{display:none;}
  .wpt-content{padding:18px 14px 50px;}
  .wpt-topbar{padding:14px 16px;}
  .wpt-stat-grid{grid-template-columns:1fr;}
  .wpt-tc-history-member{width:90px;}
  .wpt-tc-history-date{width:70px;}
}

/* ================= پروژه‌ها (projects) ================= */
.wpt-grid-projects{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
.wpt-proj-card{background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:var(--wpt-radius,10px);padding:18px;display:flex;flex-direction:column;gap:12px;position:relative;}
.wpt-proj-top{display:flex;align-items:center;gap:10px;}
.wpt-proj-icon{width:36px;height:36px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-weight:700;color:#fff;font-size:13px;flex-shrink:0;}
.wpt-proj-name{font-size:14px;font-weight:700;color:var(--wpt-ink);}
.wpt-proj-meta{font-size:11.5px;color:var(--wpt-ink-faint);}
.wpt-proj-desc{font-size:12px;color:var(--wpt-ink-soft);line-height:1.6;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.wpt-proj-bar-wrap{height:6px;border-radius:4px;background:var(--wpt-bg);overflow:hidden;}
.wpt-proj-bar-fill{height:100%;border-radius:4px;}
.wpt-proj-foot{display:flex;align-items:center;justify-content:space-between;font-size:11.5px;color:var(--wpt-ink-soft);}
.wpt-proj-actions{display:flex;gap:12px;margin-top:2px;}
.wpt-proj-actions button{font-size:11.5px;font-weight:600;border:none;background:none;font-family:inherit;color:var(--wpt-ink-soft);}
.wpt-proj-actions button:hover{color:var(--wpt-accent);}
.wpt-proj-actions button.del:hover{color:var(--wpt-danger);}
.wpt-proj-card.add{align-items:center;justify-content:center;border:1.5px dashed var(--wpt-line);color:var(--wpt-ink-faint);min-height:150px;background:none;cursor:pointer;font-size:13px;font-weight:600;}
.wpt-proj-card.add:hover{border-color:var(--wpt-accent);color:var(--wpt-accent);}
.wpt-proj-tag{display:inline-flex;align-items:center;gap:6px;font-size:12px;}
.wpt-dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex-shrink:0;}
@media (max-width:1100px){ .wpt-grid-projects{grid-template-columns:repeat(2,1fr);} }
@media (max-width:700px){ .wpt-grid-projects{grid-template-columns:1fr;} }

/* ================= تسک‌ها (tasks) ================= */
.wpt-tasks-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap;}
.wpt-tasks-toolbar-group{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.wpt-tasks-toolbar-spacer{flex:1;}
.wpt-tt-icon-btn{padding:8px 12px;border:1px solid var(--wpt-line);border-radius:6px;background:var(--wpt-surface);color:var(--wpt-ink-soft);font-family:inherit;font-size:12.5px;font-weight:600;}
.wpt-tt-icon-btn:hover{background:var(--wpt-bg);}
.wpt-tt-select{padding:8px 12px;border:1px solid var(--wpt-line);border-radius:6px;font-family:inherit;font-size:12.5px;background:var(--wpt-surface);color:var(--wpt-ink-soft);}
.wpt-tt-search{display:flex;align-items:center;gap:6px;background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:6px;padding:0 10px;}
.wpt-tt-search input{border:none;background:none;outline:none;font-family:inherit;font-size:12.5px;padding:8px 0;width:150px;color:var(--wpt-ink);}
.wpt-tt-search input::placeholder{color:var(--wpt-ink-faint);}
.wpt-tt-search-side{width:100%;margin-bottom:14px;}
.wpt-tt-search-side input{width:100%;}

.wpt-tasks-chip-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:8px;padding:10px 14px;margin-bottom:18px;}
.wpt-chip-label{font-size:12px;color:var(--wpt-ink-faint);font-weight:600;margin-inline-end:2px;}
.wpt-tt-chip{padding:6px 12px;border-radius:6px;border:1px solid var(--wpt-line);background:var(--wpt-bg);font-family:inherit;font-size:12px;color:var(--wpt-ink-soft);font-weight:600;}
.wpt-filter-clear{font-size:12px;color:var(--wpt-accent);background:none;border:none;font-family:inherit;font-weight:600;white-space:nowrap;}
.wpt-filter-clear:hover{text-decoration:underline;}

.wpt-tasks-shell{display:flex;gap:18px;align-items:flex-start;}
.wpt-tasks-main{flex:1;min-width:0;}
.wpt-tasks-quickrow{display:flex;align-items:center;gap:10px;margin-bottom:14px;}
.wpt-tasks-quicktab{display:inline-flex;align-items:center;gap:6px;background:var(--wpt-accent-soft);color:var(--wpt-accent-dark);font-size:12.5px;font-weight:700;padding:7px 14px;border-radius:6px;}

.wpt-tasks-side{width:250px;flex-shrink:0;background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:var(--wpt-radius,10px);padding:14px;}
.wpt-tasks-side-nav{display:flex;flex-direction:column;gap:2px;margin-bottom:10px;}
.wpt-tside-item{display:flex;align-items:center;gap:8px;padding:8px 9px;border-radius:8px;font-size:12.5px;font-weight:600;color:var(--wpt-ink-soft);border:none;background:none;width:100%;text-align:right;font-family:inherit;}
.wpt-tside-item:hover{background:var(--wpt-bg);}
.wpt-tside-item.active{background:var(--wpt-accent-soft);color:var(--wpt-accent-dark);}
.wpt-tside-item .wpt-tside-count{margin-right:auto;font-size:10.5px;color:var(--wpt-ink-faint);}
.wpt-tasks-side-collapse{border-top:1px solid var(--wpt-line);padding-top:8px;margin-top:4px;}
.wpt-tasks-side-collapse-head{width:100%;text-align:right;border:none;background:none;font-family:inherit;font-size:11.5px;font-weight:700;color:var(--wpt-ink-soft);padding:6px 4px;}
.wpt-tasks-side-collapse-body{display:flex;flex-direction:column;gap:1px;}
.wpt-tside-sub-item{display:flex;align-items:center;gap:8px;padding:7px 9px;border-radius:7px;font-size:12px;color:var(--wpt-ink-soft);border:none;background:none;width:100%;text-align:right;font-family:inherit;}
.wpt-tside-sub-item:hover{background:var(--wpt-bg);color:var(--wpt-ink);}
.wpt-tside-sub-item.active{color:var(--wpt-accent-dark);font-weight:700;}
.wpt-sidebar-empty{font-size:11.5px;color:var(--wpt-ink-faint);}

.wpt-card{background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:var(--wpt-radius,10px);}
.wpt-task-card-row{background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:8px;padding:14px 16px;margin-bottom:10px;display:flex;align-items:flex-start;gap:14px;cursor:pointer;transition:box-shadow .12s ease,border-color .12s ease;}
.wpt-task-card-row:hover{box-shadow:0 1px 4px rgba(34,38,47,.08);border-color:var(--wpt-accent);}
.wpt-task-status-circle{width:20px;height:20px;border-radius:50%;border:2px solid var(--wpt-line);flex-shrink:0;margin-top:2px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:11px;background:none;cursor:pointer;}
.wpt-task-status-circle.done{background:var(--wpt-success);border-color:var(--wpt-success);}
.wpt-task-status-circle.doing{border-color:var(--wpt-accent);}
.wpt-task-card-main{flex:1;min-width:0;}
.wpt-task-card-top{display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.wpt-task-card-id{font-family:'JetBrains Mono',monospace;font-size:11px;color:var(--wpt-ink-faint);}
.wpt-task-card-title{font-size:14px;font-weight:700;color:var(--wpt-ink);}
.wpt-task-card-details{font-size:12px;color:var(--wpt-ink-soft);font-weight:600;border:none;background:none;font-family:inherit;flex-shrink:0;align-self:center;}
.wpt-task-card-details:hover{color:var(--wpt-accent);}
.wpt-task-card-breadcrumb{display:flex;align-items:center;gap:7px;margin-top:9px;font-size:11.5px;color:var(--wpt-ink-soft);flex-wrap:wrap;}
.wpt-task-card-crumb-sep{color:var(--wpt-ink-faint);}
.wpt-task-card-avatar{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:9.5px;font-weight:700;flex-shrink:0;}
.wpt-status-pill[data-cycle-status]{cursor:pointer;border:none;font-family:inherit;}

.wpt-priority-tag{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;}
.wpt-priority-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}
.wpt-subtask-progress{font-size:10.5px;color:var(--wpt-ink-faint);font-family:'JetBrains Mono',monospace;margin-inline-start:6px;}

@media (max-width:1100px){ .wpt-tasks-side{display:none;} }

/* ---------------- subtasks & comments (task modal) ---------------- */
.wpt-subtask-section{margin-bottom:16px;}
.wpt-subtask-section > label{display:block;font-size:12.5px;font-weight:600;margin-bottom:6px;color:var(--wpt-ink);}
.wpt-subtask-list{display:flex;flex-direction:column;gap:6px;margin-bottom:8px;}
.wpt-subtask-row{display:flex;align-items:center;gap:8px;background:var(--wpt-bg);border-radius:8px;padding:7px 10px;}
.wpt-subtask-row input[type="checkbox"]{width:15px;height:15px;flex-shrink:0;accent-color:var(--wpt-accent);}
.wpt-subtask-row span{flex:1;font-size:12.5px;color:var(--wpt-ink);}
.wpt-subtask-row span.done{text-decoration:line-through;color:var(--wpt-ink-faint);}
.wpt-subtask-row button{border:none;background:none;color:var(--wpt-ink-faint);font-size:14px;font-family:inherit;line-height:1;}
.wpt-subtask-row button:hover{color:var(--wpt-danger);}
.wpt-subtask-add-row{display:flex;gap:8px;}
.wpt-subtask-add-row input{flex:1;padding:8px 10px;border:1px solid var(--wpt-line);border-radius:8px;font-family:inherit;font-size:12.5px;background:var(--wpt-bg);color:var(--wpt-ink);}
.wpt-subtask-add-row button{padding:8px 14px;border:none;border-radius:8px;background:var(--wpt-ink);color:var(--wpt-surface);font-family:inherit;font-size:12px;font-weight:600;}

.wpt-task-comments-section{margin-top:18px;border-top:1px solid var(--wpt-line);padding-top:16px;}
.wpt-task-comments-section > label{display:block;font-size:12.5px;font-weight:600;margin-bottom:8px;color:var(--wpt-ink);}
.wpt-comment-list{display:flex;flex-direction:column;gap:10px;margin-bottom:10px;max-height:220px;overflow-y:auto;}
.wpt-comment-row{display:flex;gap:9px;}
.wpt-comment-body{flex:1;background:var(--wpt-bg);border-radius:9px;padding:8px 11px;}
.wpt-comment-meta{display:flex;align-items:baseline;gap:7px;margin-bottom:3px;}
.wpt-comment-author{font-size:11.5px;font-weight:700;color:var(--wpt-ink);}
.wpt-comment-time{font-size:10px;color:var(--wpt-ink-faint);font-family:'JetBrains Mono',monospace;}
.wpt-comment-text{font-size:12.5px;color:var(--wpt-ink);line-height:1.7;white-space:pre-wrap;word-break:break-word;}

/* ---------------- shared: color swatches, wide modal, danger link ---------------- */
.wpt-swatches{display:flex;gap:10px;flex-wrap:wrap;}
.wpt-swatch{width:30px;height:30px;border-radius:6px;border:2px solid transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#fff;font-size:13px;font-weight:700;}
.wpt-swatch.selected{border-color:var(--wpt-ink);box-shadow:0 0 0 2px var(--wpt-surface) inset;}
.wpt-modal-wide{max-width:640px;}
.wpt-link-danger-btn{display:block;width:100%;text-align:center;border:none;background:none;font-family:inherit;font-size:12px;font-weight:600;color:var(--wpt-danger);margin-top:14px;padding:6px;}
.wpt-link-danger-btn:hover{text-decoration:underline;}
.wpt-field-row-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;}

@media (max-width:700px){
  .wpt-field-row-3{grid-template-columns:1fr;}
}

/* ================= sidebar badge, dashboard, misc shared ================= */
.wpt-rail-badge{position:absolute;top:6px;right:22px;background:var(--wpt-danger);color:#fff;font-size:9px;font-weight:700;min-width:15px;height:15px;border-radius:8px;display:flex;align-items:center;justify-content:center;padding:0 3px;}
.wpt-row-2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:20px;}
.wpt-row-3{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;margin-top:20px;}
.wpt-dash-row{display:flex;align-items:center;gap:10px;padding:10px 4px;border-bottom:1px solid var(--wpt-line);font-size:12.5px;}
.wpt-dash-row:last-child{border-bottom:none;}
.wpt-dash-row-title{flex:1;color:var(--wpt-ink);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-dash-row-code{color:var(--wpt-ink-faint);font-size:11px;flex-shrink:0;}
.wpt-dash-more-link{display:block;text-align:center;margin-top:8px;padding-top:10px;border-top:1px solid var(--wpt-line);font-size:12px;font-weight:600;color:var(--wpt-ink-soft);}
.wpt-dash-more-link:hover{color:var(--wpt-accent);}
@media (max-width:900px){ .wpt-row-2{grid-template-columns:1fr;} .wpt-row-3{grid-template-columns:1fr;} }

/* top row: check-in hero panel + 2x2 stat grid, side by side */
.wpt-dash-top-row{align-items:stretch;}
.wpt-dash-hero-panel{display:flex;align-items:center;justify-content:center;}
.wpt-dash-stat-grid.wpt-stat-grid{grid-template-columns:1fr 1fr;gap:12px;margin-bottom:0;align-content:center;}
@media (max-width:640px){ .wpt-dash-stat-grid.wpt-stat-grid{grid-template-columns:1fr 1fr;} }

/* ECharts containers (weekly hours bar / task status pie) */
.wpt-echart{width:100%;height:280px;direction:ltr;}

/* activity feed */
.wpt-activity-list{max-height:360px;overflow-y:auto;}
.wpt-activity-row{display:flex;align-items:flex-start;gap:10px;padding:11px 2px;border-bottom:1px solid var(--wpt-line);}
.wpt-activity-row:last-child{border-bottom:none;}
.wpt-activity-icon{color:var(--wpt-ink-faint);font-size:15px;margin-top:2px;flex-shrink:0;}
.wpt-activity-main{flex:1;min-width:0;}
.wpt-activity-title{font-size:12.5px;color:var(--wpt-ink);line-height:1.7;}
.wpt-activity-chip{display:inline-block;font-size:10.5px;font-weight:700;color:var(--wpt-ink-soft);background:var(--wpt-bg);border:1px solid var(--wpt-line);padding:1px 7px;border-radius:20px;margin-inline-end:5px;}
.wpt-activity-desc{font-size:11.5px;color:var(--wpt-ink-soft);margin-top:2px;}
.wpt-activity-by{font-weight:600;color:var(--wpt-ink);}
.wpt-activity-date{font-size:10.5px;color:var(--wpt-ink-faint);margin-top:3px;}

/* mini project list (dashboard) */
.wpt-dash-proj-row{display:flex;align-items:center;gap:10px;padding:10px 2px;border-bottom:1px solid var(--wpt-line);}
.wpt-dash-proj-row:last-child{border-bottom:none;}
.wpt-dash-proj-icon{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:11px;flex-shrink:0;}
.wpt-dash-proj-info{flex:1;min-width:0;}
.wpt-dash-proj-name{font-size:12.5px;font-weight:600;color:var(--wpt-ink);margin-bottom:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-dash-proj-pct{font-size:11.5px;color:var(--wpt-ink-soft);flex-shrink:0;}

/* mini member list (dashboard) */
.wpt-dash-member-row{display:flex;align-items:center;gap:10px;padding:9px 2px;border-bottom:1px solid var(--wpt-line);}
.wpt-dash-member-row:last-child{border-bottom:none;}
.wpt-dash-member-info{flex:1;min-width:0;}
.wpt-dash-member-name{font-size:12.5px;font-weight:600;color:var(--wpt-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-dash-member-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;}

@media (max-width:900px){
  .wpt-dash-top-row{grid-template-columns:1fr;}
  .wpt-dash-stat-grid.wpt-stat-grid{grid-template-columns:1fr 1fr;}
}

/* ================= تقویم (calendar) ================= */
.wpt-cal-nav{display:flex;align-items:center;justify-content:center;gap:22px;margin-bottom:14px;}
.wpt-cal-nav button{width:30px;height:30px;border-radius:8px;border:1px solid var(--wpt-line);background:var(--wpt-surface);color:var(--wpt-ink-soft);font-size:15px;}
.wpt-cal-nav button:hover{background:var(--wpt-bg);}
.wpt-cal-month-label{font-size:14px;font-weight:700;min-width:130px;text-align:center;}
.wpt-cal-head-row{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-bottom:6px;}
.wpt-cal-head-cell{text-align:center;font-size:11px;color:var(--wpt-ink-faint);font-weight:700;padding:4px 0;}
.wpt-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;}
.wpt-cal-cell{min-height:86px;border:1px solid var(--wpt-line);border-radius:8px;padding:6px;background:var(--wpt-surface);cursor:pointer;display:flex;flex-direction:column;gap:3px;}
.wpt-cal-cell:hover{border-color:var(--wpt-accent);}
.wpt-cal-cell.blank{background:none;border:none;cursor:default;}
.wpt-cal-cell.today{border-color:var(--wpt-accent);background:var(--wpt-accent-soft);}
.wpt-cal-daynum{font-size:11.5px;font-weight:700;color:var(--wpt-ink-soft);}
.wpt-cal-event-chip{font-size:10px;font-weight:600;border-radius:4px;padding:2px 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-cal-more{font-size:9.5px;color:var(--wpt-ink-faint);padding:0 3px;}
.wpt-cal-upcoming-row{cursor:pointer;}
@media (max-width:700px){
  .wpt-cal-cell{min-height:50px;}
  .wpt-cal-event-chip{display:none;}
}

/* ================= فایل‌ها (files) ================= */
.wpt-file-row{display:flex;align-items:center;gap:12px;padding:12px 4px;border-bottom:1px solid var(--wpt-line);}
.wpt-file-row:last-child{border-bottom:none;}
.wpt-file-icon{width:36px;height:36px;border-radius:8px;background:var(--wpt-bg);display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0;}
.wpt-file-main{flex:1;min-width:0;}
.wpt-file-title{font-size:13px;font-weight:700;color:var(--wpt-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-file-meta{font-size:11px;color:var(--wpt-ink-faint);margin-top:2px;}
.wpt-del-file-btn{border:none;background:none;font-family:inherit;font-size:12px;font-weight:600;color:var(--wpt-ink-soft);}
.wpt-del-file-btn:hover{color:var(--wpt-danger);}

/* ================= پیام‌رسان (messenger) — fully self-contained, fixed
   height card. Deliberately does NOT rely on the page shell's flex/padding
   so it can never collide with unrelated layout (sidebar, topbar, etc). ================= */
.wpt-msg-card{
  display:flex;
  height:600px;
  max-height:75vh;
  border:1px solid var(--wpt-line);
  border-radius:var(--wpt-radius,10px);
  overflow:hidden;
  background:var(--wpt-surface);
  box-sizing:border-box;
}
.wpt-msg-sidebar{
  width:280px;
  min-width:280px;
  max-width:280px;
  flex:0 0 280px;
  border-inline-end:1px solid var(--wpt-line);
  display:flex;
  flex-direction:column;
  overflow-y:auto;
  padding:12px;
  box-sizing:border-box;
}
.wpt-msg-search-box{margin-bottom:10px;flex-shrink:0;display:flex;gap:6px;}
.wpt-msg-search-box input{
  flex:1;min-width:0;box-sizing:border-box;padding:8px 12px;border:1px solid var(--wpt-line);
  border-radius:8px;font-family:inherit;font-size:12.5px;background:var(--wpt-bg);color:var(--wpt-ink);
}
.wpt-msg-search-box button{
  flex-shrink:0;padding:8px 10px;border:1px solid var(--wpt-line);border-radius:8px;background:var(--wpt-surface);
  color:var(--wpt-ink-soft);font-family:inherit;font-size:11.5px;font-weight:700;white-space:nowrap;
}
.wpt-msg-search-box button:hover{background:var(--wpt-bg);color:var(--wpt-accent);}
.wpt-msg-convo-list{display:flex;flex-direction:column;gap:2px;}
.wpt-msg-convo{
  display:flex;align-items:center;gap:9px;padding:9px;border-radius:9px;border:none;
  background:none;width:100%;box-sizing:border-box;text-align:right;font-family:inherit;cursor:pointer;
}
.wpt-msg-convo:hover{background:var(--wpt-bg);}
.wpt-msg-convo.active{background:var(--wpt-accent-soft);}
.wpt-msg-convo-avatar{
  width:34px;height:34px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:12px;font-weight:700;
}
.wpt-msg-group-avatar{background:var(--wpt-ink-faint);font-size:15px;}
.wpt-msg-convo-main{flex:1;min-width:0;overflow:hidden;}
.wpt-msg-convo-name{font-size:12.5px;font-weight:700;color:var(--wpt-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-msg-convo-preview{font-size:11px;color:var(--wpt-ink-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:1px;}
.wpt-msg-unread-badge{
  background:var(--wpt-accent);color:#fff;font-size:10px;font-weight:700;min-width:17px;height:17px;
  border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px;flex-shrink:0;
}
.wpt-msg-main{flex:1 1 auto;display:flex;flex-direction:column;min-width:0;box-sizing:border-box;}
.wpt-msg-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:20px;text-align:center;}
.wpt-msg-head{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid var(--wpt-line);flex-shrink:0;box-sizing:border-box;}
.wpt-msg-head-avatar{width:32px;height:32px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;font-weight:700;}
.wpt-msg-head-name{font-size:13.5px;font-weight:700;color:var(--wpt-ink);}
.wpt-msg-head-sub{font-size:11.5px;color:var(--wpt-ink-faint);}
.wpt-msg-head-manage-btn{border:1px solid var(--wpt-line);background:var(--wpt-surface);color:var(--wpt-ink-soft);font-family:inherit;font-size:11.5px;font-weight:600;padding:6px 12px;border-radius:8px;flex-shrink:0;}
.wpt-msg-head-manage-btn:hover{background:var(--wpt-bg);color:var(--wpt-accent);}
.wpt-msg-list{flex:1 1 auto;overflow-y:auto;padding:16px 18px;display:flex;flex-direction:column;gap:8px;box-sizing:border-box;}
.wpt-msg-bubble-row{display:flex;align-items:flex-end;gap:6px;}
.wpt-msg-bubble-row.mine{justify-content:flex-end;}
.wpt-msg-bubble-row.theirs{justify-content:flex-start;}
.wpt-msg-bubble{max-width:min(65%,460px);padding:9px 13px;border-radius:12px;font-size:12.5px;line-height:1.7;white-space:pre-wrap;word-break:break-word;box-sizing:border-box;}
.wpt-msg-group-sender{display:block;font-size:11px;font-weight:800;color:var(--wpt-accent);margin-bottom:3px;}
.wpt-msg-forwarded-label{display:flex;align-items:center;gap:4px;font-size:10px;font-style:italic;opacity:.75;margin-bottom:4px;}
.wpt-msg-bubble-row.mine .wpt-msg-bubble{background:var(--wpt-accent);color:#fff;border-bottom-right-radius:3px;}
.wpt-msg-bubble-row.theirs .wpt-msg-bubble{background:var(--wpt-bg);color:var(--wpt-ink);border-bottom-left-radius:3px;}
.wpt-msg-time{display:block;font-size:9.5px;opacity:.7;margin-top:4px;text-align:left;}

.wpt-msg-bubble-actions{display:flex;gap:2px;opacity:0;transition:opacity .12s ease;flex-shrink:0;}
.wpt-msg-bubble-row:hover .wpt-msg-bubble-actions{opacity:1;}
.wpt-msg-bubble-actions button{
  width:24px;height:24px;border-radius:50%;border:1px solid var(--wpt-line);background:var(--wpt-surface);
  color:var(--wpt-ink-soft);font-size:12px;line-height:1;display:flex;align-items:center;justify-content:center;
}
.wpt-msg-bubble-actions button:hover{background:var(--wpt-bg);color:var(--wpt-accent);}

.wpt-msg-reply-quote{
  border-inline-start:3px solid rgba(255,255,255,.6);background:rgba(0,0,0,.14);border-radius:6px;
  padding:5px 9px;margin-bottom:6px;font-size:11px;
}
.wpt-msg-bubble-row.theirs .wpt-msg-reply-quote{border-inline-start-color:var(--wpt-accent);background:var(--wpt-surface);box-shadow:0 0 0 1px var(--wpt-line) inset;}
.wpt-msg-reply-quote-author{display:block;font-weight:700;margin-bottom:1px;}
.wpt-msg-reply-quote-text{display:block;opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

.wpt-msg-media-img{max-width:220px;max-height:220px;border-radius:8px;display:block;margin-bottom:6px;}
.wpt-msg-media-file{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;text-decoration:none;color:inherit;margin-bottom:4px;}
.wpt-msg-media-file:hover{text-decoration:underline;}

.wpt-msg-reply-preview{
  display:flex;align-items:center;gap:10px;padding:8px 18px;background:var(--wpt-bg);
  border-top:1px solid var(--wpt-line);flex-shrink:0;box-sizing:border-box;font-size:11.5px;
}
.wpt-msg-reply-preview-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--wpt-ink-soft);}
.wpt-msg-reply-preview button, .wpt-msg-media-preview button{border:none;background:none;color:var(--wpt-ink-faint);font-size:13px;flex-shrink:0;}
.wpt-msg-reply-preview button:hover, .wpt-msg-media-preview button:hover{color:var(--wpt-danger);}
.wpt-msg-media-preview{
  display:flex;align-items:center;gap:10px;padding:8px 18px;background:var(--wpt-bg);
  border-top:1px solid var(--wpt-line);flex-shrink:0;box-sizing:border-box;font-size:11.5px;color:var(--wpt-ink-soft);
}
.wpt-msg-media-preview span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

.wpt-msg-input-row{display:flex;align-items:center;gap:8px;padding:14px 18px;border-top:1px solid var(--wpt-line);flex-shrink:0;box-sizing:border-box;}
.wpt-msg-input-row input[type="text"]{flex:1;min-width:0;padding:10px 14px;border:1px solid var(--wpt-line);border-radius:20px;font-family:inherit;font-size:12.5px;background:var(--wpt-bg);color:var(--wpt-ink);box-sizing:border-box;}
.wpt-msg-input-row button[type="submit"]{padding:9px 20px;border:none;border-radius:20px;background:var(--wpt-ink);color:var(--wpt-surface);font-family:inherit;font-size:12.5px;font-weight:700;flex-shrink:0;}
#wpt-msg-attach-btn{width:36px;height:36px;border-radius:50%;border:1px solid var(--wpt-line);background:var(--wpt-surface);color:var(--wpt-ink-soft);font-size:14px;flex-shrink:0;}
#wpt-msg-attach-btn:hover{background:var(--wpt-bg);}
#wpt-msg-attach-btn:disabled{opacity:.6;}

.wpt-forward-list{max-height:340px;overflow-y:auto;}
.wpt-forward-list .wpt-msg-convo{cursor:pointer;}

@media (max-width:800px){
  .wpt-msg-card{height:70vh;}
  .wpt-msg-sidebar{width:96px;min-width:96px;max-width:96px;flex-basis:96px;}
  .wpt-msg-convo-preview{display:none;}
  .wpt-msg-convo-name{font-size:10.5px;}
}


/* ================= گزارش کار (work reports) ================= */
.wpt-report-card{padding:16px;margin-bottom:12px;}
.wpt-report-card-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px;}
.wpt-report-card-date{font-size:11.5px;color:var(--wpt-ink-soft);}
.wpt-report-card-spacer{flex:1;}
.wpt-del-report-btn{border:none;background:none;font-family:inherit;font-size:11.5px;font-weight:600;color:var(--wpt-ink-soft);}
.wpt-del-report-btn:hover{color:var(--wpt-danger);}
.wpt-report-card-body{font-size:12.5px;line-height:1.8;color:var(--wpt-ink);white-space:pre-wrap;}

/* ================= تنظیمات (settings) ================= */
.wpt-settings-card{background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:var(--wpt-radius,10px);padding:20px;max-width:560px;margin-bottom:18px;}
.wpt-settings-card label{font-size:12.5px;font-weight:700;color:var(--wpt-ink);}
.wpt-settings-danger{border-color:var(--wpt-danger);}

/* =====================================================================
   MOBILE APP LAYER — turns the desktop rail+content shell into a proper
   touch-first app on phones/small tablets: bottom tab bar instead of a
   side rail (frees up the full screen width for content), single-pane
   messenger with a back button, full-screen modals, stacked task
   filters instead of a vanished sidebar, sticky topbar, and touch
   targets sized for fingers instead of cursors. Appended last on
   purpose so it wins the cascade over the older partial breakpoints
   above without having to rewrite them.
   ===================================================================== */

@media (max-width:760px){

  /* ---- app shell: side rail -> fixed bottom tab bar ---- */
  html{-webkit-tap-highlight-color:transparent;}
  .wpt-app{min-height:100vh;}
  .wpt-sidebar{
    position:fixed;inset-inline:0;bottom:0;top:auto;width:100%;height:auto;
    flex-direction:row;align-items:center;justify-content:flex-start;
    padding:4px 6px calc(4px + env(safe-area-inset-bottom));
    gap:0;border-inline-end:none;border-top:1px solid var(--wpt-line);
    overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;z-index:500;box-shadow:0 -2px 10px rgba(0,0,0,.05);
  }
  .wpt-sidebar::-webkit-scrollbar{display:none;}
  .wpt-rail-logo-btn{flex-shrink:0;margin-inline-end:4px;}
  .wpt-rail-nav{flex-direction:row;flex:0 0 auto;width:auto;gap:0;}
  .wpt-rail-item{
    flex-direction:column;width:auto;flex:0 0 auto;min-width:60px;
    padding:7px 8px;border-radius:8px;border-inline-start:none;
  }
  .wpt-rail-item.active{border-inline-start:none;background:var(--wpt-accent-soft);}
  .wpt-rail-item.active svg{color:var(--wpt-accent);}
  .wpt-rail-item svg{width:21px;height:21px;}
  .wpt-rail-label{display:block;font-size:9px;}
  .wpt-rail-badge{top:2px;right:14px;}

  /* room for the fixed bottom bar so content never hides behind it */
  .wpt-content{padding:16px 14px calc(78px + env(safe-area-inset-bottom));}
  .wpt-main{min-width:0;}

  /* sticky, compact topbar */
  .wpt-topbar{position:sticky;top:0;z-index:250;padding:12px 14px;gap:8px;}
  .wpt-page-title{font-size:15.5px;}

  /* ---- touch targets & inputs: 16px prevents iOS auto-zoom-on-focus ---- */
  input,select,textarea{font-size:16px !important;}
  .wpt-btn{padding:11px 18px;font-size:13.5px;}
  .wpt-btn-sm{padding:9px 14px;}
  .wpt-icon-btn,.wpt-user-menu-btn{width:40px;height:40px;}
  .wpt-row-actions button{width:34px;height:34px;}
  .wpt-row-actions button.wpt-btn{width:auto;height:auto;}
  .wpt-tab{padding:12px 4px;}

  /* ---- modals: near-fullscreen sheet instead of a cramped popup ---- */
  .wpt-modal-overlay{padding:0;align-items:flex-end;}
  .wpt-modal{
    max-width:100%;width:100%;max-height:92vh;border-radius:16px 16px 0 0;
    padding:18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .wpt-modal-wide{max-width:100%;}
  .wpt-modal-actions{position:sticky;bottom:-18px;background:var(--wpt-surface);
    padding:10px 0 2px;margin-top:14px;}

  .wpt-toast-stack{bottom:calc(74px + env(safe-area-inset-bottom));left:12px;right:12px;}
  .wpt-toast{width:100%;}

  /* ---- messenger: single-pane (list <-> thread) with a back button ---- */
  .wpt-msg-card{height:calc(100vh - 132px - env(safe-area-inset-bottom));max-height:none;
    position:relative;border-radius:10px;}
  .wpt-msg-sidebar{width:100%;min-width:100%;max-width:100%;flex-basis:100%;
    border-inline-end:none;}
  .wpt-msg-convo-preview{display:block;}
  .wpt-msg-convo-name{font-size:12.5px;}
  .wpt-msg-main{position:absolute;inset:0;background:var(--wpt-surface);
    transform:translateX(100%);transition:transform .18s ease;}
  html[dir="rtl"] .wpt-msg-main,.wpt-msg-main{transform:translateX(100%);}
  .wpt-msg-card.wpt-msg-open .wpt-msg-sidebar{display:none;}
  .wpt-msg-card.wpt-msg-open .wpt-msg-main{transform:translateX(0);}
  .wpt-msg-head{padding-inline-start:52px;position:relative;}
  .wpt-msg-mobile-back{
    display:flex;align-items:center;justify-content:center;position:absolute;
    inset-inline-start:10px;top:10px;width:34px;height:34px;border-radius:50%;
    border:1px solid var(--wpt-line);background:var(--wpt-surface);color:var(--wpt-ink-soft);z-index:5;
  }
  .wpt-msg-card:not(.wpt-msg-open) .wpt-msg-mobile-back{display:none;}
  .wpt-msg-bubble{max-width:82%;}

  /* ---- tasks: side filters stack under the list instead of vanishing ---- */
  .wpt-tasks-shell{flex-direction:column;}
  .wpt-tasks-side{display:block;width:100%;order:2;margin-top:14px;}

  /* ---- projects / stats / misc grids ---- */
  .wpt-avatar-uploader{flex-wrap:wrap;}
  .wpt-tc-hero-row{flex-direction:column;align-items:stretch;}
  .wpt-tc-timer-card,.wpt-tc-checkin-btn{width:100%;min-width:0;}
}

@media (max-width:420px){
  .wpt-rail-item{min-width:54px;padding:6px 6px;}
  .wpt-modal{padding:16px 14px calc(16px + env(safe-area-inset-bottom));}
  .wpt-msg-bubble{max-width:88%;}
}



/* =====================================================================
   RESPONSIVE OVERRIDE — 2026
   Desktop-first layout is preserved; this layer hardens tablet/mobile
   behavior for all WPT screens.
   ===================================================================== */

/* Prevent accidental horizontal page overflow from long content.
   NOTE: this must stay on `html` only. Adding overflow-x:hidden to
   `body` as well turns body into a scroll container, which changes
   the reference edge for position:sticky children (.wpt-sidebar,
   .wpt-topbar) from the viewport to body's own padding-box. Since
   body also has padding-top:50px (to clear the fixed header), that
   50px got added a second time on top of the sticky `top:50px`
   offset, pushing the sidebar/topbar ~50px too low under the header. */
html { max-width:100%; overflow-x:hidden; }
*, *::before, *::after { box-sizing:border-box; }
img, video, iframe, canvas, svg { max-width:100%; }

/* Medium screens / tablets */
@media (max-width: 1024px) {
  .wpt-content { padding:22px 20px 50px; }

  .wpt-topbar {
    padding-inline:20px;
    gap:10px;
  }

  .wpt-stat-grid { gap:10px; }
  .wpt-grid-projects { gap:12px; }

  .wpt-toolbar-search { width:200px; }

  .wpt-tasks-toolbar {
    flex-wrap:wrap;
    gap:10px;
  }

  .wpt-tasks-toolbar-group {
    flex-wrap:wrap;
    min-width:0;
  }

  .wpt-cal-grid,
  .wpt-cal-head-row { gap:4px; }

  .wpt-modal-wide {
    width:min(94vw, 900px);
  }
}

/* Tablets and large phones */
@media (max-width: 760px) {
  .wpt-content {
    width:100%;
    max-width:100%;
    padding:14px 12px calc(84px + env(safe-area-inset-bottom));
  }

  .wpt-topbar {
    width:100%;
    min-width:0;
    padding:10px 12px;
  }

  .wpt-page-title,
  .wpt-page-subtitle {
    min-width:0;
    overflow-wrap:anywhere;
  }

  .wpt-topbar-spacer { display:none; }

  .wpt-toolbar,
  .wpt-tasks-toolbar,
  .wpt-field-row,
  .wpt-field-row-3 {
    width:100%;
  }

  .wpt-toolbar > *,
  .wpt-tasks-toolbar > *,
  .wpt-tasks-toolbar-group > * {
    min-width:0;
  }

  .wpt-toolbar-search {
    width:100%;
    flex:1 1 100%;
  }

  .wpt-toolbar .wpt-btn,
  .wpt-tasks-toolbar .wpt-btn,
  .wpt-tasks-toolbar .wpt-tt-icon-btn {
    min-height:42px;
  }

  .wpt-tasks-toolbar-group {
    width:100%;
  }

  .wpt-tasks-toolbar-spacer { display:none; }

  .wpt-tt-search {
    flex:1 1 100%;
    min-width:0;
  }

  .wpt-tt-search input,
  .wpt-tt-select {
    width:100%;
    min-width:0;
  }

  .wpt-panel,
  .wpt-card,
  .wpt-settings-card {
    max-width:100%;
  }

  .wpt-panel { padding:14px; }

  .wpt-stat-grid {
    grid-template-columns:1fr 1fr !important;
    gap:10px;
  }

  .wpt-grid-projects {
    grid-template-columns:1fr !important;
  }

  .wpt-row-2 {
    grid-template-columns:1fr !important;
  }

  .wpt-field-row,
  .wpt-field-row-3 {
    grid-template-columns:1fr !important;
  }

  /* Tables become horizontally scrollable instead of breaking the page. */
  .wpt-table-wrap,
  .wpt-table-responsive {
    width:100%;
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  .wpt-table-wrap table,
  .wpt-table-responsive table {
    min-width:620px;
  }

  /* Generic wide rows/cards should wrap rather than force viewport width. */
  .wpt-request-row,
  .wpt-asset-row,
  .wpt-file-row,
  .wpt-member-row,
  .wpt-project-row {
    max-width:100%;
    flex-wrap:wrap;
  }

  .wpt-request-info,
  .wpt-asset-info,
  .wpt-file-info,
  .wpt-member-info {
    min-width:0 !important;
    flex:1 1 160px;
  }

  /* Calendar: keep seven columns but make each cell compact. */
  .wpt-cal-grid,
  .wpt-cal-head-row {
    min-width:0;
    width:100%;
    gap:3px;
  }

  .wpt-cal-cell {
    min-width:0 !important;
    padding:6px 3px !important;
    overflow:hidden;
  }

  .wpt-cal-cell * {
    max-width:100%;
    overflow-wrap:anywhere;
  }

  /* Forms and controls use the available width. */
  .wpt-field input,
  .wpt-field select,
  .wpt-field textarea,
  .wpt-settings-card input,
  .wpt-settings-card select,
  .wpt-settings-card textarea {
    width:100%;
    max-width:100%;
  }

  .wpt-modal-overlay {
    width:100%;
    max-width:100%;
  }

  .wpt-modal {
    width:100%;
    max-width:100%;
    max-height:92vh;
    overflow-y:auto;
  }

  .wpt-modal-actions {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }

  .wpt-modal-actions > * {
    flex:1 1 140px;
    min-width:0;
  }

  .wpt-auth-box,
  .wpt-org-box {
    width:calc(100vw - 28px);
    max-width:400px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .wpt-content {
    padding-inline:10px;
  }

  .wpt-topbar {
    padding-inline:10px;
  }

  .wpt-page-title { font-size:15px; }

  .wpt-stat-grid {
    grid-template-columns:1fr !important;
  }

  .wpt-panel,
  .wpt-settings-card {
    padding:12px;
  }

  .wpt-toolbar {
    gap:8px;
  }

  .wpt-toolbar > .wpt-btn,
  .wpt-toolbar > button,
  .wpt-tasks-toolbar .wpt-btn,
  .wpt-tasks-toolbar .wpt-tt-icon-btn,
  .wpt-tasks-toolbar .wpt-tt-select {
    width:100%;
  }

  .wpt-tabs {
    overflow-x:auto;
    white-space:nowrap;
    -webkit-overflow-scrolling:touch;
  }

  .wpt-tab {
    flex:0 0 auto;
    min-width:110px;
  }

  .wpt-msg-input-row {
    padding:10px;
    gap:6px;
  }

  .wpt-msg-input-row button[type="submit"] {
    padding-inline:14px;
  }

  .wpt-msg-card {
    border-radius:8px;
  }

  .wpt-rail-label { font-size:8px; }
  .wpt-rail-item { min-width:52px; }

  .wpt-avatar-uploader {
    width:100%;
  }

  .wpt-avatar-uploader > * {
    max-width:100%;
  }
}

/* Very narrow devices */
@media (max-width: 360px) {
  .wpt-content { padding-inline:8px; }

  .wpt-rail-item {
    min-width:48px;
    padding-inline:4px;
  }

  .wpt-rail-item svg {
    width:19px;
    height:19px;
  }

  .wpt-modal {
    padding-inline:12px;
  }

  .wpt-msg-bubble {
    max-width:92%;
  }
}


/* =====================================================================
   WPT MODERN UI LAYER — 2026
   Visual refresh only: preserves existing markup, AJAX and PHP behaviour.
   ===================================================================== */
:root{
  --wpt-bg:#f6f7f9;
  --wpt-surface:#ffffff;
  --wpt-surface-2:#f9fafb;
  --wpt-ink:#151922;
  --wpt-ink-soft:#667085;
  --wpt-ink-faint:#98a2b3;
  --wpt-accent:#3157d5;
  --wpt-accent-soft:#eef2ff;
  --wpt-accent-dark:#2445b5;
  --wpt-success:#159570;
  --wpt-success-soft:#e9f8f3;
  --wpt-warning:#c78318;
  --wpt-warning-soft:#fff6e5;
  --wpt-danger:#d04444;
  --wpt-danger-soft:#fff0f0;
  --wpt-line:#e7eaf0;
  --wpt-contrast:#111827;
  --wpt-radius:14px;
  --wpt-shadow-xs:0 1px 2px rgba(16,24,40,.04);
  --wpt-shadow-sm:0 4px 14px rgba(16,24,40,.06);
  --wpt-shadow-md:0 12px 32px rgba(16,24,40,.09);
  color-scheme:light;
}
html[data-theme="dark"]{
  --wpt-bg:#0e1117;
  --wpt-surface:#151922;
  --wpt-surface-2:#1a1f29;
  --wpt-ink:#f4f5f7;
  --wpt-ink-soft:#aab2c0;
  --wpt-ink-faint:#737d8e;
  --wpt-accent:#718cff;
  --wpt-accent-soft:rgba(113,140,255,.14);
  --wpt-accent-dark:#9badff;
  --wpt-success:#38b98e;
  --wpt-success-soft:rgba(56,185,142,.13);
  --wpt-warning:#e2a84d;
  --wpt-warning-soft:rgba(226,168,77,.13);
  --wpt-danger:#ef7d7d;
  --wpt-danger-soft:rgba(239,125,125,.13);
  --wpt-line:#272d39;
  --wpt-contrast:#f4f5f7;
  --wpt-shadow-xs:0 1px 2px rgba(0,0,0,.15);
  --wpt-shadow-sm:0 6px 18px rgba(0,0,0,.18);
  --wpt-shadow-md:0 16px 40px rgba(0,0,0,.28);
  color-scheme:dark;
}

body{
  background:
    radial-gradient(circle at 85% -10%, rgba(49,87,213,.07), transparent 30%),
    var(--wpt-bg);
  color:var(--wpt-ink);
}
button,input,select,textarea{font-family:'Vazirmatn',sans-serif;}
::selection{background:var(--wpt-accent);color:#fff;}

.wpt-app{background:transparent;}
.wpt-sidebar{
  width:88px;
  padding:14px 9px;
  gap:12px;
  background:rgba(255,255,255,.86);
  border-inline-end:1px solid var(--wpt-line);
  box-shadow:1px 0 18px rgba(16,24,40,.025);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
html[data-theme="dark"] .wpt-sidebar{background:rgba(21,25,34,.88);}

.wpt-rail-logo-btn{
  width:42px;height:42px;border-radius:13px;
  box-shadow:0 7px 18px rgba(49,87,213,.18);
}
.wpt-rail-nav{gap:4px;}
.wpt-rail-item{
  min-height:62px;
  padding:10px 4px;
  border-radius:13px;
  color:var(--wpt-ink-faint);
  transition:transform .18s ease,background .18s ease,color .18s ease,box-shadow .18s ease;
}
.wpt-rail-item:hover{
  background:var(--wpt-surface-2);
  color:var(--wpt-ink-soft);
  transform:translateY(-1px);
}
.wpt-rail-item.active{
  background:var(--wpt-accent-soft);
  color:var(--wpt-accent);
  border-inline-start:0;
  box-shadow:inset 0 0 0 1px rgba(49,87,213,.08);
}
.wpt-rail-item.active:after{
  content:"";
  position:absolute;
  inset-inline-end:2px;
  width:3px;height:24px;border-radius:99px;
  background:var(--wpt-accent);
}
.wpt-rail-item svg{width:21px;height:21px;}
.wpt-rail-label{font-size:10.5px;font-weight:700;}

.wpt-main{min-width:0;}
.wpt-topbar{
  min-height:72px;
  padding:14px 30px;
  background:rgba(255,255,255,.82);
  border-bottom:1px solid var(--wpt-line);
  box-shadow:0 1px 0 rgba(16,24,40,.02);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  position:sticky;
  top:0;
  z-index:250;
}
html[data-theme="dark"] .wpt-topbar{background:rgba(21,25,34,.84);}
.wpt-page-title{font-size:18px;font-weight:800;letter-spacing:-.02em;}
.wpt-page-subtitle{font-size:12px;color:var(--wpt-ink-soft);margin-top:4px;}
.wpt-content{padding:28px 30px 64px;max-width:1440px;width:100%;margin:0 auto;}

.wpt-btn{
  border-radius:10px;
  min-height:40px;
  padding:9px 17px;
  font-size:12.5px;
  box-shadow:var(--wpt-shadow-xs);
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease;
}
.wpt-btn:hover{transform:translateY(-1px);box-shadow:var(--wpt-shadow-sm);}
.wpt-btn:active{transform:translateY(0);box-shadow:none;}
.wpt-btn-primary{
  background:linear-gradient(135deg,var(--wpt-accent),var(--wpt-accent-dark));
  box-shadow:0 5px 15px rgba(49,87,213,.18);
}
.wpt-btn-primary:hover{background:linear-gradient(135deg,var(--wpt-accent-dark),var(--wpt-accent));}
.wpt-btn-ghost{background:var(--wpt-surface);border-color:var(--wpt-line);}
.wpt-btn-danger{box-shadow:0 5px 15px rgba(208,68,68,.14);}

.wpt-field{margin-bottom:18px;}
.wpt-field label{font-size:12px;margin-bottom:7px;font-weight:700;}
.wpt-field input,.wpt-field select,.wpt-field textarea{
  border-color:var(--wpt-line);
  background:var(--wpt-surface);
  border-radius:10px;
  min-height:42px;
  padding:10px 13px;
  box-shadow:inset 0 1px 2px rgba(16,24,40,.02);
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.wpt-field input:hover,.wpt-field select:hover,.wpt-field textarea:hover{border-color:#cbd2df;}
.wpt-field input:focus,.wpt-field select:focus,.wpt-field textarea:focus{
  border-color:var(--wpt-accent);
  box-shadow:0 0 0 4px var(--wpt-accent-soft);
}
.wpt-toolbar-search,.wpt-tt-search{
  border-radius:11px;
  background:var(--wpt-surface);
  box-shadow:var(--wpt-shadow-xs);
  transition:border-color .16s ease,box-shadow .16s ease;
}
.wpt-toolbar-search:focus-within,.wpt-tt-search:focus-within{
  border-color:var(--wpt-accent);
  box-shadow:0 0 0 4px var(--wpt-accent-soft);
}
.wpt-toolbar select,.wpt-tt-select,.wpt-tt-icon-btn{
  border-radius:10px;
  min-height:40px;
  background:var(--wpt-surface);
}
.wpt-chip{border-radius:999px;padding:7px 14px;transition:.16s ease;}
.wpt-chip:hover{border-color:var(--wpt-accent);color:var(--wpt-accent);}
.wpt-chip.active{box-shadow:0 4px 12px rgba(49,87,213,.16);}

.wpt-panel,.wpt-card,.wpt-user-table-wrap,.wpt-proj-card,.wpt-task-card-row,.wpt-settings-card,.wpt-msg-card{
  border-color:var(--wpt-line);
  border-radius:var(--wpt-radius);
  box-shadow:var(--wpt-shadow-xs);
}
.wpt-panel,.wpt-settings-card{padding:20px;}
.wpt-panel-title{font-size:14px;font-weight:800;}
.wpt-stat-grid{gap:16px;margin-bottom:22px;}
.wpt-stat-card{
  position:relative;
  overflow:hidden;
  border-color:var(--wpt-line);
  border-radius:16px;
  padding:18px 20px;
  box-shadow:var(--wpt-shadow-xs);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.wpt-stat-card:before{
  content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--wpt-accent);opacity:.8;
}
.wpt-stat-card:hover{transform:translateY(-2px);box-shadow:var(--wpt-shadow-sm);border-color:#d8deea;}
.wpt-stat-label{font-size:11.5px;font-weight:600;margin-bottom:9px;}
.wpt-stat-value{font-size:25px;font-weight:800;letter-spacing:-.03em;}

.wpt-user-table-wrap{overflow:auto;}
.wpt-user-table{font-size:12.5px;}
.wpt-user-table th{
  background:var(--wpt-surface-2);
  color:var(--wpt-ink-soft);
  padding:13px 16px;
  font-size:11px;
}
.wpt-user-table td{padding:14px 16px;}
.wpt-user-table tr{transition:background .15s ease;}
.wpt-user-table tr:hover td{background:var(--wpt-accent-soft);}
.wpt-row-actions button{
  width:32px;height:32px;border-radius:9px;
  transition:.16s ease;
}
.wpt-row-actions button.wpt-btn{width:auto;height:auto;}
.wpt-row-actions button:hover{transform:translateY(-1px);box-shadow:var(--wpt-shadow-xs);}

.wpt-proj-card{
  padding:20px;
  gap:14px;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.wpt-proj-card:hover{transform:translateY(-3px);box-shadow:var(--wpt-shadow-md);border-color:#d5dceb;}
.wpt-proj-icon{width:42px;height:42px;border-radius:12px;}
.wpt-proj-name{font-size:14px;font-weight:800;}
.wpt-proj-bar-wrap{height:7px;border-radius:99px;}
.wpt-proj-card.add{min-height:170px;border-radius:16px;}

.wpt-task-card-row{
  padding:16px 18px;
  border-radius:12px;
  margin-bottom:10px;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.wpt-task-card-row:hover{transform:translateY(-1px);box-shadow:var(--wpt-shadow-sm);border-color:rgba(49,87,213,.35);}
.wpt-tasks-side{border-radius:16px;padding:16px;box-shadow:var(--wpt-shadow-xs);}
.wpt-tside-item{min-height:40px;border-radius:10px;}
.wpt-tside-item.active{box-shadow:inset 0 0 0 1px rgba(49,87,213,.08);}

.wpt-tasks-chip-row{
  border-radius:13px;
  box-shadow:var(--wpt-shadow-xs);
  padding:11px 14px;
}
.wpt-tt-chip{border-radius:999px;padding:7px 12px;}
.wpt-tasks-quicktab{border-radius:999px;}

.wpt-tabs{gap:8px;margin-bottom:22px;}
.wpt-tab{
  padding:11px 8px;
  margin-inline-end:8px;
  border-radius:8px 8px 0 0;
}
.wpt-tab.active{color:var(--wpt-accent);}

.wpt-modal-overlay{background:rgba(15,23,42,.48);backdrop-filter:blur(4px);}
.wpt-modal{
  border:1px solid var(--wpt-line);
  border-radius:18px;
  padding:24px;
  box-shadow:0 24px 70px rgba(15,23,42,.2);
}
.wpt-modal-title{font-size:16px;font-weight:800;}
.wpt-modal-close{
  width:34px;height:34px;border-radius:9px;
  display:flex;align-items:center;justify-content:center;
}
.wpt-modal-close:hover{background:var(--wpt-bg);}

.wpt-toast{
  border-radius:12px;
  padding:12px 16px;
  box-shadow:var(--wpt-shadow-md);
  backdrop-filter:blur(10px);
}

.wpt-org-item{
  border-radius:14px;
  padding:14px 16px;
  box-shadow:var(--wpt-shadow-xs);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.wpt-org-item:hover{transform:translateY(-2px);box-shadow:var(--wpt-shadow-sm);}
.wpt-org-item-icon{width:42px;height:42px;border-radius:12px;}
.wpt-auth-card{
  border-radius:18px;
  padding:26px;
  box-shadow:var(--wpt-shadow-md);
}
.wpt-auth-logo{width:48px;height:48px;border-radius:14px;box-shadow:0 8px 22px rgba(49,87,213,.2);}
.wpt-auth-title{font-size:21px;letter-spacing:-.025em;}

.wpt-tc-timer-card,.wpt-tc-checkin-btn,.wpt-tc-month-row{
  border-radius:14px;
}
.wpt-tc-checkin-btn{box-shadow:0 8px 20px rgba(21,149,112,.16);transition:transform .16s ease,box-shadow .16s ease;}
.wpt-tc-checkin-btn:hover{opacity:1;transform:translateY(-2px);box-shadow:0 12px 26px rgba(21,149,112,.22);}

.wpt-msg-card{
  height:calc(100vh - 190px);
  max-height:760px;
  min-height:520px;
  box-shadow:var(--wpt-shadow-sm);
}
.wpt-msg-sidebar{padding:14px;}
.wpt-msg-convo{padding:10px;border-radius:11px;transition:.15s ease;}
.wpt-msg-convo:hover{background:var(--wpt-bg);transform:translateX(-1px);}
.wpt-msg-convo.active{background:var(--wpt-accent-soft);}
.wpt-msg-convo-avatar,.wpt-msg-head-avatar{box-shadow:0 2px 7px rgba(16,24,40,.12);}
.wpt-msg-bubble{padding:10px 14px;border-radius:14px;}
.wpt-msg-bubble-row.mine .wpt-msg-bubble{box-shadow:0 5px 14px rgba(49,87,213,.14);}
.wpt-msg-input-row input[type="text"]{min-height:42px;border-radius:999px;}
#wpt-msg-attach-btn{width:40px;height:40px;}
.wpt-msg-input-row button[type="submit"]{min-height:40px;box-shadow:0 5px 12px rgba(17,24,39,.12);}

.wpt-file-row,.wpt-asset-row,.wpt-member-row{border-radius:12px;transition:.16s ease;}
.wpt-file-row:hover,.wpt-asset-row:hover,.wpt-member-row:hover{background:var(--wpt-accent-soft);}

.wpt-empty-block{padding:76px 20px;}
.wpt-empty-title{font-size:14px;font-weight:800;}
.wpt-empty-sub{font-size:12px;line-height:1.8;}

.wpt-access-badge,.wpt-status-pill{padding:4px 10px;border-radius:999px;}

@media (max-width:1024px){
  .wpt-content{padding:22px 20px 54px;}
  .wpt-topbar{padding-inline:20px;}
}
@media (max-width:760px){
  body{
    background:var(--wpt-bg);
    padding-bottom:env(safe-area-inset-bottom);
  }
  .wpt-sidebar{
    height:70px;
    padding:5px 7px calc(5px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.94);
    box-shadow:0 -8px 28px rgba(16,24,40,.08);
    border-top:1px solid var(--wpt-line);
  }
  html[data-theme="dark"] .wpt-sidebar{background:rgba(21,25,34,.96);}
  .wpt-rail-item{min-width:62px;min-height:58px;border-radius:12px;}
  .wpt-rail-item.active:after{display:none;}
  .wpt-rail-item.active{background:var(--wpt-accent-soft);}
  .wpt-rail-label{font-size:9px;}
  .wpt-rail-logo-btn{width:38px;height:38px;border-radius:11px;}
  .wpt-content{padding:14px 12px calc(88px + env(safe-area-inset-bottom));}
  .wpt-topbar{
    min-height:62px;
    padding:10px 14px;
    background:rgba(255,255,255,.9);
  }
  html[data-theme="dark"] .wpt-topbar{background:rgba(21,25,34,.92);}
  .wpt-page-title{font-size:16px;}
  .wpt-page-subtitle{font-size:11px;}
  .wpt-stat-grid{gap:10px;}
  .wpt-stat-card{padding:15px 16px;border-radius:14px;}
  .wpt-stat-value{font-size:22px;}
  .wpt-panel,.wpt-settings-card{padding:15px;}
  .wpt-btn{min-height:42px;}
  .wpt-user-table-wrap{border-radius:13px;}
  .wpt-task-card-row{padding:14px;}
  .wpt-msg-card{
    height:calc(100vh - 154px - env(safe-area-inset-bottom));
    min-height:440px;
    border-radius:14px;
  }
  .wpt-modal{border-radius:18px 18px 0 0;}
}
@media (max-width:480px){
  .wpt-content{padding-inline:10px;}
  .wpt-topbar{padding-inline:11px;}
  .wpt-stat-card{padding:14px;}
  .wpt-stat-label{font-size:11px;}
  .wpt-toolbar > .wpt-btn,.wpt-toolbar > button,
  .wpt-tasks-toolbar .wpt-btn,.wpt-tasks-toolbar .wpt-tt-icon-btn{border-radius:11px;}
  .wpt-org-item{padding:13px;}
}

/* ================================================================
   WPT UI V4 — Calm productivity / reference-inspired design system
   Goal: low visual fatigue, clear hierarchy, restrained color.
   ================================================================ */
:root{
  --wpt-bg:#f6f7f9;
  --wpt-surface:#ffffff;
  --wpt-surface-2:#f8f9fb;
  --wpt-ink:#17191d;
  --wpt-ink-soft:#68707b;
  --wpt-ink-faint:#9aa1aa;
  --wpt-accent:#2563eb;
  --wpt-accent-soft:#eef4ff;
  --wpt-accent-dark:#1d4ed8;
  --wpt-success:#087f5b;
  --wpt-success-soft:#eaf7f2;
  --wpt-warning:#a16207;
  --wpt-warning-soft:#fff7df;
  --wpt-danger:#c62828;
  --wpt-danger-soft:#fff0f0;
  --wpt-line:#e3e6eb;
  --wpt-contrast:#15181d;
  --wpt-radius:10px;
  --wpt-shadow-xs:0 1px 2px rgba(16,24,40,.035);
  --wpt-shadow-sm:0 4px 14px rgba(16,24,40,.055);
  --wpt-shadow-md:0 12px 30px rgba(16,24,40,.10);
  color-scheme:light;
}
html[data-theme="dark"]{
  --wpt-bg:#17191d;
  --wpt-surface:#202328;
  --wpt-surface-2:#1c1f24;
  --wpt-ink:#f0f2f4;
  --wpt-ink-soft:#a4abb4;
  --wpt-ink-faint:#707781;
  --wpt-accent:#78a2ff;
  --wpt-accent-soft:#202c46;
  --wpt-accent-dark:#9bb8ff;
  --wpt-success:#4bb58e;
  --wpt-success-soft:#1d332b;
  --wpt-warning:#d5a34b;
  --wpt-warning-soft:#352b1b;
  --wpt-danger:#ef7777;
  --wpt-danger-soft:#382124;
  --wpt-line:#30343a;
  --wpt-contrast:#f4f6f8;
  --wpt-shadow-xs:0 1px 2px rgba(0,0,0,.18);
  --wpt-shadow-sm:0 5px 16px rgba(0,0,0,.20);
  --wpt-shadow-md:0 14px 34px rgba(0,0,0,.28);
  color-scheme:dark;
}

body{
  background:var(--wpt-bg);
  color:var(--wpt-ink);
  background-image:none;
}
::selection{background:var(--wpt-accent-soft);color:var(--wpt-ink);}

/* Shell */
.wpt-app{background:var(--wpt-bg);}
.wpt-sidebar{
  width:82px;
  padding:10px 7px;
  gap:8px;
  background:var(--wpt-surface);
  border-inline-end:1px solid var(--wpt-line);
  box-shadow:none;
  backdrop-filter:none;
}
.wpt-rail-logo-btn{
  width:40px;height:40px;border-radius:9px;
  box-shadow:none;
}
.wpt-rail-nav{gap:1px;}
.wpt-rail-item{
  min-height:58px;
  padding:7px 3px;
  border-radius:8px;
  color:#8a929d;
  transition:background .14s ease,color .14s ease;
}
.wpt-rail-item:hover{background:var(--wpt-bg);color:var(--wpt-ink-soft);transform:none;}
.wpt-rail-item.active{
  background:var(--wpt-accent-soft);
  color:var(--wpt-accent);
  border-inline-start:0;
  box-shadow:none;
}
.wpt-rail-item.active:after{
  inset-inline-end:-7px;
  width:3px;height:28px;
  background:var(--wpt-accent);
}
.wpt-rail-item svg{width:20px;height:20px;stroke-width:1.7;}
.wpt-rail-label{font-size:9.5px;font-weight:600;}
.wpt-icon-btn,.wpt-user-menu-btn{
  width:34px;height:34px;border-radius:8px;
  box-shadow:none;
  background:var(--wpt-surface);
}

/* Top bar */
.wpt-topbar{
  min-height:50px;
  padding:7px 18px;
  background:var(--wpt-surface);
  border-bottom:1px solid var(--wpt-line);
  box-shadow:none;
  backdrop-filter:none;
  position:sticky;
  top:0;
  z-index:250;
}
.wpt-page-title{font-size:14px;font-weight:700;letter-spacing:0;}
.wpt-page-subtitle{font-size:11px;color:var(--wpt-ink-soft);margin-top:2px;}
.wpt-page-count{font-size:10px;padding:3px 8px;background:var(--wpt-bg);}
.wpt-content{padding:20px 24px 52px;max-width:1480px;}

/* Controls */
.wpt-btn{
  min-height:36px;
  border-radius:8px;
  padding:7px 14px;
  font-size:12px;
  font-weight:700;
  box-shadow:none;
  transition:background .14s ease,border-color .14s ease,color .14s ease;
}
.wpt-btn:hover,.wpt-btn:active{transform:none;box-shadow:none;}
.wpt-btn-primary{background:var(--wpt-accent);box-shadow:none;}
.wpt-btn-primary:hover{background:var(--wpt-accent-dark);}
.wpt-btn-ghost{background:var(--wpt-surface);border:1px solid var(--wpt-line);}
.wpt-btn-ghost:hover{background:var(--wpt-bg);border-color:#cfd4db;}
.wpt-btn-danger{background:var(--wpt-danger);}
.wpt-btn-sm{min-height:32px;padding:5px 11px;border-radius:7px;}

.wpt-field input,.wpt-field select,.wpt-field textarea{
  min-height:38px;
  background:var(--wpt-surface);
  border:1px solid var(--wpt-line);
  border-radius:8px;
}
.wpt-field input:focus,.wpt-field select:focus,.wpt-field textarea:focus{
  border-color:#9db7ee;
  box-shadow:0 0 0 3px var(--wpt-accent-soft);
}

/* Panels/cards: almost flat, only enough depth to separate surfaces */
.wpt-panel,.wpt-card,.wpt-user-table-wrap,.wpt-settings-card,.wpt-proj-card,.wpt-msg-card{
  background:var(--wpt-surface);
  border:1px solid var(--wpt-line);
  border-radius:10px;
  box-shadow:none;
}
.wpt-panel,.wpt-settings-card{padding:17px 18px;}
.wpt-panel-title{font-size:13px;font-weight:700;}
.wpt-panel-sub{font-size:11px;}

/* Stats: compact and quiet */
.wpt-stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px;}
.wpt-stat-card{
  padding:13px 15px;
  border-radius:9px;
  box-shadow:none;
  transition:border-color .14s ease,background .14s ease;
}
.wpt-stat-card:before{display:none;}
.wpt-stat-card:hover{transform:none;box-shadow:none;border-color:#d5dae1;background:var(--wpt-surface);}
.wpt-stat-label{font-size:10.5px;margin-bottom:6px;color:var(--wpt-ink-soft);}
.wpt-stat-value{font-size:21px;font-weight:750;letter-spacing:-.02em;}

/* Tables */
.wpt-user-table-wrap{overflow:auto;}
.wpt-user-table th{background:var(--wpt-surface-2);padding:10px 14px;font-size:10.5px;}
.wpt-user-table td{padding:11px 14px;}
.wpt-user-table tr:hover td{background:#fafbfc;}
html[data-theme="dark"] .wpt-user-table tr:hover td{background:#23272d;}
.wpt-row-actions button{width:30px;height:30px;border-radius:7px;box-shadow:none;}
.wpt-row-actions button.wpt-btn{width:auto;height:auto;}
.wpt-row-actions button:hover{transform:none;box-shadow:none;}

/* Chips/status: use color only as semantic signal */
.wpt-access-badge,.wpt-status-pill{padding:3px 9px;border-radius:999px;font-size:10px;}
.wpt-access-owner{color:#2459b8;background:#edf3ff;border-color:#d8e4ff;}
.wpt-access-admin{color:#8a5a09;background:#fff7df;border-color:#f1dfad;}
.wpt-access-member,.wpt-access-viewer{color:#66707c;background:#f0f2f5;border-color:#e2e5e9;}
.wpt-status-active,.wpt-status-asset-healthy,.wpt-status-request-approved{color:#087f5b;background:#eaf7f2;}
.wpt-status-invited,.wpt-status-asset-needs_repair,.wpt-status-asset-maintenance,.wpt-status-request-pending,.wpt-status-request-return_pending{color:#946200;background:#fff7df;}
.wpt-status-inactive,.wpt-status-asset-retired,.wpt-status-request-rejected{color:#b42318;background:#fff0f0;}
.wpt-status-asset-available,.wpt-status-asset-on_loan,.wpt-status-request-returned{color:#315d9f;background:#edf3ff;}
.wpt-status-request-cancelled{color:#68707b;background:#f0f2f5;}

/* Dashboard */
.wpt-hello{font-size:18px;font-weight:750;margin-bottom:3px;}
.wpt-hello-sub{font-size:11.5px;color:var(--wpt-ink-soft);margin-bottom:18px;}
.wpt-row-2{gap:12px;margin-top:14px;}
.wpt-dash-row{padding:10px 2px;font-size:12px;}

/* Attendance hero, closer to reference: compact, white, calm */
.wpt-tc-hero{padding:4px 0 16px;max-width:700px;}
.wpt-tc-hero-date{font-size:21px;font-weight:800;margin-bottom:20px;}
.wpt-tc-hero-row{gap:10px;margin-bottom:14px;}
.wpt-tc-timer-card{border-radius:9px;padding:10px 20px;min-width:165px;box-shadow:none;}
.wpt-tc-timer-label{font-size:10px;}
.wpt-tc-timer-value{font-size:17px;}
.wpt-tc-checkin-btn{border-radius:9px;padding:10px 22px;min-width:128px;box-shadow:none;}
.wpt-tc-checkin-btn:hover{transform:none;box-shadow:none;}
.wpt-tc-month-row{border-radius:9px;padding:9px 17px;}

/* Calendar/files */
.wpt-cal-cell{border-radius:8px;background:var(--wpt-surface);}
.wpt-cal-cell:hover{border-color:#b9c9e8;}
.wpt-file-row,.wpt-asset-row,.wpt-member-row{border-radius:8px;}
.wpt-file-row:hover,.wpt-asset-row:hover,.wpt-member-row:hover{background:var(--wpt-accent-soft);}

/* Projects/tasks */
.wpt-proj-card,.wpt-task-card-row{box-shadow:none;}
.wpt-proj-card{padding:17px;gap:12px;transition:border-color .14s ease,background .14s ease;}
.wpt-proj-card:hover{transform:none;box-shadow:none;border-color:#cfd5dd;}
.wpt-proj-icon{width:38px;height:38px;border-radius:9px;}
.wpt-proj-name{font-size:13px;font-weight:750;}
.wpt-proj-card.add{min-height:150px;border-radius:10px;}
.wpt-task-card-row{padding:13px 15px;border-radius:9px;margin-bottom:8px;transition:border-color .14s ease,background .14s ease;}
.wpt-task-card-row:hover{transform:none;box-shadow:none;border-color:#cfd5dd;}
.wpt-tasks-side{border-radius:10px;padding:13px;box-shadow:none;}
.wpt-tside-item{min-height:38px;border-radius:8px;}
.wpt-tasks-chip-row{border-radius:9px;box-shadow:none;padding:9px 12px;}
.wpt-tt-chip{border-radius:999px;padding:6px 11px;}
.wpt-tasks-quicktab{border-radius:8px;}

/* Tabs */
.wpt-tabs{gap:2px;margin-bottom:18px;}
.wpt-tab{padding:9px 8px;margin-inline-end:10px;border-radius:6px 6px 0 0;}
.wpt-tab.active{color:var(--wpt-accent);border-bottom-color:var(--wpt-accent);}

/* Messenger */
.wpt-msg-card{box-shadow:none;}
.wpt-msg-convo{border-radius:8px;}
.wpt-msg-convo:hover{transform:none;}
.wpt-msg-convo.active{background:var(--wpt-accent-soft);}
.wpt-msg-bubble-row.mine .wpt-msg-bubble{box-shadow:none;}

/* Modal/toast */
.wpt-modal-overlay{background:rgba(17,24,39,.30);backdrop-filter:blur(2px);}
.wpt-modal{border-radius:12px;padding:20px;box-shadow:0 16px 42px rgba(16,24,40,.14);}
.wpt-modal-title{font-size:15px;}
.wpt-toast{border-radius:9px;box-shadow:var(--wpt-shadow-md);}

/* Login/org picker */
.wpt-auth-card{border-radius:12px;padding:22px;box-shadow:var(--wpt-shadow-sm);}
.wpt-auth-logo{width:44px;height:44px;border-radius:10px;box-shadow:none;}
.wpt-auth-title{font-size:19px;}
.wpt-org-item{border-radius:10px;padding:12px 14px;box-shadow:none;}
.wpt-org-item:hover{transform:none;box-shadow:none;}
.wpt-org-item-icon{width:38px;height:38px;border-radius:9px;}

@media (max-width:860px){
  .wpt-stat-grid{grid-template-columns:1fr 1fr;}
  .wpt-content{padding:18px 16px 50px;}
}
@media (max-width:760px){
  .wpt-sidebar{width:100%;height:68px;padding:4px 6px calc(4px + env(safe-area-inset-bottom));}
  .wpt-rail-item{min-width:58px;min-height:56px;border-radius:9px;}
  .wpt-rail-label{font-size:8.5px;}
  .wpt-content{padding:13px 11px calc(82px + env(safe-area-inset-bottom));}
  .wpt-topbar{min-height:50px;padding:8px 12px;}
  .wpt-page-title{font-size:14px;}
  .wpt-stat-card{padding:13px;}
}
@media (max-width:480px){
  .wpt-content{padding-inline:9px;}
  .wpt-stat-grid{gap:8px;}
  .wpt-stat-card{padding:12px;}
  .wpt-stat-value{font-size:20px;}
}

/* ================= Global header — reference-inspired ================= */
.wpt-global-header{
  position:fixed;inset:0 0 auto 0;height:50px;z-index:500;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 14px;background:var(--wpt-surface);border-bottom:1px solid var(--wpt-line);
  color:var(--wpt-ink);direction:rtl;
}
.wpt-header-right,.wpt-header-left{display:flex;align-items:center;height:100%;}
.wpt-header-right{gap:9px;min-width:0;}
.wpt-header-left{gap:6px;direction:ltr;}
.wpt-header-orgswitch{position:relative;}
.wpt-header-org{
  height:38px;display:flex;align-items:center;gap:9px;padding:0 2px 0 5px;
  color:var(--wpt-ink);min-width:205px;text-decoration:none;border-radius:7px;
}
.wpt-header-org:hover{background:var(--wpt-bg);}
/* Floating org-switch bubble: opens on hover (desktop) or tap (touch/keyboard). */
.wpt-orgswitch-panel{
  position:absolute;top:100%;right:0;left:auto;padding-top:8px;width:250px;
  max-width:calc(100vw - 24px);z-index:20;direction:rtl;
  opacity:0;visibility:hidden;transform:translateY(-6px);
  transition:opacity .15s ease, transform .15s ease, visibility .15s;
  pointer-events:none;
}
.wpt-header-orgswitch:hover .wpt-orgswitch-panel,
.wpt-header-orgswitch.is-open .wpt-orgswitch-panel,
.wpt-header-orgswitch:focus-within .wpt-orgswitch-panel{
  opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto;
}
.wpt-orgswitch-inner{
  background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:12px;
  box-shadow:0 14px 35px rgba(15,23,42,.14);overflow:hidden;
}
.wpt-orgswitch-list{max-height:280px;overflow-y:auto;display:flex;flex-direction:column;padding:6px;}
.wpt-orgswitch-item{
  display:flex;align-items:center;gap:9px;padding:8px;border-radius:8px;
  text-decoration:none;color:inherit;
}
.wpt-orgswitch-item:hover{background:var(--wpt-bg);}
.wpt-orgswitch-item.is-current{background:color-mix(in srgb, var(--wpt-accent) 8%, transparent);}
.wpt-orgswitch-item-icon{
  flex-shrink:0;width:28px;height:28px;border-radius:6px;color:#fff;font-size:12px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}
.wpt-orgswitch-item-name{font-size:12px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wpt-orgswitch-check{width:15px;height:15px;color:var(--wpt-accent);flex-shrink:0;}
.wpt-orgswitch-empty{padding:16px 10px;text-align:center;font-size:11.5px;color:var(--wpt-ink-soft);}
.wpt-orgswitch-manage{
  display:block;text-align:center;font-size:11px;padding:10px 8px;color:var(--wpt-accent);
  text-decoration:none;border-top:1px solid var(--wpt-line);
}
.wpt-orgswitch-manage:hover{background:var(--wpt-bg);}
.wpt-header-org-icon{
  width:34px;height:34px;border:1px solid var(--wpt-line);border-radius:6px;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.wpt-header-org-icon svg{width:18px;height:18px;}
.wpt-header-org-text{display:flex;flex-direction:column;line-height:1.2;min-width:0;}
.wpt-header-org-text strong{font-size:12.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wpt-header-chevron{width:15px;height:15px;color:var(--wpt-ink-faint);flex-shrink:0;}
.wpt-header-icon{
  position:relative;width:34px;height:34px;border:0;background:transparent;color:var(--wpt-ink);
  display:flex;align-items:center;justify-content:center;border-radius:7px;padding:0;cursor:pointer;
}
.wpt-header-icon:hover{background:var(--wpt-bg);}
.wpt-header-icon svg{width:19px;height:19px;}
.wpt-notification-dot{
  position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:50%;
  background:#2563eb;border:2px solid var(--wpt-surface);display:none;
}
.wpt-header-notifications{position:relative;height:100%;display:flex;align-items:center;}
.wpt-header-usermenu{position:relative;height:100%;display:flex;align-items:center;}
.wpt-header-usermenu .wpt-user-menu{top:100%;left:0;right:auto;margin-top:8px;bottom:auto;}
.wpt-notification-panel{
  position:absolute;top:44px;left:0;width:330px;max-width:calc(100vw - 24px);
  background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:12px;
  box-shadow:0 14px 35px rgba(15,23,42,.12);overflow:hidden;z-index:20;direction:rtl;
}
.wpt-notification-panel[hidden]{display:none;}
.wpt-notification-head{
  height:48px;padding:0 14px;display:flex;align-items:center;gap:10px;
  border-bottom:1px solid var(--wpt-line);
}
.wpt-notification-head strong{font-size:13px;}
.wpt-notification-mark-all{
  margin-right:auto;border:0;background:transparent;color:var(--wpt-accent);
  font-size:10.5px;font-family:inherit;cursor:pointer;padding:4px 2px;
}
.wpt-notification-mark-all:hover{text-decoration:underline;}
.wpt-notification-mark-all[hidden]{display:none;}
.wpt-notification-close{border:0;background:transparent;color:var(--wpt-ink-soft);font-size:22px;line-height:1;cursor:pointer;padding:2px 5px;}
.wpt-notification-body{max-height:360px;overflow-y:auto;}
.wpt-notification-empty{min-height:175px;padding:25px 22px;display:flex;align-items:center;justify-content:center;text-align:center;flex-direction:column;gap:7px;color:var(--wpt-ink-soft);}
.wpt-notification-empty-icon{width:42px;height:42px;border-radius:10px;background:var(--wpt-bg);display:flex;align-items:center;justify-content:center;margin-bottom:4px;}
.wpt-notification-empty-icon svg{width:20px;height:20px;}
.wpt-notification-empty strong{font-size:12px;color:var(--wpt-ink);}
.wpt-notification-empty span{font-size:10px;line-height:1.8;max-width:235px;}

.wpt-notification-list{display:flex;flex-direction:column;}
.wpt-notification-item{
  position:relative;display:flex;align-items:flex-start;gap:10px;padding:11px 14px;
  text-decoration:none;color:inherit;border-bottom:1px solid var(--wpt-line);
}
.wpt-notification-item:last-child{border-bottom:0;}
.wpt-notification-item:hover{background:var(--wpt-bg);}
.wpt-notification-item.unread{background:color-mix(in srgb, var(--wpt-accent) 6%, transparent);}
.wpt-notification-item-icon{
  flex-shrink:0;width:32px;height:32px;border-radius:8px;background:var(--wpt-bg);
  display:flex;align-items:center;justify-content:center;color:var(--wpt-accent);
}
.wpt-notification-item-icon svg{width:16px;height:16px;}
.wpt-notification-item-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;}
.wpt-notification-item-title{font-size:11.5px;color:var(--wpt-ink);}
.wpt-notification-item-msg{
  font-size:10.5px;color:var(--wpt-ink-soft);overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;
}
.wpt-notification-item-time{font-size:9.5px;color:var(--wpt-ink-faint);}
.wpt-notification-item-dot{
  flex-shrink:0;width:7px;height:7px;border-radius:50%;background:#2563eb;margin-top:5px;
}

/* Make every logged-in app start below the fixed header. */
body:has(.wpt-app){padding-top:50px;}
body:has(.wpt-app) .wpt-app{min-height:calc(100vh - 50px);}
body:has(.wpt-app) .wpt-sidebar{min-height:calc(100vh - 50px);}

@media (max-width:760px){
  .wpt-global-header{height:48px;padding:0 8px;}
  .wpt-header-org{min-width:0;max-width:205px;gap:6px;}
  .wpt-header-org-icon{width:30px;height:30px;}
  .wpt-header-icon{width:30px;height:30px;}
  .wpt-notification-panel{top:42px;left:-4px;width:310px;}
  body:has(.wpt-app){padding-top:48px;}
  body:has(.wpt-app) .wpt-app{min-height:calc(100vh - 48px);}
  body:has(.wpt-app) .wpt-sidebar{min-height:0;}
}
@media (max-width:430px){
  .wpt-header-org-text strong{max-width:145px;}
  .wpt-header-org{height:34px;}
  .wpt-notification-panel{left:auto;right:-4px;width:min(310px,calc(100vw - 16px));}
}

/* v5.1 header cleanup */

/* ================= dashboard v2 — matches reference overview layout ================= */
.wpt-dash{display:flex;flex-direction:column;gap:16px;}
.wpt-dash-row2{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:stretch;}
.wpt-dash-row-3col{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;}
@media (max-width:960px){
  .wpt-dash-row2{grid-template-columns:1fr;}
  .wpt-dash-row-3col{grid-template-columns:1fr;}
}

/* hero (date + timer) trimmed for the dashboard context */
.wpt-dash-hero-panel{display:flex;align-items:center;justify-content:center;}
.wpt-dash-hero-compact .wpt-tc-hero{padding:6px 0;}
.wpt-dash-hero-compact .wpt-tc-month-row{display:none;}

/* summary strip: 4 stat items in one row, icon + label + amount */
.wpt-dash-summary-panel{background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:var(--wpt-radius);display:flex;align-items:center;}
.wpt-dash-summary-strip{display:grid;grid-template-columns:repeat(4,1fr);width:100%;}
.wpt-dash-summary-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:20px 8px;border-inline-start:1px solid var(--wpt-line);text-align:center;}
.wpt-dash-summary-item:first-child{border-inline-start:none;}
.wpt-dash-summary-item .icon{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--wpt-bg);color:var(--wpt-ink-soft);font-size:15px;}
.wpt-dash-summary-item .title{font-size:11px;color:var(--wpt-ink-soft);}
.wpt-dash-summary-item .amount{font-size:19px;font-weight:800;color:var(--wpt-ink);}
@media (max-width:640px){
  .wpt-dash-summary-strip{grid-template-columns:1fr 1fr;}
  .wpt-dash-summary-item{border-inline-start:none;border-bottom:1px solid var(--wpt-line);}
}

/* generic dashboard card shell (header / scroll body / footer link) */
.wpt-dash-card{padding:0;display:flex;flex-direction:column;overflow:hidden;}
.wpt-dash-card-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--wpt-line);font-size:13px;font-weight:700;color:var(--wpt-ink);}
.wpt-dash-card-head-tag{font-size:11px;font-weight:600;color:var(--wpt-ink-soft);background:var(--wpt-bg);border:1px solid var(--wpt-line);border-radius:20px;padding:3px 10px;}
.wpt-dash-card-body{padding:6px 16px;flex:1;min-height:60px;max-height:360px;overflow-y:auto;}
.wpt-dash-card-body .wpt-empty-block{padding:44px 10px;}
.wpt-dash-card-body .empty-list{font-size:12.5px;color:var(--wpt-ink-faint);}
.wpt-dash-card-footer{border-top:1px solid var(--wpt-line);padding:10px;text-align:center;}
.wpt-dash-card-footer a{font-size:12px;font-weight:600;color:var(--wpt-ink-soft);}
.wpt-dash-card-footer a:hover{color:var(--wpt-accent);}

/* attendance table card */
.wpt-dash-attendance-head{font-size:12px;color:var(--wpt-ink-soft);font-weight:600;}
.wpt-dash-attendance-head .col-name{flex:2;text-align:right;}
.wpt-dash-attendance-head .col-in,.wpt-dash-attendance-head .col-out{flex:1;text-align:center;}
.wpt-dash-attendance-row{display:flex;align-items:center;gap:8px;padding:11px 2px;border-bottom:1px solid var(--wpt-line);font-size:12.5px;}
.wpt-dash-attendance-row:last-child{border-bottom:none;}
.wpt-dash-attendance-row .col-name{flex:2;text-align:right;color:var(--wpt-ink);font-weight:600;}
.wpt-dash-attendance-row .col-in,.wpt-dash-attendance-row .col-out{flex:1;text-align:center;color:var(--wpt-ink-soft);}

/* my open-task cards on the dashboard */
.wpt-dash-task-item{padding:12px 2px;border-bottom:1px solid var(--wpt-line);}
.wpt-dash-task-item:last-child{border-bottom:none;}
.wpt-dash-task-item .top{display:flex;align-items:center;gap:10px;}
.wpt-dash-task-check{width:18px;height:18px;border:none;background:none;color:var(--wpt-ink-faint);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:16px;}
.wpt-dash-task-title{flex:1;font-size:12.5px;font-weight:700;color:var(--wpt-ink);display:flex;align-items:center;gap:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-dash-task-title .code{font-size:10.5px;font-weight:700;color:var(--wpt-ink-faint);background:var(--wpt-bg);border:1px solid var(--wpt-line);border-radius:5px;padding:1px 6px;flex-shrink:0;}
.wpt-dash-task-item .footer-details{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:9px;padding-inline-start:28px;}
.wpt-dash-task-item .info-label{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--wpt-ink-soft);}
.wpt-dash-task-item .info-label i{font-size:12px;}
.wpt-dash-subtask-badge{display:flex;align-items:center;gap:4px;font-size:10.5px;font-weight:700;color:var(--wpt-ink-soft);background:var(--wpt-bg);border:1px solid var(--wpt-line);border-radius:6px;padding:2px 8px;}

/* charts */
.wpt-echart{width:100%;height:280px;direction:ltr;}

/* activity feed reuses .wpt-activity-* already defined above */

/* projects / members mini list cards */
.wpt-dash-mini-list-card .wpt-dash-card-body{padding:8px 14px;}
.wpt-dash-mini-list{display:flex;flex-direction:column;}
.wpt-dash-mini-item{display:flex;align-items:center;gap:11px;padding:11px 2px;border-bottom:1px solid var(--wpt-line);}
.wpt-dash-mini-item:last-child{border-bottom:none;}
.wpt-dash-mini-icon{width:36px;height:36px;border-radius:9px;background:var(--wpt-bg);border:1px solid var(--wpt-line);color:var(--wpt-ink-soft);display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0;}
.wpt-dash-mini-item .content{flex:1;min-width:0;}
.wpt-dash-mini-item .content .title{font-size:12.5px;font-weight:700;color:var(--wpt-ink);margin-bottom:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wpt-dash-mini-item .content .desc{font-size:11px;color:var(--wpt-ink-soft);margin-bottom:6px;}
.wpt-dash-mini-item .content .desc span{color:var(--wpt-ink);font-weight:700;}
.wpt-dash-mini-item .meter{height:5px;border-radius:20px;background:var(--wpt-bg);overflow:hidden;}
.wpt-dash-mini-item .meter .progress-bar{display:block;height:100%;border-radius:20px;background:var(--wpt-success);}
.wpt-dash-mini-item .meter .progress-bar.danger{background:var(--wpt-danger);}
.wpt-dash-mini-item .wpt-dash-member-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;}

@media (max-width:640px){
  .wpt-dash-attendance-head .col-name,.wpt-dash-attendance-row .col-name{flex:1.4;}
}

/* ================= اموال (assets) — جدول در باکس با اسکرول داخلی =================
   جدول دارایی‌ها ارتفاع محدود می‌گیرد و خودش اسکرول می‌شود، به‌جای اینکه با
   زیاد شدن ردیف‌ها کل صفحه را به پایین بکشد. سربرگ جدول هم هنگام اسکرول
   بالای باکس می‌چسبد تا عنوان ستون‌ها همیشه دیده شود. */
.wpt-asset-table-wrap{
  max-height:min(62vh,620px);
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--wpt-line) transparent;
}
.wpt-asset-table-wrap::-webkit-scrollbar{width:8px;}
.wpt-asset-table-wrap::-webkit-scrollbar-track{background:transparent;}
.wpt-asset-table-wrap::-webkit-scrollbar-thumb{background:var(--wpt-line);border-radius:20px;}
.wpt-asset-table-wrap::-webkit-scrollbar-thumb:hover{background:var(--wpt-ink-faint);}
.wpt-asset-table-wrap .wpt-user-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:var(--wpt-surface-2,var(--wpt-surface));
}
@media (max-width:760px){
  .wpt-asset-table-wrap{max-height:min(60vh,520px);}
}

/* ================= اموال (assets) — نمای فشرده موبایل با جزئیات باز‌شونده =================
   در موبایل فقط دو ستون «دارایی» و «کد» در یک خط باریک نمایش داده می‌شود. با
   زدن روی هر ردیف، یک پنل جزئیات (دسته‌بندی، محل نگهداری، مسئول، در اختیار،
   وضعیت و دکمه‌های عملیات) درست زیر همان ردیف باز می‌شود. چون در این عرض
   جدول به‌صورت بلوکی نمایش داده می‌شود (نه جدول واقعی)، ردیف‌ها را خودمان
   flex می‌کنیم تا دو ستون باقی‌مانده کنار هم و در یک خط بمانند. */
/* پنل جزئیات فقط مخصوص نمای فشردهٔ موبایل است؛ در دسکتاپ همیشه باید پنهان
   بماند (قبلاً فقط داخل مدیاکوئری موبایل پنهان می‌شد و در دسکتاپ به‌صورت
   ردیف خامِ بدون استایل، همیشه نمایش داده می‌شد). */
.wpt-asset-table-wrap .wpt-asset-detail-row{display:none;}
/* فلش بازشوندهٔ کنار نام دارایی هم فقط مخصوص نمای موبایل است؛ در دسکتاپ
   بدون این قانون با اندازهٔ پیش‌فرض svg (حدود ۳۰۰×۱۵۰ پیکسل) رندر می‌شد. */
.wpt-asset-expand-caret{display:none;}

@media (max-width:860px){
  .wpt-asset-table-wrap{overflow-x:hidden;}
  .wpt-asset-table-wrap .wpt-user-table{width:100%;font-size:12.5px;}

  .wpt-asset-table-wrap .wpt-a-col-category,
  .wpt-asset-table-wrap .wpt-a-col-location,
  .wpt-asset-table-wrap .wpt-a-col-custodian,
  .wpt-asset-table-wrap .wpt-a-col-holder,
  .wpt-asset-table-wrap .wpt-a-col-status,
  .wpt-asset-table-wrap .wpt-a-col-actions{
    display:none;
  }

  /* سربرگ: فقط «دارایی» و «کد»، در یک خط، همیشه بالای باکس چسبیده. */
  .wpt-asset-table-wrap .wpt-user-table thead{display:block;}
  .wpt-asset-table-wrap .wpt-user-table thead tr{
    display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 12px;
  }
  .wpt-asset-table-wrap .wpt-user-table thead th{padding:9px 0;}
  .wpt-asset-table-wrap .wpt-user-table thead .wpt-a-col-code{flex:0 0 auto;width:auto;}
  .wpt-asset-table-wrap .wpt-user-table thead .wpt-a-col-name{flex:1;width:auto;}

  /* هر ردیف: نام دارایی (با فلش) در یک سمت، کد در سمت دیگر — یک خط باریک. */
  .wpt-asset-table-wrap .wpt-user-table tbody tr.wpt-asset-row{
    display:flex;align-items:center;justify-content:space-between;gap:10px;
    width:100%;padding:11px 12px;cursor:pointer;
  }
  .wpt-asset-table-wrap .wpt-a-col-name{
    display:flex;align-items:center;gap:6px;flex:1;width:auto;min-width:0;
    font-weight:700;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  .wpt-asset-table-wrap .wpt-a-col-code{
    flex:0 0 auto;width:auto;color:var(--wpt-ink-faint);font-size:11px;white-space:nowrap;
  }
  .wpt-asset-expand-caret{
    display:inline-block;width:15px;height:15px;flex-shrink:0;color:var(--wpt-ink-faint);
    transition:transform .16s ease;order:-1;
  }
  tr.wpt-asset-row.wpt-asset-row-open .wpt-asset-expand-caret{transform:rotate(180deg);color:var(--wpt-ink-soft);}
  tr.wpt-asset-row.wpt-asset-row-open{background:var(--wpt-bg);}

  /* پنل جزئیات: فقط وقتی ردیف بالایش باز باشد نمایش داده می‌شود. */
  .wpt-asset-table-wrap .wpt-user-table tbody tr.wpt-asset-detail-row{display:none;}
  .wpt-asset-table-wrap .wpt-user-table tbody tr.wpt-asset-row.wpt-asset-row-open + tr.wpt-asset-detail-row{
    display:block;width:100%;
  }
  .wpt-asset-table-wrap .wpt-asset-detail-row td{
    display:block;width:100%;padding:2px 12px 14px;border-bottom:1px solid var(--wpt-line);
  }
  .wpt-asset-detail-grid{display:flex;flex-direction:column;gap:7px;margin-bottom:4px;}
  .wpt-asset-detail-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;font-size:11.5px;}
  .wpt-asset-detail-item span{color:var(--wpt-ink-faint);font-size:10.5px;flex-shrink:0;padding-top:1px;}
  .wpt-asset-detail-item b{font-weight:600;color:var(--wpt-ink);text-align:left;}
  .wpt-asset-detail-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;margin-top:8px;gap:6px;}
  .wpt-asset-detail-actions .wpt-btn-sm{padding:6px 12px;font-size:11px;}
  .wpt-asset-detail-actions button:not(.wpt-btn){
    width:30px;height:30px;border-radius:7px;border:1px solid var(--wpt-line);
    background:var(--wpt-surface);color:var(--wpt-ink-soft);display:flex;align-items:center;justify-content:center;
  }
  .wpt-asset-detail-actions button:not(.wpt-btn) svg{width:14px;height:14px;}
}

/* ================= مدیریت کاربران — نمای کارتی موبایل =================
   همان الگوی ردیفِ قابل‌بازشدنِ صفحهٔ اموال: در حالت فشرده فقط نام و
   ایمیل کاربر با یک فلش دیده می‌شود؛ با تپ روی ردیف، پنل جزئیات (نقش،
   سطح دسترسی، وضعیت، تاریخ عضویت و دکمه‌های عملیات) باز می‌شود. این
   قوانین به‌خاطر کلاس اضافهٔ .wpt-member-table-wrap از قانون عمومی
   «شکستن جدول به بلوک» با اولویت بیشتر پیشی می‌گیرند. */
.wpt-member-expand-caret{display:none;}
/* پنل جزئیات فقط مخصوص نمای فشردهٔ موبایل است؛ در دسکتاپ باید همیشه پنهان
   بماند (وگرنه چون <tr> بدون هیچ قانونی به‌صورت پیش‌فرض نمایش داده می‌شود،
   محتوای جزئیات به‌صورت یک ردیف خامِ بدون استایل زیر هر کاربر تکرار می‌شد). */
.wpt-member-table-wrap .wpt-member-detail-row{display:none;}
@media (max-width:860px){
  .wpt-member-table-wrap{overflow-x:hidden;}
  .wpt-member-table-wrap .wpt-user-table{width:100%;font-size:12.5px;}

  .wpt-member-table-wrap .wpt-mcol-role,
  .wpt-member-table-wrap .wpt-mcol-access,
  .wpt-member-table-wrap .wpt-mcol-status,
  .wpt-member-table-wrap .wpt-mcol-date,
  .wpt-member-table-wrap .wpt-mcol-actions{
    display:none;
  }

  .wpt-member-table-wrap .wpt-user-table thead{display:none;}
  .wpt-member-table-wrap .wpt-user-table,
  .wpt-member-table-wrap .wpt-user-table tbody{display:block;width:100%;}

  .wpt-member-table-wrap .wpt-user-table tbody tr.wpt-member-row{
    display:flex;align-items:center;gap:10px;
    width:100%;padding:11px 14px;cursor:pointer;border-bottom:1px solid var(--wpt-line);
  }
  .wpt-member-table-wrap .wpt-mcol-name{
    display:block;width:100%;padding:0;border:none;
  }
  .wpt-member-table-wrap .wpt-mcol-name .wpt-u-cell{display:flex;align-items:center;gap:10px;}
  .wpt-member-expand-caret{
    display:inline-block;width:15px;height:15px;flex-shrink:0;color:var(--wpt-ink-faint);
    transition:transform .16s ease;order:-1;
  }
  tr.wpt-member-row.wpt-member-row-open .wpt-member-expand-caret{transform:rotate(180deg);color:var(--wpt-ink-soft);}
  tr.wpt-member-row.wpt-member-row-open{background:var(--wpt-bg);}

  .wpt-member-table-wrap .wpt-user-table tbody tr.wpt-member-detail-row{display:none;}
  .wpt-member-table-wrap .wpt-user-table tbody tr.wpt-member-row.wpt-member-row-open + tr.wpt-member-detail-row{
    display:block;width:100%;
  }
  .wpt-member-table-wrap .wpt-member-detail-row td{
    display:block;width:100%;padding:2px 14px 14px;border-bottom:1px solid var(--wpt-line);
  }
  .wpt-member-detail-grid{display:flex;flex-direction:column;gap:7px;margin-bottom:4px;}
  .wpt-member-detail-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;font-size:11.5px;}
  .wpt-member-detail-item span{color:var(--wpt-ink-faint);font-size:10.5px;flex-shrink:0;padding-top:1px;}
  .wpt-member-detail-item b{font-weight:600;color:var(--wpt-ink);text-align:left;}
  .wpt-member-detail-actions{display:flex;flex-wrap:wrap;justify-content:flex-start;margin-top:8px;gap:6px;}
  .wpt-member-detail-actions .wpt-btn-sm{padding:6px 12px;font-size:11px;}
  .wpt-member-detail-actions button:not(.wpt-btn){
    width:30px;height:30px;border-radius:7px;border:1px solid var(--wpt-line);
    background:var(--wpt-surface);color:var(--wpt-ink-soft);display:flex;align-items:center;justify-content:center;
  }
  .wpt-member-detail-actions button:not(.wpt-btn) svg{width:14px;height:14px;}
}

/* ================= اموال (assets) — فاصله‌گذاری سربرگ صفحه =================
   کارت‌های آمار، تب‌ها، نوار جست‌وجو و ردیف فیلتر وضعیت قبلاً به هم چسبیده
   بودند؛ این بخش فقط برای صفحهٔ اموال فاصلهٔ بیشتری بین این چهار ردیف
   ایجاد می‌کند تا صفحه منظم‌تر دیده شود. */
#wpt-asset-stat-grid{margin-bottom:28px;}
#wpt-asset-tabs{margin-bottom:26px;}
.wpt-tab-panel[data-tab-panel="all"] .wpt-toolbar{margin-bottom:22px;}
#wpt-asset-status-filter{margin-bottom:22px;padding-top:18px;border-top:1px solid var(--wpt-line);}
@media (max-width:760px){
  #wpt-asset-stat-grid{margin-bottom:20px;}
  #wpt-asset-tabs{margin-bottom:20px;}
  .wpt-tab-panel[data-tab-panel="all"] .wpt-toolbar{margin-bottom:18px;}
  #wpt-asset-status-filter{margin-bottom:18px;padding-top:14px;}

  /* سه باکس آمار به‌جای اینکه هرکدام یک ردیف کامل و بلند بگیرند (که فضای
     زیادی از موبایل را اشغال می‌کرد)، حالا به‌صورت سه مربع کوچک کنار هم
     نمایش داده می‌شوند. */
  #wpt-asset-stat-grid{grid-template-columns:repeat(3,1fr) !important;gap:8px !important;}
  #wpt-asset-stat-grid .wpt-stat-card{
    aspect-ratio:1;padding:8px 6px;display:flex;flex-direction:column;
    align-items:center;justify-content:center;text-align:center;gap:2px;
  }
  #wpt-asset-stat-grid .wpt-stat-label{font-size:10px;margin-bottom:0;line-height:1.35;}
  #wpt-asset-stat-grid .wpt-stat-value{font-size:18px;}

  /* تب‌های «همه دارایی‌ها / درخواست‌ها / اموال من / درخواست خرید اموال» در
     موبایل به‌جای اسکرول افقی و روی‌هم‌افتادن، همه با متن و پدینگ کوچک‌تر
     در یک ردیف جا می‌شوند. */
  #wpt-asset-tabs{overflow-x:visible;white-space:normal;display:flex;gap:0;}
  #wpt-asset-tabs .wpt-tab{
    flex:1 1 0;min-width:0;padding:8px 2px;margin-inline-end:0;
    font-size:10px;text-align:center;white-space:normal;line-height:1.35;
  }
  #wpt-asset-tabs .wpt-tab-count{
    display:inline-block;font-size:9px;padding:1px 5px;margin-inline-start:2px;
  }
}

/* ================= اموال (assets) — دکمهٔ فیلتر وضعیت =================
   قبلاً همهٔ گزینه‌های وضعیت (همه/سالم/در انبار/...) به‌صورت یک ردیف چیپ در
   کنار هم بودند که هم در دسکتاپ هم موبایل به‌هم می‌ریخت و می‌شکست. حالا
   این گزینه‌ها داخل یک منوی کشویی قرار گرفته‌اند که فقط با کلیک روی دکمهٔ
   «فیلتر» باز می‌شود؛ رفتار در دسکتاپ و موبایل یکسان است. */
.wpt-filter-dropdown{position:relative;display:inline-block;}
.wpt-filter-toggle{
  display:inline-flex;align-items:center;gap:8px;
  padding:9px 14px;border-radius:10px;border:1px solid var(--wpt-line);
  background:var(--wpt-surface);color:var(--wpt-ink);
  font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer;
  transition:border-color .15s ease,color .15s ease;
}
.wpt-filter-toggle:hover{border-color:var(--wpt-accent);color:var(--wpt-accent);}
.wpt-filter-toggle svg{width:16px;height:16px;flex-shrink:0;color:var(--wpt-ink-faint);}
.wpt-filter-toggle .wpt-filter-chevron{width:13px;height:13px;transition:transform .15s ease;}
.wpt-filter-dropdown.open .wpt-filter-toggle{border-color:var(--wpt-accent);color:var(--wpt-accent);}
.wpt-filter-dropdown.open .wpt-filter-chevron{transform:rotate(180deg);}

.wpt-filter-menu{
  position:absolute;top:calc(100% + 8px);inset-inline-start:0;z-index:40;
  display:none;flex-direction:column;gap:2px;min-width:190px;max-width:calc(100vw - 32px);
  background:var(--wpt-surface);border:1px solid var(--wpt-line);border-radius:12px;
  box-shadow:var(--wpt-shadow-md,0 12px 32px rgba(16,24,40,.14));padding:6px;
}
.wpt-filter-dropdown.open .wpt-filter-menu{display:flex;}
.wpt-filter-menu .wpt-chip{
  all:unset;box-sizing:border-box;display:block;width:100%;
  padding:9px 12px;border-radius:8px;
  font-family:inherit;font-size:12.5px;font-weight:600;color:var(--wpt-ink-soft);
  cursor:pointer;text-align:right;
}
.wpt-filter-menu .wpt-chip:hover{background:var(--wpt-bg);color:var(--wpt-ink);}
.wpt-filter-menu .wpt-chip.active{background:var(--wpt-accent-soft);color:var(--wpt-accent);box-shadow:none;}

/* ================= مدیریت کاربران (org users) — فاصله‌گذاری سربرگ صفحه =================
   همون مشکلِ چسبیدگیِ کارت‌های آمار/نوار جست‌وجو/ردیف فیلتر وضعیت این‌جا هم
   بود، به‌خصوص در حالت موبایل که آیتم‌های نوار جست‌وجو و دکمه زیر هم قرار
   می‌گیرند و به هدر بالای صفحه می‌چسبند. */
#wpt-user-stat-grid{margin-bottom:28px;}
.wpt-user-toolbar{margin-bottom:22px;}
.wpt-filter-row{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:22px;padding-top:18px;border-top:1px solid var(--wpt-line);}
@media (max-width:760px){
  #wpt-user-stat-grid{margin-bottom:18px;}
  .wpt-user-toolbar{gap:12px;margin-top:14px;margin-bottom:18px;}
  .wpt-user-toolbar > *{margin-bottom:0;}
  .wpt-filter-row{margin-bottom:16px;padding-top:14px;}
  .wpt-user-table-wrap{margin-top:2px;}

  /* سه باکس آمار کاربران هم مثل اموال: به‌جای سه ردیف بلند و پر از فضای
     خالی، سه مربع کوچک کنار هم. */
  #wpt-user-stat-grid{grid-template-columns:repeat(3,1fr) !important;gap:8px !important;}
  #wpt-user-stat-grid .wpt-stat-card{
    aspect-ratio:1;padding:8px 6px;display:flex;flex-direction:column;
    align-items:center;justify-content:center;text-align:center;gap:2px;
  }
  #wpt-user-stat-grid .wpt-stat-label{font-size:10px;margin-bottom:0;line-height:1.35;}
  #wpt-user-stat-grid .wpt-stat-value{font-size:18px;}
}
