/*
 Correcto Team v1.0
 COMPONENTS

 Buttons, badges, cards, dropdowns, generic modals and reusable controls.
*/

/*
 * Correcto Team v1.0
 * canonical navigation profile structure ownership
 *
 * STRUCTURE ONLY.
 *
 * Owns:
 * - header navigation controls
 * - search/control dimensions
 * - profile control/menu geometry
 * - mobile navigation drawer geometry
 * - mobile profile/menu geometry
 * - mobile bottom navigation geometry
 *
 * Does NOT own:
 * - header container geometry
 * - Board
 * - Razvoz
 * - explicit light/dark colors
 */


/* ==========================================================
   MOBILE LEGACY FUNCTIONAL STRUCTURE — <=760
   Early source rules are intentionally kept before later
   <=900 rules so specificity/cascade remains equivalent.
   ========================================================== */

@media (max-width:760px){

  .mobile-bottom-nav{
    display:grid!important;
    grid-template-columns:repeat(5,1fr)!important;
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:calc(8px + env(safe-area-inset-bottom))!important;
    z-index:95000!important;
    padding:7px!important;
    border-radius:19px!important;
    backdrop-filter:blur(18px)!important;
  }

  .mobile-bottom-nav button{
    min-width:0!important;
    min-height:52px!important;
    border-radius:13px!important;
    display:grid!important;
    place-items:center!important;
    align-content:center!important;
    gap:2px!important;
    padding:5px 2px!important;
  }

  .mobile-bottom-nav button span{
    font-size:19px!important;
    line-height:1!important;
  }

  .mobile-bottom-nav button small{
    font-size:10px!important;
    font-weight:800!important;
  }

  body.mobile-nav-open{
    overflow:hidden!important;
  }

  body.mobile-nav-open #appHeader .main-nav{
    display:flex!important;
    position:fixed!important;
    z-index:90010!important;
    top:64px!important;
    left:10px!important;
    right:auto!important;
    bottom:calc(84px + env(safe-area-inset-bottom))!important;
    width:min(88vw,360px)!important;
    padding:14px!important;
    border-radius:18px!important;
    overflow-y:auto!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:7px!important;
  }

  body.mobile-nav-open #appHeader .main-nav>.nav-button,
  body.mobile-nav-open #appHeader .main-nav>.dropdown>.dropdown-toggle{
    width:100%!important;
    min-height:46px!important;
    justify-content:flex-start!important;
    padding:11px 13px!important;
    border-radius:12px!important;
  }

  body.mobile-nav-open #appHeader .dropdown{
    width:100%!important;
  }

  body.mobile-nav-open #appHeader .dropdown-menu{
    position:static!important;
    display:none!important;
    width:100%!important;
    min-width:0!important;
    margin-top:5px!important;
    border-radius:12px!important;
  }

  body.mobile-nav-open #appHeader .dropdown.open>.dropdown-menu{
    display:grid!important;
  }

  body.mobile-profile-open .profile-dropdown{
    display:block!important;
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:calc(82px + env(safe-area-inset-bottom))!important;
    z-index:95010!important;
  }

  body.mobile-profile-open .profile-dropdown>.profile-button{
    display:none!important;
  }

  body.mobile-profile-open .profile-dropdown>.profile-menu{
    display:grid!important;
    position:static!important;
    width:100%!important;
    min-width:0!important;
    padding:10px!important;
    border-radius:18px!important;
  }

  body.mobile-profile-open .profile-menu button{
    min-height:46px!important;
    border-radius:11px!important;
    text-align:left!important;
    padding:11px 13px!important;
  }
}


/* ==========================================================
   MOBILE PROFILE / BOTTOM NAV DETAIL — <=760
   Later legacy source block.
   ========================================================== */

@media (max-width:760px){

  #appHeader .mobile-nav-toggle{
    display:flex!important;
    width:38px!important;
    height:38px!important;
    border-radius:12px!important;
  }

  #appHeader .header-tools{
    display:flex!important;
    justify-content:flex-end!important;
    min-width:0!important;
  }

  #appHeader .header-tools>*:not(.profile-dropdown){
    display:none!important;
  }

  #appHeader .profile-dropdown{
    display:block!important;
    position:relative!important;
  }

  #appHeader .profile-button{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    padding:2px!important;
    border-radius:50%!important;
  }

  #appHeader .profile-button .avatar{
    width:34px!important;
    height:34px!important;
    font-size:12px!important;
  }

  #appHeader .profile-button .profile-copy,
  #appHeader .profile-button>span:last-child{
    display:none!important;
  }

  #appHeader .profile-dropdown.open>.profile-menu,
  body.mobile-profile-open #appHeader .profile-dropdown>.profile-menu{
    display:grid!important;
    position:fixed!important;
    top:64px!important;
    right:10px!important;
    left:auto!important;
    width:min(340px,calc(100vw - 20px))!important;
    max-height:calc(100dvh - 82px)!important;
    overflow-y:auto!important;
    padding:10px!important;
    gap:5px!important;
    border-radius:20px!important;
    z-index:100500!important;
  }

  .profile-menu-user{
    display:flex!important;
    align-items:center!important;
    gap:11px!important;
    padding:9px 9px 13px!important;
    margin-bottom:3px!important;
  }

  .profile-menu-user .avatar{
    width:42px!important;
    height:42px!important;
  }

  .profile-menu-user div{
    display:grid!important;
    min-width:0!important;
  }

  .profile-menu-user strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  #appHeader .profile-menu button{
    display:grid!important;
    grid-template-columns:26px 1fr auto!important;
    align-items:center!important;
    gap:8px!important;
    min-height:47px!important;
    padding:9px 11px!important;
    border-radius:12px!important;
    text-align:left!important;
  }

  #profileNotificationToggle em{
    font-style:normal!important;
    font-size:10px!important;
    font-weight:900!important;
    padding:4px 7px!important;
    border-radius:999px!important;
  }

  .profile-build-info{
    display:grid!important;
    gap:2px!important;
    margin:5px 2px!important;
    padding:10px 12px!important;
    border-radius:12px!important;
  }

  .profile-build-info strong{
    font-size:11px!important;
  }

  .profile-build-info small{
    font-size:10px!important;
  }

  .mobile-bottom-nav{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    left:8px!important;
    right:8px!important;
    bottom:calc(7px + env(safe-area-inset-bottom))!important;
    min-height:65px!important;
    padding:6px!important;
    border-radius:20px!important;
  }

  .mobile-bottom-nav button{
    min-height:51px!important;
    border-radius:14px!important;
  }
}


/* ==========================================================
   MOBILE PROFILE FINALIZATION — <=900
   This block intentionally comes after <=760 source rules.
   ========================================================== */

