/* Preventivas: a compact workspace for daily maintenance. */
.pm-filter-group { border-bottom:1px solid var(--pm-line); }
.pm-filter-group>summary { padding:8px 0; font-size:12px; font-weight:650; cursor:pointer; }
.pm-filter-group>div { display:flex; flex-direction:column; gap:10px; padding:5px 0 12px; }
.pm-compact { min-width:0; }
.pm-page-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; }
.pm-page-title { display:flex; align-items:center; gap:12px; min-width:0; }
.pm-page-icon { display:grid; place-items:center; flex:none; width:40px; height:40px; border:1px solid var(--pm-line); border-radius:12px; color:var(--action-text); background:var(--pm-surface); font-size:16px; }
.pm-page-title h1 { font-size:20px; line-height:1.25; letter-spacing:-.025em; font-weight:900; }
.pm-page-title p { margin-top:2px; color:var(--pm-muted); font-size:12px; }
.pm-compact .pm-page-header>.pm-primary,
.pm-workspace button[data-pm-action="create-preventive"] { min-height:40px; height:40px; padding:0 16px; border-radius:12px; box-shadow:0 1px 2px 0 rgba(0,0,0,0.05); font-weight:700; font-size:13px; }
.pm-compact .pm-module-bar { margin-bottom:14px; gap:8px; }
.pm-compact .pm-module-nav { gap:4px; padding:4px; border-radius:12px; background:var(--pm-surface); border:1px solid var(--pm-line); }
.pm-compact .pm-module-nav .pm-button { min-height:34px; padding:6px 12px; border-radius:8px; font-weight:700; color:var(--pm-muted); border:0; }
.pm-compact .pm-module-nav .pm-button[aria-pressed=true] { color:white; background:#1e40af; box-shadow:0 1px 2px rgba(0,0,0,0.08); }
.pm-compact .pm-module-nav .pm-button:hover:not([aria-pressed=true]) { color:var(--text); background:var(--pm-soft); }
.dark .pm-compact .pm-module-nav .pm-button[aria-pressed=true] { background:#2563eb; color:white; }
.pm-nav-count { display:inline-grid; place-items:center; min-width:20px; height:19px; padding:0 5px; border-radius:4px; background:var(--pm-soft); font-size:11px; font-variant-numeric:tabular-nums; }
.pm-compact .pm-module-actions { gap:5px; }
.pm-compact .pm-module-actions>.pm-icon-button,.pm-compact .pm-module-actions>.pm-action-menu>.pm-icon-button { width:38px; height:38px; min-height:38px; flex-basis:38px; border-radius:12px; border-color:var(--pm-line); background:var(--pm-surface); color:var(--pm-muted); }
.pm-compact .pm-module-actions button:hover { border-color:#94a3b8; background:var(--pm-soft); color:var(--action-text); }
.pm-content { min-width:0; padding:18px; border:1px solid var(--pm-line); border-radius:16px; background:var(--pm-surface); box-shadow:0 1px 3px rgba(0,0,0,0.04); }
.pm-content--list { padding:0; border:0; background:transparent; box-shadow:none; }
.pm-content--list .pm-list-tools { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:14px 16px 10px; background:var(--pm-surface); border:1px solid var(--pm-line); border-bottom:0; border-radius:16px 16px 0 0; }
.pm-search-field { position:relative; flex:1 1 250px; max-width:460px; min-width:0; }
.pm-search-field>i { position:absolute; top:50%; left:12px; transform:translateY(-50%); font-size:13px; color:var(--pm-muted); pointer-events:none; }
.pm-workspace .pm-search-field>input[type=search] { height:40px; min-height:40px; padding:8px 12px 8px 34px; margin:0; border-radius:12px; font-size:13px; background:var(--pm-soft); }
.pm-search-field>input::placeholder { color:var(--pm-muted); opacity:1; }
.pm-list-tools .pm-result-count { margin:0 0 0 auto; white-space:nowrap; font-size:12px; }
.pm-list-tools .pm-result-count strong { color:var(--text); font-variant-numeric:tabular-nums; }
.pm-list-tools .pm-views-button { min-height:40px; padding:8px 14px; font-size:12px; font-weight:700; border-radius:12px; }
.pm-saved-dot { width:6px; height:6px; border-radius:50%; background:var(--action-text); }
.pm-content--list .pm-list-filterbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; padding:0 16px 12px; background:var(--pm-surface); border:1px solid var(--pm-line); border-top:0; border-radius:0 0 16px 16px; margin-bottom:16px; }
.pm-windows { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.pm-window { display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:6px 12px; border:1px solid var(--pm-line); border-radius:10px; color:var(--pm-muted); background:var(--pm-surface); font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap; transition:all .15s ease; }
.pm-window>i { font-size:11px; }
.pm-window-count { min-width:18px; padding:1px 5px; border-radius:4px; background:var(--pm-soft); color:var(--pm-muted); font-size:11px; font-variant-numeric:tabular-nums; text-align:center; }
.pm-window:hover { background:var(--pm-soft); color:var(--text); }
.pm-compact .pm-window[aria-pressed=true] { color:white; background:#1e40af; border-color:#1e40af; box-shadow:0 1px 2px rgba(0,0,0,0.06); }
.dark .pm-compact .pm-window[aria-pressed=true] { background:#2563eb; border-color:#2563eb; color:white; }
.pm-window[aria-pressed=true] .pm-window-count { color:#1e40af; background:white; }
.dark .pm-window[aria-pressed=true] .pm-window-count { color:#1e3a8a; background:#eff6ff; }
.pm-window-alert>i { color:var(--danger-text); }
.pm-list-filterbar>.pm-button { min-height:34px; border:1px solid var(--pm-line); border-radius:10px; padding:6px 10px; color:var(--pm-muted); font-size:12px; font-weight:700; background:var(--pm-surface); }
.pm-list-filterbar>.pm-button:hover { background:var(--pm-soft); color:var(--text); }
.pm-filter-total { display:inline-grid; place-items:center; min-width:18px; height:18px; background:var(--pm-soft); border-radius:4px; margin-left:4px; }
.pm-content--list .pm-active-filters { display:flex; flex-wrap:wrap; gap:6px; padding:0 16px 12px; background:var(--pm-surface); border:1px solid var(--pm-line); border-top:0; border-radius:0 0 16px 16px; margin-bottom:16px; }
.pm-content--list:has(.pm-active-filters:not(:empty)) .pm-list-filterbar { border-bottom:0; border-radius:0; margin-bottom:0; }
.pm-filter-chip { display:inline-flex; align-items:center; gap:5px; min-height:28px; max-width:100%; padding:4px 10px; border:1px solid #dbeafe; border-radius:9999px; background:#eff6ff; color:#1e40af; font-size:10px; font-weight:700; cursor:pointer; overflow-wrap:anywhere; }
.dark .pm-filter-chip { border-color:rgba(30,64,175,0.4); background:rgba(23,37,84,0.2); color:#93c5fd; }
.pm-filter-chip strong { font-weight:700; color:inherit; }
.pm-filter-chip>i { margin-left:3px; }
.pm-filter-chip:hover { border-color:#93c5fd; background:#dbeafe; }
.pm-content--list>.pm-table-card { border-radius:16px; border:1px solid var(--pm-line); background:var(--pm-surface); box-shadow:0 1px 3px rgba(0,0,0,0.04); margin-bottom:16px; }
.pm-table-card>.pm-table-scroll { border:0; border-radius:0; margin:0; box-shadow:none; }
.pm-content--list>.pm-quick { margin:0 0 16px; padding:16px; border:1px solid var(--pm-line); border-radius:16px; background:var(--pm-surface); box-shadow:0 1px 3px rgba(0,0,0,0.04); }
.pm-compact .pm-preventive-table { min-width:960px; width:100%; table-layout:fixed; border-collapse:collapse; }
.pm-compact .pm-preventive-table th:nth-child(n) { width:auto; text-align:left; }
.pm-compact .pm-preventive-table th:last-child { text-align:center; padding-right:8px; }
.pm-compact .pm-preventive-table th { padding:10px 12px; height:auto; font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:0.08em; line-height:1.35; vertical-align:middle; color:#475569; background:#f8fafc; border-bottom:1px solid #e2e8f0; }
.dark .pm-compact .pm-preventive-table th { color:#94a3b8; background:#0f172a; border-bottom-color:#1e293b; }
.pm-compact .pm-preventive-table th:last-child { text-transform:none; letter-spacing:normal; }
.pm-compact .pm-preventive-table td { padding:10px 12px; font-size:13px; line-height:1.4; vertical-align:middle; }
.pm-compact .pm-preventive-table td:nth-child(4),.pm-compact .pm-preventive-table td:nth-child(5),.pm-compact .pm-preventive-table td:nth-child(6),.pm-compact .pm-preventive-table td:nth-child(7) { padding-left:8px; padding-right:8px; }
.pm-compact .pm-preventive-table .pm-cell-title>.pm-button { display:inline; min-height:0; height:auto; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; font-size:13px; font-weight:600; line-height:1.35; color:#1e293b; text-align:left; }
.dark .pm-compact .pm-preventive-table .pm-cell-title>.pm-button { color:#f1f5f9; }
.pm-compact .pm-preventive-table .pm-cell-title>.pm-button:hover { color:#1d4ed8; text-decoration:underline; background:transparent; }
.dark .pm-compact .pm-preventive-table .pm-cell-title>.pm-button:hover { color:#60a5fa; }
.pm-compact .pm-preventive-table td:last-child .pm-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:4px; }
.pm-compact .pm-preventive-table .pm-icon-button { width:40px; height:40px; min-height:40px; min-width:40px; flex:0 0 40px; padding:0; border-radius:12px; border:1px solid #e2e8f0; background:#ffffff; color:#475569; font-size:14px; box-shadow:0 1px 3px rgba(15,23,42,0.14); }
.dark .pm-compact .pm-preventive-table .pm-icon-button { border-color:#334155; background:#0f172a; color:#cbd5e1; }
.pm-compact .pm-preventive-table .pm-icon-button:hover { border-color:#93c5fd; background:#eff6ff; color:#1d4ed8; transform:translateY(-1px); box-shadow:0 4px 9px rgba(15,23,42,0.17); }
.dark .pm-compact .pm-preventive-table .pm-icon-button:hover { border-color:#1e40af; background:#1e293b; color:#60a5fa; }
.pm-compact .pm-preventive-table :is([data-pm-action=start-task],.btn-quick-start) { background:#1e40af!important; border-color:#1e40af!important; color:#ffffff!important; }
.pm-compact .pm-preventive-table :is([data-pm-action=start-task],.btn-quick-start):hover { background:#1e3a8a!important; border-color:#1e3a8a!important; color:#ffffff!important; }
.pm-compact .pm-preventive-table .btn-quick-resume { background:#ffffff!important; border-color:#bfdbfe!important; color:#1e40af!important; }
.pm-compact .pm-preventive-table .btn-quick-resume:hover { background:#eff6ff!important; border-color:#93c5fd!important; }
.pm-compact .pm-preventive-table .btn-quick-resolve { background:#ecfdf5!important; border-color:#6ee7b7!important; color:#047857!important; }
.pm-compact .pm-preventive-table .btn-quick-resolve:hover { background:#d1fae5!important; border-color:#34d399!important; }
.pm-compact .pm-preventive-table .btn-quick-pause { background:#fffbeb!important; border-color:#fcd34d!important; color:#92400e!important; }
.pm-compact .pm-preventive-table .btn-quick-pause:hover { background:#fef3c7!important; border-color:#fbbf24!important; }
.pm-compact .pm-preventive-table .pm-execution-meta { flex-basis:100%; width:100%; display:flex; justify-content:center; margin-top:6px; }
tr.pm-row--overdue>td, tr.pm-row--today>td { border-top:1px solid #94a3b8; border-bottom:1px solid #94a3b8; }
tr.pm-row--overdue>td:first-child { border-left:6px solid #dc2626; background-image:linear-gradient(90deg, rgba(220,38,38,0.11), transparent 65%); }
tr.pm-row--today>td:first-child { border-left:6px solid #d97706; background-image:linear-gradient(90deg, rgba(217,119,6,0.13), transparent 65%); }
tr.pm-row--overdue>td:last-child, tr.pm-row--today>td:last-child { border-right:1px solid #94a3b8; }
.dark tr.pm-row--overdue>td, .dark tr.pm-row--today>td { border-top-color:#475569; border-bottom-color:#475569; }
.dark tr.pm-row--overdue>td:last-child, .dark tr.pm-row--today>td:last-child { border-right-color:#475569; }
.pm-deadline { font-weight:600; font-variant-numeric:tabular-nums; }
.pm-list-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; padding:11px 16px; border-top:1px solid var(--pm-line); color:var(--pm-muted); font-size:11px; background:var(--pm-surface); }
.pm-list-footer i { margin-right:5px; }
.pm-compact .pm-empty { padding:44px 20px!important; font-size:13px!important; }
.pm-empty>strong { display:block; }
.pm-empty-icon { display:block; margin:0 auto 12px; font-size:23px; color:var(--pm-muted); }
.pm-compact .pm-planning-modes { display:inline-flex; margin:0 0 14px; padding:3px; border:1px solid var(--pm-line); border-radius:7px; background:var(--pm-soft); gap:2px; }
.pm-compact .pm-planning-modes .pm-button { min-height:30px; border:0; padding:6px 10px; background:transparent; font-size:11px; }
.pm-compact .pm-planning-modes .pm-button[aria-pressed=true] { background:var(--pm-surface); color:var(--action-text); box-shadow:0 1px 3px #0f172a12; }
.pm-compact .pm-content>.pm-section-heading h2 { font-size:16px; }
.pm-compact .pm-content>.pm-section-heading p { font-size:12px; }
.pm-compact .pm-content>.pm-filters { gap:10px; }
.pm-compact .pm-content>.pm-filters label { font-size:11px; }
.pm-compact .pm-content>.pm-filters :is(select,input) { min-height:34px; padding:7px 9px; font-size:12px; }
.pm-compact .pm-content>.pm-filters .pm-button { min-height:34px; }
.pm-compact .pm-calendar-day { min-height:92px; }
.pm-plan-tools { margin-bottom:14px; }
.pm-plan-tools>.pm-search-field { display:block; width:min(100%,460px); margin-bottom:10px; }
.pm-plan-filters>summary { display:inline-flex; align-items:center; gap:7px; min-height:32px; padding:5px 8px; border:1px solid var(--pm-line); border-radius:6px; font-size:11px; font-weight:600; cursor:pointer; color:var(--pm-muted); }
.pm-plan-filters[open]>summary { background:var(--pm-soft); color:var(--action-text); }
.pm-plan-filters>.pm-filters { padding-top:12px; gap:10px; }
.pm-plan-filters label { flex:1 1 150px; font-size:11px; }
.pm-plan-filters label :is(select,input) { min-height:34px; padding:7px 9px; font-size:12px; }
.pm-plan-tabs { display:flex; flex-wrap:wrap; gap:4px; margin:16px 0; padding-bottom:10px; border-bottom:1px solid var(--pm-line); }
.pm-plan-tabs .pm-button { min-height:32px; border-color:transparent; font-size:12px; padding:6px 10px; color:var(--pm-muted); }
.pm-compact .pm-plan-tabs .pm-button[aria-pressed=true] { color:var(--action-text); border-color:transparent; background:var(--action-soft); box-shadow:none; }
.pm-plan-overview h2 { font-size:18px; font-weight:700; letter-spacing:-.02em; margin-top:12px; }
.pm-plan-overview p { margin:6px 0; font-size:12px; color:var(--pm-muted); }
.pm-quick-add-bar { padding:12px 16px; border:1px solid var(--pm-line); background:var(--pm-soft); border-radius:16px; margin-bottom:14px; }
.pm-quick-add-grid { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; }
.pm-quick-field { flex:1 1 120px; min-width:105px; font-size:11px; font-weight:700; color:var(--pm-muted); }
.pm-quick-field--equip { flex:1.4 1 170px; min-width:150px; }
.pm-quick-field--title { flex:2 1 220px; min-width:180px; }
.pm-quick-field--batch { flex:3 1 320px; min-width:240px; }
.pm-quick-field--desc { flex:1.5 1 170px; min-width:140px; }
.pm-quick-field--hours { flex:0 1 88px; min-width:78px; }
.pm-quick-field--date { flex:0 1 135px; min-width:125px; }
.pm-quick-field :is(input,select,textarea) { width:100%; min-height:34px; padding:6px 9px; font-size:12px; margin-top:3px; border:1px solid var(--pm-line); border-radius:9px; background:var(--pm-surface); color:var(--text); }
.pm-quick-actions { display:flex; align-items:center; gap:6px; margin-left:auto; }
.pm-quick-actions .pm-button { min-height:34px; height:34px; padding:0 12px; border-radius:9px; font-size:12px; white-space:nowrap; }
.pm-row--editing>td { background:var(--action-soft); vertical-align:top!important; }
.pm-inline-input,.pm-inline-select { width:100%; min-height:32px!important; padding:5px 8px!important; font-size:12px!important; border:1px solid var(--pm-line)!important; border-radius:8px!important; background:var(--pm-surface)!important; color:var(--text)!important; }
.pm-inline-input.w-14 { width:64px; }
@media(max-width:1100px) { .pm-list-tools { gap:8px; } .pm-search-field { max-width:380px; } }
@media(max-width:640px) {
    .pm-page-header { margin-bottom:14px; gap:8px; flex-wrap:wrap; }
    .pm-page-title h1 { font-size:19px; }
    .pm-page-icon { width:36px; height:36px; font-size:15px; border-radius:9px; }
    .pm-page-title { gap:9px; }
    .pm-compact .pm-module-bar { flex-wrap:nowrap; align-items:center; }
    .pm-compact .pm-module-nav { flex:1; min-width:0; width:auto; gap:0; }
    .pm-compact .pm-module-nav .pm-button { flex:1 1 auto; min-height:34px; padding:6px 7px; font-size:11px; gap:5px; }
    .pm-compact .pm-module-nav .pm-button>i,.pm-nav-count { display:none; }
    .pm-compact .pm-module-actions { flex-wrap:nowrap; gap:0; }
    .pm-compact .pm-module-actions>.pm-icon-button { display:none; }
    .pm-content { padding:12px; }
    .pm-content--list { padding:0; }
    .pm-compact .pm-calendar-day { min-height:64px; }
    .pm-list-tools { padding:12px 12px 8px; gap:10px; }
    .pm-search-field { flex:1 1 100%; max-width:none; }
    .pm-list-tools .pm-result-count { margin:0 auto 0 0; font-size:11px; }
    .pm-list-tools .pm-views-button { min-height:32px; font-size:11px; }
    .pm-list-filterbar { padding:0 12px 10px; }
    .pm-windows { gap:1px; width:100%; }
    .pm-window { gap:5px; padding:5px 6px; min-height:34px; font-size:11px; }
    .pm-window>i { display:none; }
    .pm-window-count { padding:1px 4px; font-size:10px; }
    .pm-active-filters { padding:0 12px 10px; }
    .pm-filter-chip { min-height:32px; }
    .pm-quick-add-bar { padding:10px 12px; }
    .pm-quick-field { flex:1 1 calc(50% - 8px); }
    .pm-quick-field--wide { flex:1 1 100%; }
    .pm-quick-actions { width:100%; justify-content:flex-end; }
    .pm-list-footer { padding:10px 12px; font-size:10px; }
    .pm-list-footer>span:last-child { display:none; }
}