:root {
    --ink: #101828;
    --surface: #f5f7f5;
    --panel: #ffffff;
    --muted: #667085;
    --line: #e4e7ec;
    --lime: #c9ef73;
    --coral: #f07c5b;
    --green: #16a34a;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "DM Sans", Arial, sans-serif;
    background: var(--surface);
    color: var(--ink);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.auth-layout {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(90deg, rgba(8, 15, 24, .72) 0%, rgba(8, 15, 24, .34) 48%, rgba(8, 15, 24, .58) 100%),
        url("fundo-industrial.png") center / cover fixed;
}

.eyebrow {
    font-size: .72rem;
    letter-spacing: .16em;
    font-weight: 700;
    color: #b9c5be;
    text-transform: uppercase;
}
.accent { color: var(--coral); }

h1, h2, h3 {
    font-family: "Space Grotesk", Arial, sans-serif;
    letter-spacing: -0.04em;
}

.brand-mark {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--lime);
}
.brand-mark span { color: var(--coral); }

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}
.form-wrap {
    width: min(100%, 450px);
    background: rgba(255,255,255,0.93);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 2rem;
    box-shadow: var(--shadow);
}
.form-wrap h2 {
    font-size: 2.2rem;
    margin: .8rem 0 .3rem;
}
.muted {
    color: var(--muted);
    margin: 0 0 2rem;
}

form {
    display: grid;
    gap: .8rem;
}
label {
    font-size: .8rem;
    font-weight: 700;
    margin-top: .4rem;
}
input {
    width: 100%;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus {
    border-color: var(--coral);
    box-shadow: 0 0 0 4px rgba(240,124,91,.14);
}
button {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--coral), #dc6d4d);
    color: #fff;
    padding: 1rem 1.2rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: .8rem;
    transition: transform .2s ease, box-shadow .2s ease;
}
button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(240,124,91,.24);
}
button:focus-visible, a:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
button span { float: right; font-size: 1.2rem; }