@media (max-width:900px){

  .mobile-bottom-nav{
    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;
  }

  .profile-dropdown .profile-menu{
    position:fixed!important;
    top:64px!important;
    right:10px!important;
    left:auto!important;
    width:min(330px,calc(100vw - 20px))!important;
    max-height:calc(100dvh - 82px)!important;
    overflow-y:auto!important;
    padding:10px!important;
    border-radius:18px!important;
    z-index:500!important;
  }

  .profile-menu-user{
    padding:13px!important;
    border-radius:14px!important;
    margin-bottom:8px!important;
  }

  .profile-menu>button{
    display:grid!important;
    grid-template-columns:
      36px
      minmax(0,1fr)
      auto!important;
    grid-template-rows:auto auto!important;
    column-gap:10px!important;
    align-items:center!important;
    width:100%!important;
    padding:10px 11px!important;
    border-radius:12px!important;
    text-align:left!important;
  }

  .profile-menu>button .profile-menu-icon{
    grid-row:1/3!important;
    width:34px!important;
    height:34px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:10px!important;
    font-size:17px!important;
  }

  .profile-menu>button b{
    grid-column:2!important;
    font-size:13px!important;
  }

  .profile-menu>button small{
    grid-column:2!important;
    font-size:10.5px!important;
  }

  .profile-menu>button em{
    grid-column:3!important;
    grid-row:1/3!important;
    align-self:center!important;
  }

  .profile-build-info{
    margin:8px 2px!important;
    padding:10px 12px!important;
    border-radius:12px!important;
  }
}


/* ==========================================================
   DESKTOP PROFILE MENU SOURCE — >=901
   ========================================================== */

@media (min-width:901px){

  .profile-menu{
    min-width:310px!important;
    padding:10px!important;
    border-radius:16px!important;
  }

  .profile-menu>button{
    display:grid!important;
    grid-template-columns:34px 1fr auto!important;
    grid-template-rows:auto auto!important;
    column-gap:9px!important;
    align-items:center!important;
    padding:10px!important;
    border-radius:11px!important;
    text-align:left!important;
  }

  .profile-menu>button .profile-menu-icon{
    grid-row:1/3!important;
    width:32px!important;
    height:32px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:9px!important;
  }

  .profile-menu>button b{
    grid-column:2!important;
  }

  .profile-menu>button small{
    grid-column:2!important;
    font-size:10px!important;
  }

  .profile-menu>button em{
    grid-column:3!important;
    grid-row:1/3!important;
  }
}


/* ==========================================================
   BASE NAVIGATION / PROFILE CONTROL STRUCTURE
   ========================================================== */

.premium-brand{
  cursor:pointer;
}

.premium-brand .brand-copy{
  display:inline-flex;
  gap:6px;
  align-items:center;
  letter-spacing:-.03em;
}

.premium-brand .brand-copy strong,
.premium-brand .brand-copy b{
  font-weight:900;
}

#appHeader .main-nav{
  display:flex;
  align-items:center;
  gap:5px;
}

#appHeader .nav-button,
#appHeader .main-nav>.dropdown>.dropdown-toggle{
  min-height:42px;
  padding:0 12px!important;
  border-radius:12px!important;
  font-size:13px!important;
  font-weight:800!important;
}

.premium-header-tools{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}

.premium-create-button{
  height:44px;
  padding:0 14px;
  border-radius:13px;
  font-weight:850;
}

.premium-create-button span{
  font-size:19px;
  margin-right:5px;
}

.premium-create-button:hover{
  transform:translateY(-1px);
}

.premium-global-search{
  position:relative;
  width:min(390px,28vw)!important;
}

.premium-global-search .search-icon{
  position:absolute;
  left:13px;
  top:50%;
  transform:translateY(-50%);
  z-index:2;
  font-size:17px;
}

#appHeader .premium-global-search input{
  height:44px!important;
  padding:0 14px 0 39px!important;
  border-radius:13px!important;
}

#appHeader .command-palette-trigger{
  height:44px!important;
  border-radius:13px!important;
}

#appHeader .header-icon-button{
  position:relative;
  width:44px!important;
  height:44px!important;
  border-radius:13px!important;
}

#appHeader .profile-button{
  min-width:172px!important;
  height:46px!important;
  padding:4px 8px!important;
  border-radius:14px!important;
}

#appHeader .profile-copy{
  min-width:0;
  text-align:left;
}

#appHeader .profile-copy strong{
  display:block;
  max-width:115px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#appHeader .dropdown-menu{
  border-radius:16px!important;
  padding:8px!important;
}

#appHeader .dropdown-menu button{
  border-radius:10px!important;
}


/* ==========================================================
   COMPACT DESKTOP — 901-1370
   ========================================================== */

@media (min-width:901px) and (max-width:1370px){

  .premium-create-button b,
  .command-palette-trigger b,
  .command-palette-trigger kbd{
    display:none!important;
  }

  .premium-create-button{
    width:44px;
    padding:0!important;
  }

  .premium-create-button span{
    margin:0;
  }

  #appHeader .profile-button{
    min-width:48px!important;
  }

  .profile-copy{
    display:none!important;
  }

  .premium-global-search{
    width:min(310px,25vw)!important;
  }
}


/* ==========================================================
   MOBILE CONTROL SYSTEM — <=900
   Source block immediately before final responsive header.
   ========================================================== */

@media (max-width:900px){

  #appHeader .premium-brand{
    pointer-events:auto!important;
  }

  #appHeader .premium-brand .brand-logo{
    display:none!important;
  }

  #appHeader .premium-brand .brand-copy{
    font-size:19px!important;
  }

  #appHeader .premium-header-tools>*:not(.profile-dropdown){
    display:none!important;
  }

  #appHeader .profile-button{
    min-width:40px!important;
    width:40px!important;
    height:40px!important;
    padding:3px!important;
  }

  #appHeader .main-nav{
    top:58px!important;
    left:8px!important;
    right:8px!important;
    width:auto!important;
    border-radius:18px!important;
    padding:10px!important;
  }

  #appHeader .main-nav .nav-button,
  #appHeader .main-nav>.dropdown>.dropdown-toggle{
    width:100%!important;
    justify-content:flex-start!important;
    min-height:46px!important;
    margin-bottom:5px!important;
  }
}


/* ==========================================================
   RESPONSIVE CONTAINMENT BASE
   ========================================================== */

#appHeader .main-nav{
  min-width:0!important;
  max-width:100%!important;
}

#appHeader .premium-global-search{
  min-width:150px!important;
  max-width:390px!important;
  width:clamp(150px,21vw,390px)!important;
}

#appHeader .command-palette-trigger,
#appHeader .premium-create-button,
#appHeader .header-icon-button,
#appHeader .profile-button{
  flex:0 0 auto!important;
}

#appHeader .main-nav>.nav-button,
#appHeader .main-nav>.dropdown>.dropdown-toggle{
  max-width:100%!important;
}


/* ==========================================================
   LARGE DESKTOP — 1451-1780
   ========================================================== */

@media (min-width:1451px) and (max-width:1780px){

  #appHeader .premium-global-search{
    width:clamp(170px,18vw,300px)!important;
  }

  #appHeader .premium-create-button{
    padding-inline:11px!important;
  }

  #appHeader .command-palette-trigger{
    padding-inline:10px!important;
  }

  #appHeader .profile-button{
    min-width:145px!important;
    max-width:165px!important;
  }

  #appHeader .profile-copy strong{
    max-width:95px!important;
  }

  #appHeader .nav-button,
  #appHeader .main-nav>.dropdown>.dropdown-toggle{
    padding-inline:9px!important;
    font-size:12.5px!important;
  }
}


