:root{
    --emof-bg:#f4f6f8;
    --emof-surface:#ffffff;
    --emof-surface-soft:#f8fafc;
    --emof-text:#172033;
    --emof-muted:#667085;
    --emof-border:#e3e8ef;
    --emof-border-strong:#cdd5df;
    --emof-primary:#b91c1c;
    --emof-primary-dark:#991b1b;
    --emof-primary-soft:#fff1f1;
    --emof-shadow:0 14px 36px rgba(16,24,40,.08);
    --emof-shadow-soft:0 6px 18px rgba(16,24,40,.055);
    --emof-radius:18px;
    --emof-radius-sm:12px;
}


/* A página do WordPress já recebe o nome "Oficina Eletro Max". Como o sistema tem cabeçalho próprio,
   escondemos o título externo apenas na página que usa o shortcode [em_oficina]. */
.emof-oficina-page .entry-header,
.emof-oficina-page .page-header,
.emof-oficina-page .wp-block-post-title,
.emof-oficina-page h1.entry-title,
.emof-oficina-page .entry-title,
.emof-oficina-page .page-title{
    display:none!important;
}
.emof-oficina-page .entry-content,
.emof-oficina-page .site-main,
.emof-oficina-page main,
.emof-oficina-page .content-area{
    margin-top:0!important;
    padding-top:0!important;
}

