:root{--ink:#25253c;--muted:#8e90a5;--line:#ececf3;--purple:#6954e8;--pale:#f7f6ff;--green:#28ae82;--orange:#eea849;--rose:#e7798d;font-family:'DM Sans',sans-serif;color:var(--ink)}*{box-sizing:border-box}body{margin:0;background:#fbfbfd}.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#fbfbfd 0%,#f3f1ff 55%,#eef9f5 100%)}.login-card{width:min(420px,100%);background:white;border:1px solid var(--line);border-radius:14px;padding:30px;box-shadow:0 24px 70px #25253c20}.login-card .primary{width:100%;margin-top:20px}.login-brand{color:var(--ink);padding:0 0 26px}.login-error{color:#cf3f5c;font-size:12px;font-weight:700}.login-options{display:grid;gap:10px;margin:16px 0 4px}
.login-option{display:flex;align-items:center;gap:10px;margin:0;font:600 13px 'DM Sans';color:#55566a;cursor:pointer}
.login-option input{width:auto;margin:0;accent-color:var(--purple)}
.login-hint{display:block;margin-top:12px;line-height:1.4;color:#8e90a5;text-align:center;font-size:11px}.app-shell{display:flex;min-height:100vh}.sidebar{background:#27263e;color:#f9f9ff;width:252px;padding:26px 16px 18px;display:flex;flex-direction:column;flex-shrink:0}.brand{font:800 24px Manrope;letter-spacing:-1px;padding:0 11px 30px;display:flex;align-items:center;gap:9px}.brand-mark{background:#745ff0;color:white;width:29px;height:29px;display:grid;place-items:center;border-radius:9px;font-size:17px}.workspace{padding:12px 11px;background:#34334f;border:1px solid #464461;border-radius:11px;display:flex;align-items:center;gap:9px;font-size:12px}.workspace div{flex:1}.workspace b,.profile b{display:block;font-size:12px}.workspace small,.profile small{color:#aaaabd;font-size:10px}nav{margin-top:27px}.nav-item{display:flex;align-items:center;width:100%;border:0;background:transparent;color:#bfc0ce;font:500 14px 'DM Sans';padding:12px 12px;border-radius:8px;gap:13px;text-align:left;cursor:pointer}.nav-item span{font-size:18px;width:17px;text-align:center}.nav-item em{font:600 10px 'DM Sans';background:#48475f;border-radius:10px;padding:2px 7px;margin-left:auto;color:#e7e7ed}.nav-item.active,.nav-item:hover{color:white;background:#403e5c}.nav-item.active{box-shadow:inset 3px 0 #967eff}.sidebar-bottom{margin-top:auto}.profile{border-top:1px solid #414056;margin:12px 7px 0;padding-top:18px;display:flex;gap:9px;align-items:center}.profile div{flex:1}.avatar{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;color:white;font:700 10px Manrope}.purple{background:#806ee6}.amber{background:#df9a5c}main{padding:40px 48px 58px;max-width:1500px;width:100%;margin:auto}header,.section-heading,.card-title,.modal-top,.modal-actions{display:flex;justify-content:space-between;align-items:center}.eyebrow{font-size:11px;font-weight:700;letter-spacing:1.1px;color:#9b9bae;margin:0 0 6px;text-transform:uppercase}h1,h2,h3{font-family:Manrope;margin:0;letter-spacing:-.7px}h1{font-size:28px}h1 span{color:#f3b458}h2{font-size:21px}h3{font-size:15px}p{color:var(--muted);font-size:13px;margin:5px 0 0}.header-actions{display:flex;align-items:center;gap:12px}.icon-button{border:1px solid var(--line);background:white;width:38px;height:38px;border-radius:9px;font-size:20px;color:#696a7d;position:relative}.bell i{position:absolute;background:#e86e86;border:2px solid white;width:8px;height:8px;border-radius:50%;top:7px;right:8px}.primary{border:0;border-radius:8px;background:var(--purple);color:white;padding:11px 17px;font:600 13px 'DM Sans';cursor:pointer;box-shadow:0 4px 10px #6954e833}.primary:hover{background:#5d49d6}.section-heading{margin:43px 0 20px}.section-heading select,.filters select{border:1px solid var(--line);border-radius:7px;background:white;color:#5c5d70;padding:9px 12px;font:12px 'DM Sans'}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:17px}.card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:20px}.metric{padding:18px 20px}.metric .metric-top{display:flex;justify-content:space-between;color:#7f8094;font-size:12px}.metric-icon{width:30px;height:30px;border-radius:8px;background:#f0edff;display:grid;place-items:center;color:var(--purple);font-size:15px}.metric strong{font:700 28px Manrope;display:block;margin-top:18px}.trend{font-size:11px;color:var(--green);font-weight:600}.trend.gray{color:#9798a8}.grid-two{display:grid;grid-template-columns:1.55fr 1fr;gap:17px;margin:17px 0}.text-button{background:none;border:0;color:var(--purple);font:600 12px 'DM Sans';cursor:pointer}.legend{display:flex;gap:13px;font-size:11px;color:#88899a}.dot{display:inline-block;width:7px;height:7px;border-radius:10px;margin-right:4px}.purple-dot{background:var(--purple)}.green-dot{background:var(--green)}.chart-card{height:277px}.chart-wrap{height:185px;display:flex;margin-top:15px}.y-labels{width:28px;height:160px;display:flex;flex-direction:column;justify-content:space-between;color:#a4a5b3;font-size:10px}.chart{position:relative;flex:1;height:160px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 39px,#f0f0f5 40px);border-bottom:1px solid #eee}.chart:before,.chart:after{content:"";position:absolute;left:0;right:0;height:160px;background-size:100% 100%;pointer-events:none}.chart:before{background:linear-gradient(159deg,transparent 0 8%,#6954e8 8.4% 9.5%,transparent 10% 21%,#6954e8 21.5% 22.5%,transparent 23% 37%,#6954e8 37.5% 38.5%,transparent 39% 48%,#6954e8 48.5% 49.5%,transparent 50% 66%,#6954e8 66.5% 67.5%,transparent 68% 80%,#6954e8 80.5% 81.5%,transparent 82%)}.chart:after{background:linear-gradient(163deg,transparent 0 25%,#28ae82 25.5% 26.5%,transparent 27% 36%,#28ae82 36.5% 37.5%,transparent 38% 53%,#28ae82 53.5% 54.5%,transparent 55% 60%,#28ae82 60.5% 61.5%,transparent 62% 75%,#28ae82 75.5% 76.5%,transparent 77%)}.donut-area{display:flex;align-items:center;gap:25px;margin:25px 5px}.donut{width:142px;height:142px;border-radius:50%;background:conic-gradient(var(--purple) 0 42%,var(--green) 42% 70%,var(--orange) 70% 88%,var(--rose) 88%);display:grid;place-items:center}.donut>div{width:102px;height:102px;border-radius:50%;background:white;display:grid;place-content:center;text-align:center}.donut b{font:700 24px Manrope}.donut small{font-size:10px;color:#9899aa}.status-key{display:grid;gap:11px;font-size:11px;color:#696a7c}.status-key div{display:flex;gap:7px;align-items:center}.status-key b{margin-left:auto}.recent{padding-bottom:7px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;margin-top:13px}th{text-align:left;color:#a2a3b1;text-transform:uppercase;letter-spacing:.7px;font-size:10px;padding:10px 8px}td{font-size:12px;padding:14px 8px;border-top:1px solid #f0f0f4}.ticket-title{font-weight:600}.ticket-id{font-size:10px;color:#a2a3b1;margin-top:3px}.assignee{display:flex;align-items:center;gap:7px}.assignee .avatar{width:23px;height:23px;font-size:8px}.badge{display:inline-block;padding:4px 8px;border-radius:12px;font-size:10px;font-weight:600}.todo{background:#f0eff4;color:#76768a}.progress{background:#eeeaff;color:#6853d9}.hold{background:#fff2dc;color:#c27e21}.completed{background:#e5f7ef;color:#22976f}.priority{font-size:11px}.priority:before{content:'●';margin-right:5px}.High{color:#dd5d78}.Medium{color:#dc9a42}.Low{color:#4caa87}.hidden{display:none!important}.filters{display:flex;gap:10px;margin-bottom:17px}.filters input{border:1px solid var(--line);border-radius:8px;background:white;padding:10px 13px;min-width:260px;font:13px 'DM Sans';outline-color:#bcb2ff}.ticket-list{display:grid;gap:10px}.ticket-row{background:white;border:1px solid var(--line);border-radius:10px;padding:16px 18px;display:grid;grid-template-columns:minmax(180px,2fr) 1fr 110px 90px minmax(200px,auto);gap:15px;align-items:center}.ticket-row.my-ticket-row{grid-template-columns:minmax(180px,2fr) 110px 90px 100px minmax(200px,auto)}.ticket-row p{font-size:11px}.ticket-notice{margin-top:8px;font-size:11px;font-weight:600;line-height:1.35;padding:7px 9px;border-radius:7px}.hold-notice{background:#fff2dc;color:#c27e21}.transfer-notice{background:#f0edff;color:#6853d9}.ticket-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.action-btn{border:1px solid var(--line);background:white;color:#55566a;border-radius:7px;padding:7px 10px;font:600 11px 'DM Sans';cursor:pointer;white-space:nowrap}.action-btn,.mobile-action,.mobile-chip,.board-card-icons button,.list-ticket-card-icons button{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.action-btn:hover{background:#f7f6ff;border-color:#d8d3f5}
.action-btn.start{color:#22976f;border-color:#c8ebd9;background:#e5f7ef}
.action-btn.hold{color:#c27e21;border-color:#f0d7a8;background:#fff2dc}
.action-btn.complete{color:#6853d9;border-color:#d8d3f5;background:#eeeaff}
.action-btn.transfer{color:#55566a}
.action-btn:active,.mobile-action:active{
  transform:scale(.98);
  filter:brightness(.96);
}
.action-btn:disabled,.mobile-action:disabled{
  opacity:.55;
  pointer-events:none;
}.dialog-note{margin:12px 0 0;font-size:12px;color:#696a7c;font-weight:600}.team-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.team-card{background:white;border:1px solid var(--line);border-radius:11px;padding:20px}.team-card .avatar{width:42px;height:42px;font-size:12px;margin-bottom:12px}.workload{height:7px;background:#f0eff5;border-radius:8px;margin:16px 0 7px;overflow:hidden}.workload i{display:block;height:100%;background:var(--purple);border-radius:8px}.admin-layout{display:grid;grid-template-columns:360px 1fr;gap:17px;align-items:start}.user-form{padding:0}.user-list{display:grid;gap:10px;margin-top:15px}.user-row{display:grid;grid-template-columns:1.5fr 1fr 130px 90px;gap:12px;align-items:center;border:1px solid #f0f0f4;border-radius:10px;padding:12px}.user-row small{display:block;color:#8e90a5;font-size:11px;margin-top:2px}.user-row input,.user-row select{margin:0}.secondary:disabled,.primary:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}dialog{border:0;border-radius:14px;width:min(510px,calc(100% - 32px));padding:0;box-shadow:0 20px 70px #1f203855}dialog::backdrop{background:#25243d77}form{padding:25px}.close{border:0;background:none;font-size:26px;color:#9798a9;cursor:pointer}label{display:block;font-size:12px;font-weight:600;margin:17px 0 0;color:#56576a}input,textarea,label select{display:block;width:100%;margin-top:7px;border:1px solid #e3e3eb;border-radius:7px;padding:10px 11px;font:13px 'DM Sans';resize:vertical}textarea{min-height:76px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-row label{min-width:0}.secondary{border:1px solid var(--line);background:white;color:#606174;border-radius:8px;padding:10px 16px;font:600 13px 'DM Sans'}.modal-actions{margin-top:23px;justify-content:flex-end;gap:9px}/* legacy mobile 64px rail removed */@media(max-width:600px){.sidebar{display:none}main{padding:23px 16px}header{align-items:flex-start}.header-actions .icon-button{display:none}.primary{padding:10px}.metrics{gap:9px}.metric{padding:13px}.metric strong{font-size:23px}.grid-two{margin-top:10px}.donut-area{gap:12px}.donut{width:120px;height:120px}.donut>div{width:84px;height:84px}.ticket-row,.ticket-row.my-ticket-row,.user-row{grid-template-columns:1fr}.filters{flex-wrap:wrap}.filters input{min-width:100%}.team-grid{grid-template-columns:1fr}}

.image-avatar{overflow:hidden;background:#ececf3}.image-avatar img{width:100%;height:100%;object-fit:cover;display:block}.profile-layout{display:grid;grid-template-columns:300px minmax(0,520px);gap:17px;align-items:start}.profile-preview{text-align:center}.profile-image-preview{width:116px;height:116px;border-radius:50%;margin:4px auto 18px;background:#806ee6;background-size:cover;background-position:center;color:white;display:grid;place-items:center;font:800 28px Manrope}.profile-image-preview.has-image span{display:none}.profile-preview h3{font-size:18px}.profile-layout .user-form{padding:0}.profile-layout input:disabled{background:#f7f7fa;color:#8e90a5}@media(max-width:900px){.profile-layout{grid-template-columns:1fr}}

.column-picker{position:relative;margin:0;padding:0;background:transparent;border:0;z-index:30}
.column-dropdown{position:relative}
.column-dropdown-toggle{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:7px;background:white;color:#5c5d70;padding:9px 12px;font:600 12px 'DM Sans';cursor:pointer;user-select:none}
.column-dropdown-toggle *{pointer-events:none}
.column-dropdown-toggle em{font-style:normal;font-size:11px;font-weight:700;color:#6853d9;background:#eeeaff;border-radius:999px;padding:2px 7px}
.column-caret{font-size:11px;color:#8e90a5}
.column-dropdown.open .column-caret{transform:rotate(180deg);display:inline-block}
.column-dropdown-menu{display:none;position:absolute;top:calc(100% + 6px);right:0;z-index:40;min-width:210px;background:white;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 30px #25253c18;padding:10px;max-height:280px;overflow:auto}
.column-dropdown.open .column-dropdown-menu{display:grid;gap:2px}
.column-dropdown-title{margin:0 0 6px;padding:0 6px;font-size:11px;font-weight:700;color:#9b9bae;text-transform:uppercase;letter-spacing:.6px}
.column-option{display:flex;align-items:center;gap:8px;margin:0;padding:8px 8px;border:0;border-radius:7px;background:transparent;font-size:12px;font-weight:600;color:#55566a;cursor:pointer}
.column-option:hover{background:#f7f6ff}
.column-option input{width:auto;margin:0}
.column-option:has(input:checked){color:#6853d9}
.admin-ticket-table{background:white;border:1px solid var(--line);border-radius:10px;padding:8px 12px 4px}
.admin-ticket-table table{margin-top:0}
.admin-ticket-table td{max-width:260px;vertical-align:top;word-break:break-word}
.filters{align-items:center;flex-wrap:wrap}

.mobile-nav{display:none}
.mobile-status-filters{display:none;gap:8px;overflow:auto;padding-bottom:4px;margin-bottom:14px;-webkit-overflow-scrolling:touch}
.mobile-status-filters.hidden{display:none!important}
.mywork-toolbar{margin-bottom:12px}
.mobile-chip{border:1px solid var(--line);background:white;color:#5c5d70;border-radius:999px;padding:10px 14px;font:600 12px 'DM Sans';white-space:nowrap;cursor:pointer;min-height:44px;display:inline-flex;align-items:center}
.mobile-chip.active{background:#eeeaff;border-color:#d8d3f5;color:#6853d9}
.mobile-ticket-card{background:white;border:1px solid var(--line);border-radius:14px;padding:16px;display:grid;gap:12px}
.mobile-ticket-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.mobile-ticket-meta{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#8e90a5}
.mobile-actions{display:grid;gap:8px}
.mobile-action{width:100%;justify-content:center;padding:14px 12px;font-size:14px;border-radius:10px;min-height:44px}
.mobile-done-note{margin:0;text-align:center;font-weight:700;color:#22976f}

.mobile-more-sheet{
  width:min(100vw,420px);
  max-height:min(80dvh,560px);
  margin:auto 0 0;
  border:0;
  border-radius:18px 18px 0 0;
  padding:0 0 calc(12px + env(safe-area-inset-bottom));
  background:var(--surface,#fff);
  color:var(--ink);
}
.mobile-more-sheet::backdrop{background:#25253c66}
.mobile-more-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 18px 10px;
  border-bottom:1px solid var(--line);
}
.mobile-more-head strong{font:800 15px Manrope}
.mobile-more-list{display:grid;padding:8px 10px 0}
.mobile-more-item{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  border:0;
  background:transparent;
  color:var(--ink);
  font:600 14px 'DM Sans';
  padding:14px 12px;
  border-radius:12px;
  min-height:48px;
  cursor:pointer;
  text-align:left;
}
.mobile-more-item:hover,
.mobile-more-item:focus-visible{background:#f7f6ff;outline:none}
.mobile-more-item.admin-only.hidden{display:none!important}
.mobile-more-item svg{width:18px;height:18px;color:#6853d9}
.mobile-more-logout{color:#cf3f5c}
.mobile-more-logout svg{color:#cf3f5c}
html.night-mode .mobile-more-item:hover,
html.night-mode .mobile-more-item:focus-visible{background:var(--surface-2)}

.inline-image-overlay{
  position:fixed;
  inset:0;
  z-index:10000;
  background:#25253c88;
  display:grid;
  place-items:center;
  padding:16px;
  padding-bottom:calc(16px + env(safe-area-inset-bottom));
}
.inline-image-overlay.hidden{display:none!important}
.inline-image-dialog{
  border:0;
  border-radius:16px;
  padding:0;
  width:min(100vw - 24px,480px);
  max-height:min(88dvh,800px);
  background:transparent;
  box-shadow:none;
}
.inline-image-dialog::backdrop{
  background:#25253c99;
}
.inline-image-dialog-open{
  position:fixed;
  inset:0;
  z-index:10000;
  display:grid;
  place-items:center;
  margin:auto;
  background:#25253c99;
}
.inline-image-panel{
  width:min(100%,480px);
  max-height:min(88dvh,800px);
  overflow:auto;
  background:var(--surface,#fff);
  border-radius:16px;
  padding:14px;
  display:grid;
  gap:12px;
  box-shadow:0 20px 50px #0005;
}
.inline-image-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.inline-image-top strong{font:800 14px Manrope}
.inline-image-panel img{
  width:100%;
  max-height:min(60dvh,520px);
  object-fit:contain;
  border-radius:10px;
  background:#f4f4f8;
}
.inline-image-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}

/* Image preview must read clearly above other ticket dialogs */
#image-preview-dialog{
  padding:20px;
  width:min(720px,calc(100vw - 24px));
  z-index:10000;
}
#image-preview-dialog::backdrop{
  background:#0f1218cc;
}

@media(max-width:900px){
  html,body{min-height:100dvh}
  .app-shell{
    flex-direction:column;
    min-height:100dvh;
    padding-bottom:0;
  }
  .sidebar{display:none}
  .mobile-nav{
    display:flex;
    justify-content:space-around;
    align-items:stretch;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:50;
    background:#27263e;
    padding:6px 4px calc(6px + env(safe-area-inset-bottom));
    border-top:1px solid #414056;
    box-shadow:0 -8px 24px #25253c18;
  }
  .mobile-nav-item{
    border:0;
    background:transparent;
    color:#bfc0ce;
    font:600 10px 'DM Sans';
    display:grid;
    gap:3px;
    justify-items:center;
    align-content:center;
    padding:8px 2px;
    cursor:pointer;
    flex:1;
    max-width:none;
    min-height:52px;
    min-width:0;
    -webkit-tap-highlight-color:transparent;
  }
  .mobile-nav-item span{font-size:16px}
  .mobile-nav-item.active,.mobile-nav-item:hover{color:white}
  .mobile-nav-item.admin-only.hidden{display:none!important}
  .mobile-nav-item.more-active{color:white}
  .mobile-status-filters{display:flex}
  main{
    padding:20px 16px;
    padding-bottom:calc(88px + env(safe-area-inset-bottom));
    min-height:0;
    flex:1;
  }
  header{align-items:flex-start;gap:12px}
  header .header-actions .icon-button{display:none}
  header .header-actions .icon-button.bell{display:grid!important;place-items:center;min-width:44px;min-height:44px}
  header .header-actions .icon-button.theme-toggle{display:grid!important;place-items:center;min-width:44px;min-height:44px}
  header .header-actions .page-refresh-timer{
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    gap:0;
    width:44px;
    height:44px;
    min-width:44px;
    min-height:44px;
    padding:0;
    border-radius:12px;
    font-size:0;
  }
  header .header-actions .page-refresh-timer #auto-refresh-label,
  header .header-actions .page-refresh-timer .page-refresh-label{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
  }
  header .header-actions .page-refresh-timer svg,
  header .header-actions .page-refresh-timer i{
    width:16px;
    height:16px;
  }
  header .header-actions #new-ticket{display:none!important}
  #new-ticket-2,
  #new-ticket-mywork,
  #profile-new-ticket{display:none!important}
  .section-heading{margin:18px 0 14px}
  .section-heading-end{width:100%;justify-content:space-between}
  .metrics{grid-template-columns:1fr 1fr;gap:10px}
  .grid-two,.admin-layout,.profile-layout,.team-grid{grid-template-columns:1fr}
  .chart-card{height:auto}
  .ticket-row,.ticket-row.my-ticket-row{grid-template-columns:1fr;gap:10px}
  .ticket-actions{justify-content:stretch}
  .ticket-actions .action-btn{flex:1;min-height:44px}
  .filters{flex-wrap:wrap}
  .filters input{min-width:100%}
  .login-card{width:min(420px,100%)}
  .login-option{min-height:44px;padding:8px 4px;font-size:14px}
  .login-option input{width:20px;height:20px;flex-shrink:0}
  body{padding-bottom:0}
  /* 16px inputs prevent iOS focus zoom */
  input,select,textarea,.quick-search,.filter-subdrop-toggle{
    font-size:16px!important;
  }
  .contact-user-row{
    grid-template-columns:1fr!important;
    gap:10px;
  }
  .user-row.contact-user-row input,
  .user-row.contact-user-row select{
    width:100%;
    min-height:44px;
  }
  .board-card-icons .icon-button,
  .board-card-icons .log-book-btn,
  .board-card-icons .ticket-view-btn,
  .list-ticket-card-icons .icon-button,
  .list-ticket-card-icons .log-book-btn,
  .list-ticket-card-icons .ticket-view-btn{
    min-width:44px;
    min-height:44px;
  }
  .board-card-actions .action-btn,
  .list-ticket-actions .action-btn{
    min-height:44px;
    width:100%;
    justify-content:center;
  }
  .board-card-actions,
  .list-ticket-actions{
    display:grid;
    gap:8px;
  }
  .admin-ticket-table table{min-width:0}
  .mobile-fab{display:none!important}
}

@media(max-width:600px){
  .login-card{padding:24px 18px}
  .login-hint{font-size:12px;line-height:1.45}
}

.notification-wrap{position:relative}
.notification-badge{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#e86e86;color:white;font:700 10px 'DM Sans';display:grid;place-items:center;border:2px solid white}
.notification-panel{position:absolute;top:calc(100% + 8px);right:0;width:min(360px,calc(100vw - 24px));background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 16px 40px #25253c22;z-index:60;overflow:hidden}
.notification-panel-top{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line)}
.notification-panel-top strong{font:700 13px Manrope}
.notification-list{max-height:340px;overflow:auto;display:grid}
.notification-item{border:0;border-bottom:1px solid #f0f0f4;background:white;text-align:left;padding:12px 14px;cursor:pointer;width:100%}
.notification-item:hover{background:#f7f6ff}
.notification-item.unread{background:#f7f6ff}
.notification-item b{display:block;font-size:12px;color:var(--ink);line-height:1.35}
.notification-item small{display:block;margin-top:5px;color:#8e90a5;font-size:11px}
.notification-empty{padding:18px 14px;margin:0;color:#8e90a5;font-size:12px}
.toast-stack{position:fixed;top:18px;right:18px;z-index:80;display:grid;gap:10px;width:min(340px,calc(100vw - 24px));pointer-events:none}
.toast{background:#27263e;color:white;border-radius:12px;padding:14px 16px;box-shadow:0 16px 40px #25253c33;opacity:0;transform:translateY(-8px);transition:.25s ease}
.toast.show{opacity:1;transform:translateY(0)}
.toast strong{display:block;font:700 12px Manrope;margin-bottom:4px}
.toast p{margin:0;color:#d7d7e4;font-size:12px;line-height:1.4}
.ticket-created{margin:6px 0 0;font-size:11px;color:#8e90a5}
.ticket-deadline{margin:4px 0 0;font-size:11px;color:#8e90a5}
.ticket-deadline.overdue,.deadline-overdue{color:#cf3f5c;font-weight:700}
.history-details{margin-top:10px}
.history-details summary{cursor:pointer;font-size:12px;font-weight:700;color:#6853d9}
.ticket-history{margin:8px 0 0;padding-left:18px;display:grid;gap:8px}
.ticket-history li{font-size:11px;color:#55566a}
.ticket-history small{display:block;color:#8e90a5;margin-top:2px}
.history-empty{margin:8px 0 0;font-size:11px;color:#8e90a5}

@media(max-width:900px){
  header .header-actions .icon-button.bell{display:grid}
  header .header-actions .icon-button.theme-toggle{display:grid!important;place-items:center}
  .toast-stack{top:12px;right:12px;left:12px;width:auto}
  .notification-panel{position:fixed;left:12px;right:12px;top:64px;width:auto}
  #new-ticket{
    display:none!important;
  }
  #new-ticket .lucide-icon,
  #new-ticket i{width:16px;height:16px}
  .section-heading{flex-wrap:wrap;gap:10px}
  .section-heading .primary{width:100%}
  .ticket-toolbar{flex-wrap:wrap;gap:8px}
  .ticket-toolbar .quick-search{min-width:100%;flex:1 1 100%}
  .filter-dropdown{flex:1 1 auto}
  .view-mode-toggle{width:100%}
  .view-mode-btn{flex:1;justify-content:center}
  .advanced-filters{
    position:fixed;
    left:12px;
    right:12px;
    top:auto;
    bottom:calc(72px + env(safe-area-inset-bottom));
    max-height:min(70vh,520px);
    overflow:auto;
    z-index:70;
    width:auto;
    box-shadow:0 16px 40px #25253c33;
  }
  .board-user-filter{
    margin:0 0 12px;
    padding:12px;
    background:white;
    border:1px solid var(--line);
    border-radius:12px;
  }
  .board-user-filter-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
    font:700 11px Manrope;
    color:#8e90a5;
    text-transform:uppercase;
    letter-spacing:.5px;
  }
  .board-user-chips{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }
  .user-filter-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    border:1px solid var(--line);
    background:#fbfbfd;
    border-radius:999px;
    padding:7px 10px 7px 7px;
    font:600 11px 'DM Sans';
    color:#5c5d70;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .user-filter-chip.active{
    background:#eeeaff;
    border-color:#d8d3f5;
    color:#6853d9;
  }
  .user-filter-chip .avatar.sm{
    width:22px;
    height:22px;
    font-size:8px;
  }
  .mobile-fab{
    display:none!important;
  }
  .mobile-nav-create{
    color:white!important;
    background:#403e5c;
    border-radius:12px;
    margin:2px;
    min-height:52px;
  }
  .mobile-nav-create i{color:#c4b8ff}
  dialog{
    width:min(100vw - 16px,510px);
    max-height:min(92dvh,900px);
    margin:auto;
    border-radius:16px;
  }
  dialog form,
  #logs-dialog,
  #details-dialog,
  #image-preview-dialog,
  #ticket-dialog form,
  #complete-dialog form,
  #hold-dialog form,
  #transfer-dialog form,
  #start-dialog form{
    max-height:min(80dvh,900px);
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
  }
  dialog.keyboard-open{
    max-height:var(--vv-height, 92dvh);
    margin-bottom:var(--vv-offset-bottom, 0px);
  }
  .form-row{grid-template-columns:1fr}
  .photo-upload-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .photo-upload-actions .photo-btn{width:100%}
  .modal-actions{flex-wrap:wrap}
  .modal-actions .primary,
  .modal-actions .secondary{flex:1;min-width:120px}
  .board-board{
    display:flex;
    flex-direction:column;
    gap:14px;
    overflow-x:visible;
    overflow-y:visible;
    scroll-snap-type:none;
    -webkit-overflow-scrolling:auto;
    padding:0 0 12px;
    min-height:0;
  }
  .board-column{
    flex:none;
    width:100%;
    min-width:0;
    max-height:none;
    scroll-snap-align:none;
  }
  .board-column-body{
    max-height:none;
    overflow-y:visible;
  }
  .board-card-actions .action-btn{
    min-height:40px;
    font-size:12px;
    padding:8px 10px;
  }
  .filter-assignee-actions{
    display:flex;
    justify-content:space-between;
    gap:8px;
    margin-bottom:8px;
    padding:0 4px;
  }
  .filter-assignee-option{
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px;
    border-radius:8px;
  }
  .filter-assignee-option:hover{background:#f7f6ff}
  .filter-checkboxes{max-height:220px;overflow:auto}
}

@media(min-width:901px){
  .mobile-fab{display:none}
  .board-user-filter{
    margin:0 0 14px;
    padding:12px 14px;
    background:white;
    border:1px solid var(--line);
    border-radius:12px;
  }
  .board-user-filter-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
    font:700 11px Manrope;
    color:#8e90a5;
    text-transform:uppercase;
    letter-spacing:.5px;
  }
  .board-user-chips{display:flex;flex-wrap:wrap;gap:8px}
  .user-filter-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    border:1px solid var(--line);
    background:#fbfbfd;
    border-radius:999px;
    padding:7px 10px 7px 7px;
    font:600 11px 'DM Sans';
    color:#5c5d70;
    cursor:pointer;
  }
  .user-filter-chip.active{
    background:#eeeaff;
    border-color:#d8d3f5;
    color:#6853d9;
  }
  .user-filter-chip .avatar.sm{width:22px;height:22px;font-size:8px}
  .filter-assignee-actions{
    display:flex;
    justify-content:space-between;
    gap:8px;
    margin-bottom:8px;
  }
  .filter-assignee-option{
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px;
    border-radius:8px;
  }
}

.ticket-title-row{display:flex;align-items:flex-start;gap:8px}
.ticket-title-row .ticket-title{flex:1}
.log-book-btn{border:1px solid var(--line);background:#f7f6ff;width:34px;height:34px;border-radius:8px;cursor:pointer;font-size:16px;flex-shrink:0;display:grid;place-items:center}
.log-book-btn:hover{background:#eeeaff;border-color:#d8d3f5}
.ticket-view-btn{border:1px solid var(--line);background:#eef6ff;width:34px;height:34px;border-radius:8px;cursor:pointer;font-size:15px;flex-shrink:0;display:grid;place-items:center}
.ticket-view-btn:hover{background:#e0edff;border-color:#b9d4f5}
.logs-count{font-size:11px;color:#8e90a5;margin-left:6px}
#logs-dialog,#details-dialog{padding:25px;width:min(640px,calc(100vw - 24px))}
.logs-dialog-body,.details-dialog-body{margin-top:12px;max-height:min(520px,70vh);overflow:auto;border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:#fbfbfd}
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.detail-field{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--surface,#fff)}
.detail-field span{display:block;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;margin-bottom:6px}
.detail-field b{font-weight:600;font-size:13px;color:var(--ink)}
.detail-section{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.detail-section h4{margin:0 0 8px;font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}
.detail-section p{margin:0;font-size:13px;line-height:1.45;color:var(--ink);white-space:pre-wrap}
.detail-empty{color:var(--muted)!important}
.detail-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.detail-image{margin:0}
.detail-image img{width:100%;border-radius:10px;border:1px solid var(--line);display:block;background:#fff}
.detail-image figcaption{margin-top:6px;font-size:11px;color:var(--muted);line-height:1.3}
@media(max-width:600px){.detail-grid{grid-template-columns:1fr}}
.field-hint{margin:12px 0 0;font-size:11px;color:#8e90a5}
.contact-line{display:block;margin-top:4px;color:#8e90a5;font-size:10px;line-height:1.4}
.contact-user-row{grid-template-columns:1.6fr 1fr 1fr 120px 90px}

.same-number{display:inline-flex;align-items:center;gap:7px;margin-top:8px;font-size:12px;font-weight:600;color:#55566a;cursor:pointer}
.same-number input{width:auto;margin:0}
input[readonly]{background:#f7f7fa;color:#696a7c}

.photo-upload{margin-top:7px}
.photo-upload-actions{display:flex;flex-wrap:wrap;gap:8px}
.photo-btn{padding:9px 12px;font-size:12px}
.danger-btn{color:#cf3f5c;border-color:#f0c9d1}
.danger-btn:hover{background:#fff5f7}

.confirm-copy{margin:12px 0 0;font-size:13px;color:#55566a;line-height:1.45}
.confirm-copy b{color:var(--ink)}
.complete-notice{background:#e5f7ef;color:#1f7a58}
.complete-image-preview{margin-top:10px}
.complete-image-preview img,.completion-thumb img{width:100%;max-width:220px;border-radius:10px;border:1px solid var(--line);display:block}
.completion-thumb{margin-top:8px}
.ticket-icon-actions{display:inline-flex;align-items:center;gap:6px;flex-shrink:0}
.ticket-image-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.image-chip-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:#eef6ff;color:var(--ink);border-radius:999px;padding:6px 10px;font:600 11px 'DM Sans';cursor:pointer}
.image-chip-btn:hover{background:#e0edff;border-color:#b9d4f5}
.image-chip-icon{font-size:14px;line-height:1}
#image-preview-dialog{padding:20px;width:min(720px,calc(100vw - 24px))}
.image-preview-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.image-preview-top-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.image-preview-top-actions .photo-btn{text-decoration:none}
.image-preview-stage{margin-top:12px;border:1px solid var(--line);border-radius:12px;background:#0f1218;padding:12px;min-height:220px;display:grid;place-items:center;max-height:min(70vh,640px);overflow:auto}
.image-preview-stage img{max-width:100%;max-height:min(64vh,580px);width:auto;height:auto;object-fit:contain;border-radius:8px;display:block}

:root{
  --bg:#fbfbfd;
  --surface:#ffffff;
  --surface-2:#f7f6ff;
  --text:var(--ink);
  --text-soft:#696a7c;
  --input-bg:#ffffff;
  --shadow:#25253c20;
}
html.night-mode{
  --ink:#e8e8f2;
  --muted:#9a9bb0;
  --line:#34354a;
  --pale:#232336;
  --bg:#161622;
  --surface:#1e1e2e;
  --surface-2:#27263e;
  --text:#e8e8f2;
  --text-soft:#b0b1c3;
  --input-bg:#232336;
  --shadow:#00000055;
  color-scheme:dark;
}
html.night-mode body{background:var(--bg);color:var(--ink)}
html.night-mode .login-screen{background:linear-gradient(135deg,#161622 0%,#1e1e2e 55%,#1a2430 100%)}
html.night-mode .login-card,
html.night-mode .card,
html.night-mode .ticket-row,
html.night-mode .team-card,
html.night-mode .admin-ticket-table,
html.night-mode .mobile-ticket-card,
html.night-mode .notification-panel,
html.night-mode .column-dropdown-menu,
html.night-mode .logs-dialog-body,
html.night-mode .details-dialog-body,
html.night-mode dialog{background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:0 16px 40px var(--shadow)}
html.night-mode .icon-button,
html.night-mode .secondary,
html.night-mode .filters input,
html.night-mode .filters select,
html.night-mode .section-heading select,
html.night-mode .action-btn,
html.night-mode .mobile-chip,
html.night-mode .column-dropdown-toggle,
html.night-mode .log-book-btn,
html.night-mode .ticket-view-btn,
html.night-mode input,
html.night-mode textarea,
html.night-mode label select,
html.night-mode .user-row{background:var(--input-bg);color:var(--ink);border-color:var(--line)}
html.night-mode .detail-field{background:var(--input-bg)}
html.night-mode .ticket-view-btn{background:#1a2a3d}
html.night-mode .ticket-view-btn:hover{background:#24364d;border-color:#4a6f96}
html.night-mode .image-chip-btn{background:#1a2a3d;color:var(--ink);border-color:var(--line)}
html.night-mode .image-chip-btn:hover{background:#24364d;border-color:#4a6f96}
html.night-mode .image-preview-stage{background:#0b0d12;border-color:var(--line)}

html.night-mode .action-btn.start{background:#1d3b32;border-color:#2f6b57;color:#7ddec0}
html.night-mode .action-btn.hold{background:#3b2f1d;border-color:#8a6a2f;color:#efc278}
html.night-mode .action-btn.complete{background:#2a2740;border-color:#5a4ea0;color:#b7a8ff}
html.night-mode .todo{background:#2a2a38;color:#c2c3d1}
html.night-mode .progress{background:#2a2740;color:#b7a8ff}
html.night-mode .hold{background:#3b2f1d;color:#efc278}
html.night-mode .completed{background:#1d3b32;color:#7ddec0}
html.night-mode .hold-notice{background:#3b2f1d;color:#efc278}
html.night-mode .transfer-notice{background:#2a2740;color:#b7a8ff}
html.night-mode .complete-notice{background:#1d3b32;color:#7ddec0}
html.night-mode .notification-item{background:var(--surface);border-color:var(--line)}
html.night-mode .notification-item.unread,
html.night-mode .notification-item:hover,
html.night-mode .column-option:hover{background:var(--surface-2)}
html.night-mode th{color:#8c8da3}
html.night-mode td{border-top-color:var(--line)}
html.night-mode .donut>div{background:var(--surface)}
html.night-mode .metric-icon{background:#2a2740}
html.night-mode .chart{background:repeating-linear-gradient(to bottom,transparent 0,transparent 39px,#2a2a38 40px);border-bottom-color:var(--line)}
html.night-mode .workload{background:#2a2a38}
html.night-mode input:disabled,
html.night-mode input[readonly]{background:#2a2a38;color:#9a9bb0}
html.night-mode .close{color:#9a9bb0}
html.night-mode .login-theme-toggle{position:absolute;top:18px;right:18px;z-index:5}
.login-screen{position:relative}
html.night-mode .theme-toggle{font-size:18px}
@media(max-width:900px){
  header .header-actions .icon-button.theme-toggle{display:grid!important;place-items:center}
}

.login-theme-toggle{position:absolute;top:18px;right:18px;z-index:5}

.section-heading-end{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}
.page-refresh-timer{
  display:inline-flex;
  align-items:center;
  gap:7px;
  border:1px solid var(--line);
  background:#f7f6ff;
  color:#5c5d70;
  border-radius:999px;
  padding:7px 12px;
  font:700 12px 'DM Sans';
  white-space:nowrap;
  cursor:pointer;
  flex-shrink:0;
  position:relative;
}
.page-refresh-timer svg,
.page-refresh-timer i{
  width:14px;
  height:14px;
}
.page-refresh-timer:hover{
  border-color:#d0cbf0;
  color:#6853d9;
}
.page-refresh-timer.is-refreshing{
  opacity:.75;
  cursor:wait;
}
.page-refresh-timer.is-refreshing svg,
.page-refresh-timer.is-refreshing i{
  animation:page-refresh-spin .8s linear infinite;
}
.page-refresh-inline{
  cursor:default;
  pointer-events:none;
}
@keyframes page-refresh-spin{
  to{transform:rotate(360deg)}
}
html.night-mode .page-refresh-timer{
  background:#2a2740;
  border-color:var(--line);
  color:var(--text-soft,#c8c8d8);
}
html.night-mode .page-refresh-timer:hover{
  color:#b7a8ff;
  border-color:#4a4570;
}

.ticket-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start;margin-bottom:14px}
.filter-dropdown{position:relative;z-index:25}
.advanced-filters{position:absolute;top:calc(100% + 8px);left:0;width:min(360px,calc(100vw - 28px));background:var(--surface,#fff);border:1px solid var(--line);border-radius:14px;padding:16px;box-shadow:0 16px 40px var(--shadow,#25253c22);display:grid;gap:12px}
.advanced-filters.hidden{display:none!important}
.filter-date-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.float-field{position:relative;margin:0;display:block}
.float-field>span{position:absolute;top:-8px;left:10px;padding:0 6px;background:var(--surface,#fff);font-size:11px;font-weight:700;color:var(--muted);z-index:1}
.float-field input,.float-field select{width:100%;margin:0;border:1px solid var(--line);border-radius:10px;background:var(--input-bg,#fff);color:var(--ink);padding:12px 12px;font:13px 'DM Sans'}
.quick-search{border:1px solid var(--line);border-radius:8px;background:var(--input-bg,#fff);padding:10px 13px;min-width:220px;flex:1;font:13px 'DM Sans';color:var(--ink)}
.filter-action{width:100%;justify-content:center;text-align:center}
.filter-action.see-all{color:#4b7bec;border-color:#4b7bec;background:transparent}
.filter-action.reset-all{color:#cf3f5c;border-color:#cf3f5c;background:transparent}
.admin-ticket-table{overflow:auto}
.admin-ticket-table table{min-width:0;width:100%;table-layout:auto}
.admin-ticket-table th,.admin-ticket-table td{vertical-align:middle;white-space:normal;padding:12px 10px;line-height:1.35}
.admin-ticket-table th{white-space:nowrap}
.admin-ticket-table .col-id,
.admin-ticket-table .col-status,
.admin-ticket-table .col-priority,
.admin-ticket-table .col-updated,
.admin-ticket-table .col-createdAt{white-space:nowrap}
.admin-ticket-table .col-deadline{white-space:nowrap;min-width:140px}
.admin-ticket-table .col-status,
.admin-ticket-table .col-priority{min-width:110px}
.admin-ticket-table .col-title{min-width:180px}
.admin-ticket-table .col-description{min-width:180px;max-width:260px}
.admin-ticket-table .col-assignee{min-width:150px}
.admin-ticket-table .col-history{min-width:110px}

/* List view: stacked cards (no side-scroll table) */
.list-ticket-stack{
  display:grid;
  gap:12px;
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}
.list-ticket-card{
  background:var(--surface,#fff);
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px 16px;
  display:grid;
  gap:12px;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.list-ticket-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.list-ticket-card-title-wrap{min-width:0;flex:1}
.list-ticket-id{
  display:inline-block;
  font:700 11px 'DM Sans';
  color:#6853d9;
  letter-spacing:.2px;
  margin-bottom:4px;
}
.list-ticket-title{
  display:block;
  width:100%;
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  text-align:left;
  font:700 15px Manrope;
  color:var(--ink);
  cursor:pointer;
  line-height:1.35;
  word-break:break-word;
}
.list-ticket-title:hover{color:#6853d9}
.list-ticket-card-icons{display:inline-flex;gap:4px;flex-shrink:0}
.list-ticket-meta{
  margin:0;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:10px 14px;
}
.list-ticket-meta-row{
  margin:0;
  min-width:0;
  display:grid;
  gap:3px;
}
.list-ticket-meta-row dt{
  font:700 10px 'DM Sans';
  text-transform:uppercase;
  letter-spacing:.4px;
  color:var(--muted);
}
.list-ticket-meta-row dd{
  margin:0;
  font:500 13px 'DM Sans';
  color:var(--ink);
  word-break:break-word;
  line-height:1.4;
}
.list-ticket-meta-row.col-description{grid-column:1/-1}
.list-ticket-actions .ticket-actions{
  flex-wrap:wrap;
  justify-content:flex-start;
  gap:6px;
}
.ticket-list{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}
/* ticket rows stay fully within viewport */
.ticket-row,
.ticket-row.my-ticket-row{
  max-width:100%;
  overflow-x:hidden;
  word-break:break-word;
}

html.night-mode .list-ticket-card{background:var(--surface);border-color:var(--line)}
html.night-mode .list-ticket-title:hover{color:#b8a8ff}
html.night-mode .list-ticket-id{color:#b7a8ff}
.nowrap{white-space:nowrap!important}
.badge.nowrap{display:inline-flex;align-items:center;white-space:nowrap}
.timeline-cell{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.timeline-cell .logs-count{margin:0}
html.night-mode .advanced-filters,
html.night-mode .float-field>span{background:var(--surface)}
html.night-mode .filter-action.see-all{color:#8eb6ff;border-color:#8eb6ff}
html.night-mode .filter-action.reset-all{color:#ff8aa0;border-color:#ff8aa0}
@media(max-width:900px){
  .quick-search{min-width:100%}
  .advanced-filters{left:0;right:0;width:auto}
}

.filter-group{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--input-bg,#fff)}
.filter-group-title{margin:0 0 8px;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.6px}
.filter-subdrop{position:relative}
.filter-subdrop-toggle{width:100%;display:flex;align-items:center;gap:8px;justify-content:space-between;border:1px solid var(--line);border-radius:10px;background:var(--input-bg,#fff);color:var(--ink);padding:11px 12px;font:600 12px 'DM Sans';cursor:pointer;text-align:left}
.filter-subdrop-toggle>span:first-child{text-transform:uppercase;letter-spacing:.5px;color:var(--muted);font-size:11px;flex:0 0 auto}
.filter-subdrop-toggle em{flex:1;font-style:normal;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}
.filter-subdrop-toggle .column-caret{flex:0 0 auto;transition:transform .15s ease}
.filter-subdrop-toggle.open .column-caret{transform:rotate(180deg)}
.filter-subdrop-menu{margin-top:6px;border:1px solid var(--line);border-radius:10px;background:var(--surface,#fff);padding:10px 12px;max-height:180px;overflow:auto}
.filter-subdrop-menu.hidden{display:none!important}
.filter-checkboxes{display:grid;gap:8px}
.filter-checkboxes label{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;font-weight:600;color:var(--ink);cursor:pointer}
.filter-checkboxes input{width:auto;margin:0}
html.night-mode .filter-subdrop-toggle,
html.night-mode .filter-subdrop-menu{background:var(--surface)}
#filter-toggle em{font-style:normal;font-size:11px;font-weight:700;color:#6853d9;background:#eeeaff;border-radius:999px;padding:2px 7px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;vertical-align:middle}
html.night-mode #filter-toggle em{background:#2a2740;color:#b7a8ff}
html.night-mode .filter-group{background:var(--input-bg)}

/* Lucide icons */
.lucide-icon, [data-lucide], .nav-item svg, .mobile-nav-item svg, .icon-button svg, .action-btn svg, .log-book-btn svg, .ticket-view-btn svg, .metric-icon svg, .image-chip-icon svg, .primary svg {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}
.nav-item, .mobile-nav-item, .action-btn, .primary, .image-chip-btn, .log-book-btn, .ticket-view-btn, .icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-item { width: 100%; }
.nav-item svg, .mobile-nav-item svg { width: 18px; height: 18px; }
.mobile-nav-item { display: grid; gap: 4px; justify-items: center; }
.mobile-nav-item svg { width: 18px; height: 18px; }
.icon-button { justify-content: center; }
.icon-button svg { width: 18px; height: 18px; }
.metric-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--pale, #f7f6ff); color: var(--purple); }
.metric-icon svg { width: 18px; height: 18px; }
.log-book-btn svg, .ticket-view-btn svg { width: 16px; height: 16px; }
.image-chip-icon { display: inline-flex; }
.image-chip-icon svg { width: 14px; height: 14px; }
.action-btn svg { width: 14px; height: 14px; }

/* Analytics */
.analytics-range-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.analytics-range-controls select, .analytics-custom-dates input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg, #fff);
  color: var(--ink);
  padding: 9px 11px;
  font: 13px 'DM Sans';
}
.analytics-custom-dates { display: flex; gap: 8px; flex-wrap: wrap; }
.analytics-custom-dates.hidden { display: none !important; }
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 18px;
}
.analytics-card.span-2 { grid-column: span 2; }
.analytics-list { display: grid; gap: 8px; margin-top: 10px; }
.analytics-list div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink); }
.analytics-list b { color: var(--purple); }
.analytics-list.compact div { font-size: 11px; color: var(--muted); }
.monthly-bars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 180px;
  padding-top: 12px;
}
.monthly-bar { display: grid; gap: 6px; justify-items: center; align-content: end; }
.monthly-bar-fill {
  width: 100%;
  max-width: 42px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #8b7cf0, #6954e8);
  min-height: 8px;
}
.monthly-bar b { font-size: 12px; }
.monthly-bar span { font-size: 11px; color: var(--muted); }
@media (max-width: 900px) {
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-card.span-2 { grid-column: auto; }
  .analytics-range-controls { justify-content: stretch; width: 100%; }
  .analytics-range-controls select { width: 100%; }
}
html.night-mode .analytics-range-controls select,
html.night-mode .analytics-custom-dates input { background: var(--input-bg); color: var(--ink); border-color: var(--line); }
html.night-mode .monthly-bar-fill { background: linear-gradient(180deg, #8b7cf0, #5b49c9); }

/* User-wise ticket report (user columns board) */
.user-report-card { margin: 0 0 18px; overflow: hidden; }
.user-report-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.user-report-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  justify-content: flex-end;
}
.user-report-field {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  min-width: 140px;
}
.user-report-field span { letter-spacing: 0.02em; }
.user-report-field select,
.user-report-field input[type="search"] {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg, #fff);
  color: var(--ink);
  padding: 9px 11px;
  font: 13px 'DM Sans';
  min-width: 150px;
}
.user-report-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 12px 'DM Sans';
  color: var(--ink);
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg, #fff);
  min-height: 40px;
  cursor: pointer;
}
.user-report-toggle input { accent-color: var(--purple, #6954e8); }
.user-report-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 16px;
}
.user-report-stat {
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  color: #fff;
  min-height: 78px;
  box-shadow: 0 8px 20px #00000018;
}
.user-report-stat span {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.92;
}
.user-report-stat b {
  font: 800 28px Manrope, sans-serif;
  line-height: 1;
}
.user-report-stat.ton-users { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
.user-report-stat.ton-tasks { background: linear-gradient(135deg, #15803d, #22c55e); }
.user-report-stat.ton-progress { background: linear-gradient(135deg, #0369a1, #38bdf8); color: #0b1f2a; }
.user-report-stat.ton-hold { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.user-report-stat.ton-todo { background: linear-gradient(135deg, #475569, #64748b); }

.user-report-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
  max-height: min(72vh, 820px);
  overflow: auto;
  padding: 2px 2px 8px;
}
.user-report-board-page {
  max-height: calc(100vh - 220px);
  min-height: 420px;
  padding: 4px 2px 12px;
}
#userreport-view .user-report-summary {
  margin-top: 4px;
}
#userreport-view .section-heading-end {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.user-board-column {
  background: #141922;
  border: 1px solid #2a3344;
  border-radius: 14px;
  padding: 12px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-board-column-head { display: flex; justify-content: space-between; gap: 8px; }
.user-board-column-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.user-board-column-name-row .user-mention { color: #f3f6fb; font-weight: 700; }
.user-board-column-name-row .user-mention-name { color: #f3f6fb; font-size: 15px; }
.user-board-column-count {
  margin: 4px 0 0;
  font-size: 12px;
  color: #8b95a8;
  font-weight: 600;
}
.user-board-count-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font: 800 11px Manrope, sans-serif;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.user-board-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.user-board-pill {
  font: 700 10px 'DM Sans';
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.user-board-pill.progress { background: #0c4a6e; color: #7dd3fc; }
.user-board-pill.hold { background: #7f1d1d; color: #fecaca; }
.user-board-pill.todo { background: #334155; color: #e2e8f0; }
.user-board-pill.done { background: #14532d; color: #bbf7d0; }
.user-board-pill.empty { background: #1f2937; color: #94a3b8; }

.user-board-cards {
  display: grid;
  gap: 10px;
  flex: 1;
}
.user-board-card {
  background: #1b2433;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.user-board-card.status-hold { border-color: #7f1d1d66; }
.user-board-card.status-progress { border-color: #0284c766; }
.user-board-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.user-board-card-title {
  border: 0;
  background: transparent;
  color: #f8fafc;
  font: 800 14px Manrope, sans-serif;
  text-align: left;
  padding: 0;
  cursor: pointer;
  line-height: 1.25;
}
.user-board-card-title:hover { color: #c4b5fd; }
.user-board-priority {
  font: 800 10px 'DM Sans';
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  text-transform: uppercase;
}
.user-board-priority.medium,
.user-board-priority.Medium { background: #9a3412; color: #ffedd5; }
.user-board-priority.high,
.user-board-priority.High { background: #991b1b; color: #fee2e2; }
.user-board-priority.low,
.user-board-priority.Low { background: #1e3a5f; color: #bfdbfe; }
.user-board-card-meta {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
}
.user-board-card-meta .user-board-meta-icon,
.user-board-card-meta svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #64748b;
}
.user-board-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.user-board-card-foot time {
  font-size: 11px;
  color: #7c8698;
  font-weight: 600;
  white-space: nowrap;
}
.user-board-card .badge {
  font-size: 10px;
  padding: 4px 8px;
}
.user-board-empty-col,
.user-report-empty {
  margin: 0;
  padding: 18px 8px;
  text-align: center;
  color: #8b95a8;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .user-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-report-summary .user-report-stat:last-child { grid-column: span 2; }
  .user-report-controls { width: 100%; }
  .user-report-field { flex: 1; min-width: min(100%, 160px); }
  .user-report-field select,
  .user-report-field input[type="search"] { width: 100%; min-width: 0; }
  .user-report-board {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

/* Light mode: board still uses dark columns for readability like the reference */
html:not(.night-mode) .user-report-card .user-board-column {
  box-shadow: 0 10px 28px #0f172a14;
}
html.night-mode .user-report-field select,
html.night-mode .user-report-field input[type="search"],
html.night-mode .user-report-toggle {
  background: var(--input-bg);
  color: var(--ink);
  border-color: var(--line);
}

/* Hide native file pickers — never clickable (buttons call .click() in JS) */
.file-input-hidden,
.photo-upload input[type="file"],
input[type="file"].file-input-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}
.photo-upload { position: relative; }
/* Keep field chrome like other form labels without wrapping controls */
.form-field.photo-field{
  display:block;
  font-size:12px;
  font-weight:600;
  margin:17px 0 0;
  color:#56576a;
}
.form-field.photo-field > .field-label{
  display:block;
  margin:0 0 2px;
}
.form-field.photo-field .photo-upload{
  font-weight:500;
}
.upload-thumb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg, #fbfbfd);
}
.upload-thumb-row.hidden { display: none !important; }
.upload-thumb-item {
  position: relative;
  flex-shrink: 0;
}
.upload-thumb-btn {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--line);
  display: block;
}
.upload-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.upload-thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: #cf3f5c;
  color: #fff;
  font: 700 14px/1 Manrope, sans-serif;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 1px 4px #0003;
}
.upload-thumb-remove:hover { background: #b4334c; }
.upload-thumb-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  width: 100%;
}
html.night-mode .upload-thumb-row { background: var(--input-bg); border-color: var(--line); }

/* Collapsible sidebar */
.sidebar {
  width: 252px;
  transition: width .2s ease;
  overflow: hidden;
}
.sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 8px;
}
.sidebar-top .brand {
  padding: 0 4px 18px;
  flex: 1;
  min-width: 0;
}
.sidebar-toggle {
  border: 1px solid #464461;
  background: #34334f;
  color: #d7d7e8;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
.sidebar-toggle:hover {
  background: #403e5c;
  color: #fff;
}
.sidebar-toggle svg {
  width: 16px;
  height: 16px;
}
.header-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-expand-btn {
  display: none !important;
}
.nav-label {
  flex: 1;
  text-align: left;
}
.app-shell.sidebar-collapsed .sidebar,
html.sidebar-collapsed .app-shell .sidebar {
  width: 76px;
  padding-left: 12px;
  padding-right: 12px;
}
.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .workspace-copy,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .nav-item em,
.app-shell.sidebar-collapsed .profile-copy,
html.sidebar-collapsed .app-shell .brand-text,
html.sidebar-collapsed .app-shell .workspace-copy,
html.sidebar-collapsed .app-shell .nav-label,
html.sidebar-collapsed .app-shell .nav-item em,
html.sidebar-collapsed .app-shell .profile-copy {
  display: none !important;
}
.app-shell.sidebar-collapsed .workspace,
html.sidebar-collapsed .app-shell .workspace {
  justify-content: center;
  padding: 10px 8px;
}
.app-shell.sidebar-collapsed .nav-item,
html.sidebar-collapsed .app-shell .nav-item {
  justify-content: center;
  padding: 12px 8px;
  gap: 0;
}
.app-shell.sidebar-collapsed .sidebar-top,
html.sidebar-collapsed .app-shell .sidebar-top {
  flex-direction: column;
  align-items: center;
}
.app-shell.sidebar-collapsed .sidebar-top .brand,
html.sidebar-collapsed .app-shell .sidebar-top .brand {
  padding: 0 0 10px;
  justify-content: center;
}
.app-shell.sidebar-collapsed .profile,
html.sidebar-collapsed .app-shell .profile {
  justify-content: center;
  margin-left: 0;
  margin-right: 0;
}
.app-shell.sidebar-collapsed .sidebar-expand-btn,
html.sidebar-collapsed .app-shell .sidebar-expand-btn {
  display: grid !important;
  place-items: center;
}
.app-shell.sidebar-collapsed main,
html.sidebar-collapsed .app-shell main {
  max-width: none;
}
@media (max-width: 900px) {
  .sidebar-toggle,
  .sidebar-expand-btn {
    display: none !important;
  }
}

/* User hover details card */
.user-mention {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  border-radius: 999px;
  padding: 2px 4px 2px 2px;
  max-width: 100%;
  vertical-align: middle;
}
.user-mention:hover,
.user-mention:focus-visible {
  background: #eeeaff;
  outline: none;
}
.user-mention-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-hover-card {
  position: fixed;
  z-index: 1200;
  background: var(--surface, #fff);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px #25253c28;
  padding: 14px;
  pointer-events: auto;
}
.user-hover-card.hidden { display: none !important; }
.user-hover-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.user-hover-top .avatar {
  width: 42px;
  height: 42px;
  font-size: 13px;
}
.user-hover-top b {
  display: block;
  font-size: 14px;
}
.user-hover-top small {
  color: var(--muted);
  font-size: 11px;
}
.user-hover-rows {
  display: grid;
  gap: 8px;
}
.user-hover-rows div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.user-hover-rows span {
  color: var(--muted);
  font-weight: 600;
}
.user-hover-rows b {
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}
.analytics-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.analytics-user-strong {
  display: inline-flex;
  font-weight: 700;
}
.team-card .user-mention {
  margin-bottom: 6px;
}
.team-card .user-mention-name {
  font-size: 15px;
  font-family: Manrope, sans-serif;
  font-weight: 800;
}
html.night-mode .user-mention:hover,
html.night-mode .user-mention:focus-visible {
  background: #2a2740;
}
html.night-mode .user-hover-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 18px 40px var(--shadow);
}

/* —— Jira-style kanban board —— */
.view-mode-toggle{
  display:inline-flex;
  border:1px solid var(--line);
  border-radius:8px;
  overflow:hidden;
  background:white;
  flex-shrink:0;
}
.view-mode-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:0;
  background:transparent;
  color:#5c5d70;
  padding:8px 12px;
  font:600 12px 'DM Sans';
  cursor:pointer;
}
.view-mode-btn + .view-mode-btn{border-left:1px solid var(--line)}
.view-mode-btn.active{
  background:#eeeaff;
  color:#6853d9;
}
.view-mode-btn svg{width:14px;height:14px}
.ticket-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-bottom:16px;
}
.ticket-toolbar .quick-search{flex:1;min-width:160px}
.view-only-tag{
  display:inline-block;
  font:600 10px 'DM Sans';
  color:#8e90a5;
  background:#f0eff4;
  border-radius:999px;
  padding:3px 8px;
  white-space:nowrap;
}
.view-only-note{color:#8e90a5!important;font-weight:600}
.board-board{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  align-items:start;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:10px;
  min-height:420px;
  scroll-behavior:smooth;
  scrollbar-width:thin;
  scrollbar-color:#c5c6d4 transparent;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}
.board-board::-webkit-scrollbar{height:8px}
.board-board::-webkit-scrollbar-track{background:transparent}
.board-board::-webkit-scrollbar-thumb{
  background:#d0d1dc;
  border-radius:999px;
}
.board-board::-webkit-scrollbar-thumb:hover{background:#b4b5c4}
.board-column{
  background:#f4f4f8;
  border:1px solid var(--line);
  border-radius:12px;
  min-width:0;
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 220px);
}
.board-column-header{
  display:flex;
  align-items:center;
  gap:8px;
  padding:12px 12px 10px;
  position:sticky;
  top:0;
  background:inherit;
  border-radius:12px 12px 0 0;
  z-index:1;
}
.board-column-header h3{
  font:700 12px Manrope;
  letter-spacing:.2px;
  text-transform:uppercase;
  color:#5c5d70;
  flex:1;
}
.board-column-count{
  font:700 11px 'DM Sans';
  font-style:normal;
  background:white;
  border:1px solid var(--line);
  color:#696a7d;
  border-radius:999px;
  padding:2px 8px;
}
.board-column-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#9899aa;
  flex-shrink:0;
}
.board-column.status-todo .board-column-dot{background:#76768a}
.board-column.status-progress .board-column-dot{background:#6853d9}
.board-column.status-hold .board-column-dot{background:#c27e21}
.board-column.status-completed .board-column-dot{background:#22976f}
.board-column-body{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:0 10px 12px;
  overflow-y:auto;
  min-height:80px;
  flex:1;
  transition:background .15s ease,box-shadow .15s ease;
}
.board-column-body.drag-over{
  background:#ece8ff;
  box-shadow:inset 0 0 0 2px #c4b8ff;
  border-radius:8px;
}
.board-empty{
  margin:8px 4px;
  font-size:11px;
  color:#a2a3b1;
  text-align:center;
  padding:16px 8px;
  border:1px dashed #d8d8e2;
  border-radius:8px;
}
.board-filter-empty{
  margin:12px 0 0;
  font-size:12px;
  color:#8e90a5;
  text-align:center;
}
.board-card{
  background:white;
  border:1px solid var(--line);
  border-radius:10px;
  padding:11px 12px;
  display:grid;
  gap:8px;
  box-shadow:0 1px 2px #25253c08;
  cursor:default;
  transition:box-shadow .15s ease,transform .15s ease,border-color .15s ease;
}
.board-card.mine{cursor:grab}
.board-card.mine:active{cursor:grabbing}
.board-card.dragging{
  opacity:.55;
  transform:rotate(1.5deg) scale(.98);
}
.board-card:hover{
  border-color:#d4cff5;
  box-shadow:0 6px 16px #25253c12;
}
.board-card-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
}
.board-card-id{
  font:600 10px 'DM Sans';
  color:#a2a3b1;
  letter-spacing:.3px;
}
.board-card-icons .ticket-icon-actions{gap:4px}
.board-card-icons .log-book-btn,
.board-card-icons .ticket-view-btn{
  width:26px;
  height:26px;
  padding:0;
}
.board-card-title{
  border:0;
  background:none;
  padding:0;
  margin:0;
  text-align:left;
  font:600 13px Manrope;
  color:var(--ink);
  letter-spacing:-.2px;
  cursor:pointer;
  line-height:1.35;
}
.board-card-title:hover{color:#6853d9}
.board-card-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  font-size:11px;
}
.board-deadline{color:#8e90a5;font-weight:600}
.board-deadline.overdue{color:#cf3f5c}
.board-card-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-top:2px;
}
.board-card-footer .assignee{min-width:0}
.board-card-footer .assignee .avatar{width:20px;height:20px;font-size:7px}
.board-card-footer .user-mention-name{font-size:11px}
.board-card-actions .ticket-actions{
  flex-wrap:wrap;
  justify-content:flex-start;
  gap:4px;
  width:100%;
}
.board-card-actions .action-btn{
  padding:5px 8px;
  font-size:10px;
}

html.night-mode .view-mode-toggle,
html.night-mode .board-card{background:var(--surface);border-color:var(--line)}
html.night-mode .view-mode-btn{color:var(--text-soft)}
html.night-mode .view-mode-btn.active{background:#2a2740;color:#b8a8ff}
html.night-mode .board-column{background:var(--surface-2);border-color:var(--line)}
html.night-mode .board-column-header h3{color:var(--text-soft)}
html.night-mode .board-column-count{background:var(--input-bg);border-color:var(--line);color:var(--text-soft)}
html.night-mode .board-column-body.drag-over{background:#2a2740;box-shadow:inset 0 0 0 2px #6b5bbd}
html.night-mode .board-empty{border-color:var(--line);color:var(--muted)}
html.night-mode .view-only-tag{background:#2a2a3c;color:var(--muted)}
html.night-mode .board-card-title{color:var(--ink)}
html.night-mode .board-card-title:hover{color:#b8a8ff}

@media(max-width:1100px){
  .board-board{
    grid-template-columns:repeat(2,minmax(0,1fr));
    overflow-x:visible;
  }
  .board-column{max-height:none;min-width:0}
}
@media(max-width:700px){
  .board-board{
    display:flex;
    flex-direction:column;
    gap:14px;
    overflow-x:visible;
    overflow-y:visible;
    min-height:0;
    scroll-snap-type:none;
  }
  .board-column{
    max-height:none;
    min-width:0;
    width:100%;
  }
  .board-column-body{max-height:none;overflow-y:visible}
  .view-mode-btn span,
  .view-mode-btn{font-size:11px;padding:8px 10px}
  .list-ticket-meta{grid-template-columns:1fr 1fr}
}

/* WhatsApp Management (admin) */
.wa-mgmt{display:grid;gap:16px}
.wa-master-card .wa-master-row,
.wa-stage-top{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.wa-master-card h3,
.wa-stage-card h3{margin:0 0 4px;font:700 16px Manrope}
.wa-master-card p,
.wa-stage-card p{margin:0;color:var(--muted);font-size:13px}
.wa-token-hint{margin-top:14px}
.wa-token-hint code{
  display:inline-block;
  margin:2px 3px 2px 0;
  padding:2px 6px;
  border-radius:6px;
  background:#eeeaff;
  color:#5340b8;
  font:600 11px ui-monospace, Menlo, Consolas, monospace;
}
.wa-stage-list{display:grid;gap:14px}
.wa-stage-card{display:grid;gap:12px}
.wa-template-label{
  display:grid;
  gap:8px;
  margin:0;
  font:700 12px 'DM Sans';
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.4px;
}
.wa-template-label textarea{
  width:100%;
  min-height:140px;
  resize:vertical;
  border:1px solid var(--line);
  border-radius:10px;
  padding:12px;
  font:13px ui-monospace, Menlo, Consolas, monospace;
  line-height:1.45;
  color:var(--ink);
  background:var(--input-bg,#fff);
  text-transform:none;
  letter-spacing:0;
  font-weight:500;
}
.wa-stage-actions{display:flex;justify-content:flex-end}
.wa-mgmt-footer{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 0 24px;
}
.wa-mgmt-footer-actions{display:flex;flex-wrap:wrap;gap:10px}
.wa-switch{
  display:inline-flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  user-select:none;
  font:700 12px 'DM Sans';
  color:var(--ink);
}
.wa-switch input{position:absolute;opacity:0;pointer-events:none}
.wa-switch-ui{
  width:46px;
  height:26px;
  border-radius:999px;
  background:#c9cad6;
  position:relative;
  transition:background .15s ease;
  flex-shrink:0;
}
.wa-switch-ui::after{
  content:'';
  position:absolute;
  top:3px;left:3px;
  width:20px;height:20px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 4px #0003;
  transition:transform .15s ease;
}
.wa-switch input:checked + .wa-switch-ui{background:#28ae82}
.wa-switch input:checked + .wa-switch-ui::after{transform:translateX(20px)}
.wa-switch em{font-style:normal;min-width:52px}
html.night-mode .wa-token-hint code{background:#2a2740;color:#b7a8ff}
html.night-mode .wa-template-label textarea{background:var(--input-bg);border-color:var(--line);color:var(--ink)}
html.night-mode .wa-switch-ui{background:#4a4a5c}