/* ==========================================================
   COMPACT LARGE DESKTOP — 1451-1580
   ========================================================== */

@media (min-width:1451px) and (max-width:1580px){

  #appHeader .premium-create-button b,
  #appHeader .command-palette-trigger b,
  #appHeader .command-palette-trigger kbd{
    display:none!important;
  }

  #appHeader .premium-create-button,
  #appHeader .command-palette-trigger{
    width:44px!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
  }

  #appHeader .premium-create-button span{
    margin:0!important;
  }

  #appHeader .profile-button{
    min-width:48px!important;
    width:48px!important;
    padding:4px!important;
  }

  #appHeader .profile-copy,
  #appHeader .profile-button>span:last-child{
    display:none!important;
  }

  #appHeader .premium-global-search{
    width:clamp(170px,19vw,270px)!important;
  }
}


/* ==========================================================
   DRAWER RANGE — <=1450
   ========================================================== */

@media (max-width:1450px){

  #appHeader .premium-header-tools{
    grid-column:2!important;
    width:100%!important;
    grid-template-columns:
      auto
      auto
      minmax(150px,1fr)
      auto
      auto
      auto
      auto!important;
  }

  #appHeader .premium-global-search{
    width:100%!important;
    max-width:none!important;
  }

  #appHeader .main-nav{
    max-width:min(360px,92vw)!important;
  }
}


/* ==========================================================
   TABLET — <=1100
   ========================================================== */

@media (max-width:1100px){

  #appHeader .premium-header-tools{
    display:flex!important;
    width:auto!important;
    justify-content:flex-end!important;
  }

  #appHeader .premium-header-tools>.premium-create-button,
  #appHeader .premium-header-tools>.command-palette-trigger,
  #appHeader .premium-header-tools>.premium-global-search{
    display:none!important;
  }

  #appHeader .profile-button{
    min-width:44px!important;
    width:44px!important;
  }

  #appHeader .profile-copy,
  #appHeader .profile-button>span:last-child{
    display:none!important;
  }
}


/* ==========================================================
   FINAL PHONE CONTROL WRITER — <=900
   ========================================================== */

@media (max-width:900px){

  #appHeader .mobile-nav-toggle{
    display:grid!important;
  }

  #appHeader .premium-brand .brand-copy{
    font-size:clamp(16px,5vw,20px)!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  #appHeader .premium-brand small,
  #appHeader .premium-brand .brand-logo{
    display:none!important;
  }

  #appHeader .premium-header-tools>*:not(.profile-dropdown){
    display:none!important;
  }

  #appHeader .profile-dropdown{
    width:44px!important;
    min-width:44px!important;
  }

  #appHeader .profile-button{
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    padding:3px!important;
  }

  #appHeader .main-nav{
    left:8px!important;
    right:auto!important;
    width:min(360px,calc(100vw - 16px))!important;
    max-width:calc(100vw - 16px)!important;
  }

  #appHeader .profile-menu{
    right:8px!important;
    left:auto!important;
    width:min(340px,calc(100vw - 16px))!important;
    max-width:calc(100vw - 16px)!important;
  }
}


/* ==========================================================
   ULTRA SMALL — <=380
   ========================================================== */

@media (max-width:380px){

  #appHeader .mobile-nav-toggle,
  #appHeader .profile-button{
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
  }

  #appHeader .premium-brand .brand-copy{
    font-size:16px!important;
  }
}


/* ==========================================================
   FINAL DESKTOP WRITER — >=901
   This must remain after large/compact desktop source rules.
   ========================================================== */

@media (min-width:901px){

  #appHeader .main-nav{
    gap:3px!important;
    overflow:visible!important;
  }

  #appHeader .main-nav>.nav-button,
  #appHeader .main-nav>.dropdown>.dropdown-toggle{
    padding:9px 10px!important;
    font-size:13px!important;
  }

  #appHeader .premium-create-button{
    padding:10px 14px!important;
  }

  #appHeader .premium-global-search{
    min-width:240px!important;
    max-width:390px!important;
  }
}


/*
 * Correcto Team v1.0
 * canonical structural completion ownership
 *
 * Phase 3T:
 * remaining non-theme declarations from mixed
 * Header/Nav/Profile theme blocks.
 *
 * No explicit colors/backgrounds/shadows here.
 */

/* Desktop brand structure inherited from >=901 legacy block. */

@media (min-width:901px){

  #appHeader .brand{
    gap:10px!important;
  }

  #appHeader .brand-logo{
    width:38px!important;
    height:38px!important;
    border-radius:11px!important;
    font-size:20px!important;
  }

  #appHeader .brand>span:not(.brand-logo){
    font-size:22px!important;
    font-weight:900!important;
  }

  #appHeader .brand small{
    padding:5px 9px!important;
    border-radius:999px!important;
    font-size:10px!important;
  }
}


/* Mobile modal/drawer overlay geometry from <=760 legacy block. */

@media (max-width:760px){

  body.mobile-nav-open::after{
    content:""!important;
    position:fixed!important;
    inset:0!important;
    z-index:89990!important;
  }

  body.mobile-profile-open::after{
    content:"";
    position:fixed;
    inset:0;
    z-index:94980;
  }
}


/*
 * Correcto Team v1.0
 * canonical mobile bottom nav board entry hotfix
 *
 * Board chooser must never own the touch area occupied by
 * the persistent mobile navigation.
 *
 * Navigation structure remains clickable while
 * body.board-entry-open is active.
 */

@media (max-width:760px){

  body.board-entry-open .board-entry-overlay{
    bottom:
      calc(
        80px +
        env(safe-area-inset-bottom,0px)
      )!important;
  }

  body.board-entry-open .mobile-bottom-nav{
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }

  body.board-entry-open .mobile-bottom-nav button{
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }
}

/* =========================================================
   CORRECTO TEAM v1.0
   CANONICAL MOBILE TASK MODAL OWNER

   Mobile task-modal structure has exactly one owner here.
   Desktop >=981px remains in legacy until desktop migration.
   ========================================================= */

