/* CxKitty progressive front-end enhancements.
   Kept separate from index.html so the existing console can remain stable. */

.task-wizard-shell{display:grid;gap:16px}
.task-wizard-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:14px 20px;border-bottom:1px solid var(--n-200);background:linear-gradient(180deg,#fff,var(--n-50))}
.task-wizard-step{display:flex;align-items:center;gap:8px;min-width:0;padding:8px 10px;border:1px solid transparent;border-radius:var(--r-md);color:var(--n-500);font-size:12px;font-weight:600;background:transparent;text-align:left;cursor:pointer}
.task-wizard-step:hover{background:#fff;border-color:var(--n-200)}
.task-wizard-step.active{color:var(--brand-700);background:var(--brand-50);border-color:var(--brand-200)}
.task-wizard-step.complete{color:var(--accent-700)}
.task-wizard-step-index{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;border-radius:999px;background:var(--n-200);color:var(--n-600);font-size:12px}
.task-wizard-step.active .task-wizard-step-index{background:var(--brand-600);color:#fff}
.task-wizard-step.complete .task-wizard-step-index{background:var(--accent-500);color:#fff}
.task-wizard-pane{display:none;animation:cxkitty-pane-in .16s ease}
.task-wizard-pane.active{display:block}
.task-wizard-pane-title{font-size:15px;font-weight:700;color:var(--n-900);margin-bottom:3px}
.task-wizard-pane-desc{font-size:12px;color:var(--n-500);margin-bottom:14px}
.task-wizard-empty{padding:18px;border:1px dashed var(--n-300);border-radius:var(--r-md);background:var(--n-50);color:var(--n-500);font-size:13px}
.task-wizard-footer-nav{display:flex;align-items:center;gap:8px;margin-right:auto}
.task-wizard-preflight-actions{display:flex;align-items:center;gap:8px;margin-bottom:12px}

#taskDailyWindowSection{display:flex}
#taskDailyWindowSection.policy-unavailable{background:var(--n-50);border-color:var(--n-200)}
#taskDailyWindowSection.policy-unavailable .toggle{opacity:.45;cursor:not-allowed;pointer-events:none}
#taskDailyWindowSection.policy-unavailable .switch-label{color:var(--n-500)}
.task-policy-reason{display:none;margin-top:6px;color:#9a3412;font-size:12px;font-weight:600}
#taskDailyWindowSection.policy-unavailable .task-policy-reason{display:block}
#taskDailyWindowFields[aria-disabled="true"]{display:none!important}

.task-plan-source{display:inline-flex;align-items:center;gap:5px;margin-left:8px;padding:2px 7px;border-radius:999px;background:var(--n-100);color:var(--n-600);font-size:11px;font-weight:600;vertical-align:middle}
.task-plan-source.server{background:var(--accent-50);color:var(--accent-700)}
.task-plan-source.local{background:#fffbeb;color:#92400e}

.attention-panel{margin-bottom:16px;border-color:#fed7aa;background:linear-gradient(180deg,#fff,#fffaf5)}
.attention-panel .panel-header{align-items:flex-start}
.attention-count{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:#ea580c;color:#fff;font-size:12px;font-weight:700}
.attention-list{display:grid;gap:10px}
.attention-item{display:flex;align-items:flex-start;gap:12px;padding:12px;border:1px solid var(--n-200);border-radius:var(--r-md);background:#fff}
.attention-item-icon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:8px;background:#fff7ed;color:#c2410c;font-weight:800}
.attention-item-main{flex:1;min-width:0}
.attention-item-title{font-weight:650;color:var(--n-900)}
.attention-item-desc{margin-top:2px;color:var(--n-500);font-size:12px}
.attention-empty{padding:15px;border:1px solid #bbf7d0;border-radius:var(--r-md);background:#f0fdf4;color:#166534}

.account-health{display:grid;gap:5px;min-width:120px}
.account-health-badge{display:inline-flex;align-items:center;gap:6px;width:max-content;max-width:100%;padding:3px 8px;border-radius:999px;background:var(--n-100);color:var(--n-600);font-size:12px;font-weight:650}
.account-health-badge.ok{background:var(--accent-50);color:var(--accent-700)}
.account-health-badge.info{background:#eff6ff;color:#1d4ed8}
.account-health-badge.warning{background:#fffbeb;color:#92400e}
.account-health-badge.danger{background:#fef2f2;color:#b91c1c}
.account-health-dot{width:7px;height:7px;border-radius:999px;background:currentColor}
.account-health-detail{max-width:220px;color:#92400e;font-size:11px;line-height:1.4;white-space:normal}
.account-health-time{color:var(--n-400);font-size:11px}
.account-health-actions{display:flex;gap:4px;flex-wrap:wrap}

.login-method-selector{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:4px;border:1px solid var(--n-200);border-radius:var(--r-md);background:var(--n-50)}
.login-method-option{height:38px;border:1px solid transparent;border-radius:var(--r-sm);background:transparent;color:var(--n-600);font:500 13px/1 var(--font-sans);cursor:pointer;transition:background var(--tr-fast),border-color var(--tr-fast),color var(--tr-fast),box-shadow var(--tr-fast)}
.login-method-option:hover{background:#fff;color:var(--n-900)}
.login-method-option.active{border-color:var(--n-200);background:#fff;color:var(--n-900);box-shadow:var(--shadow-sm)}
.login-method-option:disabled{opacity:.62;cursor:not-allowed}

.zhidao-qr-panel{display:grid;justify-items:center;gap:10px;margin-bottom:20px;padding:16px;border:1px solid var(--n-200);border-radius:var(--r-md);background:var(--n-50)}
.zhidao-qr-panel[hidden]{display:none}
.zhidao-qr-frame{display:grid;place-items:center;width:min(220px,100%);aspect-ratio:1;border:1px solid var(--n-200);border-radius:var(--r-md);background:#fff;overflow:hidden}
.zhidao-qr-frame img{display:block;width:100%;height:100%;object-fit:contain;padding:8px}
.zhidao-qr-frame img[hidden]{display:none}
.zhidao-qr-placeholder{max-width:150px;color:var(--n-400);font-size:12px;line-height:1.6;text-align:center}
.zhidao-qr-placeholder[hidden]{display:none}
.zhidao-qr-title{color:var(--n-900);font-size:14px;font-weight:700}
.zhidao-qr-subtitle{color:var(--n-500);font-size:12px}

.schedule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
.schedule-card{padding:16px;border:1px solid var(--n-200);border-radius:var(--r-lg);background:#fff;box-shadow:var(--shadow-sm)}
.schedule-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}
.schedule-card-title{font-weight:700;color:var(--n-900)}
.schedule-card-meta{color:var(--n-500);font-size:12px}
.schedule-card-line{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-top:1px dashed var(--n-200);font-size:12px}
.schedule-card-line span:first-child{color:var(--n-500)}
.schedule-unavailable{padding:24px;border:1px dashed #fdba74;border-radius:var(--r-lg);background:#fff7ed;color:#9a3412}
.schedule-status{display:inline-flex;padding:3px 8px;border-radius:999px;background:var(--accent-50);color:var(--accent-700);font-size:11px;font-weight:700}
.schedule-status.off{background:var(--n-100);color:var(--n-500)}
.schedule-plan-hint{min-height:20px;line-height:1.55}
.schedule-plan-hint.success{color:var(--accent-700)}
.schedule-plan-hint.warning{color:#92400e}
.schedule-plan-hint.error{color:#b91c1c}
#schedulePlanName:disabled{cursor:not-allowed;background:var(--n-50);color:var(--n-500)}

.customer-name-edit-btn{width:32px;height:32px;min-width:32px;padding:0;flex:0 0 32px}
.customer-name-edit-modal{width:440px}
.customer-name-edit-modal .modal-body{min-width:0}
.customer-name-account{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-mono);background:var(--n-50);color:var(--n-600)}

@keyframes cxkitty-pane-in{from{opacity:.35;transform:translateY(3px)}to{opacity:1;transform:none}}

.ch-tree.catalog-verification{max-height:none;overflow:visible;border:0}
.catalog-verification .verification-browser-frame{aspect-ratio:45/26;max-height:40vh}
.catalog-verification .catalog-captcha-crop{width:min(300px,100%);height:84px;aspect-ratio:auto;max-height:none;background:#fff;padding:8px}
.catalog-captcha-crop img{width:100%;height:100%;object-fit:contain}
@media(max-width:768px){
  .task-wizard-steps{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px 12px}
  .task-wizard-step{padding:7px 8px}
  .task-wizard-footer-nav{width:100%;order:2}
  .task-wizard-footer-nav .btn{flex:1}
  .attention-item{flex-wrap:wrap}
  .attention-item .btn{width:100%}
  .zhidao-qr-frame{width:min(200px,100%)}
  .customer-name-edit-modal{width:100%}
}
