
:root{
  --wf-bg:#f3f7fc;
  --wf-surface:#ffffff;
  --wf-surface-2:#f8fbff;
  --wf-line:#d8e3f1;
  --wf-text:#1b2a45;
  --wf-muted:#667a99;
  --wf-primary:#3b6df6;
  --wf-primary-2:#18b7de;
  --wf-shadow:0 18px 40px rgba(30,55,90,.10);
}
body{background:radial-gradient(circle at 12% 18%, rgba(94,114,228,.08), transparent 22%),radial-gradient(circle at 80% 20%, rgba(37,187,228,.08), transparent 18%),var(--wf-bg)!important;color:var(--wf-text)!important}
.shell{width:min(100vw - 20px, 1820px)!important;gap:18px!important;padding:12px!important;grid-template-columns:290px minmax(0,1fr) 78px!important}
.sidebar{padding:22px 18px!important;background:linear-gradient(180deg,#0e2243,#112b54 58%,#173966)!important;color:#eef5ff!important;border-color:#193b6a!important;box-shadow:0 22px 48px rgba(10,20,40,.28)!important}
.sidebar .brand strong,.sidebar .nav-link,.sidebar .nav-section-label,.sidebar .company-user-card strong,.sidebar .company-user-card p,.sidebar .company-user-card .mini{color:#eef5ff!important}
.sidebar .brand p,.sidebar .company-user-card .muted{color:rgba(238,245,255,.74)!important}
.sidebar .nav-link{border-radius:16px!important;padding:12px 14px!important;font-weight:700!important;opacity:.92}
.sidebar .nav-link:hover{background:rgba(255,255,255,.08)!important;opacity:1}
.sidebar .nav-link.is-active{background:linear-gradient(135deg, rgba(72,106,255,.95), rgba(25,183,219,.80))!important;color:#fff!important;box-shadow:0 14px 28px rgba(17,86,200,.28)!important}
.company-user-card{margin-top:auto!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.12)!important}
.main-area{gap:18px!important}
.topbar{padding:16px 18px!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(280px,520px) auto!important;gap:16px!important;align-items:center!important}
.topbar h1{font-size:2rem!important;line-height:1.05!important}
.search-shell{min-height:52px!important;padding:0 14px!important;background:var(--wf-surface)!important;border:1px solid var(--wf-line)!important;box-shadow:0 10px 24px rgba(35,71,140,.06)!important}
.search-shell input{color:var(--wf-text)!important;font-size:15px!important}
.topbar-actions{justify-self:end!important;display:flex!important;align-items:center!important;gap:12px!important;flex-wrap:wrap!important}
.workday-pill,.rail-btn,.card,.drawer-card,.drawer-section,.drawer-section-inline,.table-shell,.toolbar-card,.chat-side,.chat-main,.tg-chat-main,.modern-messages,.chat-compose-card,.kanban-column,.entity-record-card,.entity-kanban-card{background:var(--wf-surface)!important;border:1px solid var(--wf-line)!important;box-shadow:var(--wf-shadow)!important}
.content{padding-bottom:22px!important}
.page-block{display:grid!important;gap:18px!important}
.section-head{display:flex!important;justify-content:space-between!important;align-items:flex-end!important;gap:14px!important;flex-wrap:wrap!important}
.section-head h2{font-size:1.9rem!important;line-height:1.08!important;margin:0!important}
.entity-page-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.entity-toolbar{grid-template-columns:minmax(220px,1fr) 240px auto auto!important;align-items:center!important}
.hero-kpi{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;gap:14px!important;padding:16px!important}
.hero-kpi>div{padding:12px 14px;background:var(--wf-surface-2);border:1px solid var(--wf-line);border-radius:16px;display:grid;gap:6px}
.hero-kpi strong{font-size:1.2rem}
.entity-record-card,.entity-kanban-card{cursor:pointer;transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease}
.entity-record-card:hover,.entity-kanban-card:hover{transform:translateY(-2px);border-color:#b6cbed!important;box-shadow:0 18px 38px rgba(32,80,155,.12)!important}
.entity-record-card__head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.entity-record-card__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-top:12px}
.entity-drawer-head{align-items:flex-start!important}
.entity-drawer-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.entity-record-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:14px}
.drawer{width:min(980px, calc(100vw - 24px))!important;top:12px!important;right:12px!important;height:calc(100vh - 24px)!important;border-radius:28px!important}
.drawer-header{padding:18px 22px!important;border-bottom:1px solid var(--wf-line)!important;background:linear-gradient(180deg,#fff, #f8fbff)!important;position:sticky;top:0;z-index:2}
.drawer-body{padding:20px!important;overflow:auto!important}
.drawer-tabs-nav{display:flex;gap:10px;flex-wrap:wrap;padding:8px;border-radius:18px;background:var(--wf-surface-2);border:1px solid var(--wf-line)}
.drawer-tab{padding:12px 16px!important;border-radius:14px!important;font-weight:700!important;color:var(--wf-muted)!important}
.drawer-tab.is-active{background:#fff!important;color:var(--wf-primary)!important;box-shadow:0 8px 16px rgba(45,85,170,.10)!important}
.task-view-headline,.project-view-headline{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap}
.task-view-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
.task-focus-strip{display:grid!important;grid-template-columns:minmax(0,1.3fr) minmax(300px,.9fr)!important;gap:14px!important}
.task-view-overview-grid{display:grid!important;grid-template-columns:minmax(0,1.3fr) minmax(320px,.9fr)!important;gap:16px!important}
.task-team-card .list-item{padding:10px 0;border-bottom:1px dashed var(--wf-line)}
.task-team-card .list-item:last-child{border-bottom:0}
.right-rail{padding-top:10px!important}
.rail-btn{min-height:84px!important;border-radius:22px!important}
.rail-btn .count{background:#f25e6f!important;color:#fff!important}
#mobile-nav-trigger,.mobile-nav-trigger{display:none!important}
.chat-shell,.drawer-chat-layout{display:grid;grid-template-columns:320px minmax(0,1fr)!important;gap:16px!important}
.chat-side,.chat-side-panel,.chat-sidebar-panel{padding:14px!important;border-radius:22px!important;background:linear-gradient(180deg,#f8fbff,#f4f8fe)!important}
.chat-thread,.tg-thread,.chat-thread-row{padding:14px!important;border-radius:18px!important;min-height:88px;align-items:flex-start!important}
.tg-chat-main,.chat-main-panel{display:grid!important;grid-template-rows:auto 1fr auto!important;min-height:72vh!important;gap:14px!important}
.tg-chat-hero,.chat-head{padding:16px 18px!important;border-radius:20px!important;background:var(--wf-surface)!important;border:1px solid var(--wf-line)!important;box-shadow:var(--wf-shadow)!important}
.modern-messages,.chat-messages{padding:18px!important;border-radius:22px!important;background:linear-gradient(180deg,#fbfdff,#f5f9ff)!important;border:1px solid var(--wf-line)!important;min-height:420px!important}
.chat-compose-card,.chat-form{padding:14px!important;border-radius:22px!important;background:var(--wf-surface)!important;border:1px solid var(--wf-line)!important;box-shadow:var(--wf-shadow)!important}
.chat-form textarea,.chat-compose-card textarea,.chat-compose-row textarea{min-height:112px!important}
.chat-bubble,.tg-message-bubble{max-width:min(78%, 720px)!important;border-radius:18px!important;box-shadow:none!important}
.chat-bubble.me,.tg-message-bubble.me{background:linear-gradient(135deg,#4d74ff,#26b4df)!important;color:#fff!important}
.kanban-grid{align-items:start!important}
.kanban-column{min-height:260px!important;padding:0!important;overflow:hidden}
.kanban-column-head{padding:16px 16px 12px!important;background:#fbfdff;border-bottom:1px solid var(--wf-line)}
.kanban-list{padding:14px!important;display:grid;gap:12px}
.kanban-card{padding:14px!important;border-radius:18px!important;background:#fff!important;border:1px solid var(--wf-line)!important}
.code-sample,.api-code-block{background:#0f1b33!important;color:#eef4ff!important;border-radius:16px!important;padding:14px!important;overflow:auto}
@media (max-width:1180px){
  .shell{grid-template-columns:1fr!important;width:calc(100vw - 10px)!important;padding:8px!important;gap:10px!important}
  .sidebar{position:fixed!important;left:10px!important;top:10px!important;bottom:10px!important;width:min(330px, calc(100vw - 20px))!important;transform:translateX(-110%)!important;opacity:0!important;pointer-events:none!important;z-index:80!important;overflow:auto!important}
  .sidebar.mobile-open{transform:translateX(0)!important;opacity:1!important;pointer-events:auto!important}
  .mobile-overlay{z-index:70!important}
  .main-area{min-width:0!important}
  .topbar{grid-template-columns:1fr!important;gap:12px!important}
  .topbar-center,.topbar-actions{width:100%!important}
  #mobile-nav-trigger,.mobile-nav-trigger{display:inline-flex!important}
  .right-rail{position:fixed!important;right:10px!important;bottom:10px!important;top:auto!important;display:flex!important;gap:10px;z-index:69}
  .rail-btn{min-height:64px!important;padding:10px 12px!important}
  .drawer{width:calc(100vw - 12px)!important;right:6px!important;top:6px!important;height:calc(100vh - 12px)!important}
  .drawer-chat-layout,.chat-shell,.task-view-overview-grid,.task-focus-strip,.task-view-grid,.entity-toolbar{grid-template-columns:1fr!important}
}