@media (max-width:980px){

  #appModal:has(.premium-task-shell){
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    min-width:0!important;

    height:calc(100dvh - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    min-height:0!important;

    margin:auto!important;
    padding:0!important;

    border-radius:16px!important;
    overflow:hidden!important;
  }

  #appModal:has(.premium-task-shell) form{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;

    display:grid!important;
    grid-template-rows:52px minmax(0,1fr) auto!important;

    padding:0!important;
    overflow:hidden!important;
  }

  #appModal:has(.premium-task-shell) .modal-header{
    height:52px!important;
    min-height:52px!important;

    margin:0!important;
    padding:0 14px!important;

    position:relative!important;
    inset:auto!important;

    display:flex!important;
    align-items:center!important;

    border-bottom:1px solid var(--border)!important;
    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell) #modalClose{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
  }

  #appModal:has(.premium-task-shell) .modal-body{
    width:100%!important;
    min-width:0!important;

    height:auto!important;
    min-height:0!important;
    max-height:none!important;

    padding:0!important;

    overflow-y:auto!important;
    overflow-x:hidden!important;

    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch;
  }

  #appModal:has(.premium-task-shell) .premium-task-shell{
    display:block!important;

    width:100%!important;
    height:auto!important;
    min-height:100%!important;
    max-height:none!important;

    overflow:visible!important;
  }

  #appModal:has(.premium-task-shell) .premium-task-hero{
    display:none!important;
  }

  #appModal:has(.premium-task-shell) .task-detail-grid{
    display:block!important;

    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;

    margin:0!important;
    padding:0!important;

    overflow:visible!important;
  }

  #appModal:has(.premium-task-shell) .task-left-panel,
  #appModal:has(.premium-task-shell) .task-right-panel{
    display:block!important;

    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;

    padding:15px!important;

    overflow:visible!important;

    border-right:0!important;
    border-left:0!important;

    scrollbar-gutter:auto!important;
  }

  #appModal:has(.premium-task-shell) .task-left-panel{
    border:0!important;
  }

  #appModal:has(.premium-task-shell) .task-right-panel{
    border:0!important;
    border-top:1px solid var(--border)!important;
  }

  #appModal:has(.premium-task-shell)
  .task-right-panel
  .section-head{
    position:static!important;
    top:auto!important;
  }

  #appModal:has(.premium-task-shell) .form-grid{
    display:grid!important;

    grid-template-columns:minmax(0,1fr)!important;
    gap:11px!important;

    min-width:0!important;
  }

  #appModal:has(.premium-task-shell) .form-grid>*{
    grid-column:1!important;
    min-width:0!important;
    max-width:100%!important;
  }

  #appModal:has(.premium-task-shell)
  input[type="date"],
  #appModal:has(.premium-task-shell)
  input[type="datetime-local"]{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    box-sizing:border-box!important;
  }

  #appModal:has(.premium-task-shell) .trello-task-heading{
    position:relative!important;

    padding-left:31px!important;
    margin:4px 0 3px!important;
  }

  #appModal:has(.premium-task-shell)
  .trello-task-heading:before{
    content:''!important;

    position:absolute!important;
    left:0!important;
    top:10px!important;

    width:17px!important;
    height:17px!important;

    border:2px solid var(--muted)!important;
    border-radius:50%!important;

    box-sizing:border-box!important;
  }

  #appModal:has(.premium-task-shell) .task-title-editor{
    width:100%!important;

    min-height:54px!important;
    max-height:120px!important;

    padding:0!important;

    border:0!important;
    background:transparent!important;
    box-shadow:none!important;

    resize:none!important;

    font-size:22px!important;
    line-height:1.2!important;
  }

  #appModal:has(.premium-task-shell)
  .trello-description-block{
    margin-top:6px!important;
    padding:0!important;

    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }

  #appModal:has(.premium-task-shell)
  .task-description-editor{
    min-height:96px!important;
  }

  #appModal:has(.premium-task-shell)
  .task-attachments-list{
    grid-template-columns:1fr!important;
  }

  #appModal:has(.premium-task-shell)
  .task-attachments-section,
  #appModal:has(.premium-task-shell)
  .task-checklist-section{
    margin-top:12px!important;
    padding:13px!important;
  }

  #appModal:has(.premium-task-shell)
  .premium-task-section{
    scroll-margin-top:12px!important;
  }


  /*
   * Footer is outside the scrollable modal-body.
   * It therefore stays visible without position:fixed/sticky.
   */
  #appModal:has(.premium-task-shell) .modal-footer{
    width:100%!important;
    min-width:0!important;

    height:auto!important;
    min-height:58px!important;

    margin:0!important;

    padding:
      8px
      10px
      calc(8px + env(safe-area-inset-bottom,0px))
      !important;

    display:grid!important;

    grid-template-columns:
      minmax(0,1fr)
      minmax(0,1.15fr)
      !important;

    align-items:center!important;
    gap:6px!important;

    position:relative!important;
    inset:auto!important;

    overflow:visible!important;

    border-top:1px solid var(--border)!important;
    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell)
  .modal-footer:has(#modalDanger){
    grid-template-columns:
      auto
      minmax(0,1fr)
      minmax(0,1.15fr)
      !important;
  }

  #appModal:has(.premium-task-shell)
  .modal-footer button{
    width:100%!important;
    min-width:0!important;

    height:40px!important;
    min-height:40px!important;

    margin:0!important;
    padding:0 10px!important;

    border-radius:9px!important;

    font-size:13px!important;
    line-height:1!important;

    white-space:nowrap!important;
  }

  #appModal:has(.premium-task-shell)
  .modal-footer #modalDanger{
    width:auto!important;
    justify-self:start!important;
    padding-inline:9px!important;
  }
}

@media (max-width:360px){

  #appModal:has(.premium-task-shell){
    width:calc(100vw - 10px)!important;
    max-width:calc(100vw - 10px)!important;

    height:calc(100dvh - 10px)!important;
    max-height:calc(100dvh - 10px)!important;

    border-radius:13px!important;
  }

  #appModal:has(.premium-task-shell) .task-left-panel,
  #appModal:has(.premium-task-shell) .task-right-panel{
    padding:12px!important;
  }

  #appModal:has(.premium-task-shell) .modal-footer{
    padding:
      7px
      8px
      calc(7px + env(safe-area-inset-bottom,0px))
      !important;

    gap:5px!important;
  }

  #appModal:has(.premium-task-shell)
  .modal-footer button{
    height:38px!important;
    min-height:38px!important;

    padding-inline:7px!important;

    font-size:12px!important;
  }
}

/* =========================================================
   C8C.1 — CANONICAL DESKTOP TASK WORKSPACE OWNER
   Desktop >= 981px only.
   Mobile/tablet <= 980px keeps the existing C4 one-scroll owner.
   ========================================================= */

