
:root{--bg:#f5f7fb;--surface:#fff;--text:#152033;--muted:#697386;--line:#e5e9f0;--primary:#2563eb;--primary-dark:#1d4ed8;--success:#059669;--danger:#dc2626;--shadow:0 8px 28px rgba(15,23,42,.07)}
*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg);color:var(--text);font-family:Segoe UI,Inter,Arial,sans-serif;font-size:14px}a{text-decoration:none;color:inherit}
.topbar{height:70px;background:rgba(255,255,255,.97);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:100}.topbar-inner{height:100%;max-width:1540px;margin:auto;padding:0 24px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;align-items:center;gap:12px}.brand-logo{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#2563eb,#0891b2);color:#fff;display:grid;place-items:center;font-size:21px;box-shadow:0 7px 18px rgba(37,99,235,.22)}.brand-title{font-weight:800;font-size:16px}.brand-sub{font-size:11px;color:var(--muted);margin-top:2px}.user-area{display:flex;align-items:center;gap:10px}.user-chip{display:flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid var(--line);background:#fff;border-radius:12px}.avatar{width:29px;height:29px;border-radius:9px;background:#eaf1ff;color:#1d4ed8;display:grid;place-items:center;font-weight:800}
.layout{display:flex;max-width:1540px;margin:auto;min-height:calc(100vh - 70px)}.sidebar{width:245px;flex:0 0 245px;padding:22px 14px}.content{flex:1;min-width:0;padding:28px 25px 55px}.nav-label{font-size:10px;font-weight:800;color:#98a2b3;text-transform:uppercase;letter-spacing:.09em;padding:8px 12px}.nav-item{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:11px;color:#4b5563;font-weight:650;margin:3px 0}.nav-item:hover,.nav-item.active{background:#eaf1ff;color:#1d4ed8}.nav-icon{width:24px;text-align:center}
.hero{background:linear-gradient(135deg,#0f172a,#1e3a8a 62%,#0e7490);color:#fff;border-radius:20px;padding:30px;box-shadow:0 14px 40px rgba(15,23,42,.14)}.hero h1{margin:0 0 8px;font-size:27px}.hero p{margin:0;color:rgba(255,255,255,.8)}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:18px}.page-head h1,.page-head h2{margin:0;font-weight:800}.small-muted{font-size:12px;color:var(--muted)}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:14px;margin:20px 0}.stat-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:var(--shadow)}.stat-top{display:flex;justify-content:space-between}.stat-icon{width:41px;height:41px;border-radius:12px;background:#eef4ff;display:grid;place-items:center;font-size:20px}.stat-number{font-size:25px;font-weight:800;margin-top:10px}.stat-label{font-size:12px;color:var(--muted)}
.folder-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.folder-card{background:#fff;border:1px solid var(--line);border-radius:17px;min-height:158px;box-shadow:var(--shadow);transition:.18s}.folder-card:hover{transform:translateY(-3px);border-color:#c9d8ff;box-shadow:0 15px 35px rgba(15,23,42,.1)}.folder-card .card-body{padding:21px}.folder-icon{width:52px;height:52px;border-radius:14px;background:#eef4ff;display:grid;place-items:center;font-size:29px;margin-bottom:13px}.folder-card h3{font-size:16px;margin:0 0 5px}.folder-card p{margin:0;color:var(--muted);font-size:12px}
.breadcrumb-wrap{margin-bottom:15px}.breadcrumb{display:flex;gap:7px;align-items:center;flex-wrap:wrap;color:var(--muted);font-size:13px}.breadcrumb a{color:#5572aa}.breadcrumb .current{color:var(--text);font-weight:750}
.search-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:14px;box-shadow:var(--shadow);margin-bottom:18px}.search-row{display:grid;grid-template-columns:minmax(220px,1.7fr) minmax(150px,1fr) minmax(150px,1fr) auto;gap:9px}
.form-control,.form-select{width:100%;min-height:42px;border:1px solid #dfe4ec;border-radius:10px;background:#fff;padding:9px 11px;font:inherit}.form-control:focus,.form-select:focus{outline:none;border-color:#8db1ff;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:9px 14px;border-radius:10px;border:1px solid transparent;font-weight:700;cursor:pointer}.btn-sm{min-height:34px;padding:6px 9px;font-size:12px}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{background:var(--primary-dark)}.btn-success{background:var(--success);color:#fff}.btn-outline-secondary,.btn-outline-primary,.btn-outline-danger{background:#fff;border-color:#dfe4ec}.btn-outline-danger{color:#b91c1c}.btn-outline-primary{color:#1d4ed8}
.table-card{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}.table-responsive{overflow-x:auto}.table{width:100%;border-collapse:collapse;margin:0}.table th{background:#f8fafc;color:#667085;font-size:10px;text-transform:uppercase;letter-spacing:.05em;padding:13px 14px;text-align:left;border-bottom:1px solid var(--line)}.table td{padding:13px 14px;border-bottom:1px solid #edf0f4;vertical-align:middle}.table tr:hover td{background:#fbfdff}.file-name{font-weight:750}.file-meta{font-size:11px;color:var(--muted);margin-top:3px}.action-group{display:flex;gap:5px}.empty{text-align:center;padding:55px 15px;color:var(--muted)}.empty-icon{font-size:35px;margin-bottom:8px}.badge-expired,.badge-warning2{display:inline-block;padding:5px 8px;border-radius:7px;font-size:11px;font-weight:700}.badge-expired{background:#fee2e2;color:#b91c1c}.badge-warning2{background:#fef3c7;color:#92400e}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}.login-wrap{max-width:430px;margin:65px auto}.login-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:30px;box-shadow:var(--shadow)}.text-center{text-align:center}.text-muted{color:var(--muted)}.mx-auto{margin-left:auto;margin-right:auto}.mb-3{margin-bottom:16px}.mt-2{margin-top:8px}.mt-3{margin-top:16px}.w-100{width:100%}
@media(max-width:1100px){.sidebar{display:none}.stats{grid-template-columns:repeat(3,1fr)}.folder-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.topbar{height:62px}.topbar-inner{padding:0 12px}.brand-title{font-size:13px}.brand-sub{display:none}.user-chip span{display:none}.content{padding:18px 12px 35px}.hero{padding:22px;border-radius:16px}.hero h1{font-size:21px}.stats{grid-template-columns:repeat(2,1fr);gap:9px}.folder-grid{grid-template-columns:1fr}.search-row{grid-template-columns:1fr}.page-head{flex-direction:column}.page-head .btn{width:100%}.table{min-width:920px}}

.container-fluid{width:100%;margin:0 auto}.py-4{padding-top:1.5rem;padding-bottom:1.5rem}
.row{display:flex;flex-wrap:wrap}.g-2{gap:.5rem}.g-3{gap:1rem}
.col-12{width:100%}.col-md-3{width:25%}.col-md-4{width:33.333%}.col-md-6{width:50%}
.col-md-7{width:58.333%}.col-md-8{width:66.666%}.col-md-5{width:41.666%}
.col-lg-4{width:33.333%}.col-xl-4{width:33.333%}
.mb-4{margin-bottom:1.5rem}.mb-3{margin-bottom:1rem}.mb-2{margin-bottom:.5rem}
.mt-4{margin-top:1.5rem}.mt-3{margin-top:1rem}.mt-2{margin-top:.5rem}.p-4{padding:1.5rem}
.d-flex{display:flex}.d-inline{display:inline}.align-items-center{align-items:center}.justify-content-between{justify-content:space-between}
.justify-content-center{justify-content:center}.gap-2{gap:.5rem}.text-white{color:#fff}.text-dark{color:#172033}
.text-center{text-align:center}.text-decoration-none{text-decoration:none}.fw-bold{font-weight:800}
.rounded{border-radius:10px}.shadow-sm{box-shadow:0 2px 10px rgba(15,23,42,.08)}
.alert{padding:12px 14px;border-radius:10px;margin-bottom:14px}.alert-danger{background:#fee2e2;color:#991b1b}.alert-info{background:#e0f2fe;color:#075985}
.text-danger{color:#dc2626}.text-muted{color:var(--muted)}.form-label{display:block;margin-bottom:6px;font-size:13px;font-weight:700}
@media(max-width:760px){.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-lg-4,.col-xl-4{width:100%}}

.category-icon{font-size:15px;font-weight:900;letter-spacing:.02em;color:#1d4ed8}
.nav-icon{width:30px;height:30px;border-radius:8px;background:#eef4ff;color:#1d4ed8;display:grid;place-items:center;font-size:9px;font-weight:900;letter-spacing:.02em;flex:0 0 30px}
.icon-bb{background:#eaf1ff;color:#1d4ed8}.icon-vt{background:#fff4df;color:#b45309}.icon-yc{background:#fff0f0;color:#c2410c}.icon-kd{background:#eafaf3;color:#047857}.icon-kh{background:#f0edff;color:#6d28d9}.icon-dt{background:#fdf0ff;color:#a21caf}.icon-kt{background:#edf2f7;color:#475569}
.home-heading{margin-top:8px;margin-bottom:20px}

/* Document actions: clear SVG icons + text labels, no emoji/font dependency */
.action-group{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.doc-action{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:62px;height:34px;padding:5px 9px;border-radius:9px;border:1px solid #dbe2ea;background:#fff;font:600 12px/1 Segoe UI,Arial,sans-serif;text-decoration:none;cursor:pointer;transition:all .16s ease}
.doc-action svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.doc-action:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(15,23,42,.10)}
.doc-action-view{color:#2563eb;background:#eff6ff;border-color:#bfdbfe}
.doc-action-view:hover{background:#dbeafe}
.doc-action-download{color:#0369a1;background:#ecfeff;border-color:#a5f3fc}
.doc-action-download:hover{background:#cffafe}
.doc-action-edit{color:#b45309;background:#fffbeb;border-color:#fde68a}
.doc-action-edit:hover{background:#fef3c7}
.doc-action-delete{color:#dc2626;background:#fef2f2;border-color:#fecaca}
.doc-action-delete:hover{background:#fee2e2}
@media(max-width:760px){
  .doc-action{min-width:42px;padding:7px 8px}
  .doc-action span{display:none}
  .doc-action svg{width:18px;height:18px}
}

.nav-emoji{font-size:18px;line-height:1;background:#f3f6fb}

.admin-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.admin-modal{position:fixed;inset:0;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center;padding:20px;z-index:2000}
.admin-modal[hidden]{display:none}
.admin-modal-box{width:min(520px,100%);background:#fff;border-radius:16px;padding:22px;box-shadow:0 24px 70px rgba(15,23,42,.25)}
.admin-modal-head{display:flex;align-items:center;justify-content:space-between;font-size:18px;margin-bottom:18px}
.admin-modal-head button{border:0;background:#f1f5f9;border-radius:8px;width:32px;height:32px;font-size:22px;cursor:pointer}
.admin-detail{display:grid;gap:10px;margin-bottom:16px}
.admin-detail div{display:flex;justify-content:space-between;gap:20px;padding:11px 13px;background:#f8fafc;border-radius:9px}
.admin-detail span{color:#64748b}
.admin-password-note{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;border-radius:10px;padding:12px;margin-bottom:18px;line-height:1.5}
.password-input-wrap{position:relative}
.password-input-wrap input{padding-right:48px}
.password-input-wrap button{position:absolute;right:6px;top:4px;border:0;background:transparent;width:38px;height:34px;cursor:pointer}
@media(max-width:700px){.admin-actions .btn{font-size:12px}.admin-detail div{flex-direction:column;gap:3px}}

/* V17: force document action icon/text styling and bust cached CSS */
.action-group .doc-action{box-sizing:border-box!important;color:inherit!important;background:#fff!important;border:1px solid #dbe2ea!important;text-decoration:none!important}
.action-group .doc-action svg{display:block!important;width:17px!important;height:17px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.action-group .doc-action span{display:inline!important;color:inherit!important;font:600 12px/1 Segoe UI,Arial,sans-serif!important}
.action-group .doc-action-view{color:#2563eb!important;background:#eff6ff!important;border-color:#bfdbfe!important}
.action-group .doc-action-download{color:#0369a1!important;background:#ecfeff!important;border-color:#a5f3fc!important}
.action-group .doc-action-edit{color:#b45309!important;background:#fffbeb!important;border-color:#fde68a!important}
.action-group .doc-action-delete{color:#dc2626!important;background:#fef2f2!important;border-color:#fecaca!important}
.action-group .doc-action:hover{filter:brightness(.97);transform:translateY(-1px)}
@media(max-width:760px){
 .action-group .doc-action{min-width:42px!important;padding:7px 8px!important}
 .action-group .doc-action span{display:none!important}
 .action-group .doc-action svg{width:18px!important;height:18px!important}
}

/* V20 - Repair Plan / SCL dashboard */
.plan-tabs{display:flex;gap:10px;margin:18px 0}
.plan-tab{padding:11px 18px;border:1px solid #dbe3ef;border-radius:12px;background:#fff;text-decoration:none;font-weight:700;color:#334155}
.plan-tab.active{background:#2563eb;color:#fff;border-color:#2563eb}
.line-filter{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.chip{padding:8px 14px;border-radius:999px;background:#fff;border:1px solid #dbe3ef;text-decoration:none;color:#475569}
.chip.active{background:#eff6ff;color:#2563eb;border-color:#93c5fd;font-weight:700}
.progress-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:18px 0}
.progress-card,.dashboard-total,.table-card,.import-card,.empty-state{background:#fff;border:1px solid #e3e8f0;border-radius:18px;box-shadow:0 8px 28px rgba(15,23,42,.06)}
.progress-card{padding:20px}
.progress-title{font-weight:800;color:#334155}
.progress-number{font-size:32px;font-weight:900;margin:8px 0}
.progress-track{height:10px;background:#edf2f7;border-radius:20px;overflow:hidden}
.progress-fill{height:100%;background:#2563eb;border-radius:20px}
.dashboard-total{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;margin:18px 0;overflow:hidden}
.dashboard-total div{padding:18px;background:#fff}
.dashboard-total span{display:block;font-size:11px;color:#64748b;font-weight:800}
.dashboard-total strong{font-size:26px;margin-top:7px;display:block}
.table-card{overflow:hidden}
.table-head{padding:18px 20px;border-bottom:1px solid #edf0f4}
.table-head h2{margin:0 0 4px}
.table-wrap{overflow:auto}
.table-wrap table{width:100%;border-collapse:collapse;min-width:1050px}
.table-wrap th,.table-wrap td{padding:12px 14px;border-bottom:1px solid #edf0f4;text-align:left;vertical-align:top}
.table-wrap th{font-size:11px;color:#64748b;letter-spacing:.04em}
.cat-badge{display:inline-block;padding:5px 8px;border-radius:8px;background:#eff6ff;color:#1d4ed8;font-size:12px;font-weight:700}
.status-form select{padding:7px 9px;border:1px solid #dbe3ef;border-radius:8px;background:#fff}
.status-pill{font-size:12px;font-weight:700}
.empty-row{text-align:center!important;padding:45px!important;color:#64748b}
.import-card{max-width:760px;padding:28px;margin-top:20px}
.import-icon{width:58px;height:58px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#dcfce7;color:#15803d;font-weight:900;margin-bottom:15px}
.file-picker{display:block;border:2px dashed #cbd5e1;border-radius:14px;padding:24px;margin:20px 0;cursor:pointer}
.file-picker input{display:block;margin-bottom:10px}
.btn-secondary{display:inline-block;margin-left:8px;background:#fff;border:1px solid #dbe3ef;color:#334155}
.alert{margin-top:18px;padding:13px 15px;border-radius:10px}
.alert.success{background:#ecfdf5;color:#166534}
.alert.danger{background:#fef2f2;color:#991b1b}
@media(max-width:900px){
 .progress-grid,.dashboard-total{grid-template-columns:1fr}
 .page-head{gap:12px}
}

/* V21 - Repair plan dashboard: modern category navigation and per-work editing */
.repair-page{max-width:1450px;margin:0 auto}.repair-head{align-items:flex-end}.repair-head h1{font-size:34px;letter-spacing:-.03em;margin:7px 0 7px}.repair-head .breadcrumb{color:#64748b}.repair-head .breadcrumb span{padding:0 5px;color:#a0aec0}.eyebrow{font-size:10px;letter-spacing:.13em;font-weight:900;color:#7b8aa2}.repair-import-btn{min-height:44px}.btn-icon{font-size:18px;font-weight:900}.modern-tabs{margin:22px 0 18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.modern-tabs .plan-tab{display:flex;align-items:center;gap:12px;padding:13px 16px;border-radius:15px;background:#fff;border:1px solid #dfe6f0;box-shadow:0 5px 18px rgba(15,23,42,.04);transition:.18s}.modern-tabs .plan-tab:hover{transform:translateY(-1px);box-shadow:0 9px 24px rgba(15,23,42,.08)}.modern-tabs .plan-tab.active{background:#152b43;border-color:#152b43;color:#fff}.modern-tabs .plan-tab small{display:block;font-weight:500;opacity:.7;margin-top:3px}.tab-code,.category-code{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;font-size:12px;font-weight:900;flex:0 0 42px}.daily-code{background:#eaf1ff;color:#2563eb}.scl-code{background:#d1fae5;color:#047857}.modern-tabs .active .scl-code{background:#fff;color:#047857}.category-selector{background:#fff;border:1px solid #e1e7ef;border-radius:20px;padding:21px;box-shadow:var(--shadow)}.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:16px}.section-title-row h2{margin:3px 0 0;font-size:20px}.scope-note{padding:8px 12px;border-radius:10px;background:#f6f8fb;color:#64748b;font-size:12px;font-weight:700}.category-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:11px}.category-tab{display:flex;align-items:center;gap:11px;padding:13px;border:1px solid #e3e8ef;border-radius:14px;background:#fff;transition:.18s}.category-tab:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(15,23,42,.06)}.category-tab b{font-size:13px}.category-tab small{display:block;color:#7b8798;margin-top:3px;font-size:11px}.category-tab.selected{box-shadow:0 0 0 2px currentColor inset}.category-tab.all.selected{color:#334155}.category-tab.cat-dl.selected{color:#2563eb}.category-tab.cat-dk.selected{color:#7c3aed}.category-tab.cat-nk.selected{color:#059669}.all-code{background:#eef2f7;color:#475569}.cat-dl .category-code{background:#eaf1ff;color:#2563eb}.cat-dk .category-code{background:#f1eafe;color:#7c3aed}.cat-nk .category-code{background:#e8faf2;color:#059669}.modern-line-filter{margin:15px 0 14px;padding:9px 0;align-items:center}.modern-line-filter .filter-label{font-size:10px;font-weight:900;letter-spacing:.1em;color:#8793a6;margin-right:2px}.modern-line-filter .chip{font-size:12px;padding:8px 13px}.modern-progress-grid{grid-template-columns:repeat(3,1fr);gap:13px;margin:12px 0 15px}.modern-progress-grid .progress-card{padding:17px 18px;display:block;color:inherit;transition:.18s}.modern-progress-grid .progress-card:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(15,23,42,.1)}.modern-progress-grid .selected-card{box-shadow:0 0 0 2px #2563eb inset,0 10px 28px rgba(37,99,235,.09)}.progress-card-top{display:flex;justify-content:space-between;align-items:center}.progress-card .category-code.small{width:32px;height:32px;flex-basis:32px;font-size:10px;background:#eef4ff;color:#2563eb}.progress-percent{font-size:24px;font-weight:900}.modern-progress-grid .progress-title{margin:9px 0 11px;font-size:13px}.modern-progress-grid .progress-fill{background:linear-gradient(90deg,#2563eb,#06b6d4)}.progress-meta{display:flex;justify-content:space-between;margin-top:9px;font-size:11px;color:#7b8798}.modern-total{grid-template-columns:repeat(4,1fr);border-radius:16px;margin:0 0 16px;box-shadow:none;background:transparent;gap:10px;overflow:visible}.modern-total .total-item{border:1px solid #e1e7ef;border-radius:15px;padding:15px 17px;box-shadow:0 5px 18px rgba(15,23,42,.04);position:relative;overflow:hidden}.modern-total .total-item:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#2563eb}.modern-total .total-green:before{background:#059669}.modern-total .total-orange:before{background:#d97706}.modern-total .total-gray:before{background:#64748b}.modern-total span{font-size:10px}.modern-total strong{font-size:25px}.modern-total small{display:block;color:#94a3b8;margin-top:3px;font-size:10px}.repair-table-card{border-radius:19px}.modern-table-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px}.modern-table-head h2{font-size:20px;margin:4px 0}.table-count{display:flex;align-items:baseline;gap:6px;background:#f6f8fb;padding:8px 12px;border-radius:11px}.table-count strong{font-size:20px}.table-count span{font-size:11px;color:#7b8798}.repair-table{min-width:1180px}.repair-table th{background:#fbfcfe;white-space:nowrap}.repair-table td{padding:13px 12px}.repair-table tbody tr{transition:background .12s}.repair-table tbody tr:hover{background:#fafcff}.col-stt{width:55px}.col-work{width:31%}.col-action{width:70px}.stt-cell{font-weight:800;color:#64748b}.line-badge{display:inline-flex;padding:5px 8px;border-radius:8px;background:#f4f6fa;color:#475569;font-size:11px;font-weight:800;white-space:nowrap}.cat-badge{min-width:32px;text-align:center}.cat-dl-badge{background:#eaf1ff;color:#2563eb}.cat-dk-badge{background:#f1eafe;color:#7c3aed}.cat-nk-badge{background:#e8faf2;color:#059669}.equipment-name{font-weight:800;line-height:1.35}.equipment-code{font-size:11px;color:#7b8798;margin-top:4px;line-height:1.35}.work-content{white-space:pre-line;line-height:1.5;max-width:420px}.status-select{border:1px solid #d9e1eb;border-radius:9px;padding:7px 9px;background:#fff;font-size:12px;font-weight:700;color:#334155;max-width:145px}.row-edit-btn{border:1px solid #bfdbfe;background:#eff6ff;color:#2563eb;border-radius:9px;padding:8px 11px;font-weight:800;font-size:12px;cursor:pointer}.row-edit-btn:hover{background:#dbeafe}.action-cell{vertical-align:middle!important}.large-empty{padding:70px 30px;text-align:center}.empty-symbol{width:58px;height:42px;border-radius:12px;background:#eef4ff;color:#2563eb;display:inline-grid;place-items:center;font-size:12px;font-weight:900;letter-spacing:.08em;margin-bottom:12px}.empty-row>div{margin:0 auto 10px}.empty-row span{display:block;color:#7b8798;margin-top:5px}.modal-open{overflow:hidden}.edit-modal{position:fixed;inset:0;z-index:3000}.edit-modal[hidden]{display:none}.edit-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.52);backdrop-filter:blur(3px)}.edit-dialog{position:relative;width:min(820px,calc(100vw - 28px));max-height:calc(100vh - 30px);overflow:auto;margin:15px auto;background:#fff;border-radius:20px;box-shadow:0 30px 90px rgba(15,23,42,.28);padding:22px}.edit-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #edf0f4;padding-bottom:15px;margin-bottom:16px}.edit-dialog-head h3{margin:3px 0 0;font-size:21px}.close-edit{border:0;background:#f1f5f9;color:#475569;width:34px;height:34px;border-radius:9px;font-size:23px;cursor:pointer}.edit-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.edit-grid label{font-size:11px;font-weight:800;color:#5d6b7f}.edit-grid label.full{grid-column:1/-1}.edit-grid input,.edit-grid select,.edit-grid textarea{display:block;width:100%;margin-top:6px;border:1px solid #d9e1eb;border-radius:10px;padding:10px 11px;background:#fff;color:#172033;font:500 13px Segoe UI,Arial,sans-serif;outline:none}.edit-grid textarea{resize:vertical;line-height:1.5}.edit-grid input:focus,.edit-grid select:focus,.edit-grid textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 3px #eff6ff}.edit-form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px;padding-top:15px;border-top:1px solid #edf0f4}.btn-light{background:#f8fafc;border:1px solid #dbe3ef;color:#334155}.btn-light:hover{background:#f1f5f9}
@media(max-width:1050px){.category-tabs{grid-template-columns:repeat(2,1fr)}.modern-total{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.repair-head h1{font-size:25px}.modern-tabs{grid-template-columns:1fr}.category-tabs{grid-template-columns:1fr}.modern-progress-grid{grid-template-columns:1fr}.modern-total{grid-template-columns:1fr}.section-title-row{align-items:flex-start;flex-direction:column}.scope-note{width:100%}.modern-line-filter{overflow:auto;white-space:nowrap}.modern-table-head{align-items:flex-start;gap:10px}.table-count{display:none}.edit-grid{grid-template-columns:1fr}.edit-grid label.full{grid-column:auto}.edit-dialog{padding:17px;border-radius:16px}}
.repair-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.repair-report-btn{min-height:44px;background:#0f766e;color:#fff}.repair-report-btn:hover{background:#115e59}.report-alert{margin:0 0 14px;padding:12px 15px;border-radius:12px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-weight:700;font-size:13px}
@media(max-width:760px){.repair-head-actions{width:100%;display:grid;grid-template-columns:1fr}.repair-head-actions .btn{width:100%}}

/* SCL: tìm kiếm và nhập Excel */
.repair-search-card{background:#fff;border:1px solid #e1e7ef;border-radius:16px;padding:12px 14px;margin:14px 0;box-shadow:0 5px 18px rgba(15,23,42,.04)}
.repair-search-form{display:flex;align-items:center;gap:9px}
.search-field-wrap{position:relative;flex:1}
.search-field-icon{position:absolute;left:13px;top:50%;transform:translateY(-50%);font-size:21px;color:#64748b;line-height:1}
.search-field-wrap input{width:100%;height:43px;border:1px solid #d9e1eb;border-radius:10px;padding:0 13px 0 39px;font:500 13px Segoe UI,Arial,sans-serif;outline:none;background:#fff}
.search-field-wrap input:focus{border-color:#93c5fd;box-shadow:0 0 0 3px #eff6ff}
.scl-import-card{max-width:920px}
.import-step-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:14px;margin-top:18px}
.import-step{display:flex;gap:13px;align-items:flex-start;padding:16px;border:1px solid #e3e8ef;border-radius:14px;background:#fbfcfe}
.import-step-no{width:32px;height:32px;flex:0 0 32px;border-radius:10px;display:grid;place-items:center;background:#eaf1ff;color:#2563eb;font-weight:900}
.import-label{display:block;font-size:12px;font-weight:900;color:#334155;margin-bottom:7px}
.import-step small{display:block;color:#7b8798;font-size:11px;margin-top:7px;line-height:1.45}
.import-line-select{min-width:250px;height:42px;border:1px solid #d9e1eb;border-radius:10px;padding:0 10px;background:#fff;font:500 13px Segoe UI,Arial,sans-serif}
.import-note{margin-top:14px;padding:12px 14px;border-radius:12px;background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;font-size:12px;line-height:1.55}
.import-actions{display:flex;gap:9px;margin-top:15px}
@media(max-width:760px){.repair-search-form{flex-wrap:wrap}.search-field-wrap{flex-basis:100%}.repair-search-form .btn{flex:1}.import-step-grid{grid-template-columns:1fr}.import-line-select{width:100%;min-width:0}.import-actions{display:grid;grid-template-columns:1fr}.import-actions .btn{width:100%}}

/* SCL import/create actions */
.import-actions .btn-success {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#0f9d72;
    color:#fff;
    border:1px solid #0f9d72;
    text-decoration:none;
}
.import-actions .btn-success:hover { background:#0b815d; color:#fff; }
.create-work-card { max-width: 1000px; }
.create-work-card h2 { margin-top:0; margin-bottom:22px; }
.create-work-card .edit-grid label { display:flex; flex-direction:column; gap:7px; font-weight:600; }
.create-work-card input, .create-work-card select, .create-work-card textarea { width:100%; box-sizing:border-box; }
.create-work-card .alert:empty { display:none; }

/* Bảng SCL bám sát cấu trúc Excel mẫu */
.repair-template-table{min-width:980px;table-layout:fixed}
.repair-template-table th,.repair-template-table td{vertical-align:top}
.repair-template-table thead th{background:#fff;border-bottom:1px solid #dbe3ec;text-align:center;font-size:11px;font-weight:900;color:#34445a;white-space:normal;line-height:1.25}
.repair-template-table .template-head-main th{height:52px}
.repair-template-table tbody td{padding:14px 12px;border-bottom:1px solid #e7edf4;line-height:1.45}
.repair-template-table tbody tr:nth-child(even){background:#fcfdff}
.repair-template-table tbody tr:hover{background:#f6faff}
.repair-template-table .col-stt{width:58px;text-align:center}
.repair-template-table .col-equipment{width:230px}
.repair-template-table .col-code{width:170px}
.repair-template-table .col-work{width:390px}
.repair-template-table .col-notes{width:170px}
.repair-template-table .col-status{width:145px}
.repair-template-table .col-action{width:72px}
.repair-template-table .equipment-name{font-size:14px;font-weight:850;color:#10233f}
.repair-template-table .template-code{font-size:13px;color:#334e73;margin-top:0;word-break:break-word}
.repair-template-table .work-content{font-size:13px;max-width:none;white-space:pre-line}
.repair-template-table .notes-cell{font-size:12px;white-space:pre-line;word-break:break-word}
@media(max-width:760px){.repair-template-table{min-width:980px}}

/* SCL V27 - bảng không bị khuất: cuộn ngang rõ ràng và giữ cấu trúc Excel */
.repair-table-card { overflow: visible; }
.repair-table-card .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    border-top: 1px solid #edf0f4;
}
.repair-table-card .table-wrap::-webkit-scrollbar { height: 12px; }
.repair-table-card .table-wrap::-webkit-scrollbar-track { background: #eef2f7; border-radius: 10px; }
.repair-table-card .table-wrap::-webkit-scrollbar-thumb { background: #aab7c7; border-radius: 10px; }
.repair-table-card .repair-template-table {
    width: 100%;
    min-width: 980px;
    table-layout: fixed;
}
.repair-template-table .col-stt { width: 58px; }
.repair-template-table .col-equipment { width: 230px; }
.repair-template-table .col-code { width: 170px; }
.repair-template-table .col-work { width: 390px; }
.repair-template-table .col-notes { width: 170px; }
.repair-template-table .col-status { width: 145px; }
.repair-template-table .col-action { width: 75px; }
.repair-template-table td { overflow-wrap: anywhere; }
.repair-template-table .equipment-name { font-size: 13px; }
.repair-template-table .work-content { min-width: 0; }
@media (max-width: 1100px) {
    .repair-page { width: calc(100% - 24px); }
}

/* SCL dashboard status cards */
.status-card-link{display:block;color:inherit;text-decoration:none;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.status-card-link:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.10)}
.status-card-link.active-status-card{box-shadow:0 0 0 2px #2563eb inset,0 8px 22px rgba(37,99,235,.10)}
.status-card-link strong{display:block}
.status-card-link small{pointer-events:none}

/* V33 - chọn dây chuyền khi xuất báo cáo */
.repair-report-form{display:flex;align-items:center;gap:8px;margin:0}
.repair-report-line{height:42px;min-width:150px;padding:0 12px;border:1px solid #cfd8e6;border-radius:10px;background:#fff;color:#13233f;font-weight:600;outline:none}
.repair-report-line:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
@media (max-width:760px){.repair-report-form{width:100%;flex-wrap:wrap}.repair-report-line{flex:1;min-width:180px}.repair-report-btn{flex:1}}

/* Tach rieng Kế hoạch sửa chữa va Sửa chữa lớn trên thanh ben */
.document-section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:8px 0 18px}.document-section-head h2{margin:0;font-size:24px;font-weight:800}.document-section-head .small-muted{margin-top:4px}