.switch {
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: .9rem;
    text-align: center;
}
.switch a {
    font-weight: 700;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.alert {
    padding: .8rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: .88rem;
}
.error {
    background: #fff0ed;
    color: #9d3d2a;
    border: 1px solid #f2c8bf;
}
.success {
    background: #ebfdf1;
    color: #166534;
    border: 1px solid #b7ebc7;
}

.dashboard-page {
    min-height: 100vh;
    background:
        linear-gradient(110deg, rgba(7, 14, 21, .94) 0%, rgba(10, 21, 29, .86) 48%, rgba(8, 15, 21, .94) 100%),
        url("fundo-industrial.png") center / cover fixed;
    color: #fff;
}

.topbar {
    padding: 1.5rem clamp(1.5rem, 5vw, 5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(8, 16, 23, .48);
    border-bottom: 1px solid rgba(201,239,115,0.16);
    backdrop-filter: blur(14px);
}
.future-actions { order: 2; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: .55rem; margin-left: 1.5rem; margin-right: auto; }
.future-button { display: block; margin: 0; padding: .55rem .75rem; border: 1px solid rgba(201,239,115,.18); border-radius: 8px; background: rgba(255,255,255,.04); color: #dfe6ec; font-size: .78rem; cursor: not-allowed; opacity: .72; }
.detail-button { cursor: pointer; opacity: 1; }
.detail-button:hover { background: rgba(255,255,255,.08); border-color: rgba(201,239,115,.5); box-shadow: 0 14px 24px rgba(240,124,91,.24); transform: translateY(-1px); }
.detail-button.active { color: var(--dark); background: var(--lime); border-color: var(--lime); box-shadow: none; }
.detail-button.active:hover { color: var(--dark); background: var(--lime); transform: none; }
.future-button:disabled { cursor: not-allowed; }
.future-button:disabled:hover { transform: none; box-shadow: none; }
.future-button small { display: block; margin-top: .18rem; color: var(--lime); font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; }
.nav-actions {
    order: 3;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav-actions a, .nav-actions form {
    display: inline-block;
}
.nav-actions a {
    color: #dfe6ec;
    font-size: .95rem;
    font-weight: 600;
}
.nav-actions a.active { color: var(--lime); }
.small { margin: 0; font-size: 1.8rem; }
.logout {
    margin: 0;
    padding: .7rem 1.2rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
}
.logout:hover {
    background: var(--coral);
    border-color: var(--coral);
}

.dashboard {
    padding: clamp(2rem, 6vw, 6rem) clamp(1.4rem, 6vw, 6rem);
}
.dashboard h1 {
    font-size: clamp(1.6rem, 3.8vw, 3rem);
    margin: 1rem 0 .8rem;
    line-height: 1;
}
.dashboard h1 span { color: var(--lime); }
.dashboard .muted {
    color: #dfe6ec;
    font-size: 1.05rem;
    margin: 0 0 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    max-width: 900px;
}
.stat-card strong {
    display: block;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    color: #fff;
}

.status-line {
    margin-top: 3rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #dfe6ec;
    font-size: .9rem;
}
.recent-section { width: 100%; max-width: 600px; margin-top: 3rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.section-heading h2 { margin: .6rem 0 1rem; font-size: 1.8rem; }
.slide-controls { display: flex; align-items: center; gap: .55rem; color: #c6d2d9; font-size: .8rem; }
.slide-button { width: 34px; height: 34px; margin: 0; padding: 0; border: 1px solid rgba(201,239,115,.22); border-radius: 8px; background: rgba(255,255,255,.05); }
.detail-slideshow { min-height: 380px; }
.detail-slide { display: none; min-height: 380px; padding: 1.5rem; border: 1px solid rgba(201,239,115,.2); border-radius: 12px; background: rgba(18,31,37,.8); animation: slide-in .35s ease; }
.detail-slide.active { display: block; }
.slide-number { display: block; color: var(--coral); font-size: .7rem; font-weight: 700; letter-spacing: .12em; }
.detail-slide strong { display: block; margin: .65rem 0 .25rem; color: var(--lime); font-size: 2rem; }
.slide-piece { color: #fff; font-size: 1rem; }
.slide-meta { display: flex; flex-wrap: wrap; gap: .55rem 1.5rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.1); color: #b9c7ce; font-size: .82rem; }
.empty-recent { padding: 1.5rem; border: 1px dashed rgba(201,239,115,.24); border-radius: 12px; color: #b9c7ce; }
.change-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.change-heading h1 { font-size: clamp(2.4rem, 5vw, 4.8rem); margin: 1rem 0 .7rem; }
.change-actions { display: flex; gap: .65rem; }
.change-actions button { margin: 0; }
.change-meta { display: grid; grid-template-columns: minmax(240px, 520px); gap: .75rem; align-items: end; margin: 2rem 0 .8rem; padding: 1rem; border: 1px solid rgba(201,239,115,.14); border-radius: 12px; background: rgba(18,31,37,.78); }
.change-meta input { padding: .75rem .8rem; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }
.change-table-wrap { overflow-x: auto; border: 1px solid rgba(201,239,115,.14); border-radius: 12px; background: rgba(18,31,37,.78); }
.change-table { min-width: 650px; }
.change-table th, .change-table td { padding: .7rem .8rem; }
.change-table th { text-align: left; color: var(--lime); }
.change-table td input { padding: .65rem .7rem; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: #fff; }
@keyframes slide-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--lime);
    border-radius: 50%;
    margin-right: .6rem;
}
.divider { margin: 0 .8rem; color: var(--coral); }

.table-wrap {
    background: rgba(18, 31, 37, .74);
    border: 1px solid rgba(201,239,115,0.14);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2rem;
    max-width: 1100px;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 1rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
th {
    color: #dfe6ec;
    font-size: .76rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.02);
}
tr:last-child td { border-bottom: 0; }
.badge {
    display: inline-block;
    padding: .35rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.badge.admin { background: rgba(201,239,115,.14); color: var(--lime); }
.badge.user { background: rgba(240,124,91,.12); color: #ffcab6; }
.role-form { display: block; }
.role-form select { padding: .4rem .55rem; border: 1px solid rgba(201,239,115,.24); border-radius: 7px; background: #16252a; color: #fff; font-size: .78rem; }
.create-user-panel { margin: 2rem 0; padding: 1.25rem; border: 1px solid rgba(201,239,115,.14); border-radius: 12px; background: rgba(18,31,37,.78); max-width: 1200px; }
.create-user-panel h2 { margin: .45rem 0 1rem; font-size: 1.45rem; }
.create-user-form { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); align-items: end; gap: .75rem; }
.create-user-form input { padding: .75rem .8rem; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }
.create-user-form button { margin: 0; }
.permission-checks { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; grid-column: 1 / -1; color: #c6d2d9; font-size: .78rem; }
.permission-checks strong { color: #fff; margin-right: .3rem; }
.permission-checks label, .permission-form label { margin: 0; font-weight: 500; }
.permission-checks input, .permission-form input { width: auto; accent-color: var(--lime); }
.permission-form { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; min-width: 230px; }
.permission-save { padding: .4rem .6rem; margin: 0; font-size: .72rem; }

.small-input,
.small-button {
    padding: .65rem .9rem;
    border-radius: 10px;
}
.small-input {
    width: 100%;
    max-width: 220px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
}
.small-button {
    background: var(--coral);
    color: #fff;
    border: 0;
    margin: 0;
}

.profile-card {
    max-width: 680px;
    background: rgba(18, 31, 37, .78);
    border: 1px solid rgba(201,239,115,0.14);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}
.profile-card form {
    gap: .9rem;
}

.detail-main { max-width: 1500px; margin: 0 auto; }
.detail-heading { display: flex; justify-content: space-between; gap: 2rem; }
.detail-heading h1 { font-size: clamp(2.4rem, 5vw, 4.8rem); margin: 1rem 0 .7rem; }
.detail-heading h1 span { color: var(--lime); }
.project-form { display: block; }
.project-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: .75rem; margin-top: 2rem; padding: 1rem; border: 1px solid rgba(201,239,115,.14); background: rgba(18,31,37,.78); border-radius: 12px; }
.project-field { display: grid; gap: .35rem; min-width: 0; }
.project-meta label { margin: 0; color: #c6d2d9; }
.project-meta input { min-width: 150px; padding: .75rem .8rem; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }
.project-meta select {
    width: 100%; max-width: 230px; min-width: 150px; padding: .75rem 2.2rem .75rem .8rem; font: inherit; line-height: normal;
    border: 1px solid rgba(255,255,255,.14); border-radius: 12px; outline: none; cursor: pointer; color: #fff; color-scheme: dark;
    -webkit-appearance: none; appearance: none;
    background: rgba(255,255,255,.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d7ecf2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right .7rem center / 16px 16px no-repeat;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.project-meta-row { grid-column: 1 / -1; display: grid; grid-template-columns: 190px minmax(0, 320px) 170px; align-items: end; gap: .75rem; }
.project-meta-row select, .project-meta-row input { min-width: 0; max-width: none; }
@media (max-width: 720px) { .project-meta-row { grid-template-columns: 1fr 1fr; } .project-meta-row .project-field:last-child { grid-column: 1 / -1; } }
.project-meta select:hover { border-color: rgba(255,255,255,.3); }
.project-meta select:focus { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(240,124,91,.14); }
.project-meta select option { color: #000; background: #fff; }
.project-meta input:disabled { opacity: .55; cursor: not-allowed; }
.project-meta button { grid-column: 1 / -1; width: 30%; margin: 0; justify-self: start; white-space: nowrap; }
.project-meta button span { margin-left: 1rem; color: rgba(255,255,255,.7); font-size: .72rem; }
.project-selector { display: grid; gap: .55rem; max-width: 760px; margin-top: 2rem; }
.project-selector label { margin: 0; color: #c6d2d9; }
.project-selector-controls { display: flex; align-items: center; gap: .75rem; }
.project-selector select { width: 100%; min-width: 0; padding: .75rem .8rem; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; color-scheme: dark; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.project-selector select:hover { border-color: rgba(255,255,255,.3); }
.project-selector select option,
.project-selector select option:checked,
.project-selector select option:hover,
.project-selector select option:focus {
    background: #fff;
    color: #000 !important;
    -webkit-text-fill-color: #000;
}
.project-selector select:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(240,124,91,.14); }
.project-selector button { margin: 0; padding: .75rem 1rem; white-space: nowrap; }
.project-meta-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; }
.detail-finish { display: flex; justify-content: flex-end; margin-top: 1rem; }
.detail-finish button { margin: 0; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.table-toolbar strong, .table-toolbar span { display: block; }
.table-toolbar span { margin-top: .25rem; color: #aebdc6; font-size: .85rem; }
.secondary-button { margin: 0; padding: .7rem .9rem; background: transparent; border: 1px solid rgba(255,255,255,.18); font-size: .82rem; }
.project-table-wrap { margin-top: .8rem; overflow-x: auto; border: 1px solid rgba(201,239,115,.14); border-radius: 12px; background: rgba(18,31,37,.72); }
.project-table { min-width: 1040px; }
.launch-table { min-width: 700px; }
.project-table th, .project-table td { padding: .65rem .55rem; text-align: center; }
.project-table th:nth-child(2), .project-table th:nth-child(3), .project-table td:nth-child(2), .project-table td:nth-child(3) { text-align: left; }
.project-table td input[type="text"] { min-width: 120px; padding: .6rem .55rem; border-radius: 7px; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #fff; }
.project-table td select { min-width: 100px; padding: .6rem .55rem; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: #16252a; color: #fff; }
.project-table .old-code-field { display: flex; gap: .4rem; align-items: center; }
.project-table td select.old-code-toggle { min-width: 72px; }
.project-table td input.old-code-input:disabled { opacity: .35; cursor: not-allowed; }
.project-table .check-cell.is-disabled { opacity: .35; }
.project-table .check-cell.is-disabled label { cursor: not-allowed; }
.row-number { color: #aebdc6; font-weight: 700; }
.check-cell label { display: grid; place-items: center; margin: 0; cursor: pointer; }
.check-cell input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-cell label span { width: 22px; height: 22px; display: block; border: 1px solid rgba(255,255,255,.28); border-radius: 5px; background: rgba(255,255,255,.04); }
.check-cell input:checked + span { border-color: var(--lime); background: var(--lime); box-shadow: inset 0 0 0 4px #27352a; }

.report-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.report-heading h1 { font-size: clamp(2.4rem, 5vw, 4.8rem); margin: 1rem 0 .7rem; }
.print-button { margin: 0; white-space: nowrap; }
.report-search { display: flex; align-items: center; gap: .65rem; margin: 2rem 0; padding: .8rem; max-width: 760px; border: 1px solid rgba(201,239,115,.14); border-radius: 12px; background: rgba(18,31,37,.78); }
.report-search input { min-width: 0; padding: .75rem .85rem; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }
.report-search button, .report-search a { margin: 0; padding: .75rem .9rem; white-space: nowrap; }
.report-search a { color: #dfe6ec; font-size: .85rem; text-decoration: underline; }
.report-project { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid rgba(201,239,115,.14); border-radius: 12px; background: rgba(18,31,37,.78); }
.report-project-header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.report-project-header h2 { margin: .45rem 0; font-size: 1.55rem; }
.report-project-header p, .report-dates { margin: 0; color: #b9c7ce; font-size: .86rem; }
.report-header-actions { display: flex; align-items: center; gap: 1rem; }
.report-dates { text-align: right; line-height: 1.7; }
.report-toggle { position: relative; display: block; width: 3rem; height: 2.25rem; margin: 0 0 .35rem; padding: 0; border: 0; border-radius: 10px; background: var(--coral); color: #fff; cursor: pointer; transform: translateY(.35rem); transition: transform .35s ease, box-shadow .2s ease; }
.report-toggle span { display: block; float: none; position: absolute; top: .25rem; left: 0; width: 100%; color: #fff; font-size: 1.25rem; line-height: 1.5; text-align: center; transform: translateY(.15rem) rotate(0deg); transform-origin: center; transition: transform .35s ease; }
.report-toggle.is-collapsed { transform: translateX(.45rem); }
.report-toggle.is-collapsed span { transform: translate(.15rem, .15rem) rotate(-90deg); }
.report-project.is-collapsed .report-project-header { margin-bottom: 0; }
.report-table-wrap { overflow-x: auto; }
.report-table { min-width: 980px; }
.report-table th, .report-table td { padding: .7rem .6rem; }
.report-check.done { color: var(--lime); font-weight: 700; }
.report-check.blocked { font-weight: 700; }
.report-file-status { display: inline-block; min-width: 4.5rem; padding: .25rem .45rem; border: 1px solid currentColor; border-radius: .35rem; text-align: center; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.report-file-status.present { color: #79cf8a; }
.report-file-status.missing { color: #ff9696; }
.report-file-status.unknown { color: #eac779; }
@media print { .report-file-status { color: #111 !important; } }
.empty-state { padding: 1.5rem; border: 1px dashed rgba(201,239,115,.25); color: #c6d2d9; border-radius: 12px; }

@media (max-width: 760px) {
    .form-panel { padding: 2rem 1rem; }
    .form-wrap { padding: 1.2rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; gap: 1rem; }
    .future-actions { order: 2; margin: 0; flex-wrap: wrap; justify-content: center; }
    .nav-actions { order: 3; flex-wrap: wrap; justify-content: center; }
    .detail-heading { display: block; }
    .project-meta { grid-template-columns: 1fr 1fr; }
    .project-meta label:first-child, .project-meta input:first-of-type { grid-column: 1 / -1; }
    .project-meta button { grid-column: 1 / -1; }
    .table-toolbar { align-items: start; flex-direction: column; }
    .report-heading, .report-project-header { display: block; }
    .report-header-actions { justify-content: space-between; }
    .print-button { margin-top: 1rem; }
    .report-search { flex-wrap: wrap; }
    .report-search input { flex: 1 1 100%; }
    .report-dates { margin-top: .8rem; text-align: left; }
    .section-heading { align-items: start; flex-direction: column; }
    .create-user-form { grid-template-columns: 1fr 1fr; }
    .create-user-form input { min-width: 0; }
    .permission-checks { grid-column: 1 / -1; }
    .change-heading { align-items: start; flex-direction: column; }
    .change-actions { width: 100%; }
    .change-actions button { flex: 1; }
    .change-meta { grid-template-columns: 1fr; }
}

.orders-carousel { margin: 2rem 0; width: 100%; }
.orders-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.orders-heading h2 { margin: .35rem 0 0; font-size: 1.5rem; }
.orders-controls { display: flex; align-items: center; gap: .65rem; }
.orders-controls button { margin: 0; padding: .55rem .8rem; min-height: 40px; background: #203d3a; border: 1px solid #52766b; color: #edf2f7; }
.orders-controls button:disabled { opacity: .4; cursor: not-allowed; }
#order-counter { min-width: 3rem; text-align: center; font-size: .85rem; color: #d4dfe8; }
.order-slide { padding: clamp(20px,3vw,32px); border: 1px solid #425b68; border-radius: 14px; background: #172633; color: #edf2f7; }
.order-slide[hidden] { display: none; }
.order-slide-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.order-slide h3 { margin: 0; font-size: clamp(1.4rem,3vw,2rem); color: #a5e4cf; overflow-wrap: anywhere; }
.order-status { background: #203d3a; color: #b3efdb; border: 1px solid #52766b; border-radius: 20px; padding: .3rem .8rem; font-size: .8rem; }
.order-info { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin: 24px 0; }
.order-info dt { color: #aebdcb; font-size: .8rem; margin-bottom: 6px; }
.order-info dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.order-progress-label { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; color: #d4dfe8; }
.order-progress { display: block; width: 100%; height: 10px; margin: 10px 0 24px; border: 0; border-radius: 8px; overflow: hidden; background: #30414f; accent-color: #8ed6c0; }
.order-progress::-webkit-progress-bar { background: #30414f; }
.order-progress::-webkit-progress-value { background: #8ed6c0; }
.order-progress::-moz-progress-bar { background: #8ed6c0; }
.order-details { display: inline-flex; align-items: center; gap: 2rem; padding: .7rem 1rem; background: #237c68; color: #fff; border-radius: 8px; font-weight: 600; }
.order-details:hover { background: #1c6857; }
@media (max-width: 600px) { .order-info { grid-template-columns: 1fr; gap: 14px; } }

/* Ajustes funcionais preservados com o tema industrial original. */
.topbar { flex-wrap: wrap; gap: 1rem; }
.future-actions { flex-wrap: wrap; margin-left: 0; }
.table-wrap { overflow-x: auto; }
.project-meta button { width: auto; max-width: 100%; white-space: normal; }
.check-cell input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 3px; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.login-centered { flex-direction: column; justify-content: center; align-items: center; padding: 32px 20px; gap: 16px; }
.login-centered .auth-intro { text-align: center; width: 100%; }
.login-centered .form-panel { width: 100%; max-width: 450px; padding: 0; }
.login-centered .form-wrap { width: 100%; }
.login-centered .password-field { position: relative; min-width: 0; }
.login-centered .password-field input { padding-right: 6rem; }
.login-centered .password-field button {
    position: absolute;
    top: 50%;
    right: .35rem;
    transform: translateY(-50%);
    margin: 0;
    padding: .65rem .75rem;
    min-height: 44px;
    background: transparent;
    color: var(--ink);
    font-size: .8rem;
    box-shadow: none;
}
.login-centered .password-field button:hover { background: var(--surface); }
.auth-intro { max-width: 640px; color: #fff; }
.auth-intro .eyebrow, .auth-intro h1 span { color: #fff; }
.auth-intro h1 { font-size: 2rem; line-height: 1.2; margin: 24px 0; }
@media (max-width: 760px) {
    .auth-layout { flex-direction: column; padding: 24px 20px; }
    .auth-intro { width: 100%; }
    .project-meta, .create-user-form { grid-template-columns: minmax(0, 1fr); }
    .project-meta input { min-width: 0; }
    .project-meta button { width: 100%; }
    .project-selector-controls { flex-wrap: wrap; }
    .dashboard-page .backup-container, .dashboard-page .detail-wrapper, .dashboard-page .form-row { grid-template-columns: minmax(0, 1fr); }
}
/* Aparência original da página inicial, preservando o carrossel de pedidos. */
@media screen {
    .home-page {
        --lime: #c9ef73;
        --coral: #f07c5b;
        font-family: "DM Sans", Arial, sans-serif;
        background: linear-gradient(110deg, rgba(7,14,21,.94), rgba(10,21,29,.86) 48%, rgba(8,15,21,.94)), url("fundo-industrial.png") center / cover fixed;
        color: #fff;
    }
    .home-page h1, .home-page h2, .home-page h3 { font-family: "Space Grotesk", Arial, sans-serif; letter-spacing: -.04em; }
    .home-page .dashboard { max-width: none; padding: clamp(2rem,6vw,6rem) clamp(1.4rem,6vw,6rem); }
    .home-page .dashboard h1 { font-size: clamp(1.6rem,3.8vw,3rem); margin: 1rem 0 .8rem; line-height: 1; }
    .home-page .dashboard .muted { color: #dfe6ec; font-size: 1.05rem; max-width: none; }
    .home-page .accent { color: var(--coral); }
    .home-page .topbar { padding: 1.5rem clamp(1.5rem,5vw,5rem); background: rgba(8,16,23,.48); border-color: rgba(201,239,115,.16); backdrop-filter: blur(14px); }
    .home-page .future-button { padding: .55rem .75rem; border: 1px solid rgba(201,239,115,.18); background: rgba(255,255,255,.04); color: #dfe6ec; font-size: .78rem; }
    .home-page .detail-button.active, .home-page .detail-button.active:hover { color: #111827; background: var(--lime); border-color: var(--lime); }
    .home-page .recent-section { max-width: 600px; margin-top: 3rem; }
    .home-page .section-heading h2 { font-size: 1.8rem; }
    .home-page .detail-slideshow, .home-page .detail-slide { min-height: 380px; }
    .home-page .detail-slide { padding: 1.5rem; background: rgba(18,31,37,.8); border-color: rgba(201,239,115,.2); }
    .home-page .slide-number { color: var(--coral); }
    .home-page .orders-carousel { max-width: 600px; margin-top: 3rem; }
    .home-page .orders-heading { align-items: end; }
    .home-page .orders-heading h2 { margin: .6rem 0 1rem; font-size: 1.8rem; }
    .home-page .order-slide { min-height: 380px; padding: 1.5rem; border: 1px solid rgba(201,239,115,.2); border-radius: 12px; background: rgba(18,31,37,.8); }
    .home-page .order-slide h3 { color: var(--lime); font-size: 2rem; }
    .home-page .order-status { color: var(--lime); background: rgba(201,239,115,.08); border-color: rgba(201,239,115,.2); }
    .home-page .order-info { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; gap: 1rem; }
    .home-page .order-info dt, .home-page .order-progress-label { color: #b9c7ce; font-size: .82rem; }
    .home-page .order-info dd { font-size: .9rem; font-weight: 400; color: #fff; }
    .home-page .orders-controls button { background: rgba(255,255,255,.05); border-color: rgba(201,239,115,.22); border-radius: 8px; min-height: 34px; padding: .4rem .65rem; }
    .home-page .order-details { background: transparent; border: 1px solid rgba(201,239,115,.22); color: var(--lime); font-size: .82rem; }
    .home-page .order-details:hover { background: rgba(201,239,115,.08); }
    .home-page .order-progress { background: rgba(255,255,255,.1); accent-color: var(--lime); }
    .home-page .order-progress::-webkit-progress-bar { background: rgba(255,255,255,.1); }
    .home-page .order-progress::-webkit-progress-value { background: var(--lime); }
    .home-page .order-progress::-moz-progress-bar { background: var(--lime); }
}

.home-page .home-slides {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.home-page .home-slides > section { min-width: 0; max-width: none; margin: 0; }
.home-page .home-slides > section:only-child { grid-column: 1 / -1; }
.home-page .home-slides > .recent-section {
    border-left: 1px solid rgba(201,239,115,.25);
    padding-left: 2rem;
}
.home-page .home-slides > .recent-section:only-child { border: 0; padding: 0; }
.home-page .home-slides .orders-heading,
.home-page .home-slides .section-heading { min-height: 100px; margin-bottom: 1rem; }
.home-page .home-dashboard { max-width: 1560px; margin: 0 auto; }
.home-page .home-intro { margin-bottom: clamp(1.5rem,3vw,2.5rem); }
.home-page .home-layout { display: grid; grid-template-columns: minmax(340px,.9fr) minmax(0,1.7fr); gap: clamp(1.5rem,3vw,3rem); align-items: start; }
.home-page .home-layout:not(.has-agenda) { grid-template-columns: minmax(0,1fr); }
.home-page .home-agenda, .home-page .home-content { min-height: 420px; padding: 20px; border: 1px solid rgba(201,239,115,.2); border-left: 3px solid var(--lime); border-radius: 10px; background: rgba(18,31,37,.82); }
.home-page .home-content { min-width: 0; }
.home-page .home-agenda-heading, .home-page .home-content .section-heading { min-height: 78px; margin: 0 0 10px; align-items: flex-start; }
.home-page .home-content .section-heading h2 { margin: 5px 0 3px; font-size: 1.25rem; letter-spacing: 0; }
.home-page .home-agenda-heading h2 { margin: 5px 0 3px; color: #f3f7f8; font-size: 1.25rem; letter-spacing: 0; }
.home-page .home-agenda-heading p { margin: 0; color: #aebfc7; font-size: .82rem; }
.home-page .home-agenda-counts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 16px 0; }
.home-page .home-agenda-counts > div { padding: 9px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; background: rgba(255,255,255,.035); }
.home-page .home-agenda-counts strong, .home-page .home-agenda-counts span { display: block; }
.home-page .home-agenda-counts strong { color: var(--lime); font-size: 1.25rem; line-height: 1.1; }
.home-page .home-agenda-counts span { margin-top: 4px; color: #bdcbd1; font-size: .72rem; }
.home-page .home-agenda-counts .is-late strong { color: #ff9385; }
.home-page .home-agenda-counts .is-done strong { color: #c9ef73; }
.home-page .home-agenda-list { display: grid; gap: 2px; max-height: 390px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.home-page .home-agenda-list li { border-top: 1px solid rgba(255,255,255,.08); }
.home-page .home-agenda-list li.is-late { border-left: 2px solid #ff9385; }
.home-page .home-agenda-list a { display: grid; gap: 3px; padding: 9px 7px; color: #edf2f5; text-decoration: none; }
.home-page .home-agenda-list a:hover { background: rgba(255,255,255,.04); }
.home-page .home-agenda-list strong { font-size: .82rem; line-height: 1.3; }
.home-page .home-agenda-list span, .home-page .home-agenda-list small { overflow: hidden; color: #aebfc7; font-size: .7rem; text-overflow: ellipsis; }
.home-page .home-agenda-list li.is-late small { color: #ffaaa0; }
.home-page .home-agenda-empty { padding: 13px 0; color: #aebfc7; font-size: .82rem; }
.home-page .home-agenda-link { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(201,239,115,.17); color: var(--lime); font-size: .82rem; font-weight: 700; text-decoration: none; }
.home-page .home-content > .recent-section { max-width: none; margin: 0; }
.home-page .home-content .detail-slideshow, .home-page .home-content .detail-slide { min-height: 300px; }
.home-page .home-content .detail-slide { padding: 14px 4px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.home-page .home-ramais { margin-top: clamp(2rem,5vw,4rem); padding-top: 18px; border-top: 1px solid rgba(201,239,115,.2); }
.home-page .home-ramais-heading { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.home-page .home-ramais-heading h2 { margin: 0; color: #edf2f5; font-size: 1.25rem; letter-spacing: 0; }
.home-page .home-ramais-table-wrap { overflow-x: auto; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(18,31,37,.68); }
.home-page .home-ramais-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.home-page .home-ramais-table th, .home-page .home-ramais-table td { padding: 7px 12px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: left; }
.home-page .home-ramais-table th { color: #aebfc7; background: rgba(255,255,255,.035); font-size: .7rem; text-transform: uppercase; }
.home-page .home-ramais-table td:first-child { width: 85px; color: var(--lime); font-weight: 800; font-variant-numeric: tabular-nums; }
.home-page .home-ramais-table td:nth-child(2) { width: 240px; color: #d8e2e6; font-weight: 650; }
.home-page .home-ramais-table tr:last-child td { border-bottom: 0; }
@media (max-width: 1000px) {
    .home-page .home-layout, .home-page .home-layout:not(.has-agenda) { grid-template-columns: minmax(0,1fr); }
    .home-page .home-agenda, .home-page .home-content { min-height: 0; }
    .home-page .home-agenda { order: 0; }
    .home-page .home-content { order: 1; }
}
@media (max-width: 560px) {
    .home-page .home-agenda { padding: 14px; }
    .home-page .home-ramais-table { min-width: 440px; }
}
@media (max-width: 1000px) {
    .home-page .home-slides { grid-template-columns: minmax(0, 1fr); }
    .home-page .home-slides > .recent-section {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid rgba(201,239,115,.25);
        padding-top: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
    .quick-actions { display: none; }
    .topbar, .report-search, .print-button { display: none; }
    .dashboard-page { background: #fff; color: #111; }
    .detail-main { max-width: none; padding: 0; }
    .report-project { break-inside: avoid; border: 1px solid #bbb; background: #fff; color: #111; }
    .report-project-content[hidden] { display: block; }
    .report-toggle { display: none; }
    .report-project-header p, .report-dates { color: #333; }
    .report-table th, .report-table td { border-color: #aaa; color: #111; }
    .change-page { background: #fff; color: #111; }
    .change-page .change-meta, .change-page .change-table-wrap { border-color: #aaa; background: #fff; }
    .change-page .change-meta input, .change-page .change-table td input { border-color: #aaa; color: #111; background: #fff; }
    .change-page .change-table th, .change-page .change-table td { border-color: #aaa; color: #111; }
}

.report-delete-form { margin: 0; }
.report-delete-button { background: #842c36; color: #fff; border: 1px solid #b14a56; padding: .5rem .75rem; white-space: nowrap; }
.report-delete-button:hover { background: #a23542; }
.report-header-actions { flex-wrap: wrap; }
@media print {
    .report-delete-form, .report-delete-cell, .report-page .alert { display: none !important; }
}
/* Compact reports to fit all columns on desktop screens. */
@media screen and (min-width: 761px) {
    .report-page .detail-main { padding-left: clamp(1rem, 3vw, 3rem); padding-right: clamp(1rem, 3vw, 3rem); }
    .report-page .report-project { padding: .85rem; margin-top: 1rem; }
    .report-page .report-project-header h2 { font-size: 1.25rem; }
    .report-page .report-table { width: 100%; min-width: 0; table-layout: fixed; }
    .report-page .report-table th, .report-page .report-table td { padding: .5rem .25rem; overflow-wrap: anywhere; white-space: normal; }
    .report-page .report-table th { font-size: .64rem; letter-spacing: .035em; }
    .report-page .report-table td { font-size: .75rem; }
    .report-page .report-table th:first-child { width: 3%; }
    .report-page .report-table th:nth-child(2), .report-page .report-table th:nth-child(3) { width: 10%; }
    .report-page .report-table th:nth-child(5) { width: 10%; }
    .report-page .report-table th.report-delete-cell { width: 8%; }
    .report-page .report-file-status { min-width: 0; max-width: 100%; padding: .2rem .35rem; font-size: .7rem; white-space: normal; }
    .report-page .report-delete-button { margin: 0; padding: .4rem .5rem; font-size: .75rem; }
    .report-page .report-delete-cell .report-delete-button { width: 100%; padding: .4rem .2rem; white-space: normal; }
}
.report-project-flags { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.2rem; margin: .8rem 0; }
.report-project-flags label { display: inline-flex; align-items: center; gap: .45rem; margin: 0; font-size: .8rem; }
.report-project-flags input[type="checkbox"] { width: 1rem; height: 1rem; margin: 0; accent-color: var(--lime); }
.report-project-flags button { margin: 0; padding: .45rem .7rem; font-size: .75rem; }
@media print { .report-project-flags button { display: none; } }
/* Compact project cards, with the expand control beside the heading. */
@media screen {
    .report-page .report-project { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .45rem .7rem; padding: .75rem; margin-top: .65rem; }
    .report-page .report-project-header { grid-column: 2; grid-row: 1; align-items: center; margin: 0; gap: .75rem; }
    .report-page .report-project-header > div:first-child { min-width: 0; }
    .report-page .report-project-header .eyebrow { display: none; }
    .report-page .report-project-header h2 { font-size: 1.05rem; line-height: 1.25; margin: 0 0 .25rem; overflow-wrap: anywhere; }
    .report-page .report-project-header p, .report-page .report-dates { font-size: .75rem; line-height: 1.4; }
    .report-page .report-header-actions { flex-shrink: 0; gap: .65rem; }
    .report-page .report-project-flags { grid-column: 2; grid-row: 2; gap: .4rem 1rem; margin: 0; }
    .report-page .report-project-flags label { font-size: .75rem; }
    .report-page .report-project-flags button { padding: .35rem .6rem; font-size: .7rem; }
    .report-page .report-toggle { grid-column: 1; grid-row: 1; align-self: start; width: 2rem; height: 2rem; margin: 0; transform: none; border-radius: 7px; }
    .report-page .report-toggle span { position: static; font-size: 1rem; line-height: 2rem; transform: none; }
    .report-page .report-toggle.is-collapsed span { transform: rotate(-90deg); }
    .report-page .report-project-content { grid-column: 1 / -1; min-width: 0; }
}
@media screen and (max-width: 760px) {
    .report-page .report-project { grid-template-columns: 2.75rem minmax(0, 1fr); gap: .5rem; }
    .report-page .report-toggle { width: 2.75rem; height: 2.75rem; }
    .report-page .report-toggle span { line-height: 2.75rem; }
    .report-page .report-header-actions { margin-top: .4rem; }
    .report-page .report-dates { margin-top: 0; }
    .report-page .report-project-flags { grid-column: 1 / -1; }
}
.report-print-project { display: inline-block; padding: .4rem .5rem; border: 1px solid rgba(201,239,115,.3); border-radius: 8px; color: #dfe6ec; font-size: .75rem; font-weight: 700; white-space: nowrap; text-decoration: none; }
.report-print-project:hover { background: rgba(201,239,115,.1); }
@media print {
    .report-print-project, .report-print-single .report-heading { display: none !important; }
    .report-print-single .report-project { margin: 0; padding: .5rem; break-inside: auto; }
    .report-print-single .report-table-wrap { overflow: visible; }
    .report-print-single .report-table { min-width: 0; width: 100%; table-layout: fixed; }
    .report-print-single .report-table th, .report-print-single .report-table td { padding: .35rem .2rem; font-size: 8pt; letter-spacing: 0; overflow-wrap: anywhere; }
    .report-print-single .report-file-status { min-width: 0; padding: .15rem; font-size: 8pt; }
    .report-print-single .report-table thead { display: table-header-group; }
    .report-print-single .report-table tr { break-inside: avoid; }
}
/* Reports: the fixed backdrop lives on its own layer, so scrolling does not repaint the full-screen image. */
@media screen {
    .report-page { isolation: isolate; background: #0a151c; }
    .report-page::before { content: ""; position: fixed; top: 0; right: 0; left: 0; height: 100vh; height: 100lvh; z-index: -1; pointer-events: none; background: linear-gradient(110deg, rgba(7, 14, 21, .94) 0%, rgba(10, 21, 29, .86) 48%, rgba(8, 15, 21, .94) 100%), url("fundo-industrial.png") center / cover no-repeat; will-change: transform; }
}
@media print {
    .report-page .report-project-content { height: auto !important; opacity: 1 !important; overflow: visible !important; }
}
/* Shared portal signature, kept in the page flow below the content. */
.portal-footer { position: relative; margin-top: 1rem; border-top: 1px solid rgba(201,239,115,.16); background: rgba(8,16,23,.8); }
.portal-footer::before { content: ""; position: absolute; top: -1px; left: 6%; width: 96px; height: 2px; background: linear-gradient(90deg, var(--lime), var(--coral)); }
.portal-footer-inner { max-width: 1500px; margin: 0 auto; padding: 1.5rem clamp(1.4rem,6vw,6rem); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.portal-footer-brand { display: flex; align-items: center; gap: 1rem; }
.portal-footer-logo { color: var(--lime); font-size: 1.9rem; font-weight: 800; font-style: italic; letter-spacing: -.08em; line-height: 1; }
.portal-footer-logo > span { color: var(--coral); }
.portal-footer-brand > div { border-left: 1px solid rgba(255,255,255,.16); padding-left: 1rem; }
.portal-footer-brand strong { color: #edf2f5; font-size: .7rem; letter-spacing: .18em; }
.portal-footer-brand p { margin: .3rem 0 0; color: #aabac5; font-size: .78rem; }
.portal-footer-end { display: flex; align-items: center; gap: 1.5rem; }
.portal-footer-end small { color: #aabac5; font-size: .72rem; }
.portal-footer-top { display: inline-flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border: 1px solid rgba(201,239,115,.2); border-radius: 8px; color: #edf2f5; font-size: .75rem; }
.portal-footer-top:hover { border-color: var(--lime); background: rgba(201,239,115,.06); }
.portal-footer-top:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.portal-footer-top span { color: var(--lime); font-size: 1rem; }
@media (max-width: 700px) {
    .portal-footer-inner { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
    .portal-footer-end { width: 100%; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
    .portal-footer-top { min-height: 44px; }
}
@media print { .portal-footer { display: none; } }

/* Ícone do campo de data: claro e em traço fino, legível no tema escuro. */
input[type="date"] { color-scheme: dark; }
input[type="date"]::-webkit-calendar-picker-indicator {
    width: 18px; height: 18px; padding: 4px; margin-left: .35rem; box-sizing: content-box; cursor: pointer; border-radius: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d7ecf2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16.5' rx='4'/%3E%3Cpath d='M3 10h18M8 2.5v4M16 2.5v4'/%3E%3Ccircle cx='8.5' cy='14.5' r='.6' fill='%23d7ecf2'/%3E%3Ccircle cx='12' cy='14.5' r='.6' fill='%23d7ecf2'/%3E%3Ccircle cx='15.5' cy='14.5' r='.6' fill='%23d7ecf2'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    filter: none; opacity: .8; transition: opacity .2s ease, background-color .2s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; background-color: rgba(255,255,255,.1); }