@media (min-width:981px){

  #appModal:has(.premium-task-shell){
    width:min(1220px,calc(100vw - 72px))!important;
    min-width:0!important;
    max-width:1220px!important;

    height:min(820px,calc(100dvh - 64px))!important;
    min-height:620px!important;
    max-height:calc(100dvh - 64px)!important;

    margin:auto!important;

    overflow:hidden!important;
    border-radius:18px!important;

    background:var(--surface)!important;
    border:1px solid var(--border)!important;

    box-shadow:
      0 28px 80px rgb(0 0 0 / .28)!important;
  }

  #appModal:has(.premium-task-shell) form{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;

    display:grid!important;
    grid-template-rows:
      52px
      minmax(0,1fr)
      64px!important;

    overflow:hidden!important;
  }

  #appModal:has(.premium-task-shell) .modal-header{
    min-height:52px!important;
    height:52px!important;

    padding:0 18px!important;

    display:flex!important;
    align-items:center!important;

    border-bottom:1px solid var(--border)!important;

    background:
      color-mix(
        in srgb,
        var(--surface) 96%,
        var(--primary) 4%
      )!important;
  }

  #appModal:has(.premium-task-shell) .modal-header h2{
    margin:0!important;
    font-size:14px!important;
    font-weight:800!important;
    color:var(--muted)!important;
  }

  #appModal:has(.premium-task-shell) .modal-body{
    min-width:0!important;
    min-height:0!important;

    padding:0!important;
    overflow:hidden!important;

    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell) .premium-task-shell{
    width:100%!important;
    height:100%!important;
    min-height:0!important;

    display:grid!important;
    grid-template-rows:
      auto
      minmax(0,1fr)!important;

    overflow:hidden!important;
    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell) .premium-task-hero{
    position:static!important;

    padding:14px 22px 13px!important;

    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    column-gap:18px!important;
    row-gap:5px!important;

    border-bottom:1px solid var(--border)!important;

    background:
      color-mix(
        in srgb,
        var(--surface2) 58%,
        var(--surface)
      )!important;

    backdrop-filter:none!important;
  }

  #appModal:has(.premium-task-shell) .premium-task-status{
    grid-column:1!important;
    grid-row:1!important;

    width:max-content!important;
    margin:0!important;

    font-size:10px!important;
    line-height:1!important;
  }

  #appModal:has(.premium-task-shell) .premium-task-hero-meta{
    grid-column:1!important;
    grid-row:2!important;

    margin:3px 0 0!important;

    display:flex!important;
    flex-wrap:wrap!important;
    gap:6px!important;
  }

  #appModal:has(.premium-task-shell) .premium-task-hero-meta span{
    padding:4px 8px!important;

    border-radius:999px!important;

    font-size:10px!important;
    line-height:1.25!important;

    background:var(--surface)!important;
    border:1px solid var(--border)!important;
  }

  #appModal:has(.premium-task-shell) .premium-task-jump{
    grid-column:2!important;
    grid-row:1 / 3!important;

    align-self:center!important;

    display:flex!important;
    flex-wrap:wrap!important;
    justify-content:flex-end!important;
    gap:6px!important;

    max-width:330px!important;
  }

  #appModal:has(.premium-task-shell) .premium-task-jump button{
    min-height:32px!important;
    height:32px!important;

    padding:0 10px!important;

    border-radius:9px!important;

    font-size:11px!important;
    font-weight:750!important;

    background:var(--surface)!important;
    border:1px solid var(--border)!important;
    color:var(--text)!important;
  }

  /*
   * JEDAN scroll model:
   * task-detail-grid je jedini skrolujući workspace.
   * left/right panel više nemaju svoje vertikalne scrollbare.
   */
  #appModal:has(.premium-task-shell) .task-detail-grid{
    min-width:0!important;
    min-height:0!important;
    height:100%!important;

    display:grid!important;
    grid-template-columns:
      minmax(0,1.62fr)
      minmax(340px,.82fr)!important;

    gap:0!important;
    padding:0!important;

    align-items:start!important;

    overflow-y:auto!important;
    overflow-x:hidden!important;

    scrollbar-gutter:stable!important;
    overscroll-behavior:contain!important;

    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell) .task-left-panel,
  #appModal:has(.premium-task-shell) .task-right-panel{
    min-width:0!important;
    min-height:100%!important;
    height:auto!important;
    max-height:none!important;

    overflow:visible!important;
    scrollbar-gutter:auto!important;
  }

  #appModal:has(.premium-task-shell) .task-left-panel{
    padding:22px 24px 32px!important;

    border:0!important;
    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell) .task-right-panel{
    padding:22px 20px 32px!important;

    border:0!important;
    border-left:1px solid var(--border)!important;

    background:
      color-mix(
        in srgb,
        var(--surface2) 64%,
        var(--surface)
      )!important;
  }

  #appModal:has(.premium-task-shell) .form-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;

    gap:14px 14px!important;
    align-items:start!important;
  }

  #appModal:has(.premium-task-shell) .form-grid > *{
    min-width:0!important;
  }

  #appModal:has(.premium-task-shell) .form-grid > .full,
  #appModal:has(.premium-task-shell) .trello-task-heading,
  #appModal:has(.premium-task-shell) .trello-description-block,
  #appModal:has(.premium-task-shell) .delivery-fields{
    grid-column:1 / -1!important;
  }

  /*
   * Datum + odgovoran zajedno u jednom redu.
   */
  #appModal:has(.premium-task-shell)
  .form-grid > label:has([name="assigneeId"]){
    grid-column:auto!important;
  }

  #appModal:has(.premium-task-shell)
  .form-grid > label:has([name="dueDate"]){
    grid-column:auto!important;
  }

  #appModal:has(.premium-task-shell)
  .form-grid > label:first-child{
    margin:0 0 2px!important;
  }

  #appModal:has(.premium-task-shell)
  #taskTemplateSelect{
    height:36px!important;

    min-width:180px!important;
    width:auto!important;
    max-width:320px!important;

    margin-top:5px!important;

    border-radius:9px!important;
  }

  #appModal:has(.premium-task-shell) .trello-task-heading{
    position:relative!important;

    margin:2px 0 2px!important;
    padding:0!important;
  }

  #appModal:has(.premium-task-shell)
  .trello-task-heading::before{
    display:none!important;
  }

  #appModal:has(.premium-task-shell) .task-title-editor{
    width:100%!important;

    min-height:44px!important;
    max-height:88px!important;

    padding:4px 0!important;

    resize:none!important;

    border:0!important;
    background:transparent!important;
    box-shadow:none!important;

    font-size:26px!important;
    line-height:1.2!important;
    font-weight:850!important;

    color:var(--text)!important;
  }

  #appModal:has(.premium-task-shell)
  .task-title-editor:focus{
    outline:0!important;
    border:0!important;
    box-shadow:none!important;
  }

  #appModal:has(.premium-task-shell)
  .trello-description-block{
    margin-top:4px!important;

    padding:16px!important;

    border:1px solid var(--border)!important;
    border-radius:14px!important;

    background:
      color-mix(
        in srgb,
        var(--surface2) 58%,
        var(--surface)
      )!important;
  }

  #appModal:has(.premium-task-shell)
  .task-description-editor{
    min-height:120px!important;
    max-height:none!important;

    padding:13px 14px!important;

    border-radius:10px!important;

    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell)
  .task-switch-row{
    min-height:62px!important;

    padding:12px 14px!important;

    border-radius:12px!important;
  }

  #appModal:has(.premium-task-shell)
  .task-attachments-section,
  #appModal:has(.premium-task-shell)
  .task-checklist-section{
    margin-top:14px!important;

    padding:16px!important;

    border:1px solid var(--border)!important;
    border-radius:14px!important;

    background:
      color-mix(
        in srgb,
        var(--surface2) 54%,
        var(--surface)
      )!important;
  }

  #appModal:has(.premium-task-shell)
  .task-right-panel .section-head{
    position:static!important;

    margin:0!important;
    padding:0 0 14px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;

    background:transparent!important;
    border:0!important;
  }

  #appModal:has(.premium-task-shell)
  .comment-compose-vertical{
    margin:0 0 16px!important;
    padding:0!important;

    display:grid!important;
    gap:8px!important;

    border:0!important;
    background:transparent!important;
  }

  #appModal:has(.premium-task-shell) #newComment{
    width:100%!important;
    min-height:96px!important;
    max-height:180px!important;

    padding:13px 14px!important;

    border-radius:12px!important;

    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell)
  .comment-compose-vertical button{
    width:100%!important;
    min-height:42px!important;

    border-radius:11px!important;
  }

  #appModal:has(.premium-task-shell)
  .task-activity-feed{
    max-height:none!important;
    height:auto!important;

    margin-top:0!important;

    overflow:visible!important;

    display:grid!important;
    gap:9px!important;
  }

  #appModal:has(.premium-task-shell)
  .task-activity-feed .comment{
    margin:0!important;

    padding:12px!important;

    border-radius:12px!important;

    background:var(--surface)!important;
    border:1px solid var(--border)!important;
  }

  #appModal:has(.premium-task-shell)
  .task-activity-feed .comment.activity{
    opacity:.82!important;

    background:
      color-mix(
        in srgb,
        var(--surface2) 72%,
        var(--surface)
      )!important;
  }

  #appModal:has(.premium-task-shell) .modal-footer{
    min-height:64px!important;
    height:64px!important;

    margin:0!important;
    padding:10px 18px!important;

    position:static!important;

    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:8px!important;

    overflow:hidden!important;

    border-top:1px solid var(--border)!important;

    background:
      color-mix(
        in srgb,
        var(--surface) 96%,
        var(--surface2)
      )!important;
  }

  #appModal:has(.premium-task-shell)
  .modal-footer button{
    min-width:92px!important;
    height:40px!important;

    padding:0 17px!important;

    border-radius:10px!important;
    white-space:nowrap!important;
  }
}