.emof-wrap{
    max-width:1220px;
    margin:0 auto;
    padding:20px 28px 28px;
    font-family:Inter,Arial,Helvetica,sans-serif;
    color:var(--emof-text);
    background:linear-gradient(180deg,#f8fafc 0%,var(--emof-bg) 220px,var(--emof-bg) 100%);
    border-radius:24px;
    line-height:1.45;
}

.emof-wrap *{box-sizing:border-box}

.emof-topbar{
    display:flex;
    gap:18px;
    justify-content:space-between;
    align-items:flex-start;
    margin-bottom:18px;
    padding:22px 24px;
    border-radius:22px;
    background:linear-gradient(135deg,#161f2d 0%,#263142 78%);
    color:#fff;
    box-shadow:var(--emof-shadow);
    border:1px solid rgba(255,255,255,.08);
}
.emof-topbar h1{margin:0 0 5px;font-size:28px;line-height:1.15;color:#fff;letter-spacing:-.03em}
.emof-topbar p{margin:0;color:#d5dce8;font-size:14px}
.emof-userbox{display:flex;flex-direction:column;align-items:flex-end;gap:5px;min-width:190px;text-align:right}
.emof-userbox strong{color:#fff}
.emof-userbox span{font-size:13px;color:#d5dce8}
.emof-switch-user{font-size:12px;color:#fff;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.65);padding-bottom:1px}
.emof-switch-user:hover{border-bottom-color:#fff}

.emof-user-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.emof-theme-form{margin:0}
.emof-theme-toggle{
    border:1px solid rgba(255,255,255,.28);
    background:rgba(255,255,255,.08);
    color:#fff;
    border-radius:999px;
    padding:6px 10px;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
    line-height:1.2;
}
.emof-theme-toggle:hover{background:rgba(255,255,255,.15);border-color:rgba(255,255,255,.48)}

.emof-nav{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:0 0 18px;
    padding:8px;
    border:1px solid var(--emof-border);
    border-radius:999px;
    background:rgba(255,255,255,.75);
    box-shadow:var(--emof-shadow-soft);
}
.emof-nav a{
    padding:9px 14px;
    border-radius:999px;
    background:transparent;
    text-decoration:none;
    color:#344054;
    font-weight:800;
    font-size:13px;
    transition:.15s ease;
}
.emof-nav a.active,.emof-nav a:hover{background:#1f2937;color:#fff;box-shadow:0 4px 10px rgba(17,24,39,.16)}

.emof-card{
    background:var(--emof-surface);
    border:1px solid var(--emof-border);
    border-radius:var(--emof-radius);
    padding:18px;
    margin-bottom:18px;
    box-shadow:var(--emof-shadow-soft);
}
.emof-card h2,.emof-card h3{letter-spacing:-.025em;color:#101828}
.emof-card h2{font-size:21px;margin:0 0 12px}
.emof-card h3{font-size:17px;margin:0 0 10px}
.emof-login{max-width:520px;margin:34px auto;padding:28px;text-align:center}

.emof-grid{display:grid;gap:14px}
.emof-kpis{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}
.emof-kpis .emof-card{padding:17px;border-left:4px solid #d6dde7}
.emof-kpis .emof-card span{display:block;color:var(--emof-muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.emof-kpis .emof-card strong{display:block;margin-top:4px;font-size:31px;color:#111827;letter-spacing:-.045em}
.emof-two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.emof-section-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}
.emof-section-head h2{margin:0}
.emof-muted,small{color:var(--emof-muted)}
small{font-size:12px}

.emof-alert{padding:12px 14px;border-radius:14px;margin-bottom:14px;font-weight:800;border:1px solid transparent}
.emof-alert-success{background:#ecfdf3;color:#027a48;border-color:#abefc6}
.emof-alert-error{background:#fef3f2;color:#b42318;border-color:#fecdca}

.emof-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.emof-field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.emof-field label,.emof-inline-form label{font-weight:800;font-size:13px;color:#344054}
.emof-field input,.emof-field select,.emof-field textarea,.emof-filters input,.emof-filters select,.emof-inline-form input{
    width:100%;
    border:1px solid var(--emof-border-strong);
    border-radius:12px;
    padding:10px 11px;
    background:#fff;
    color:#111827;
    box-sizing:border-box;
    font-size:14px;
    outline:none;
    transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.emof-field textarea{min-height:92px;resize:vertical}
.emof-field input:focus,.emof-field select:focus,.emof-field textarea:focus,.emof-filters input:focus,.emof-filters select:focus,.emof-inline-form input:focus{
    border-color:#98a2b3;
    box-shadow:0 0 0 4px rgba(152,162,179,.16);
}
.emof-field input[readonly],.emof-field input[disabled],.emof-field select[disabled]{background:#f8fafc;color:#667085}

.emof-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.emof-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    border:1px solid var(--emof-border-strong);
    border-radius:999px;
    padding:9px 14px;
    background:#fff;
    color:#344054;
    text-decoration:none;
    font-weight:800;
    cursor:pointer;
    white-space:nowrap;
    box-shadow:0 2px 6px rgba(16,24,40,.04);
    transition:transform .12s ease,background .15s ease,border-color .15s ease;
}
.emof-btn:hover{background:#f8fafc;border-color:#98a2b3;transform:translateY(-1px)}
.emof-btn-primary{background:var(--emof-primary);border-color:var(--emof-primary);color:#fff;box-shadow:0 8px 16px rgba(185,28,28,.18)}
.emof-btn-primary:hover{background:var(--emof-primary-dark);border-color:var(--emof-primary-dark)}
.emof-btn-small{font-size:12px;padding:7px 10px}
.emof-btn-danger{background:#fff1f3;border-color:#fecdca;color:#b42318}
.emof-btn-danger:hover{background:#fee4e2;border-color:#fda29b;color:#912018}
.emof-row-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.emof-inline-delete{display:inline-flex;margin:0}
.emof-danger-zone{border-color:#fecdca;background:#fff8f7}
.emof-danger-zone h3{color:#b42318}

.emof-table-wrap{
    overflow-x:auto;
    border:1px solid var(--emof-border);
    border-radius:16px;
    background:#fff;
}
.emof-table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px}
.emof-table th,.emof-table td{padding:12px 11px;border-bottom:1px solid var(--emof-border);text-align:left;vertical-align:top}
.emof-table tr:last-child td{border-bottom:0}
.emof-table th{
    position:sticky;
    top:0;
    z-index:1;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.055em;
    color:#667085;
    background:#f8fafc;
    font-weight:900;
}
.emof-table tbody tr{background:#fff;transition:background .15s ease}
.emof-table tbody tr:hover{background:#fbfcfe}
.emof-table td:first-child,.emof-table th:first-child{padding-left:16px}
.emof-table td:last-child,.emof-table th:last-child{padding-right:16px}

.emof-pill{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:5px 9px;
    font-size:11px;
    font-weight:900;
    line-height:1.15;
    border:1px solid transparent;
    background:#eef2f6;
    color:#344054;
    white-space:nowrap;
}
.emof-pill-light{background:#f8fafc;color:#475467;border-color:#e4e7ec}
.emof-urgency-now{background:#fff1f1;color:#b42318;border-color:#ffd1d1}
.emof-urgency-next{background:#fff4e5;color:#b54708;border-color:#fedf89}
.emof-urgency-period{background:#fffaeb;color:#93370d;border-color:#fef0c7}
.emof-urgency-tomorrow{background:#eff8ff;color:#175cd3;border-color:#b2ddff}
.emof-urgency-none{background:#f2f4f7;color:#475467;border-color:#e4e7ec}
.emof-status-ready{background:#ecfdf3;color:#027a48;border-color:#abefc6}
.emof-status-delivered{background:#eef2f6;color:#475467;border-color:#d0d5dd}
.emof-status-waiting{background:#fffaeb;color:#b54708;border-color:#fedf89}
.emof-status-closed{background:#f2f4f7;color:#667085;border-color:#d0d5dd}
.emof-status-working{background:#eff8ff;color:#175cd3;border-color:#b2ddff}

.emof-row-urgency-now td:first-child{border-left:5px solid #d92d20}
.emof-row-urgency-next td:first-child{border-left:5px solid #f79009}
.emof-row-urgency-period td:first-child{border-left:5px solid #fdb022}
.emof-row-urgency-tomorrow td:first-child{border-left:5px solid #2e90fa}
.emof-row-urgency-none td:first-child{border-left:5px solid #cdd5df}
.emof-row-delivered{background:#f3f4f6!important;color:#667085}
.emof-row-delivered td{border-bottom-color:#d9dee7}
.emof-row-delivered td:first-child{border-left-color:#98a2b3!important}
.emof-row-closed{background:#fafafa;color:#667085}
.emof-row-closed td:first-child{border-left-color:#98a2b3!important}

.emof-os-header{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.emof-os-header h2{margin:6px 0 0;font-size:28px;letter-spacing:-.04em}
.emof-os-badges{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.emof-back{color:var(--emof-primary);text-decoration:none;font-weight:900}
.emof-back:hover{text-decoration:underline}
.emof-dl{display:grid;grid-template-columns:150px 1fr;gap:8px 12px}
.emof-dl dt{font-weight:900;color:#475467}
.emof-dl dd{margin:0;color:#182230}

.emof-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.emof-photos figure{margin:0;border:1px solid var(--emof-border);border-radius:14px;padding:8px;background:#fff;box-shadow:0 3px 10px rgba(16,24,40,.04)}
.emof-photos img{width:100%;height:120px;object-fit:cover;border-radius:10px;background:#f2f4f7}
.emof-link-danger{border:0;background:transparent;color:#b42318;text-decoration:underline;cursor:pointer;padding:5px 0;font-weight:800}

.emof-timeline{position:relative}
.emof-timeline article{display:grid;grid-template-columns:150px 1fr;gap:12px;margin-bottom:12px}
.emof-time{font-size:12px;color:#667085;font-weight:900;padding-top:12px}
.emof-log-card{border:1px solid var(--emof-border);border-radius:16px;padding:14px;background:#fbfcfe;box-shadow:0 2px 10px rgba(16,24,40,.035)}
.emof-log-card h4{margin:0 0 8px;color:#182230}
.emof-log-card h4 span{font-weight:500;color:#667085}
.emof-log-card p{margin:8px 0}

.emof-inline-form{display:flex;gap:8px;align-items:end;flex-wrap:wrap}
.emof-inline-form label{min-width:160px}
.emof-filters{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.emof-filters input,.emof-filters select{max-width:220px;background:#fff}
.emof-check{display:inline-flex;align-items:center;gap:7px;font-weight:800;color:#475467;white-space:nowrap;background:#fff;border:1px solid var(--emof-border);border-radius:999px;padding:8px 11px}
.emof-check input{width:auto;max-width:none;margin:0}
.emof-status-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.emof-status-list div{display:flex;justify-content:space-between;gap:8px;padding:13px 14px;background:#f8fafc;border:1px solid var(--emof-border);border-radius:14px}
.emof-status-list strong{font-size:20px;letter-spacing:-.03em}
.emof-claim-box{border-color:#fedf89;background:#fffbf2}

.emof-readonly-money{
    border:1px solid var(--emof-border);
    border-radius:14px;
    padding:12px;
    background:#f8fafc;
}
.emof-readonly-money strong{font-size:21px;color:#111827;letter-spacing:-.03em}
.emof-readonly-money small{display:block;margin-top:2px}


/* Tema escuro: discreto, com contraste confortável para uso prolongado na oficina. */

/* O modo escuro precisa atingir também o fundo do tema do WordPress, não apenas os cards internos. */
html.emof-oficina-page.emof-theme-dark,
body.emof-oficina-page.emof-theme-dark{
    background:#070d18!important;
    color:#e5e7eb!important;
    color-scheme:dark;
}
body.emof-oficina-page.emof-theme-dark #page,
body.emof-oficina-page.emof-theme-dark .site,
body.emof-oficina-page.emof-theme-dark .wp-site-blocks,
body.emof-oficina-page.emof-theme-dark .site-content,
body.emof-oficina-page.emof-theme-dark .content-area,
body.emof-oficina-page.emof-theme-dark .site-main,
body.emof-oficina-page.emof-theme-dark main,
body.emof-oficina-page.emof-theme-dark article,
body.emof-oficina-page.emof-theme-dark .entry-content,
body.emof-oficina-page.emof-theme-dark .wp-block-group,
body.emof-oficina-page.emof-theme-dark .wp-block-post-content,
body.emof-oficina-page.emof-theme-dark .elementor,
body.emof-oficina-page.emof-theme-dark .elementor-section,
body.emof-oficina-page.emof-theme-dark .elementor-container,
body.emof-oficina-page.emof-theme-dark .elementor-widget-container{
    background:#070d18!important;
    color:#e5e7eb!important;
}
body.emof-oficina-page.emof-theme-dark .emof-wrap{
    border:1px solid #1f2a3d;
}

.emof-wrap.emof-theme-dark{
    --emof-bg:#0f172a;
    --emof-surface:#172033;
    --emof-surface-soft:#111827;
    --emof-text:#e5e7eb;
    --emof-muted:#aeb8c8;
    --emof-border:#2c374a;
    --emof-border-strong:#3b465a;
    --emof-primary:#ef4444;
    --emof-primary-dark:#dc2626;
    --emof-primary-soft:#3a1820;
    --emof-shadow:0 18px 46px rgba(0,0,0,.34);
    --emof-shadow-soft:0 9px 24px rgba(0,0,0,.24);
    background:linear-gradient(180deg,#111827 0%,#0f172a 220px,#0f172a 100%);
    color:var(--emof-text);
}
body.emof-oficina-page.emof-theme-dark,
body.emof-oficina-page.emof-theme-dark .site,
body.emof-oficina-page.emof-theme-dark .site-main,
body.emof-oficina-page.emof-theme-dark main,
body.emof-oficina-page.emof-theme-dark .content-area,
body.emof-oficina-page.emof-theme-dark .entry-content{
    background:#0b1220!important;
}
.emof-theme-dark .emof-topbar{background:linear-gradient(135deg,#0b1220 0%,#1f2937 80%);border-color:#334155}
.emof-theme-dark .emof-card,
.emof-theme-dark .emof-table-wrap,
.emof-theme-dark .emof-photos figure{background:var(--emof-surface);border-color:var(--emof-border)}
.emof-theme-dark .emof-card h2,
.emof-theme-dark .emof-card h3,
.emof-theme-dark .emof-os-header h2,
.emof-theme-dark .emof-log-card h4,
.emof-theme-dark .emof-dl dd{color:#f8fafc}
.emof-theme-dark .emof-nav{background:rgba(23,32,51,.78);border-color:var(--emof-border)}
.emof-theme-dark .emof-nav a{color:#d7dde8}
.emof-theme-dark .emof-nav a.active,
.emof-theme-dark .emof-nav a:hover{background:#ef4444;color:#fff;box-shadow:0 6px 14px rgba(239,68,68,.18)}
.emof-theme-dark .emof-kpis .emof-card{border-left-color:#3b465a}
.emof-theme-dark .emof-kpis .emof-card strong,
.emof-theme-dark .emof-readonly-money strong{color:#fff}
.emof-theme-dark .emof-field label,
.emof-theme-dark .emof-inline-form label,
.emof-theme-dark .emof-check{color:#d7dde8}
.emof-theme-dark .emof-field input,
.emof-theme-dark .emof-field select,
.emof-theme-dark .emof-field textarea,
.emof-theme-dark .emof-filters input,
.emof-theme-dark .emof-filters select,
.emof-theme-dark .emof-inline-form input{
    background:#0f172a;
    color:#f8fafc;
    border-color:var(--emof-border-strong);
}
.emof-theme-dark .emof-field input::placeholder,
.emof-theme-dark .emof-field textarea::placeholder{color:#94a3b8}
.emof-theme-dark .emof-field input[readonly],
.emof-theme-dark .emof-field input[disabled],
.emof-theme-dark .emof-field select[disabled]{background:#111827;color:#94a3b8}
.emof-theme-dark .emof-btn{background:#1f2937;color:#f8fafc;border-color:#3b465a;box-shadow:0 3px 8px rgba(0,0,0,.16)}
.emof-theme-dark .emof-btn:hover{background:#263449;border-color:#536178}
.emof-theme-dark .emof-btn-primary{background:var(--emof-primary);border-color:var(--emof-primary);color:#fff}
.emof-theme-dark .emof-btn-primary:hover{background:var(--emof-primary-dark);border-color:var(--emof-primary-dark)}
.emof-theme-dark .emof-btn-danger{background:#3b1519;border-color:#7a271a;color:#fecdc9}
.emof-theme-dark .emof-btn-danger:hover{background:#55160c;border-color:#b42318;color:#fff}
.emof-theme-dark .emof-danger-zone{background:#231b1b;border-color:#7a271a}
.emof-theme-dark .emof-danger-zone h3{color:#fecdca}
.emof-theme-dark .emof-table{color:#e5e7eb}
.emof-theme-dark .emof-table th{background:#111827;color:#aeb8c8;border-color:var(--emof-border)}
.emof-theme-dark .emof-table td{border-color:var(--emof-border)}
.emof-theme-dark .emof-table tbody tr{background:#172033}
.emof-theme-dark .emof-table tbody tr:hover{background:#1c283b}
.emof-theme-dark .emof-status-list div,
.emof-theme-dark .emof-readonly-money,
.emof-theme-dark .emof-log-card{background:#111827;border-color:var(--emof-border)}
.emof-theme-dark .emof-check{background:#111827;border-color:var(--emof-border)}
.emof-theme-dark .emof-claim-box{background:#2b2315;border-color:#73510e}
.emof-theme-dark .emof-row-delivered{background:#111827!important;color:#94a3b8}
.emof-theme-dark .emof-row-closed{background:#151a24;color:#94a3b8}
.emof-theme-dark .emof-photos img{background:#0f172a}
.emof-theme-dark .emof-alert-success{background:#082f23;color:#86efac;border-color:#166534}
.emof-theme-dark .emof-alert-error{background:#3b1113;color:#fecaca;border-color:#7f1d1d}
.emof-theme-dark .emof-back{color:#f87171}
.emof-theme-dark .emof-pill-light,
.emof-theme-dark .emof-urgency-none,
.emof-theme-dark .emof-status-delivered,
.emof-theme-dark .emof-status-closed{background:#263449;color:#d7dde8;border-color:#3b465a}
.emof-theme-dark .emof-urgency-now{background:#3b1113;color:#fecaca;border-color:#7f1d1d}
.emof-theme-dark .emof-urgency-next{background:#3b2410;color:#fed7aa;border-color:#9a3412}
.emof-theme-dark .emof-urgency-period{background:#33290b;color:#fde68a;border-color:#854d0e}
.emof-theme-dark .emof-urgency-tomorrow,
.emof-theme-dark .emof-status-working{background:#102a43;color:#bfdbfe;border-color:#1d4ed8}
.emof-theme-dark .emof-status-ready{background:#052e1a;color:#bbf7d0;border-color:#166534}


.emof-theme-dark .emof-wrap,
.emof-theme-dark .emof-wrap p,
.emof-theme-dark .emof-wrap td,
.emof-theme-dark .emof-wrap dd,
.emof-theme-dark .emof-wrap li{
    color:var(--emof-text);
}
.emof-theme-dark .emof-muted,
.emof-theme-dark small,
.emof-theme-dark .emof-time,
.emof-theme-dark .emof-log-card h4 span,
.emof-theme-dark .emof-dl dt{
    color:var(--emof-muted)!important;
}
.emof-theme-dark .emof-table a:not(.emof-btn),
.emof-theme-dark .emof-card a:not(.emof-btn):not(.emof-switch-user):not(.emof-back){
    color:#fca5a5;
}
.emof-theme-dark .emof-link-danger{color:#fca5a5}
.emof-theme-dark .emof-table-wrap,
.emof-theme-dark .emof-table,
.emof-theme-dark .emof-table tbody,
.emof-theme-dark .emof-table tbody tr,
.emof-theme-dark .emof-table td,
.emof-theme-dark .emof-table th{
    background-color:transparent;
}
.emof-theme-dark .emof-table tbody tr{background:#172033!important}
.emof-theme-dark .emof-table tbody tr:hover{background:#1c283b!important}
.emof-theme-dark .emof-row-delivered{background:#111827!important;color:#94a3b8!important}
.emof-theme-dark .emof-row-closed{background:#151a24!important;color:#94a3b8!important}
.emof-theme-dark .emof-pill{box-shadow:none}
.emof-theme-dark select option{background:#0f172a;color:#f8fafc}

@media(max-width:900px){
    .emof-wrap{padding:16px;border-radius:18px}
    .emof-topbar,.emof-os-header,.emof-section-head{flex-direction:column}
    .emof-userbox{align-items:flex-start;text-align:left}
    .emof-nav{border-radius:18px}
    .emof-kpis,.emof-two-col,.emof-form-grid{grid-template-columns:1fr}
    .emof-timeline article{grid-template-columns:1fr}
    .emof-time{padding-top:0}
    .emof-dl{grid-template-columns:1fr}
    .emof-filters input,.emof-filters select{max-width:none}
    .emof-table{font-size:13px}
}


/* Tela não autenticada da área restrita */
.emof-login-screen{
    max-width:980px;
    margin:0 auto;
    padding:46px 24px;
    background:radial-gradient(circle at 18% 12%, rgba(220,38,38,.18), transparent 30%),
               radial-gradient(circle at 82% 0%, rgba(15,23,42,.9), transparent 38%),
               linear-gradient(135deg, #050914 0%, #0f172a 45%, #111827 100%);
    position:relative;
    overflow:hidden;
    border:1px solid rgba(148,163,184,.12);
    box-shadow:0 28px 75px rgba(0,0,0,.16);
}
.emof-login-screen::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background-image:linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size:42px 42px;
    -webkit-mask-image:linear-gradient(to bottom, rgba(0,0,0,.85), transparent 75%);
    mask-image:linear-gradient(to bottom, rgba(0,0,0,.85), transparent 75%);
}
.emof-login-screen .emof-login-shell{
    max-width:540px;
    margin:0 auto;
    padding:34px 32px;
    text-align:center;
    position:relative;
    z-index:1;
    background:rgba(15,23,42,.94);
    border:1px solid rgba(148,163,184,.25);
    box-shadow:0 28px 75px rgba(0,0,0,.42);
}
.emof-login-brand{display:flex;flex-direction:column;gap:8px;align-items:center;margin-bottom:14px}
.emof-login-brand-title{color:#ef4444;font-size:34px;line-height:1;font-weight:900;letter-spacing:.03em;text-shadow:0 14px 34px rgba(239,68,68,.22)}
.emof-login-brand-sub{color:#cbd5e1;font-size:12px;line-height:1.35;font-weight:800;letter-spacing:.16em;text-transform:uppercase}
.emof-login-screen .emof-login h2{margin:0 0 10px;font-size:30px;line-height:1.08;color:#fff;letter-spacing:-.03em}
.emof-login-screen .emof-login p{margin:0 auto 18px;max-width:420px;color:#cbd5e1;font-size:15px}
.emof-login-screen .emof-login .emof-btn-primary{min-width:130px;min-height:46px;font-size:15px;box-shadow:0 12px 24px rgba(220,38,38,.24)}
body.emof-theme-dark .emof-login-screen{border-color:rgba(148,163,184,.18)}

@media (max-width: 640px){
  .emof-login-screen{padding:28px 14px}
  .emof-login-screen .emof-login-shell{padding:26px 18px}
  .emof-login-screen .emof-login h2{font-size:24px}
  .emof-login-brand-title{font-size:28px}
}

/* Seleção de peças por catálogo */
.emof-parts-box{
    margin:16px 0;
    padding:16px;
    border:1px solid var(--emof-border);
    border-radius:18px;
    background:var(--emof-surface-soft);
}
.emof-section-head-compact{align-items:center;margin-bottom:12px}
.emof-section-head-compact h3{margin:0 0 4px}
.emof-section-head-compact p{margin:0}
.emof-part-rows{display:flex;flex-direction:column;gap:12px}
.emof-part-row{
    display:grid;
    grid-template-columns:1.35fr 1fr 90px 130px auto;
    gap:10px;
    align-items:end;
    padding:12px;
    border:1px solid var(--emof-border);
    border-radius:16px;
    background:var(--emof-surface);
}
.emof-part-search-field{position:relative}
.emof-part-results{
    position:absolute;
    left:0;
    right:0;
    top:calc(100% + 4px);
    z-index:30;
    max-height:280px;
    overflow:auto;
    background:var(--emof-surface);
    border:1px solid var(--emof-border-strong);
    border-radius:14px;
    box-shadow:0 18px 40px rgba(15,23,42,.18);
    padding:6px;
}
.emof-part-result{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
    gap:4px 10px;
    text-align:left;
    border:0;
    border-radius:10px;
    background:transparent;
    padding:9px 10px;
    cursor:pointer;
    color:var(--emof-text);
}
.emof-part-result:hover{background:var(--emof-surface-soft)}
.emof-part-result strong{font-weight:900;color:var(--emof-primary)}
.emof-part-result small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--emof-muted)}
.emof-part-result em{grid-row:1/3;grid-column:2/3;align-self:center;text-align:right;font-style:normal;font-weight:900;color:var(--emof-text)}
body.emof-theme-dark .emof-parts-box{background:#111827;border-color:#263244}
body.emof-theme-dark .emof-part-row, body.emof-theme-dark .emof-part-results{background:#0f172a;border-color:#334155}
body.emof-theme-dark .emof-part-result:hover{background:#1f2937}
@media (max-width: 900px){
  .emof-part-row{grid-template-columns:1fr 1fr}
  .emof-part-small{max-width:none}
}
@media (max-width: 640px){
  .emof-part-row{grid-template-columns:1fr}
}


/* v1.15: catálogo de peças usado apenas para Código Material + descrição */
.emof-part-result em{display:none!important}
.emof-part-result strong{display:block;margin-bottom:2px}
.emof-part-result small{font-size:12px}


/* v1.16: melhora de contraste no catálogo de peças no tema escuro */
body.emof-theme-dark .emof-parts-box .emof-section-head-compact p,
body.emof-theme-dark .emof-parts-box .emof-muted,
body.emof-theme-dark .emof-parts-box small{
    color:#cbd5e1;
}
body.emof-theme-dark .emof-part-search,
body.emof-theme-dark .emof-part-desc,
body.emof-theme-dark .emof-part-qty,
body.emof-theme-dark .emof-part-price{
    background:#07111f !important;
    color:#f8fafc !important;
    border-color:#475569 !important;
}
body.emof-theme-dark .emof-part-search::placeholder,
body.emof-theme-dark .emof-part-desc::placeholder,
body.emof-theme-dark .emof-part-price::placeholder{
    color:#94a3b8 !important;
    opacity:1;
}
body.emof-theme-dark .emof-part-search:focus,
body.emof-theme-dark .emof-part-desc:focus,
body.emof-theme-dark .emof-part-qty:focus,
body.emof-theme-dark .emof-part-price:focus{
    border-color:#f87171 !important;
    box-shadow:0 0 0 3px rgba(248,113,113,.18) !important;
}
body.emof-theme-dark .emof-part-results{
    background:#0b1322 !important;
    border-color:#475569 !important;
    box-shadow:0 20px 42px rgba(0,0,0,.45) !important;
}
body.emof-theme-dark .emof-part-result{
    color:#f8fafc !important;
}
body.emof-theme-dark .emof-part-result:hover,
body.emof-theme-dark .emof-part-result:focus{
    background:#1e293b !important;
}
body.emof-theme-dark .emof-part-result strong{
    color:#f87171 !important;
}
body.emof-theme-dark .emof-part-result small{
    color:#e2e8f0 !important;
}

/* v1.19: seleção de serviços/mão de obra */
.emof-services-box{
    border-left:4px solid rgba(239,68,68,.55);
}
.emof-service-rows{display:flex;flex-direction:column;gap:12px}
body.emof-theme-dark .emof-services-box{background:#111827;border-color:#263244;border-left-color:#ef4444}
body.emof-theme-dark .emof-service-row{background:#0f172a;border-color:#334155}
body.emof-theme-dark .emof-service-search,
body.emof-theme-dark .emof-service-desc,
body.emof-theme-dark .emof-service-qty,
body.emof-theme-dark .emof-service-price{
    background:#07111f !important;
    color:#f8fafc !important;
    border-color:#475569 !important;
}
body.emof-theme-dark .emof-service-search::placeholder,
body.emof-theme-dark .emof-service-desc::placeholder,
body.emof-theme-dark .emof-service-price::placeholder{
    color:#94a3b8 !important;
    opacity:1;
}
body.emof-theme-dark .emof-service-search:focus,
body.emof-theme-dark .emof-service-desc:focus,
body.emof-theme-dark .emof-service-qty:focus,
body.emof-theme-dark .emof-service-price:focus{
    border-color:#f87171 !important;
    box-shadow:0 0 0 3px rgba(248,113,113,.18) !important;
}


/* v1.22: campo de atribuição de apontamento */
.emof-log-user-alert{margin-bottom:12px}
.emof-log-user-grid{margin-bottom:12px;grid-template-columns:minmax(260px,420px)}
.emof-alert-info{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
body.emof-theme-dark .emof-alert-info{background:#102a43;color:#bfdbfe;border-color:#1d4ed8}


/* v1.26: destaque discreto para número da ficha física */
.emof-title-note{
    display:inline-flex;
    align-items:center;
    margin:0 6px;
    padding:4px 8px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
    letter-spacing:.02em;
    vertical-align:middle;
    background:var(--emof-primary-soft);
    color:var(--emof-primary);
    border:1px solid rgba(185,28,28,.18);
}
.emof-theme-dark .emof-title-note{
    background:#3b1113;
    color:#fecaca;
    border-color:#7f1d1d;
}

/* v1.27: edição controlada do histórico */
.emof-log-edit-details{
    margin-top:12px;
    border-top:1px solid var(--emof-border);
    padding-top:10px;
}
.emof-log-edit-details summary{
    display:inline-flex;
    align-items:center;
    cursor:pointer;
    font-weight:900;
    color:var(--emof-primary);
    font-size:13px;
    padding:6px 0;
}
.emof-log-edit-form{
    margin-top:8px;
    padding:12px;
    border:1px solid var(--emof-border);
    border-radius:14px;
    background:var(--emof-surface-soft);
}
.emof-log-edit-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin-bottom:10px;
}
.emof-log-edit-form label{
    display:flex;
    flex-direction:column;
    gap:6px;
    font-size:13px;
    font-weight:800;
    color:#344054;
}
.emof-log-edit-form input,
.emof-log-edit-form select,
.emof-log-edit-form textarea{
    width:100%;
    border:1px solid var(--emof-border-strong);
    border-radius:12px;
    padding:9px 10px;
    background:#fff;
    color:#111827;
    font-size:14px;
}
.emof-log-edit-wide{margin-bottom:10px}
.emof-log-edit-values{grid-template-columns:repeat(2,minmax(0,220px));}
body.emof-theme-dark .emof-log-edit-form{
    background:#111827;
    border-color:#334155;
}
body.emof-theme-dark .emof-log-edit-form label{color:#e2e8f0}
body.emof-theme-dark .emof-log-edit-form input,
body.emof-theme-dark .emof-log-edit-form select,
body.emof-theme-dark .emof-log-edit-form textarea{
    background:#07111f!important;
    color:#f8fafc!important;
    border-color:#475569!important;
}
body.emof-theme-dark .emof-log-edit-details{border-color:#334155}
body.emof-theme-dark .emof-log-edit-details summary{color:#f87171}
@media(max-width:900px){.emof-log-edit-grid{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.emof-log-edit-grid,.emof-log-edit-values{grid-template-columns:1fr}}


/* v1.30: botão de exclusão do apontamento */
.emof-log-delete-form{margin-top:10px}


/* v1.34: ações do histórico com botão de apagar menor e afastado */
.emof-log-card-actions{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:18px;
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid var(--emof-border);
}
.emof-log-card-actions-left{flex:1 1 auto; min-width:0}
.emof-log-card-actions-right{flex:0 0 auto; margin-left:auto}
.emof-log-delete-form{margin-top:0}
.emof-btn-danger-subtle{
    padding:5px 10px !important;
    font-size:11px !important;
    min-height:auto;
    border-radius:999px;
    box-shadow:none;
}
.emof-theme-dark .emof-log-card-actions{border-top-color:#334155}
@media (max-width: 640px){
  .emof-log-card-actions{flex-direction:column;align-items:stretch}
  .emof-log-card-actions-right{margin-left:0;align-self:flex-end}
}


/* v1.35: abas internas de Minhas máquinas e painel de comissão */
.emof-subtabs{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin:0 0 16px;
    padding:7px;
    border:1px solid var(--emof-border);
    border-radius:999px;
    background:var(--emof-surface-soft);
}
.emof-subtabs a{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 13px;
    border-radius:999px;
    color:var(--emof-text);
    text-decoration:none;
    font-weight:900;
    font-size:13px;
}
.emof-subtabs a span{
    display:inline-flex;
    min-width:22px;
    height:22px;
    align-items:center;
    justify-content:center;
    padding:0 7px;
    border-radius:999px;
    background:#e5e7eb;
    color:#344054;
    font-size:12px;
}
.emof-subtabs a.active,
.emof-subtabs a:hover{
    background:#1f2937;
    color:#fff;
}
.emof-subtabs a.active span,
.emof-subtabs a:hover span{
    background:rgba(255,255,255,.18);
    color:#fff;
}
.emof-kpis-commission .emof-card strong{font-size:24px}
.emof-theme-dark .emof-subtabs{background:#111827;border-color:#334155}
.emof-theme-dark .emof-subtabs a{color:#e5e7eb}
.emof-theme-dark .emof-subtabs a span{background:#263449;color:#d7dde8}
.emof-theme-dark .emof-subtabs a.active,
.emof-theme-dark .emof-subtabs a:hover{background:#ef4444;color:#fff}


/* v1.37: correção forte de contraste enquanto digita no tema escuro */
body.emof-oficina-page.emof-theme-dark .emof-wrap input,
body.emof-oficina-page.emof-theme-dark .emof-wrap textarea,
body.emof-oficina-page.emof-theme-dark .emof-wrap select,
body.emof-theme-dark .emof-wrap input,
body.emof-theme-dark .emof-wrap textarea,
body.emof-theme-dark .emof-wrap select{
    background-color:#07111f !important;
    color:#f8fafc !important;
    -webkit-text-fill-color:#f8fafc !important;
    caret-color:#ffffff !important;
    border-color:#475569 !important;
}
body.emof-oficina-page.emof-theme-dark .emof-wrap input:focus,
body.emof-oficina-page.emof-theme-dark .emof-wrap textarea:focus,
body.emof-oficina-page.emof-theme-dark .emof-wrap select:focus,
body.emof-oficina-page.emof-theme-dark .emof-wrap input:active,
body.emof-oficina-page.emof-theme-dark .emof-wrap textarea:active,
body.emof-oficina-page.emof-theme-dark .emof-wrap select:active,
body.emof-theme-dark .emof-wrap input:focus,
body.emof-theme-dark .emof-wrap textarea:focus,
body.emof-theme-dark .emof-wrap select:focus,
body.emof-theme-dark .emof-wrap input:active,
body.emof-theme-dark .emof-wrap textarea:active,
body.emof-theme-dark .emof-wrap select:active{
    background-color:#07111f !important;
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
    caret-color:#ffffff !important;
    border-color:#f87171 !important;
    box-shadow:0 0 0 3px rgba(248,113,113,.18) !important;
    outline:none !important;
}
body.emof-oficina-page.emof-theme-dark .emof-wrap input::placeholder,
body.emof-oficina-page.emof-theme-dark .emof-wrap textarea::placeholder,
body.emof-theme-dark .emof-wrap input::placeholder,
body.emof-theme-dark .emof-wrap textarea::placeholder{
    color:#cbd5e1 !important;
    -webkit-text-fill-color:#cbd5e1 !important;
    opacity:1 !important;
}
body.emof-oficina-page.emof-theme-dark .emof-wrap input::selection,
body.emof-oficina-page.emof-theme-dark .emof-wrap textarea::selection,
body.emof-theme-dark .emof-wrap input::selection,
body.emof-theme-dark .emof-wrap textarea::selection{
    background:#ef4444 !important;
    color:#ffffff !important;
    -webkit-text-fill-color:#ffffff !important;
}
body.emof-oficina-page.emof-theme-dark .emof-wrap input:-webkit-autofill,
body.emof-oficina-page.emof-theme-dark .emof-wrap input:-webkit-autofill:hover,
body.emof-oficina-page.emof-theme-dark .emof-wrap input:-webkit-autofill:focus,
body.emof-theme-dark .emof-wrap input:-webkit-autofill,
body.emof-theme-dark .emof-wrap input:-webkit-autofill:hover,
body.emof-theme-dark .emof-wrap input:-webkit-autofill:focus{
    -webkit-box-shadow:0 0 0 1000px #07111f inset !important;
    -webkit-text-fill-color:#ffffff !important;
    caret-color:#ffffff !important;
    border-color:#f87171 !important;
}
body.emof-oficina-page.emof-theme-dark .emof-wrap select option,
body.emof-theme-dark .emof-wrap select option{
    background:#0f172a !important;
    color:#f8fafc !important;
}

/* v1.38: entrada em lote com várias máquinas */
.emof-batch-client-box{
    padding:16px;
    border:1px solid var(--emof-border);
    border-radius:18px;
    background:var(--emof-surface-soft);
    margin-bottom:18px;
}
.emof-batch-client-box h3{margin:0 0 12px}
.emof-machine-rows{display:flex;flex-direction:column;gap:16px;margin:16px 0}
.emof-machine-card{
    padding:16px;
    border:1px solid var(--emof-border);
    border-radius:18px;
    background:var(--emof-surface);
    box-shadow:var(--emof-shadow-soft);
}
.emof-machine-card .emof-section-head{margin-bottom:12px}
.emof-more-machine-box{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:14px 16px;
    margin-top:12px;
    border:1px dashed var(--emof-border-strong);
    border-radius:16px;
    background:var(--emof-surface-soft);
}
.emof-theme-dark .emof-batch-client-box,
.emof-theme-dark .emof-more-machine-box{background:#111827;border-color:#334155}
.emof-theme-dark .emof-machine-card{background:#172033;border-color:#334155}
@media (max-width: 720px){
  .emof-more-machine-box{flex-direction:column;align-items:flex-start}
}

/* v1.40: destaque para máquinas em garantia */
.emof-pill-warranty{background:#eef4ff;color:#3538cd;border:1px solid #c7d7fe}
.emof-theme-dark .emof-pill-warranty{background:#172554;color:#dbeafe;border-color:#1d4ed8}
