/*! Elite-Task | Copyright (C) 2026 SeyiDev | GPL-2.0-or-later */
/* ===== ELITE TASK v1.0 ===== */
@keyframes etmFadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes etmSlideIn{from{opacity:0;transform:scale(.95) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}
@keyframes etmToast{0%{opacity:0;transform:translateX(120%)}20%{opacity:1;transform:translateX(0)}80%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(120%)}}
@keyframes etmRow{from{background:#e8f0ff}to{background:transparent}}
/* ---- Scoping: plugin fits inside WP content area, never pushes page header ---- */
.etm-wrap,.etm-sc-wrap{--etm-blue:#2271b1;--etm-green:#2e7d32;--etm-orange:#e65100;--etm-red:#c62828;--etm-grey:#616161;--etm-radius:8px;--etm-shadow:0 4px 16px rgba(0,0,0,.1);}
.etm-sc-wrap{display:block;width:100%;max-width:100%;box-sizing:border-box;margin:0 !important;padding:0 !important;overflow-x:hidden;}
/* Ensure plugin never forces the page to grow vertically beyond its content */
.etm-sc-wrap *{box-sizing:border-box;}
.etm-wrap{box-sizing:border-box;}
.etm-anim-fadein{animation:etmFadeIn .4s ease both;}
.etm-anim-slidein{animation:etmSlideIn .3s ease both;}
.etm-anim-toast{animation:etmToast 3s ease forwards;}
.etm-anim-row{animation:etmRow 1.5s ease;}
.etm-btn-anim{transition:transform .15s,box-shadow .15s!important;}
.etm-btn-anim:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(0,0,0,.15)!important;}
/* ---- Core layout ---- */
.etm-wrap h1{font-size:22px;margin-bottom:20px;}
.etm-section-title,.etm-sc-subtitle{font-size:15px;color:#333;margin:18px 0 10px;padding-left:10px;border-left:4px solid var(--etm-blue);}
.etm-sc-title{font-size:22px;font-weight:700;color:var(--etm-blue);margin:0 0 18px;padding-bottom:10px;border-bottom:2px solid var(--etm-blue);}
/* ---- Stats ---- */
.etm-stats-row{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:22px;}
.etm-stat-card{flex:1;min-width:90px;background:#fff;border:1px solid #e0e0e0;border-radius:var(--etm-radius);padding:14px 10px;text-align:center;box-shadow:0 2px 6px rgba(0,0,0,.06);transition:transform .2s,box-shadow .2s;position:relative;overflow:hidden;}
.etm-stat-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;}
.etm-stat-total::before{background:var(--etm-blue);}.etm-stat-pending::before{background:var(--etm-grey);}
.etm-stat-prog::before{background:var(--etm-orange);}.etm-stat-done::before{background:var(--etm-green);}
.etm-stat-over::before{background:var(--etm-red);}.etm-stat-cancel::before{background:#9e9e9e;}
.etm-stat-approved::before{background:#1b5e20;}.etm-stat-rejected::before{background:#880e4f;}
.etm-stat-nc::before{background:#b71c1c;}
.etm-stat-card:hover{transform:translateY(-2px);box-shadow:var(--etm-shadow);}
.etm-stat-num{display:block;font-size:28px;font-weight:700;line-height:1.1;}
.etm-stat-lbl{display:block;font-size:10px;color:#777;text-transform:uppercase;letter-spacing:.5px;margin-top:4px;}
.etm-stat-total .etm-stat-num{color:var(--etm-blue);}.etm-stat-pending .etm-stat-num{color:var(--etm-grey);}
.etm-stat-prog .etm-stat-num{color:var(--etm-orange);}.etm-stat-done .etm-stat-num{color:var(--etm-green);}
.etm-stat-over .etm-stat-num{color:var(--etm-red);}.etm-stat-cancel .etm-stat-num{color:#9e9e9e;}
.etm-stat-approved .etm-stat-num{color:#1b5e20;}.etm-stat-rejected .etm-stat-num{color:#880e4f;}
.etm-stat-nc .etm-stat-num{color:#b71c1c;}
/* ---- Charts ---- */
.etm-charts-section{background:#fff;border:1px solid #e5e5e5;border-radius:var(--etm-radius);padding:18px;margin-bottom:22px;box-shadow:0 2px 8px rgba(0,0,0,.05);}
.etm-charts-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid #eee;}
.etm-charts-toolbar h3{margin:0;}
.etm-chart-filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.etm-chart-filters label{font-size:12px;font-weight:600;display:flex;flex-direction:column;gap:3px;}
.etm-chart-filters select{font-size:12px;padding:4px 8px;border:1px solid #ccc;border-radius:4px;}
.etm-chart-toggle{display:flex;gap:2px;background:#f5f7fa;border-radius:8px;padding:4px;margin-bottom:14px;flex-wrap:wrap;}
.etm-chart-tab{background:none;border:none;padding:7px 14px;font-size:12px;font-weight:600;color:#888;cursor:pointer;border-radius:6px;transition:all .2s;white-space:nowrap;}
.etm-chart-tab.active{background:#fff;color:var(--etm-blue);box-shadow:0 2px 6px rgba(0,0,0,.1);}
.etm-chart-tab:hover:not(.active){color:#555;background:rgba(255,255,255,.6);}
.etm-chart-single{background:#fafbfd;border:1px solid #eef0f4;border-radius:10px;padding:16px;min-height:300px;position:relative;}
.etm-chart-single canvas{width:100%!important;}
/* ---- Table ---- */
.etm-wrapper{background:#fff;border:1px solid #e5e5e5;border-radius:var(--etm-radius);padding:14px;margin-bottom:20px;box-shadow:0 2px 8px rgba(0,0,0,.05);}
.etm-table-scroll{overflow-x:auto;overflow-y:visible;}
.etm-table{width:max-content;min-width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed;}
.etm-table th{font-size:11px;text-transform:uppercase;background:#f5f7fa;padding:9px 10px;border-bottom:2px solid #ddd;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.etm-table td{padding:9px 10px;border-bottom:1px solid #f5f5f5;vertical-align:middle;transition:background .2s;overflow:hidden;}
.etm-table tr:hover td{background:#f0f6ff;}
.etm-row-overdue td{background:#fff8f8!important;}
.etm-no-tasks{text-align:center;color:#aaa;padding:25px!important;}
.etm-title-link{text-decoration:none;color:var(--etm-blue);font-weight:600;}
.etm-title-link:hover{text-decoration:underline;}
.etm-desc-cell{font-size:12px;line-height:1.5;word-break:break-word;white-space:normal;}
.etm-desc-cell a{color:var(--etm-blue);}
/* ---- Status badges ---- */
.etm-select{font-size:11px;padding:3px 10px;border-radius:20px;border:1px solid #ccc;font-weight:700;cursor:pointer;transition:background .2s;}
.etm-s-not_started{background:#f0f0f0;color:#555;}
.etm-s-in_progress{background:#fff3e0;color:var(--etm-orange);}
.etm-s-done{background:#e8f5e9;color:var(--etm-green);}
.etm-s-cancel{background:#fce4ec;color:var(--etm-red);}
.etm-s-not_completed{background:#fce4ec;color:var(--etm-red);}
.etm-status-badge{display:inline-block;font-size:11px;padding:3px 10px;border-radius:20px;font-weight:700;}
.etm-type-badge{display:inline-block;font-size:10px;padding:2px 8px;border-radius:20px;font-weight:700;}
.etm-type-single{background:#e8f4ff;color:var(--etm-blue);}
.etm-type-bulk{background:#fff3e0;color:var(--etm-orange);}
.etm-type-group{background:#f3e5f5;color:#7b1fa2;}
/* ---- Table toolbar ---- */
.etm-header-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;flex-wrap:wrap;gap:8px;}
.etm-tbl-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.etm-btn-save{font-size:12px;background:linear-gradient(135deg,var(--etm-blue),#1a5f9e);color:#fff;border:none;padding:8px 16px;border-radius:20px;cursor:pointer;font-weight:700;transition:all .2s;box-shadow:0 2px 6px rgba(34,113,177,.3);}
.etm-btn-save:hover:not(:disabled){background:linear-gradient(135deg,#1a5f9e,#155388);box-shadow:0 4px 12px rgba(34,113,177,.5);transform:translateY(-1px);}
.etm-btn-save:disabled{background:#b0bec5;cursor:default;box-shadow:none;transform:none;}
.etm-btn-export-csv{font-size:12px;background:#fff;color:var(--etm-blue);border:1.5px solid var(--etm-blue);padding:7px 14px;border-radius:20px;cursor:pointer;font-weight:700;transition:all .2s;}
.etm-btn-export-csv:hover{background:#e8f4ff;}
.etm-btn-export-pdf{font-size:12px;background:#fff;color:var(--etm-red);border:1.5px solid var(--etm-red);padding:7px 14px;border-radius:20px;cursor:pointer;font-weight:700;transition:all .2s;}
.etm-btn-export-pdf:hover{background:#fce4ec;}
.etm-btn-del{background:none;border:none;cursor:pointer;font-size:18px;padding:4px 7px;border-radius:6px;transition:all .2s;color:var(--etm-red);line-height:1;font-weight:700;}
.etm-btn-del:hover{background:#fce4ec;transform:scale(1.15);}
.etm-btn-edit{background:none;border:none;cursor:pointer;font-size:16px;padding:4px 7px;border-radius:6px;transition:all .2s;color:#1565c0;}
.etm-btn-edit:hover{background:#e3f2fd;transform:scale(1.15);}
.etm-btn-remind{background:none;border:none;cursor:pointer;font-size:16px;padding:4px 7px;border-radius:6px;transition:all .2s;color:var(--etm-orange);}
.etm-btn-remind:hover{background:#fff3e0;}
.etm-actions-cell{white-space:nowrap;}
.etm-feedback{font-size:12px;color:var(--etm-green);}
/* ---- Approval icons in Actions col ---- */
.etm-btn-approve-icon{background:#e8f5e9;color:#2e7d32;border:1.5px solid #a5d6a7;border-radius:50%;width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:13px;font-weight:700;transition:all .2s;vertical-align:middle;}
.etm-btn-approve-icon:hover{background:#c8e6c9;transform:scale(1.15);}
.etm-btn-reject-icon{background:#fce4ec;color:#c62828;border:1.5px solid #ef9a9a;border-radius:50%;width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:13px;font-weight:700;transition:all .2s;vertical-align:middle;}
.etm-btn-reject-icon:hover{background:#ffcdd2;transform:scale(1.15);}
/* ---- Approval badges ---- */
.etm-appr-badge{display:inline-block;font-size:11px;padding:3px 10px;border-radius:20px;font-weight:700;white-space:nowrap;}
.etm-appr-approved{background:#e8f5e9;color:#2e7d32;}
.etm-appr-rejected{background:#fce4ec;color:#c62828;}
.etm-appr-pending{background:#fff3e0;color:#e65100;}
.etm-comment-cell{max-width:160px;font-size:12px;color:#555;font-style:italic;line-height:1.4;word-break:break-word;}
/* ---- Table legend ---- */
.etm-table-legend{display:flex;gap:18px;font-size:11px;color:#888;padding:6px 0 10px;flex-wrap:wrap;}
.etm-legend-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:4px;font-size:13px;margin-right:4px;}
.etm-legend-clock{background:#fff3e0;color:var(--etm-orange);}
.etm-legend-del{background:#fce4ec;color:var(--etm-red);font-weight:700;}
/* ---- Filter bar ---- */
.etm-filter-bar{background:#f9f9f9;border:1px solid #e5e5e5;border-radius:var(--etm-radius);padding:12px 16px;margin-bottom:18px;}
.etm-filter-bar form{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;}
.etm-filter-bar label{font-size:12px;font-weight:600;display:flex;flex-direction:column;gap:3px;}
.etm-filter-bar select{font-size:12px;padding:4px 7px;border:1px solid #ccc;border-radius:4px;}
/* ---- Rich text editor ---- */
.etm-richtext-toolbar{border:1px solid #ccc;border-radius:6px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.06);}
.etm-toolbar{background:linear-gradient(to bottom,#f8f8f8,#efefef);border-bottom:1px solid #ddd;padding:6px 8px;display:flex;gap:3px;flex-wrap:wrap;align-items:center;}
.etm-toolbar button,.etm-toolbar select{background:#fff;border:1px solid #ccc;border-radius:3px;padding:3px 7px;cursor:pointer;font-size:12px;min-width:28px;color:#333;transition:background .15s,border-color .15s,color .15s;line-height:1.4;}
.etm-toolbar button:hover{background:#e8f4ff;border-color:var(--etm-blue);color:var(--etm-blue);}
.etm-toolbar button.etm-tb-active{background:#2271b1;border-color:#2271b1;color:#fff;}
.etm-toolbar select{padding:3px 5px;min-width:auto;}
.etm-rich-editor{min-height:120px;padding:10px 12px;font-size:13px;line-height:1.7;outline:none;font-family:-apple-system,BlinkMacSystemFont,sans-serif;}
.etm-rich-editor:empty:before{content:attr(placeholder);color:#bbb;pointer-events:none;}
.etm-rich-editor a{color:var(--etm-blue);text-decoration:underline;}
.etm-link-popup{position:absolute;background:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 4px 14px rgba(0,0,0,.15);padding:10px 12px;z-index:100000;min-width:280px;display:flex;gap:6px;align-items:center;}
.etm-link-popup input{flex:1;border:1px solid #ccc;border-radius:4px;padding:5px 8px;font-size:12px;}
.etm-link-popup button{font-size:12px;padding:5px 10px;border-radius:4px;cursor:pointer;border:none;}
.etm-link-popup .etm-link-ok{background:var(--etm-blue);color:#fff;}
.etm-link-popup .etm-link-cancel{background:#eee;color:#444;}
/* ---- Assign form ---- */
.etm-assign-form-wrap{margin-bottom:22px;}
.etm-form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px;margin-bottom:14px;}
.etm-form-row{display:flex;flex-direction:column;gap:5px;}
.etm-form-full{grid-column:1/-1;}
.etm-form-row label{font-size:12px;font-weight:600;color:#444;}
.etm-form-row input,.etm-form-row select{border:1px solid #ccc;border-radius:5px;padding:7px 10px;font-size:13px;width:100%;box-sizing:border-box;transition:border-color .2s;}
.etm-form-row input:focus,.etm-form-row select:focus{border-color:var(--etm-blue);outline:none;}
.etm-req{color:var(--etm-red);}
.etm-bulk-wrap{background:#f9f9f9;border:1px solid #e5e5e5;border-radius:var(--etm-radius);padding:14px;margin:12px 0;}
.etm-user-checkbox-list{max-height:220px;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;}
.etm-user-chk-item{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#fff;border:1px solid #e5e5e5;border-radius:6px;cursor:pointer;transition:background .15s,border-color .15s;}
.etm-user-chk-item:hover{background:#e8f4ff;border-color:var(--etm-blue);}
.etm-user-chk-item input{width:auto;}
.etm-user-role-tag{font-size:10px;color:#888;margin-left:auto;}
/* ---- Mode tabs ---- */
.etm-mode-tabs{display:flex;gap:0;border-bottom:2px solid #e5e5e5;margin-bottom:4px;}
.etm-mode-tab{background:none;border:none;padding:10px 20px;font-size:13px;font-weight:600;color:#888;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;transition:color .2s,border-color .2s;border-radius:6px 6px 0 0;}
.etm-mode-tab.active{color:var(--etm-blue);border-bottom-color:var(--etm-blue);}
.etm-mode-tab:hover{color:var(--etm-blue);}
/* ---- Modal ---- */
.etm-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(15,25,50,.6);z-index:999999;display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(4px);animation:etmFadeIn .2s ease;overflow-y:auto;}
.etm-modal-box{background:#fff;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.25);width:100%;max-width:720px;max-height:92vh;overflow-y:auto;display:flex;flex-direction:column;margin:auto;}
.etm-modal-sm{max-width:480px;}
.etm-modal-wide{max-width:860px;}
/* Responsive modal */
@media(max-width:900px){.etm-modal-wide{max-width:98vw;}}
@media(max-width:700px){
  .etm-modal-box{max-width:100%;border-radius:10px;max-height:95vh;}
  .etm-modal-header{padding:14px 16px;}
  .etm-modal-body{padding:12px 14px;}
  .etm-form-grid{grid-template-columns:1fr!important;}
  .etm-form-row.etm-form-full{grid-column:1!important;}
  .etm-mode-tabs{flex-wrap:wrap;}
  .etm-mode-tab{flex:1 1 auto;font-size:12px;padding:7px 10px;}
  .etm-modal-footer{flex-wrap:wrap;}
  .etm-user-checkbox-list{max-height:180px;}
}
@media(max-width:480px){
  .etm-modal-overlay{padding:8px;}
  .etm-modal-box{border-radius:8px;max-height:97vh;}
  .etm-modal-header h2{font-size:15px;}
  .etm-btn-primary,.etm-btn-secondary{width:100%;justify-content:center;}
  .etm-modal-footer{flex-direction:column;gap:8px;}
  .etm-excel-tabs{overflow-x:auto;}
}
.etm-modal-header{display:flex;justify-content:space-between;align-items:center;padding:20px 24px 16px;border-bottom:1px solid #eee;background:linear-gradient(135deg,#f8fbff,#fff);border-radius:14px 14px 0 0;}
.etm-modal-header h2{margin:0;font-size:18px;}
.etm-modal-close{background:none;border:none;font-size:24px;cursor:pointer;color:#777;line-height:1;transition:color .2s;}
.etm-modal-close:hover{color:var(--etm-red);}
.etm-modal-body{padding:20px 24px;}
.etm-modal-body #etm-modal-submit{width:100%;padding:12px;font-size:14px;margin-top:4px;}
.etm-modal-footer{display:flex;align-items:center;gap:12px;margin-top:16px;padding:16px 0 0;border-top:1px solid #eee;}
/* ---- Buttons ---- */
.etm-btn-primary{background:linear-gradient(135deg,#2271b1,#1a5f9e);color:#fff;border:none;padding:10px 24px;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:all .2s;box-shadow:0 2px 8px rgba(34,113,177,.3);}
.etm-btn-primary:hover{background:linear-gradient(135deg,#1a5f9e,#155388);transform:translateY(-1px);}
.etm-btn-secondary{background:#f0f0f0;color:#444;border:none;padding:10px 20px;border-radius:6px;font-size:13px;cursor:pointer;transition:background .2s;}
.etm-btn-secondary:hover{background:#e0e0e0;}
.etm-form-msg{font-size:12px;}.etm-form-msg.ok{color:var(--etm-green);}.etm-form-msg.err{color:var(--etm-red);}
.etm-hint{font-size:11px;color:#999;margin:2px 0 0;}
/* ---- Comment textarea ---- */
.etm-comment-textarea{width:100%;border:1px solid #ccc;border-radius:5px;padding:10px;font-size:13px;min-height:90px;box-sizing:border-box;resize:vertical;}
/* ---- Toast notification ---- */
.etm-toast{position:fixed;bottom:30px;right:30px;background:#2e7d32;color:#fff;padding:14px 20px;border-radius:8px;font-size:14px;font-weight:600;z-index:9999999;display:flex;align-items:center;gap:10px;box-shadow:var(--etm-shadow);}
.etm-toast-icon{font-size:18px;}
/* ---- Notification popup ---- */
.etm-notify-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:99999;display:flex;align-items:center;justify-content:center;padding:20px;}
.etm-notify-box{background:#fff;border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.2);width:100%;max-width:520px;max-height:85vh;overflow-y:auto;}
.etm-notify-header{display:flex;align-items:center;gap:12px;padding:20px 24px 16px;border-bottom:1px solid #eee;}
.etm-notify-header h3{margin:0;font-size:18px;flex:1;}
.etm-notify-icon{font-size:26px;}
.etm-notify-close{background:none;border:none;font-size:24px;cursor:pointer;color:#777;}
.etm-notify-body{padding:16px 24px 20px;}
.etm-notify-item{display:flex;gap:14px;align-items:flex-start;padding:14px 0;border-bottom:1px solid #f5f5f5;animation:etmFadeIn .4s ease both;}
.etm-notify-item:last-child{border-bottom:none;}
.etm-notify-icon-wrap{font-size:22px;flex-shrink:0;}
.etm-notify-content{flex:1;}.etm-notify-content strong{display:block;font-size:14px;margin-bottom:4px;}.etm-notify-content p{margin:0;font-size:13px;color:#555;}
.etm-notify-actions{display:flex;flex-direction:column;gap:6px;flex-shrink:0;}
.etm-notify-btn-primary{background:var(--etm-blue);color:#fff;border:none;padding:7px 14px;border-radius:5px;font-size:12px;font-weight:600;cursor:pointer;text-decoration:none;text-align:center;transition:background .2s;}
.etm-notify-btn-primary:hover{background:#1a5f9e;color:#fff;}
.etm-notify-btn-read{background:#f5f5f5;color:#555;border:none;padding:7px 14px;border-radius:5px;font-size:12px;cursor:pointer;transition:background .2s;}
.etm-notify-btn-read:hover{background:#e0e0e0;}
/* ---- User cards ---- */
.etm-user-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px;margin-bottom:22px;}
.etm-user-card{background:#fff;border:1px solid #e5e5e5;border-radius:8px;padding:14px;display:flex;align-items:center;gap:10px;box-shadow:0 2px 6px rgba(0,0,0,.05);}
.etm-user-card-info{flex:1;}
.etm-user-mini-stats{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px;}
.etm-ms{font-size:10px;padding:2px 7px;border-radius:10px;font-weight:600;}
.etm-ms-total{background:#e8f4ff;color:var(--etm-blue);}
.etm-ms-done{background:#e8f5e9;color:var(--etm-green);}
.etm-ms-prog{background:#fff3e0;color:var(--etm-orange);}
.etm-ms-over{background:#fce4ec;color:var(--etm-red);}
/* ---- Settings ---- */
.etm-settings-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px;margin-top:20px;}
.etm-settings-card{background:#fff;border:1px solid #e5e5e5;border-radius:8px;padding:20px;box-shadow:0 2px 6px rgba(0,0,0,.05);}
.etm-settings-card h3{margin:0 0 12px;font-size:15px;}
.etm-settings-danger{border-color:#ffcdd2;background:#fff8f8;}
.etm-settings-danger h3{color:var(--etm-red);}
.etm-settings-btns{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;}
/* ---- Wizard ---- */
.etm-wizard-wrap{max-width:920px;}
.etm-wizard-hero{background:linear-gradient(135deg,#1a3a5c,#2271b1);color:#fff;padding:28px 30px;border-radius:12px;margin-bottom:28px;box-shadow:var(--etm-shadow);}
.etm-wizard-hero h1{color:#fff;font-size:26px;margin:0 0 8px;}
.etm-wizard-hero p{margin:0;color:rgba(255,255,255,.88);}
.etm-steps{display:flex;align-items:center;margin-bottom:28px;}
.etm-step{display:flex;flex-direction:column;align-items:center;gap:5px;opacity:.4;transition:opacity .3s;}
.etm-step.active,.etm-step.done{opacity:1;}
.etm-step-num{width:36px;height:36px;border-radius:50%;background:#ccc;color:#fff;font-weight:700;font-size:16px;display:flex;align-items:center;justify-content:center;transition:background .3s;}
.etm-step.active .etm-step-num{background:var(--etm-blue);}
.etm-step.done .etm-step-num{background:var(--etm-green);}
.etm-step-lbl{font-size:12px;color:#555;white-space:nowrap;}
.etm-step.active .etm-step-lbl{color:var(--etm-blue);font-weight:600;}
.etm-step-divider{flex:1;height:2px;background:#e0e0e0;margin:0 6px;margin-bottom:18px;}
.etm-wizard-panel{display:none;background:#fff;border:1px solid #e5e5e5;border-radius:var(--etm-radius);padding:26px;box-shadow:0 2px 8px rgba(0,0,0,.05);}
.etm-wizard-panel.active{display:block;}
.etm-wizard-panel h2{margin-top:0;font-size:18px;border-bottom:1px solid #eee;padding-bottom:12px;}
.etm-role-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;margin:18px 0;}
.etm-role-card{border:2px solid #e0e0e0;border-radius:var(--etm-radius);cursor:pointer;display:block;transition:border-color .2s,background .2s,transform .2s;}
.etm-role-card:hover{transform:translateY(-2px);box-shadow:var(--etm-shadow);}
.etm-role-card input{display:none;}
.etm-role-card-inner{padding:14px;}
.etm-role-name{display:block;font-weight:700;font-size:14px;margin-bottom:3px;}
.etm-role-slug{display:block;font-size:11px;color:#888;font-family:monospace;margin-bottom:8px;}
.etm-role-pages-list{display:flex;flex-direction:column;gap:3px;}
.etm-role-pages-list span{font-size:11px;color:#555;}
.etm-role-pages-list code{font-size:10px;background:#f5f5f5;padding:2px 6px;border-radius:3px;}
.etm-badge-done{background:var(--etm-green);color:#fff;font-size:10px;padding:2px 6px;border-radius:3px;margin-left:6px;font-weight:600;}
.etm-role-done{border-color:var(--etm-green)!important;background:#f0fff4!important;}
.etm-wizard-option{background:#f9f9f9;border:1px solid #e5e5e5;border-radius:6px;padding:14px;margin:12px 0;}
.etm-wizard-option label{cursor:pointer;display:flex;gap:10px;align-items:flex-start;}
.etm-assign-block{background:#f9f9f9;border:1px solid #e5e5e5;border-radius:6px;padding:14px;margin-bottom:12px;}
.etm-assign-block h4{margin:0 0 8px;}
.etm-user-select{min-height:110px;width:100%;border:1px solid #ccc;border-radius:5px;}
.etm-pages-preview{background:#f9f9f9;border:1px solid #e5e5e5;border-radius:6px;padding:18px;margin-bottom:18px;font-size:13px;}
.etm-progress-bar{background:#eee;border-radius:20px;height:12px;overflow:hidden;}
.etm-progress-fill{background:linear-gradient(90deg,var(--etm-blue),var(--etm-green));height:100%;border-radius:20px;transition:width .4s ease;width:0%;}
.etm-summary-block{margin-bottom:24px;}
.etm-summary-block h3{background:#f5f7fa;padding:8px 12px;border-radius:6px;margin:0 0 8px;}
.etm-wizard-nav{margin-top:22px;display:flex;gap:10px;}
/* ---- Expired tasks ---- */
/* ---- Settings ---- */
.etm-settings-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px;margin-top:20px;}
.etm-settings-card{background:#fff;border:1px solid #e5e5e5;border-radius:8px;padding:20px;box-shadow:0 2px 6px rgba(0,0,0,.05);}
.etm-settings-card h3{margin:0 0 14px;font-size:15px;}
.etm-settings-danger{border-color:#ffcdd2;background:#fff8f8;}
.etm-settings-danger h3{color:var(--etm-red);}
.etm-settings-btns{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;}
.etm-stab-nav{display:flex;gap:0;flex-wrap:wrap;border-bottom:2px solid #e5e5e5;margin-bottom:20px;}
.etm-stab{background:none;border:none;border-bottom:3px solid transparent;padding:10px 16px;font-size:13px;font-weight:600;color:#777;cursor:pointer;margin-bottom:-2px;transition:color .2s,border-color .2s;border-radius:6px 6px 0 0;}
.etm-stab:hover{color:var(--etm-blue);}
.etm-stab.active{color:var(--etm-blue);border-bottom-color:var(--etm-blue);background:#f5f9ff;}
.etm-stab-panel{display:none;}
.etm-stab-panel.active{display:block;}
.etm-sfield-row{display:flex;flex-direction:column;gap:4px;margin-bottom:12px;}
.etm-sfield-row label{font-size:12px;font-weight:600;color:#555;}
.etm-sfield-row input[type=text],.etm-sfield-row input[type=number]{border:1px solid #ccc;border-radius:5px;padding:7px 10px;font-size:13px;width:100%;box-sizing:border-box;}
.etm-sfield-row input[type=text]:focus,.etm-sfield-row input[type=number]:focus{border-color:var(--etm-blue);outline:none;}
.etm-small-num{max-width:100px !important;}
.etm-color-wrap{display:flex;gap:8px;align-items:center;}
.etm-color-wrap input[type=color]{width:44px;height:38px;border:1px solid #ccc;border-radius:5px;padding:2px;cursor:pointer;}
.etm-color-wrap .etm-color-text{flex:1;}
.etm-preview-btn{display:inline-block;padding:9px 22px;font-size:13px;font-weight:600;border-radius:6px;margin-top:8px;cursor:default;border:none;box-shadow:0 2px 6px rgba(0,0,0,.12);}
.etm-settings-save-bar{margin-top:24px;padding:16px 20px;background:#f0f7ff;border:1px solid #c0d8f0;border-radius:8px;display:flex;align-items:center;gap:14px;}

/* ---- Role Access Settings ---- */
.etm-role-access-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:20px;margin-top:16px;}
.etm-ra-card h3{font-size:14px;margin:0 0 6px;}
.etm-ra-desc{font-size:12px;color:#777;margin:0 0 14px;line-height:1.5;}
.etm-ra-roles{display:flex;flex-direction:column;gap:8px;}
.etm-ra-role-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid #e5e5e5;border-radius:6px;cursor:pointer;transition:background .15s,border-color .15s;}
.etm-ra-role-item:hover{background:#f0f6ff;border-color:#2271b1;}
.etm-ra-role-item input[type=checkbox]{width:16px;height:16px;accent-color:#2271b1;cursor:pointer;flex-shrink:0;}
.etm-ra-admin{background:#f9f9f9;cursor:default!important;opacity:.75;}
.etm-ra-admin:hover{background:#f9f9f9!important;border-color:#e5e5e5!important;}
.etm-ra-role-badge{font-size:12px;font-weight:600;background:#e8f4ff;color:#2271b1;padding:3px 10px;border-radius:20px;white-space:nowrap;}
.etm-ra-admin-badge{background:#f5f5f5;color:#888;}
.etm-ra-role-item input:checked ~ .etm-ra-role-badge{background:#2271b1;color:#fff;}

/* ---- Responsive table ---- */
@media(max-width:900px){
  .etm-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .etm-table{min-width:700px;}
  .etm-filter-bar form{flex-wrap:wrap;gap:8px;}
  .etm-filter-bar label{flex:1 1 140px;}
  .etm-stat-cards{grid-template-columns:repeat(2,1fr)!important;}
}
@media(max-width:600px){
  .etm-stat-cards{grid-template-columns:1fr!important;}
  .etm-assign-form-wrap>div{flex-direction:column;}
  .etm-assign-form-wrap button{width:100%;text-align:center;}
  .etm-filter-bar label{flex:1 1 100%;}
  .etm-sc-wrap{padding:8px!important;}
}

/* ---- Completed history section ---- */
.etm-section-done{color:#2e7d32;border-left:4px solid #66bb6a;padding-left:10px;}
.etm-section-done::before{content:"";display:inline;}

/* ---- Reassign button in edit modal ---- */
#etm-reassign-submit{transition:all .2s;}
#etm-reassign-submit:hover{background:#bf360c!important;transform:scale(1.02);}
#etm-edit-reassign-note{animation:etmFadeIn .3s ease;}

/* ---- Google Drive folder link (table cell) ---- */
.etm-folder-link{
    display:inline-flex;align-items:center;gap:4px;
    color:#4285f4;font-size:11px;font-weight:600;
    text-decoration:none;white-space:nowrap;
    background:#e8f0fe;border-radius:4px;padding:2px 7px;
    border:1px solid #c5d9f8;transition:background .15s;
}
.etm-folder-link:hover{background:#d2e3fc;color:#1a56c4;}

/* ---- Drive fields in assign modal & task row ---- */
#etm-gdrive-fields,.etm-tr-drive-wrap{
    border:1px solid #e3f2fd;border-radius:8px;
    padding:14px;background:#f8fbff;
}
#etm-gdrive-options,.etm-tr-gdrive-options{margin-top:10px;}

/* ---- Export popup button ---- */
.etm-btn-export-pdf-popup{
    background:#2271b1;color:#fff;border:none;
    padding:7px 14px;border-radius:5px;
    cursor:pointer;font-size:13px;font-weight:600;
    transition:background .15s;
}
.etm-btn-export-pdf-popup[data-mode="drive"]{background:#4285f4;}
.etm-btn-export-pdf-popup:hover{opacity:.88;}

/* ---- Google Drive Settings tab ---- */
#etm-gdrive-test-btn,#etm-gdrive-save-btn{min-width:160px;}
#etm-gdrive-status{font-size:13px;}

/* ---- Export popup scope grid ---- */
#etm-export-popup .etm-modal-box{max-width:520px;}

/* ===== UPDATE v1.4: Blue Task Table ===== */
.etm-table-blue th{background:linear-gradient(135deg,#1565c0,#1976d2)!important;color:#fff!important;font-size:11px;text-transform:uppercase;padding:10px 12px;border-bottom:2px solid #0d47a1;white-space:nowrap;}
.etm-table-blue td{padding:10px 12px;border-bottom:1px solid #e3f2fd;vertical-align:middle;}
.etm-table-blue tr:hover td{background:#e8f0fe!important;}
.etm-table-blue th,.etm-table-blue td{width:auto;min-width:0;box-sizing:border-box;}
.etm-table-scroll-blue{overflow-x:auto;overflow-y:visible;scrollbar-color:#90caf9 #e3f2fd;position:relative;}
.etm-table-scroll-blue::-webkit-scrollbar{height:10px;}
.etm-table-scroll-blue::-webkit-scrollbar-track{background:#e3f2fd;border-radius:5px;}
.etm-table-scroll-blue::-webkit-scrollbar-thumb{background:#90caf9;border-radius:5px;}
.etm-table-scroll-blue::-webkit-scrollbar-thumb:hover{background:#64b5f6;}
/* Duplicate scrollbar at top via JS clone */
.etm-table-scroll-top{overflow-x:auto;scrollbar-color:#90caf9 #e3f2fd;margin-bottom:4px;}
.etm-table-scroll-top::-webkit-scrollbar{height:10px;}
.etm-table-scroll-top::-webkit-scrollbar-track{background:#e3f2fd;border-radius:5px;}
.etm-table-scroll-top::-webkit-scrollbar-thumb{background:#90caf9;border-radius:5px;}
.etm-table-scroll-top::-webkit-scrollbar-thumb:hover{background:#64b5f6;}
.etm-table-scroll-top>div{height:1px;}

/* ---- Bulk select ---- */
.etm-th-check,.etm-td-check{width:36px!important;min-width:36px!important;max-width:36px!important;text-align:center!important;padding:8px 4px!important;}
.etm-th-check input,.etm-td-check input{width:16px;height:16px;accent-color:#1565c0;cursor:pointer;}
.etm-row-select:checked ~ *{background:transparent;}
tr.etm-row-selected td{background:#e3f2fd!important;}
.etm-bulk-actions-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:6px 10px;background:#e3f2fd;border-radius:8px;animation:etmFadeIn .3s ease;}

/* ===== Task Performance Page ===== */
.etm-tpr-staff-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px;margin-top:12px;}
.etm-tpr-staff-card{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid #e5e5e5;border-radius:10px;padding:16px;box-shadow:0 2px 6px rgba(0,0,0,.05);transition:transform .2s,box-shadow .2s;}
.etm-tpr-staff-card:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0,0,0,.1);}
.etm-tpr-staff-avatar img{border-radius:50%;width:48px;height:48px;}
.etm-tpr-staff-info{flex:1;display:flex;flex-direction:column;gap:2px;}
.etm-tpr-staff-info strong{font-size:14px;color:#222;}
.etm-tpr-staff-info small{font-size:11px;color:#888;}
.etm-tpr-task-count{font-size:11px;color:#1565c0;font-weight:600;background:#e3f2fd;padding:2px 8px;border-radius:10px;display:inline-block;margin-top:2px;width:fit-content;}

/* ---- Performance Report Printable ---- */
.etm-tpr-report{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#222;line-height:1.6;}
.etm-tpr-report-header{text-align:center;padding-bottom:16px;border-bottom:3px solid #1565c0;margin-bottom:20px;}
.etm-tpr-report-header img{max-height:70px;margin-bottom:10px;}
.etm-tpr-report-header h2{margin:0;font-size:20px;color:#1565c0;letter-spacing:1px;}
.etm-tpr-report-header p{margin:4px 0 0;font-size:12px;color:#888;}
.etm-tpr-scores{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin:18px 0;}
.etm-tpr-score-card{background:#f5f9ff;border:1px solid #dce8f8;border-radius:8px;padding:12px;text-align:center;}
.etm-tpr-score-num{display:block;font-size:24px;font-weight:700;}
.etm-tpr-score-lbl{display:block;font-size:10px;color:#888;text-transform:uppercase;margin-top:2px;}
.etm-tpr-grade{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:50%;font-size:26px;font-weight:800;color:#fff;margin:0 auto 6px;}
.etm-tpr-grade-A{background:#2e7d32;}.etm-tpr-grade-B{background:#1565c0;}.etm-tpr-grade-C{background:#e65100;}.etm-tpr-grade-D{background:#c62828;}.etm-tpr-grade-F{background:#880e4f;}
.etm-tpr-task-table{width:100%;border-collapse:collapse;font-size:12px;margin:14px 0;}
.etm-tpr-task-table th{background:#1565c0;color:#fff;padding:8px 10px;text-align:left;font-size:11px;text-transform:uppercase;}
.etm-tpr-task-table td{padding:8px 10px;border-bottom:1px solid #e0e0e0;}
.etm-tpr-task-table tr:nth-child(even) td{background:#f9fafe;}
.etm-tpr-speed-good{color:#2e7d32;font-weight:600;}.etm-tpr-speed-bad{color:#c62828;font-weight:600;}
.etm-tpr-signature{margin-top:30px;text-align:right;padding-top:20px;border-top:2px solid #e0e0e0;}
.etm-tpr-signature img{max-height:50px;margin-bottom:4px;}
.etm-tpr-message{background:#f5f9ff;border-left:4px solid #1565c0;padding:12px 16px;margin:16px 0;font-size:13px;color:#555;border-radius:0 6px 6px 0;}

@media print{
    .etm-modal-overlay{position:static!important;background:none!important;}
    .etm-modal-box{max-width:100%!important;box-shadow:none!important;border:none!important;max-height:none!important;}
    .etm-modal-header,.etm-modal-footer{display:none!important;}
    .etm-tpr-report{padding:0!important;}
    .etm-tpr-scores{grid-template-columns:repeat(5,1fr)!important;}
}


/* ===== UPDATE v1.7: status-gated Drive folders ===== */
.etm-folder-locked{display:inline-flex;flex-direction:column;gap:1px;max-width:170px;opacity:.42;filter:grayscale(1);cursor:not-allowed;pointer-events:auto;font-size:11px;font-weight:600;color:#607d8b;line-height:1.25;user-select:none;padding:4px 6px;border:1px dashed #b0bec5;border-radius:6px;background:#f5f7f8;}
.etm-folder-locked small{font-size:9px;font-weight:500;color:#78909c;}
.etm-folder-link{display:inline-block;font-size:11px;font-weight:600;word-break:break-word;}

/* Nested Google Drive folder selectors */
.etm-folder-cascade{display:flex;flex-direction:column;gap:7px;margin-top:7px;}
.etm-folder-level{display:grid;grid-template-columns:92px 1fr;gap:8px;align-items:center;}
.etm-folder-level label{font-size:11px;color:#607d8b;font-weight:600;}
.etm-folder-level-select{width:100%;padding:7px 9px;border:1px solid #b0bec5;border-radius:6px;background:#fff;font-size:12px;box-sizing:border-box;}
.etm-folder-cascade-loading,.etm-folder-cascade-empty,.etm-folder-cascade-error{font-size:11px;padding:7px 9px;border-radius:5px;}
.etm-folder-cascade-loading{background:#eef6ff;color:#1565c0;}
.etm-folder-cascade-empty{background:#f5f5f5;color:#777;}
.etm-folder-cascade-error{background:#ffebee;color:#c62828;}
.etm-gdrive-location-options{display:flex;gap:12px;flex-wrap:wrap;margin:8px 0;}
.etm-gdrive-location-options label{font-size:12px;display:flex;align-items:center;gap:5px;cursor:pointer;}

/* Expanded rich-text controls */
.etm-toolbar{display:flex;align-items:center;gap:4px;flex-wrap:wrap;}
.etm-toolbar select{height:28px;min-width:82px;border:1px solid #ccd5dd;border-radius:4px;background:#fff;font-size:11px;padding:2px 4px;}
.etm-toolbar .etm-toolbar-color{width:31px;height:28px;padding:2px;border:1px solid #ccd5dd;border-radius:4px;background:#fff;cursor:pointer;}
.etm-rich-editor img{max-width:100%;height:auto;border-radius:4px;}
.etm-image-popup{display:flex;gap:5px;align-items:center;position:absolute;z-index:25;background:#fff;border:1px solid #ccd5dd;border-radius:6px;padding:7px;box-shadow:0 4px 14px rgba(0,0,0,.16);min-width:310px;}
.etm-image-popup input{flex:1;min-width:180px;}

/* Documentation page */
.etm-doc-wrap{max-width:1180px;}
.etm-doc-hero{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 24px;background:linear-gradient(135deg,#0d47a1,#1976d2);color:#fff;border-radius:12px;margin:18px 0;box-shadow:0 8px 24px rgba(13,71,161,.22);}
.etm-doc-hero h1{color:#fff!important;margin:0 0 6px!important;}
.etm-doc-hero p{margin:0;color:#e3f2fd;}
.etm-doc-actions{display:flex;gap:8px;flex-wrap:wrap;}
.etm-doc-toc{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:#fff;border:1px solid #dce8f8;border-radius:8px;padding:12px 16px;margin-bottom:18px;}
.etm-doc-section{background:#fff;border:1px solid #e1e8ef;border-radius:10px;padding:20px 22px;margin-bottom:18px;box-shadow:0 2px 8px rgba(0,0,0,.04);}
.etm-doc-section h2{margin-top:0;color:#1565c0;}
.etm-doc-section li{margin-bottom:8px;line-height:1.6;}
.etm-doc-grid{display:grid;grid-template-columns:1fr;gap:18px;}
.etm-doc-card{display:grid;grid-template-columns:minmax(300px,46%) 1fr;gap:20px;align-items:start;border:1px solid #e0e8f0;border-radius:10px;padding:14px;background:#fbfdff;}
.etm-doc-card img{display:block;width:100%;height:auto;border:1px solid #cfd8e3;border-radius:7px;background:#fff;}
.etm-doc-card h3{margin:4px 0 8px;color:#0d47a1;}
.etm-doc-card p{line-height:1.65;}
@media(max-width:800px){.etm-doc-hero,.etm-doc-card{display:block}.etm-doc-actions{margin-top:14px}.etm-doc-card img{margin-bottom:14px}.etm-folder-level{grid-template-columns:1fr;gap:3px}}
@media print{#adminmenumain,#wpadminbar,#wpfooter,.notice,.etm-doc-actions,.etm-doc-toc{display:none!important}.etm-doc-wrap{margin:0!important;max-width:none!important}.etm-doc-hero{background:#fff!important;color:#111!important;box-shadow:none;border:1px solid #ccc}.etm-doc-hero h1,.etm-doc-hero p{color:#111!important}.etm-doc-section{box-shadow:none;break-inside:avoid}.etm-doc-card{break-inside:avoid}#wpcontent{margin-left:0!important}}

/* Drive assignment panel */
.etm-gdrive-assignment-box,.etm-tr-drive-wrap{margin-top:14px;padding:14px 16px;background:#f7fbff;border:1px solid #cfe2f5;border-left:4px solid #4285f4;border-radius:8px;box-sizing:border-box;}
.etm-gdrive-box-title{display:block;margin:0 0 9px;font-size:13px;font-weight:700;color:#174ea6;}
.etm-gdrive-help{margin:5px 0 8px;font-size:12px;font-weight:600;color:#3c4043;}
.etm-gdrive-field-label{display:block;margin:9px 0 5px;font-size:12px;font-weight:600;color:#3c4043;}
.etm-gdrive-note{display:block;margin-top:6px;font-size:10px;line-height:1.45;color:#6b7785;}
.etm-gdrive-assignment-box input[type=text],.etm-tr-drive-wrap input[type=text]{width:100%;max-width:100%;padding:8px 10px;border:1px solid #b7c5d3;border-radius:6px;box-sizing:border-box;}
.etm-tr-gdrive-options{padding-top:4px;}
@media(max-width:600px){.etm-gdrive-location-options{flex-direction:column;gap:7px}.etm-image-popup{position:fixed;left:12px;right:12px;bottom:20px;min-width:0}}

/* Google Drive folder hierarchy refinements — v1.7.2 */
.etm-folder-level{position:relative;padding:9px 10px;background:#fff;border:1px solid #d9e3ec;border-radius:7px;}
.etm-folder-level:first-of-type{border-color:#8ab4f8;background:#f8fbff;}
.etm-folder-level label{font-size:11px;color:#40566b;font-weight:700;}
.etm-folder-level-select:disabled{opacity:.65;cursor:wait;background:#f5f7f9;}
.etm-folder-no-children{font-size:11px;color:#657786;padding:6px 9px;background:#f5f7f9;border-radius:5px;}
.etm-folder-selected-path{font-size:11px;font-weight:600;color:#174ea6;padding:7px 9px;background:#eaf2ff;border-left:3px solid #4285f4;border-radius:4px;word-break:break-word;}

.etm-edit-assigned-users{max-height:190px;overflow-y:auto;padding:9px;background:#fff;border:1px solid #d9e2ea;border-radius:7px;}
.etm-folder-locked:focus{outline:2px solid #c62828;outline-offset:2px;}

/* =============================================================
   ROUTINE TASKS — v1.9.0
============================================================= */
.etm-routine-wrap{max-width:1600px}
.etm-routine-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 18px}
.etm-routine-header h1,.etm-routine-header h2{margin:0 0 5px}
.etm-routine-header p{margin:0;color:#64748b}
.etm-routine-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 20px;border-bottom:1px solid #dbe3ec;padding-bottom:10px}
.etm-routine-tabs a{display:inline-flex;padding:9px 15px;border-radius:7px;text-decoration:none;background:#f1f5f9;color:#334155;font-weight:700}
.etm-routine-tabs a.active{background:#2271b1;color:#fff}
.etm-routine-template-card,.etm-routine-export-card{background:#fff;border:1px solid #dbe3ec;border-radius:10px;padding:18px;margin:0 0 18px;box-shadow:0 2px 8px rgba(15,23,42,.05)}
.etm-routine-template-card h2,.etm-routine-export-card h2{margin:0 0 5px;font-size:18px}
.etm-routine-template-card>p{color:#64748b;margin:0 0 15px}
.etm-routine-form-grid{display:grid;grid-template-columns:minmax(220px,2fr) minmax(150px,1fr) minmax(190px,1fr);gap:14px}
.etm-routine-form-grid label,.etm-routine-filter-bar label,.etm-routine-export-controls label{display:flex;flex-direction:column;gap:5px;font-weight:600;color:#334155}
.etm-routine-form-grid input,.etm-routine-form-grid select,.etm-routine-form-grid textarea,.etm-routine-filter-bar select,.etm-routine-filter-bar input,.etm-routine-export-controls select,.etm-routine-export-controls input{width:100%;min-height:38px;border:1px solid #cbd5e1;border-radius:6px;padding:7px 9px;background:#fff}
.etm-routine-full{grid-column:1/-1}
.etm-routine-form-actions{display:flex;align-items:center;gap:10px;margin-top:14px;flex-wrap:wrap}
.etm-routine-form-message,.etm-routine-row-message,.etm-routine-export-message{font-size:12px;font-weight:600;margin:4px 0 0;display:block}
.etm-routine-form-message.ok,.etm-routine-row-message.ok,.etm-routine-export-message.ok{color:#15803d}
.etm-routine-form-message.err,.etm-routine-row-message.err,.etm-routine-export-message.err{color:#b91c1c}
.etm-routine-filter-bar{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid #dbe3ec;border-radius:9px;padding:13px;margin:0 0 16px}
.etm-routine-filter-bar label{min-width:150px;font-size:12px}
.etm-routine-table-wrap{width:100%;overflow:auto;background:#fff;border:1px solid #dbe3ec;border-radius:9px}
.etm-routine-table{border:0!important;min-width:1050px}
.etm-routine-table th{white-space:nowrap;background:#f8fafc!important;color:#334155;font-weight:700}
.etm-routine-table td{vertical-align:top;padding:12px 10px!important}
.etm-routine-table select,.etm-routine-table input[type=date],.etm-routine-table input[type=number],.etm-routine-table textarea{width:100%;min-width:120px;border:1px solid #cbd5e1;border-radius:5px;padding:6px;background:#fff}
.etm-routine-description{margin-top:6px;color:#64748b;font-size:12px;line-height:1.45;max-width:480px}
.etm-routine-description p{margin:0 0 5px}
.etm-routine-template-actions{margin-top:7px;font-size:12px}
.etm-routine-frequency,.etm-routine-status,.etm-routine-admin-status{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:700;white-space:nowrap}
.etm-routine-frequency-daily{background:#dbeafe;color:#1d4ed8}.etm-routine-frequency-weekly{background:#ede9fe;color:#6d28d9}.etm-routine-frequency-monthly{background:#fef3c7;color:#92400e}
.etm-routine-status-pending{background:#f1f5f9;color:#475569}.etm-routine-status-in_progress{background:#dbeafe;color:#1d4ed8}.etm-routine-status-done{background:#dcfce7;color:#166534}.etm-routine-status-cancel{background:#fee2e2;color:#991b1b}
.etm-routine-admin-pending_review{background:#f1f5f9;color:#475569}.etm-routine-admin-approved{background:#dcfce7;color:#166534}.etm-routine-admin-declined{background:#fee2e2;color:#991b1b}
.etm-routine-duration{display:flex;align-items:center;gap:5px}.etm-routine-duration input{min-width:70px!important}.etm-routine-duration small{white-space:nowrap;color:#64748b}
.etm-routine-meta{font-size:11px;color:#64748b;margin-top:5px}
.etm-routine-empty{text-align:center;color:#64748b;padding:30px!important}.etm-routine-empty-card{background:#fff;border:1px dashed #cbd5e1;padding:18px;border-radius:8px;color:#64748b}
.etm-routine-review-controls{display:flex;flex-direction:column;gap:7px;min-width:190px}.etm-routine-review-controls textarea{min-width:180px!important}
.etm-routine-comment p{margin:0 0 6px}.etm-routine-evidence-list{margin:7px 0 0 18px}.etm-routine-muted{color:#94a3b8;font-style:italic}
.etm-routine-export-controls{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}.etm-routine-export-controls label{min-width:145px;font-size:12px}
.etm-routine-user-controls{display:grid;grid-template-columns:minmax(130px,.7fr) minmax(220px,2fr) minmax(170px,1fr) auto;gap:8px;align-items:start}
.etm-routine-file-label{display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:700;color:#475569}.etm-routine-file-label input{min-width:160px}
.etm-my-routine-section{margin-top:32px;padding-top:22px;border-top:2px solid #e2e8f0}
.etm-my-routine-table{min-width:950px}
@media(max-width:900px){
 .etm-routine-form-grid{grid-template-columns:1fr 1fr}.etm-routine-full{grid-column:1/-1}
 .etm-routine-user-controls{grid-template-columns:1fr 1fr}.etm-routine-user-controls textarea{grid-column:1/-1}
}
@media(max-width:600px){
 .etm-routine-header{flex-direction:column}.etm-routine-form-grid{grid-template-columns:1fr}.etm-routine-full{grid-column:auto}
 .etm-routine-filter-bar,.etm-routine-export-controls{align-items:stretch;flex-direction:column}.etm-routine-filter-bar label,.etm-routine-export-controls label{width:100%}
 .etm-routine-user-controls{grid-template-columns:1fr}
}
.etm-routine-review-help{display:block;color:#64748b;font-size:11px;margin-top:2px}
.etm-routine-overdue{display:inline-flex;margin-top:5px;padding:3px 7px;border-radius:999px;background:#fee2e2;color:#991b1b;font-size:10px;font-weight:700}
/* Elite-Task v1.9.1 A-Z documentation */
.etm-doc-callout{padding:12px 14px;border-radius:7px;margin:14px 0;background:#f6f7f7;border-left:4px solid #2271b1;line-height:1.55}.etm-doc-callout-success{background:#edf9f0;border-left-color:#00a32a}.etm-doc-az-nav{display:grid;grid-template-columns:repeat(13,minmax(34px,1fr));gap:7px;margin:14px 0 22px}.etm-doc-az-nav a{text-align:center;text-decoration:none;font-weight:700;padding:8px 4px;border-radius:6px;background:#eef5fc;border:1px solid #c8dcf1;color:#0d47a1}.etm-doc-az-nav a:hover{background:#0d47a1;color:#fff}.etm-doc-az-list{display:grid;gap:16px}.etm-doc-az-card{position:relative;display:grid;grid-template-columns:52px 1fr;gap:16px;border:1px solid #dce5ef;border-radius:10px;padding:18px;background:#fbfdff;scroll-margin-top:40px}.etm-doc-az-card.has-image{grid-template-columns:52px minmax(300px,1fr) minmax(330px,44%)}.etm-doc-letter{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#0d47a1;color:#fff;font-size:20px;font-weight:800}.etm-doc-az-content h3{margin:2px 0 10px;color:#0d47a1;font-size:18px}.etm-doc-az-content ol{margin:0 0 0 20px}.etm-doc-az-content li{margin-bottom:7px}.etm-doc-az-card img{display:block;width:100%;height:auto;border-radius:7px;border:1px solid #cfd8e3;background:#fff}.etm-doc-section table code{white-space:normal}.etm-doc-section{scroll-margin-top:40px}@media(max-width:900px){.etm-doc-az-nav{grid-template-columns:repeat(7,1fr)}.etm-doc-az-card,.etm-doc-az-card.has-image{grid-template-columns:48px 1fr}.etm-doc-az-card img{grid-column:1/-1}}@media(max-width:520px){.etm-doc-az-nav{grid-template-columns:repeat(5,1fr)}}@media print{.etm-doc-az-card,.etm-doc-az-card.has-image{display:block;break-inside:avoid}.etm-doc-letter{float:left;margin:0 12px 8px 0}.etm-doc-az-card img{margin-top:12px;max-width:760px}.etm-doc-az-nav{display:none}}

/* ================================================================
 * Elite-Task v1.10.0 - Routine Tasks, categories and unified UI
 * GPL-2.0-or-later
 * ================================================================ */
.etm-wrap .button,.etm-sc-wrap .button{min-height:32px;border-radius:6px;font-weight:650;box-shadow:none;transition:background-color .18s,color .18s,border-color .18s,transform .18s,box-shadow .18s;display:inline-flex;align-items:center;justify-content:center;gap:5px;line-height:1.2}
.etm-wrap .button:hover,.etm-sc-wrap .button:hover{transform:translateY(-1px);box-shadow:0 3px 8px rgba(15,23,42,.10)}
.etm-ui-btn{background:#fff!important;color:#111!important;border:1px solid #aeb7c2!important;padding:6px 11px!important}
.etm-ui-btn:hover,.etm-ui-btn:focus{background:#111!important;color:#fff!important;border-color:#111!important}
.etm-ui-btn-primary{background:#111!important;color:#fff!important;border-color:#111!important}
.etm-ui-btn-primary:hover,.etm-ui-btn-primary:focus{background:#fff!important;color:#111!important}
.etm-action-btn{background:#fff!important;color:#111!important;border:1px solid #111!important;padding:4px 9px!important;min-height:27px!important;font-size:11px!important;white-space:nowrap}
.etm-action-btn:hover,.etm-action-btn:focus{background:#111!important;color:#fff!important;border-color:#111!important}
.etm-action-btn:disabled{opacity:.45!important;cursor:not-allowed!important;transform:none!important;box-shadow:none!important}
.etm-action-danger{border-color:#b91c1c!important;color:#991b1b!important}
.etm-action-danger:hover,.etm-action-danger:focus{background:#991b1b!important;color:#fff!important;border-color:#991b1b!important}
.etm-routine-card-heading,.etm-routine-export-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}
.etm-routine-card-heading h2,.etm-routine-export-heading h2{margin:0 0 4px}
.etm-routine-card-heading p,.etm-routine-export-heading p{margin:0;color:#64748b}
.etm-routine-form-grid{grid-template-columns:minmax(240px,1.55fr) minmax(150px,.8fr) minmax(180px,.95fr) minmax(180px,.95fr)}
.etm-routine-form-grid label>span{font-size:12px;font-weight:750;color:#1f2937}
.etm-routine-form-grid .etm-richtext-toolbar{margin-top:2px}
.etm-routine-richtext .etm-rich-editor{min-height:105px;max-height:260px;overflow-y:auto;background:#fff}
.etm-my-routine-table .etm-routine-richtext{min-width:320px}
.etm-my-routine-table .etm-rich-editor{min-height:90px;max-height:190px}
.etm-routine-new-category,.etm-bulk-edit-new-category{margin-top:6px!important}
.etm-routine-csv-panel{margin-top:18px;padding:14px;border:1px dashed #94a3b8;border-radius:9px;background:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.etm-routine-csv-panel p{margin:3px 0 0;color:#64748b;font-size:12px}
.etm-routine-csv-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.etm-routine-csv-file{max-width:280px;padding:6px;background:#fff;border:1px solid #cbd5e1;border-radius:6px}
.etm-routine-csv-message{flex-basis:100%;font-size:12px;font-weight:700}
.etm-routine-csv-message.ok{color:#15803d}.etm-routine-csv-message.err{color:#b91c1c}
.etm-routine-manager-toolbar{position:relative}
.etm-routine-toolbar-divider{width:1px;height:30px;background:#cbd5e1;display:inline-block;margin:0 2px;align-self:flex-end}
.etm-routine-bulk-edit-panel{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid #111;border-radius:8px;padding:12px 14px;margin:-6px 0 14px;box-shadow:0 5px 15px rgba(15,23,42,.08)}
.etm-routine-bulk-edit-panel>strong{width:100%}
.etm-routine-bulk-edit-panel label{display:flex;flex-direction:column;gap:4px;min-width:170px;font-size:12px;font-weight:700}
.etm-routine-bulk-edit-panel select,.etm-routine-bulk-edit-panel input{min-height:36px;border:1px solid #cbd5e1;border-radius:6px;padding:6px 8px}
.etm-routine-bulk-message{font-size:12px;font-weight:700}.etm-routine-bulk-message.ok{color:#15803d}.etm-routine-bulk-message.err{color:#b91c1c}
.etm-routine-table-wrap{overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch;scrollbar-color:#111 #e5e7eb;position:relative}
.etm-routine-table-wrap::-webkit-scrollbar{height:11px}.etm-routine-table-wrap::-webkit-scrollbar-track{background:#e5e7eb}.etm-routine-table-wrap::-webkit-scrollbar-thumb{background:#111;border-radius:8px}
.etm-table-scroll-top-global{height:13px!important;margin:0 0 5px!important;border-radius:7px;background:#e5e7eb;scrollbar-color:#111 #e5e7eb}
.etm-table-scroll-top-global::-webkit-scrollbar{height:11px}.etm-table-scroll-top-global::-webkit-scrollbar-track{background:#e5e7eb;border-radius:8px}.etm-table-scroll-top-global::-webkit-scrollbar-thumb{background:#111;border-radius:8px}
.etm-routine-table{border-collapse:separate!important;border-spacing:0!important;min-width:1380px!important;background:#fff}
.etm-routine-manager-table{min-width:1580px!important}.etm-routine-summary-table{min-width:1550px!important}.etm-my-routine-table{min-width:1220px!important}
.etm-routine-table thead th{background:#111!important;color:#fff!important;border:0!important;border-right:1px solid #374151!important;padding:11px 10px!important;font-size:11px!important;letter-spacing:.025em;text-transform:uppercase;vertical-align:middle!important}
.etm-routine-table thead th:first-child{border-top-left-radius:8px}.etm-routine-table thead th:last-child{border-top-right-radius:8px}
.etm-routine-table tbody td{background:#fff;border:0!important;border-bottom:1px solid #e5e7eb!important;border-right:1px solid #eef0f3!important;padding:11px 10px!important;vertical-align:top!important;transition:background .15s}
.etm-routine-table tbody tr:nth-child(even) td{background:#fafafa}
.etm-routine-table tbody tr:hover td{background:#f1f5f9!important}
.etm-routine-table select,.etm-routine-table input[type=date],.etm-routine-table input[type=number],.etm-routine-table textarea{border-color:#b8c1cc!important;border-radius:6px!important;min-height:34px!important;font-size:12px!important}
.etm-routine-row-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:160px}
.etm-routine-category-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#e2e8f0;color:#1e293b;font-size:10px;font-weight:800;white-space:nowrap}
.etm-routine-description{max-width:430px;max-height:120px;overflow:auto;padding-right:4px}
.etm-routine-description ul,.etm-routine-description ol,.etm-routine-comment ul,.etm-routine-comment ol{margin:5px 0 5px 20px}
.etm-routine-comment{max-width:340px;line-height:1.5;word-break:break-word}.etm-routine-comment p{margin:0 0 6px}.etm-routine-comment a{color:#1557b0;text-decoration:underline;overflow-wrap:anywhere}
.etm-routine-feedback-label{display:flex;flex-direction:column;gap:4px;margin-top:7px;font-size:11px;font-weight:750;color:#475569;min-width:210px}.etm-routine-feedback-label textarea{min-width:210px!important;resize:vertical}
.etm-routine-export-card{border-top:4px solid #111!important}.etm-routine-export-controls{align-items:flex-end!important}.etm-routine-export-controls .etm-action-btn{align-self:flex-end}
.etm-routine-save-message{font-size:12px;font-weight:750;align-self:center}.etm-routine-save-message.ok{color:#15803d}.etm-routine-save-message.err{color:#b91c1c}
.etm-routine-group-card{background:#fff;border:1px solid #dbe3ec;border-radius:10px;padding:15px;margin:0 0 22px;box-shadow:0 2px 9px rgba(15,23,42,.05)}
.etm-routine-group-card .etm-sc-subtitle{margin-top:0}
.etm-routine-admin-feedback{margin-top:8px;padding:7px 9px;border-left:3px solid #111;background:#f8fafc;font-size:11px;line-height:1.45;color:#334155}
.etm-my-routine-filter .etm-routine-save-all{align-self:flex-end}
.etm-routine-table .etm-th-check,.etm-routine-table .etm-td-check{width:40px!important;min-width:40px!important;text-align:center!important;vertical-align:middle!important}
.etm-routine-table .etm-th-check input,.etm-routine-table .etm-td-check input{width:17px;height:17px;accent-color:#111;cursor:pointer}
.etm-routine-table tr[data-dirty="1"] td{box-shadow:inset 0 2px 0 #f59e0b,inset 0 -2px 0 #f59e0b}
.etm-routine-empty-card{border-radius:9px!important}
@media(max-width:900px){
 .etm-routine-form-grid{grid-template-columns:1fr 1fr}
 .etm-routine-csv-panel{align-items:flex-start;flex-direction:column}
 .etm-routine-filter-bar{align-items:stretch!important}
 .etm-routine-filter-bar label{min-width:140px}
 .etm-routine-toolbar-divider{display:none}
}
@media(max-width:600px){
 .etm-routine-form-grid{grid-template-columns:1fr}
 .etm-routine-filter-bar,.etm-routine-export-controls,.etm-routine-bulk-edit-panel{flex-direction:column;align-items:stretch!important}
 .etm-routine-filter-bar label,.etm-routine-export-controls label,.etm-routine-bulk-edit-panel label{width:100%;min-width:0!important}
 .etm-routine-filter-bar .button,.etm-routine-export-controls .button{width:100%}
 .etm-routine-csv-actions{width:100%;flex-direction:column;align-items:stretch}.etm-routine-csv-file{max-width:none;width:100%}
}