/* =========================================================
   C8C.2M.1 — MOBILE MODAL GEOMETRY FIX
   One scroll owner: .modal-body.
   Header/footer remain fixed grid rows.
   ========================================================= */

@media (max-width:980px){

  #appModal:has(.premium-task-shell){
    overflow:hidden!important;
  }

  #appModal:has(.premium-task-shell) form{
    display:grid!important;

    grid-template-rows:
      auto
      minmax(0,1fr)
      auto!important;

    width:100%!important;
    height:100%!important;

    min-width:0!important;
    min-height:0!important;

    max-height:100%!important;

    padding:0!important;

    overflow:hidden!important;
  }

  /*
   * Header nije deo scroll sadržaja.
   */
  #appModal:has(.premium-task-shell)
  .modal-header{
    grid-row:1!important;

    position:relative!important;
    top:auto!important;

    z-index:6!important;

    flex:0 0 auto!important;

    margin:0!important;

    background:var(--surface)!important;
  }

  /*
   * Jedini vertikalni scroll owner.
   */
  #appModal:has(.premium-task-shell)
  #modalBody{
    grid-row:2!important;

    width:100%!important;
    height:auto!important;

    min-width:0!important;
    min-height:0!important;

    max-height:none!important;

    padding:0!important;

    overflow-x:hidden!important;
    overflow-y:auto!important;

    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-y:contain!important;

    scrollbar-gutter:auto!important;
  }

  /*
   * Sadržaj više ne pokušava da bude poseban viewport.
   */
  #appModal:has(.premium-task-shell)
  .premium-task-shell{
    display:block!important;

    width:100%!important;
    height:auto!important;

    min-width:0!important;
    min-height:0!important;

    max-height:none!important;

    overflow:visible!important;
  }

  #appModal:has(.premium-task-shell)
  .task-detail-grid{
    display:block!important;

    width:100%!important;
    height:auto!important;

    min-width:0!important;
    min-height:0!important;

    max-height:none!important;

    overflow:visible!important;

    padding-bottom:16px!important;
  }

  #appModal:has(.premium-task-shell)
  .task-left-panel,
  #appModal:has(.premium-task-shell)
  .task-right-panel{
    height:auto!important;

    min-height:0!important;
    max-height:none!important;

    overflow:visible!important;
  }

  /*
   * Footer je treći GRID red.
   * Nije sticky unutar contenta i ne može više da preseče
   * Attachment / Checklist / Comments.
   */
  #appModal:has(.premium-task-shell)
  .modal-footer{
    grid-row:3!important;

    position:relative!important;
    inset:auto!important;
    bottom:auto!important;

    z-index:7!important;

    box-sizing:border-box!important;

    width:100%!important;
    height:auto!important;
    min-height:64px!important;

    margin:0!important;

    padding:
      9px
      12px
      calc(
        9px +
        env(safe-area-inset-bottom,0px)
      )!important;

    display:grid!important;

    grid-template-columns:
      auto
      minmax(0,1fr)
      minmax(0,1.15fr)!important;

    align-items:center!important;

    gap:7px!important;

    overflow:hidden!important;

    border-top:
      1px solid
      var(--border)!important;

    background:var(--surface)!important;

    box-shadow:
      0 -10px 28px
      rgb(0 0 0 / .14)!important;
  }

  #appModal:has(.premium-task-shell)
  .modal-footer button{
    box-sizing:border-box!important;

    width:100%!important;
    min-width:0!important;

    height:44px!important;
    min-height:44px!important;

    margin:0!important;

    padding:0 10px!important;

    white-space:nowrap!important;

    border-radius:10px!important;
  }

  /*
   * Poslednja sekcija mora moći potpuno da se dovuče iznad footera.
   */
  #appModal:has(.premium-task-shell)
  #taskSectionActivity{
    margin-bottom:4px!important;
  }
}

@media (max-width:430px){

  #appModal:has(.premium-task-shell)
  .modal-footer{
    grid-template-columns:
      .78fr
      1fr
      1.18fr!important;

    padding-left:10px!important;
    padding-right:10px!important;
  }

  #appModal:has(.premium-task-shell)
  .modal-footer button{
    padding-left:7px!important;
    padding-right:7px!important;

    font-size:14px!important;
  }
}

/* =========================================================
   C8C.2M.3 — MOBILE TASK TOOLS + COMMENTS DRAWER
   Quick access: Prilozi / Checklista / Komentari.
   Drawer lives inside modal-body.
   ========================================================= */

.mobile-task-tools{
  display:none;
}

.task-mobile-activity-toggle{
  display:none;
}

.task-mobile-activity-content{
  display:block;
}

@media (max-width:980px){

  #appModal:has(.premium-task-shell)
  #modalBody{
    position:relative!important;

    scroll-padding-top:62px!important;
  }

  /*
   * Sticky toolbar je u istom modal-body scroll owneru.
   */
  #appModal:has(.premium-task-shell)
  .mobile-task-tools{
    position:sticky!important;

    top:0!important;
    z-index:24!important;

    box-sizing:border-box!important;

    width:100%!important;
    min-height:52px!important;

    margin:0!important;
    padding:6px 10px!important;

    display:grid!important;

    grid-template-columns:
      minmax(0,1fr)
      minmax(0,1.15fr)
      minmax(0,.82fr)!important;

    align-items:stretch!important;
    gap:6px!important;

    border-bottom:
      1px solid
      var(--border)!important;

    background:
      color-mix(
        in srgb,
        var(--surface) 96%,
        transparent
      )!important;

    backdrop-filter:
      blur(14px)!important;

    box-shadow:
      0 5px 16px
      rgb(0 0 0 / .08)!important;
  }

  #appModal:has(.premium-task-shell)
  .mobile-task-tool,
  #appModal:has(.premium-task-shell)
  .task-mobile-activity-toggle{
    box-sizing:border-box!important;

    width:100%!important;
    min-width:0!important;

    height:40px!important;
    min-height:40px!important;

    margin:0!important;
    padding:0 8px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;

    overflow:hidden!important;

    border:
      1px solid
      var(--border)!important;

    border-radius:10px!important;

    background:var(--surface2)!important;
    color:var(--text)!important;

    box-shadow:none!important;

    font-size:11px!important;
    line-height:1!important;
    font-weight:760!important;

    white-space:nowrap!important;
  }

  #appModal:has(.premium-task-shell)
  .mobile-task-tool b{
    flex:0 0 auto!important;

    min-width:19px!important;
    height:19px!important;

    padding:0 4px!important;

    display:grid!important;
    place-items:center!important;

    border-radius:999px!important;

    background:
      color-mix(
        in srgb,
        var(--primary) 15%,
        var(--surface)
      )!important;

    color:var(--text)!important;

    font-size:9px!important;
    font-weight:850!important;
  }

  /*
   * Comments trigger je isti postojeći DOM button.
   */
  #appModal:has(.premium-task-shell)
  .task-mobile-activity-label{
    display:flex!important;
    align-items:center!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-label strong{
    display:none!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-meta{
    display:flex!important;
    align-items:center!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-meta
  .activity-count{
    min-width:19px!important;
    height:19px!important;

    padding:0 4px!important;

    display:grid!important;
    place-items:center!important;

    border:0!important;
    border-radius:999px!important;

    background:
      color-mix(
        in srgb,
        var(--primary) 18%,
        var(--surface)
      )!important;

    color:var(--text)!important;

    font-size:9px!important;
    line-height:1!important;
    font-weight:850!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-meta i{
    display:none!important;
  }

  #appModal:has(.premium-task-shell)
  #taskSectionAttachments,
  #appModal:has(.premium-task-shell)
  #taskSectionChecklist{
    scroll-margin-top:62px!important;
  }

  /*
   * Drawer je unutar modal-body.
   * Footer ostaje van njega.
   */
  #appModal:has(.premium-task-shell)
  #taskSectionActivity{
    position:absolute!important;

    left:0!important;
    right:0!important;

    top:52px!important;
    bottom:0!important;

    z-index:18!important;

    box-sizing:border-box!important;

    width:auto!important;
    height:auto!important;

    min-width:0!important;
    min-height:0!important;
    max-height:none!important;

    margin:0!important;
    padding:0!important;

    display:none!important;

    overflow:hidden!important;

    border:0!important;
    border-radius:0!important;

    background:var(--surface)!important;

    box-shadow:
      0 -10px 35px
      rgb(0 0 0 / .18)!important;
  }

  #appModal:has(.premium-task-shell)
  #taskSectionActivity.mobile-activity-open{
    display:flex!important;
    flex-direction:column!important;
  }

  #appModal.mobile-activity-drawer-open
  #modalBody{
    overflow:hidden!important;
    overscroll-behavior:none!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-content{
    flex:1 1 auto!important;

    display:grid!important;

    grid-template-rows:
      auto
      auto
      minmax(0,1fr)!important;

    width:100%!important;
    height:100%!important;

    min-width:0!important;
    min-height:0!important;

    padding:0!important;

    overflow:hidden!important;

    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-content
  > .section-head{
    position:relative!important;
    top:auto!important;

    z-index:2!important;

    min-height:52px!important;

    margin:0!important;
    padding:11px 14px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;

    border:0!important;

    border-bottom:
      1px solid
      var(--border)!important;

    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-content
  > .section-head strong{
    font-size:15px!important;
    font-weight:850!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-content
  .comment-compose-vertical{
    margin:0!important;
    padding:11px 12px!important;

    display:grid!important;
    gap:7px!important;

    border:0!important;

    border-bottom:
      1px solid
      var(--border)!important;

    background:var(--surface)!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-content
  #newComment{
    box-sizing:border-box!important;

    width:100%!important;
    min-width:0!important;

    min-height:78px!important;
    max-height:110px!important;

    margin:0!important;
    padding:10px 11px!important;

    resize:none!important;

    border-radius:10px!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-content
  #addComment{
    width:100%!important;
    min-height:40px!important;

    margin:0!important;

    border-radius:10px!important;
  }

  /*
   * Sam feed skroluje.
   */
  #appModal:has(.premium-task-shell)
  .task-mobile-activity-content
  .task-activity-feed{
    min-width:0!important;
    min-height:0!important;

    width:100%!important;
    height:auto!important;
    max-height:none!important;

    margin:0!important;
    padding:11px 12px 24px!important;

    display:block!important;

    overflow-x:hidden!important;
    overflow-y:auto!important;

    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-y:contain!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-content
  .task-activity-feed
  .comment{
    margin:0 0 8px!important;
    padding:10px!important;

    border-radius:10px!important;
  }

  #appModal:has(.premium-task-shell)
  .task-mobile-activity-content
  .empty-activity{
    min-height:160px!important;

    display:grid!important;
    place-items:center!important;

    padding:20px!important;

    text-align:center!important;
  }
}

@media (max-width:390px){

  #appModal:has(.premium-task-shell)
  .mobile-task-tools{
    padding-left:7px!important;
    padding-right:7px!important;

    gap:5px!important;
  }

  #appModal:has(.premium-task-shell)
  .mobile-task-tool,
  #appModal:has(.premium-task-shell)
  .task-mobile-activity-toggle{
    padding-left:5px!important;
    padding-right:5px!important;

    font-size:10px!important;
  }
}

/* =========================================================
   C8C.2M.12 — CANONICAL ICON GEOMETRY

   Single geometry owner for icon-only controls and semantic
   icon wrappers across Correcto Team.

   IMPORTANT:
   No global "button span" selector.
   Text buttons, badges, checkboxes and status dots are excluded.
   ========================================================= */


/* ---------------------------------------------------------
   ICON-ONLY CONTROLS
   --------------------------------------------------------- */

#appHeader .header-icon-button,
#appHeader .mobile-nav-toggle,
#boardKanbanDashboard .board-task-actions button,
#pageContent .shipping-drag-handle,
#pageContent .shipping-quick-complete,
#pageContent #razvozPrev,
#pageContent #razvozNext,
#loginView .password-toggle{
  display:grid!important;
  place-items:center!important;

  line-height:1!important;
  text-align:center!important;
}


/*
 * Header icon-only controls must never inherit asymmetric
 * horizontal text padding.
 */
#appHeader .header-icon-button,
#appHeader .mobile-nav-toggle{
  padding:0!important;
}


/* ---------------------------------------------------------
   SEMANTIC ICON WRAPPERS
   --------------------------------------------------------- */

#appHeader .premium-create-button > span:first-child,
#appHeader .profile-menu-icon,
#mobileBottomNav button > span:first-child,
#pageContent .dashboard-board-mark,
#pageContent .dashboard-action-card > span:first-child,
#pageContent .managed-board-icon,
#pageContent .delivery-center-icon,
#appModal .trello-section-icon,
#boardKanbanDashboard .column-template-button > span:first-child,
#boardKanbanDashboard .task-pin-mark{
  display:inline-grid!important;
  place-items:center!important;

  line-height:1!important;
  text-align:center!important;
  vertical-align:middle!important;
}


/* ---------------------------------------------------------
   GLOBAL SEARCH GLYPH
   Keep its canonical absolute anchor, center only glyph box.
   --------------------------------------------------------- */

#appHeader .premium-global-search .search-icon{
  display:grid!important;
  place-items:center!important;

  width:20px!important;
  height:20px!important;

  line-height:1!important;
  text-align:center!important;
}


/* ---------------------------------------------------------
   HEADER BOARD DROPDOWN SYMBOLS
   Do not touch .header-board-dot.
   --------------------------------------------------------- */

#appHeader
.dropdown-menu
button >
span:first-child:not(.header-board-dot){
  display:inline-grid!important;
  place-items:center!important;

  line-height:1!important;
  text-align:center!important;
  vertical-align:middle!important;
}


/* ---------------------------------------------------------
   TEMPLATE SHEET ICONS
   Works both while nested and while viewport-portaled.
   --------------------------------------------------------- */

body
.column-template-popover
.column-template-option >
span:first-child{
  display:inline-grid!important;
  place-items:center!important;

  line-height:1!important;
  text-align:center!important;
  vertical-align:middle!important;
}

/* =========================================================
   C8C.3C — NAMED CHECKLIST GROUPS
   ========================================================= */

.premium-task-shell .task-checklist-groups{
  display:grid;
  gap:14px;
  margin-top:14px;
}

.premium-task-shell .task-checklist-group{
  position:relative;
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
  background:
    color-mix(
      in srgb,
      var(--surface) 88%,
      var(--surface2)
    );
}

.premium-task-shell .task-checklist-group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.premium-task-shell .task-checklist-group-heading{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
}

.premium-task-shell
.task-checklist-group-heading
strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text);
  font-size:15px;
  line-height:1.3;
  font-weight:800;
}

.premium-task-shell
.task-checklist-group-heading
[data-checklist-group-count]{
  flex:0 0 auto;
  min-width:42px;
  padding:4px 8px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--surface2);
  color:var(--muted);
  font-size:11px;
  font-weight:750;
  text-align:center;
}

.premium-task-shell
.task-checklist-group-menu{
  position:relative;
  flex:0 0 auto;
}

.premium-task-shell
.task-checklist-group-menu
> summary{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface2);
  color:var(--text);
  cursor:pointer;
  list-style:none;
}

.premium-task-shell
.task-checklist-group-menu
> summary::-webkit-details-marker{
  display:none;
}

.premium-task-shell
.task-checklist-group-menu-popover{
  position:absolute;
  top:42px;
  right:0;
  z-index:40;
  width:180px;
  display:grid;
  gap:4px;
  padding:6px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
  box-shadow:0 18px 48px rgb(0 0 0 / .20);
}

.premium-task-shell
.task-checklist-group-menu-popover
button{
  width:100%;
  display:flex;
  align-items:center;
  padding:9px 10px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:13px;
  font-weight:650;
  text-align:left;
  cursor:pointer;
}

.premium-task-shell
.task-checklist-group-menu-popover
button:hover{
  background:var(--surface2);
}

.premium-task-shell
.task-checklist-group-menu-popover
button.danger{
  color:#dc3f4f;
}

.premium-task-shell
.task-checklist-group-progress{
  margin:0;
}

.premium-task-shell
.task-checklist-group-items{
  display:grid;
  gap:7px;
}

.premium-task-shell
.task-checklist-group-items
> small,
.premium-task-shell
.task-checklists-empty{
  padding:13px;
  border:1px dashed var(--border);
  border-radius:10px;
  background:var(--surface2);
  color:var(--muted);
  font-size:12px;
  text-align:center;
}

.premium-task-shell
.task-checklist-add-row{
  margin-top:1px;
}

.premium-task-shell
.task-checklist-add-row input,
.premium-task-shell
.task-checklist-create-panel input{
  min-width:0;
}

.premium-task-shell
.task-checklist-create-panel{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  margin-top:14px;
  padding:12px;
  border:1px dashed var(--border);
  border-radius:12px;
  background:var(--surface2);
}

.premium-task-shell
.task-checklist-create-panel.hidden{
  display:none!important;
}

.premium-task-shell
.task-checklist-section
.checklist-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.premium-task-shell
.task-checklist-section
#checklistCounter{
  flex:0 0 auto;
  color:var(--muted);
  font-size:12px;
  font-weight:750;
}


@media (max-width:768px){

  .premium-task-shell
  .task-checklist-section
  > .section-head{
    align-items:flex-start;
    gap:10px;
  }

  .premium-task-shell
  .task-checklist-section
  .checklist-head-actions{
    flex-wrap:wrap;
  }

  .premium-task-shell
  .task-checklist-group{
    padding:12px;
    border-radius:12px;
  }

  .premium-task-shell
  .task-checklist-group-heading
  strong{
    font-size:14px;
  }

  .premium-task-shell
  .task-checklist-add-row,
  .premium-task-shell
  .task-checklist-create-panel{
    grid-template-columns:1fr;
  }

  .premium-task-shell
  .task-checklist-add-row button,
  .premium-task-shell
  .task-checklist-create-panel button{
    width:100%;
  }

  .premium-task-shell
  .task-checklist-group-menu-popover{
    width:168px;
  }
}

/* =========================================================
   C8C.3D — CHECKLIST ITEM DELETE
   ========================================================= */

.premium-task-shell
.task-checklist-item-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px;
  gap:8px;
  align-items:center;
}

.premium-task-shell
.task-checklist-item-row
.check-item{
  min-width:0;
  margin:0;
}

.premium-task-shell
.task-checklist-item-delete{
  width:34px;
  height:34px;
  min-width:34px;
  min-height:34px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--border);
  border-radius:10px;
  background:transparent;
  color:var(--muted);
  font-size:20px;
  line-height:1;
  font-weight:700;
  cursor:pointer;
  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease,
    transform .15s ease;
}

.premium-task-shell
.task-checklist-item-delete:hover{
  color:#dc3f4f;
  border-color:
    color-mix(
      in srgb,
      #dc3f4f 52%,
      var(--border)
    );
  background:
    color-mix(
      in srgb,
      #dc3f4f 8%,
      transparent
    );
}

.premium-task-shell
.task-checklist-item-delete:active{
  transform:scale(.95);
}

.premium-task-shell
.task-checklist-item-delete:disabled{
  opacity:.5;
  cursor:wait;
}


@media(max-width:768px){

  .premium-task-shell
  .task-checklist-item-row{
    grid-template-columns:minmax(0,1fr) 32px;
    gap:7px;
  }

  .premium-task-shell
  .task-checklist-item-delete{
    width:32px;
    height:32px;
    min-width:32px;
    min-height:32px;
    border-radius:9px;
  }
}
