@import url("assets/vendor/poppins/poppins.css");

:root {
    --primary-green: #2d5a27;
    --secondary-green: #4a7c44;
    --accent-orange: #d35400;
    --accent-gold: #d9b66f;
    --white: #ffffff;
    --text-dark: #243126;
    --text-light: #667065;
    --border-color: #d6dfd1;
    --surface: rgba(255, 255, 255, 0.95);
    --surface-strong: #f8fbf5;
    --danger: #c0392b;
    --success: #2f7d32;
    --shadow: 0 24px 60px rgba(7, 24, 11, 0.28);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(217, 182, 111, 0.28), transparent 32%),
        radial-gradient(circle at bottom right, rgba(45, 90, 39, 0.35), transparent 28%),
        linear-gradient(135deg, #10251a 0%, #193426 45%, #2d5a27 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

body:has(.settings-page) {
    overflow-x: hidden;
}

body:has(.settings-page) .app-shell {
    width: calc(100% - 32px);
    max-width: 1380px;
}

body.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.page-shell {
    width: 100%;
    max-width: 1180px;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 560px);
    gap: 32px;
    align-items: center;
}

.login-hero {
    color: var(--white);
    padding: 24px 12px 24px 0;
}

.hero-wordmark {
    width: min(100%, 430px);
    display: block;
    margin-bottom: 18px;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.22));
    border-radius: 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.login-hero h1 {
    font-size: clamp(2.1rem, 4vw, 4rem);
    line-height: 1.05;
    margin-bottom: 16px;
}

.login-hero p {
    max-width: 540px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.7;
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 220px));
    gap: 16px;
    margin-top: 28px;
}

.highlight-item {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.highlight-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.highlight-item span {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.92rem;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 600px;
}

.login-card {
    background-color: var(--surface);
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--primary-green);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(217, 182, 111, 0.18), transparent 30%),
        linear-gradient(160deg, rgba(217, 182, 111, 0.12), transparent 38%);
    pointer-events: none;
}

.logo-container {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 10px;
}

.logo.logo-mark {
    width: 118px;
    max-width: 118px;
    border-radius: 28px;
    box-shadow: 0 18px 32px rgba(17, 39, 21, 0.16);
}

.eyebrow {
    color: var(--accent-orange);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.panel-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.tagline {
    color: var(--primary-green);
    font-size: 0.9rem;
    font-weight: 400;
    font-style: italic;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    background: rgba(255, 255, 255, 0.88);
}

input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-dark);
}

select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
    margin-bottom: 16px;
}

.checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(45, 90, 39, 0.08);
    border: 1px solid rgba(45, 90, 39, 0.12);
    font-size: 0.94rem;
    color: var(--text-dark);
    cursor: pointer;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-green);
    cursor: pointer;
}

.inline-link {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.inline-link:hover {
    text-decoration: underline;
}

.btn-submit,
.btn-secondary,
.btn-logout {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 16px 26px rgba(45, 90, 39, 0.2);
    text-decoration: none;
}

.btn-submit:hover,
.btn-secondary:hover,
.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(45, 90, 39, 0.28);
}

.btn-secondary {
    background: linear-gradient(135deg, #587351, #7a8f73);
}

.form-message {
    position: relative;
    border-radius: 18px;
    padding: 18px 20px 18px 56px;
    margin-bottom: 22px;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 600;
    border-width: 2px;
    border-style: solid;
    box-shadow: 0 16px 28px rgba(18, 39, 24, 0.12);
}

.form-message.error {
    background: linear-gradient(135deg, rgba(255, 235, 232, 0.98), rgba(255, 244, 242, 0.98));
    color: #8f2318;
    border-color: rgba(192, 57, 43, 0.5);
}

.form-message.error::before {
    content: "!";
    position: absolute;
    left: 18px;
    top: 16px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #c0392b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 8px 18px rgba(192, 57, 43, 0.28);
}

.form-message.success {
    background: linear-gradient(135deg, rgba(234, 248, 235, 0.98), rgba(244, 252, 244, 0.98));
    color: #1f5d23;
    border-color: rgba(47, 125, 50, 0.45);
}

.form-message.success::before {
    content: "\2713";
    position: absolute;
    left: 18px;
    top: 16px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #2f7d32;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 8px 18px rgba(47, 125, 50, 0.24);
}

.source-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff0e4;
    color: #9f4b1d;
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.source-badge-manual {
    background: #edf4e9;
    color: #315b2b;
}

.ai-home {
    --ai-ink: #153b25;
    --ai-green: #2f6b37;
    --ai-orange: #f28b2d;
    overflow: hidden;
    border: 1px solid rgba(211, 224, 205, .9);
    border-radius: 30px;
    background: #f7f9f5;
    box-shadow: 0 22px 60px rgba(6, 39, 22, .16);
}

.ai-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 34px 38px;
    color: #fff;
    background:
        radial-gradient(circle at 86% 30%, rgba(242, 139, 45, .3), transparent 24%),
        linear-gradient(125deg, #103320 0%, #1e5931 64%, #3c7138 100%);
}

.ai-kicker,
.ai-small-label {
    display: block;
    margin-bottom: 8px;
    color: #f8a04d;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ai-hero h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.02;
}

.ai-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    line-height: 1.65;
}

.ai-status-line {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    font-size: .78rem;
}

.ai-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, .08);
}

.ai-live-dot.online { background: #7df58e; }
.ai-live-dot.local { background: #ffc36d; }

.ai-hero-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 112px;
    min-width: 112px;
    height: 112px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 32px;
    background: rgba(255,255,255,.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
    backdrop-filter: blur(10px);
}

.ai-hero-mark span { font-size: 2.2rem; font-weight: 800; }
.ai-hero-mark small {
    position: absolute;
    right: -7px;
    bottom: 13px;
    padding: 5px 8px;
    border-radius: 10px;
    color: #153b25;
    background: #ffad55;
    font-weight: 900;
}

.ai-workspace {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 580px;
}

.ai-context-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 30px;
    padding: 28px 22px;
    border-right: 1px solid #dae4d5;
    background: linear-gradient(180deg, #eef4ea, #e5eee1);
}

.ai-context-panel .ai-small-label { color: #6d786c; }

.ai-suggestions { display: grid; gap: 9px; }
.ai-suggestions button {
    padding: 12px 13px;
    border: 1px solid #ccd9c7;
    border-radius: 15px;
    color: #264b2b;
    background: rgba(255,255,255,.78);
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.ai-suggestions button:hover {
    transform: translateX(3px);
    border-color: #f28b2d;
    background: #fff;
}

.ai-safety-note {
    padding: 15px;
    border-radius: 18px;
    color: #315336;
    background: rgba(255,255,255,.68);
    font-size: .76rem;
}
.ai-safety-note p { margin: 6px 0 0; line-height: 1.5; }

.ai-conversation {
    display: grid;
    grid-template-rows: minmax(360px, 1fr) auto;
    min-width: 0;
    padding: 24px;
    background:
        linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,.92)),
        radial-gradient(circle at 10% 10%, #dcebd7, transparent 40%);
}

.ai-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 610px;
    overflow: auto;
    padding: 4px 5px 22px;
}

.ai-message {
    max-width: min(720px, 88%);
    padding: 14px 17px;
    border-radius: 19px;
    box-shadow: 0 9px 25px rgba(36, 75, 40, .07);
}
.ai-message span {
    display: block;
    margin-bottom: 4px;
    color: #748073;
    font-size: .67rem;
    font-weight: 800;
    text-transform: uppercase;
}
.ai-message p { margin: 0; line-height: 1.55; white-space: pre-wrap; }
.ai-message-assistant { align-self: flex-start; border: 1px solid #d8e3d4; background: #f3f7f0; }
.ai-message-user { align-self: flex-end; color: #fff; background: linear-gradient(135deg, #2e6835, #1d4d29); }
.ai-message-user span { color: rgba(255,255,255,.65); }

.ai-result-card {
    width: 100%;
    overflow: hidden;
    border: 1px solid #d5e0d0;
    border-radius: 20px;
    background: #fff;
}
.ai-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px 17px;
    background: #edf4e9;
}
.ai-result-head strong, .ai-result-head span { display: block; }
.ai-result-head span { margin-top: 3px; color: #697568; font-size: .75rem; }
.ai-result-head button {
    padding: 8px 11px;
    border: 0;
    border-radius: 12px;
    color: #24542b;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}
.ai-result-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.ai-result-table-wrap { max-height: 330px; overflow: auto; }
.ai-result-card table { width: 100%; border-collapse: collapse; font-size: .75rem; }
.ai-result-card th {
    position: sticky;
    top: 0;
    padding: 10px;
    color: #fff;
    background: #275d30;
    text-align: left;
    white-space: nowrap;
}
.ai-result-card td { padding: 9px 10px; border-bottom: 1px solid #e1e8de; white-space: nowrap; }

.ai-composer {
    padding: 12px;
    border: 1px solid #cfdccc;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 13px 35px rgba(18, 55, 31, .11);
}
.ai-composer textarea {
    width: 100%;
    min-height: 62px;
    resize: vertical;
    padding: 10px;
    border: 0;
    outline: 0;
    color: #203d27;
    background: transparent;
    font: inherit;
}
.ai-composer-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-tool-button, .ai-send-button {
    padding: 10px 13px;
    border: 0;
    border-radius: 13px;
    font: inherit;
    font-size: .75rem;
    font-weight: 800;
    cursor: pointer;
}
.ai-tool-button { color: #315a36; background: #edf3e9; }
.ai-tool-button.subtle { color: #687368; background: #f4f5f2; }
.ai-tool-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ai-tool-button.is-recording { color: #fff; background: #bd402d; }
.ai-send-button { margin-left: auto; min-width: 110px; color: #fff; background: linear-gradient(135deg, #f28b2d, #ff9f43); }
.ai-composer.is-loading { opacity: .68; pointer-events: none; }

@media (max-width: 900px) {
    .ai-workspace { grid-template-columns: 1fr; }
    .ai-context-panel { border-right: 0; border-bottom: 1px solid #dae4d5; }
    .ai-suggestions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-safety-note { display: none; }
}

@media (max-width: 560px) {
    .ai-home-page,
    .ai-home-page * { box-sizing: border-box; }
    body.ai-home-page {
        width: auto;
        max-width: 100%;
        overflow-x: hidden;
        padding: 10px;
    }
    .ai-home-page .app-shell {
        display: block;
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        margin: 0;
    }
    .ai-home-page .app-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        width: 100%;
        min-width: 0;
        padding: 14px;
        border-radius: 20px;
    }
    .ai-home-page .sidebar-brand {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
    }
    .ai-home-page .sidebar-logo {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }
    .ai-home-page .sidebar-brand span { font-size: .72rem; }
    .ai-home-page .sidebar-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .ai-home-page .sidebar-link {
        min-width: max-content;
        padding: 10px 13px;
        border-radius: 13px;
        font-size: .78rem;
    }
    .ai-home-page .sidebar-user { display: none; }
    .ai-home-page .btn-logout {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        margin: 0;
        padding: 9px 13px;
        border-radius: 12px;
        font-size: .75rem;
    }
    .ai-home-page .app-content {
        width: calc(100vw - 20px);
        min-width: 0;
        max-width: calc(100vw - 20px);
        overflow: hidden;
    }
    .ai-home-page .content-header {
        margin: 16px 2px 12px;
    }
    .ai-home { width: 100%; max-width: 100%; border-radius: 22px; }
    .ai-hero { align-items: flex-start; padding: 25px 20px; }
    .ai-hero-copy { min-width: 0; }
    .ai-hero-copy,
    .ai-hero-copy p { width: 100%; max-width: 100%; overflow: hidden; overflow-wrap: anywhere; }
    .ai-hero h2 { max-width: 100%; font-size: 1.9rem; overflow-wrap: anywhere; }
    .ai-status-line { align-items: flex-start; }
    .ai-status-line strong { min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }
    .ai-hero-mark { display: none; }
    .ai-workspace { width: 100%; max-width: 100%; min-width: 0; min-height: 0; overflow: hidden; }
    .ai-context-panel, .ai-conversation { width: 100%; max-width: 100%; min-width: 0; padding: 16px; }
    .ai-suggestions { width: 100%; max-width: 100%; min-width: 0; display: flex; overflow-x: auto; }
    .ai-suggestions button { min-width: 210px; }
    .ai-messages { min-height: 390px; max-height: 56vh; }
    .ai-message { max-width: 96%; }
    .ai-result-head { align-items: flex-start; flex-direction: column; }
    .ai-result-actions { width: 100%; justify-content: flex-start; }
    .ai-composer-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-tool-button, .ai-send-button { min-width: 0; width: 100%; text-align: center; }
    .ai-send-button { width: 100%; margin-left: 0; }
}

.field-hint {
    display: block;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 0.86rem;
}

.field-error {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(192, 57, 43, 0.11);
    color: var(--danger);
    border: 1px solid rgba(192, 57, 43, 0.18);
    font-size: 0.92rem;
    line-height: 1.4;
}

.product-image-preview {
    margin-top: 12px;
    min-height: 160px;
    border-radius: 18px;
    border: 1px dashed var(--border-color);
    background: linear-gradient(180deg, rgba(248, 251, 245, 0.95), rgba(255, 255, 255, 0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
}

.product-image-preview-img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 14px;
}

.product-image-preview-empty {
    color: var(--text-light);
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
}

.product-form-card .product-form-row {
    align-items: flex-end;
    gap: 18px;
}

.product-form-card .product-code-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding-bottom: 8px;
    white-space: normal;
    line-height: 1.35;
    max-width: 280px;
}

.product-form-card .product-code-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 0;
}

.product-form-card .compact-width {
    max-width: 180px;
}

.product-form-card .product-photo-row {
    margin-bottom: 20px;
}

.product-form-card .product-photo-field {
    max-width: 340px;
}

.product-form-card .product-volume-field {
    max-width: 220px;
}

.product-form-card .product-support-row .form-group {
    min-width: 240px;
}

.product-form-card .product-help-card {
    min-width: 320px;
    flex: 1.15;
}

.footer-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.footer-links a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

.dashboard-page {
    padding: 28px;
}

.dashboard-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 26px;
    color: var(--white);
    backdrop-filter: blur(12px);
}

.dashboard-header h1 {
    font-size: clamp(1.8rem, 3vw, 3rem);
    margin-bottom: 8px;
}

.dashboard-header p {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 24px;
}

.dashboard-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.dashboard-card h2 {
    color: var(--primary-green);
    margin-bottom: 18px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    gap: 16px;
}

.stat-item {
    background: var(--surface-strong);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
}

.stat-item span {
    display: block;
    color: var(--text-light);
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.stat-item strong {
    font-size: 1.3rem;
    color: var(--primary-green);
}

.profile-list {
    display: grid;
    gap: 14px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.profile-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-row span {
    color: var(--text-light);
    font-size: 0.92rem;
}

.profile-row strong {
    text-align: right;
}

.redirect-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    padding: 30px 20px;
}

.app-shell {
    max-width: 1380px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 24px;
}

.app-sidebar,
.sidebar {
    background: rgba(10, 28, 18, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 24px;
    color: var(--white);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sidebar-brand,
.brand-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
    color: var(--white);
}

.sidebar-brand strong,
.brand-card strong {
    display: block;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--white);
}

.sidebar-brand span,
.sidebar-user span,
.brand-card span,
.user-card span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.user-card {
    margin-top: auto;
    display: grid;
    gap: 6px;
    color: var(--white);
}

.user-card strong {
    color: var(--white);
}

.sidebar-logo {
    width: 62px;
    height: 62px;
    object-fit: contain;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(217, 182, 111, 0.12));
    border-radius: 20px;
    padding: 6px;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.16);
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-link {
    display: block;
    padding: 14px 16px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.07));
    border-color: rgba(255, 255, 255, 0.28);
    color: var(--white);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 12px 28px rgba(3, 15, 8, 0.16);
}

.sidebar-user {
    margin-top: auto;
    display: grid;
    gap: 4px;
}

.app-content,
.content-area {
    min-width: 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    color: var(--white);
}

.settings-hero-header {
    align-items: center;
    gap: 28px;
    padding: 26px 30px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 92% 18%, rgba(217, 182, 111, 0.22), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 22px 55px rgba(6, 21, 12, 0.22);
}

.settings-hero-header h1 {
    margin: 6px 0 0;
    max-width: 520px;
    font-size: clamp(1.75rem, 3vw, 2.65rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.settings-hero-header p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(0.98rem, 1.5vw, 1.14rem);
    line-height: 1.55;
}

.content-title {
    color: var(--white);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.content-card {
    background: var(--surface);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.manager-card {
    background: var(--surface);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.content-subnav {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.subnav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    min-width: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.content-subnav:not(.content-subnav-secondary) .subnav-link {
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 20px rgba(9, 32, 18, 0.06);
}

.content-subnav:not(.content-subnav-secondary) .subnav-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 24px rgba(9, 32, 18, 0.12);
}

.content-subnav:not(.content-subnav-secondary) .subnav-link.active {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.30);
    box-shadow: 0 14px 28px rgba(9, 32, 18, 0.16);
    position: relative;
}

.content-subnav:not(.content-subnav-secondary) .subnav-link.active::after {
    content: '';
    position: absolute;
    inset: auto 16px 8px 16px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.content-subnav-secondary .subnav-link {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 245, 237, 0.98));
    color: #31552a;
    border: 1px solid rgba(197, 213, 190, 0.92);
    box-shadow: 0 10px 24px rgba(9, 32, 18, 0.08);
}

.content-subnav-secondary .subnav-link:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(247, 250, 244, 0.98), rgba(229, 240, 223, 0.98));
    border-color: rgba(166, 188, 156, 0.96);
    color: #26451f;
    box-shadow: 0 14px 28px rgba(9, 32, 18, 0.12);
}

.content-subnav-secondary .subnav-link.active {
    background: linear-gradient(135deg, #f2c37a, #e58c3d);
    color: #ffffff;
    border-color: rgba(175, 92, 26, 0.92);
    box-shadow: 0 16px 32px rgba(137, 72, 20, 0.22);
    position: relative;
}

.content-subnav-secondary .subnav-link.active::after {
    content: '';
    position: absolute;
    inset: auto 16px 8px 16px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.content-subnav-secondary {
    margin-top: -4px;
}

.manager-panel {
    background: var(--surface);
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: var(--shadow);
}

.manager-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 22px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(45, 90, 39, 0.08), rgba(255, 255, 255, 0.92));
    border: 1px solid var(--border-color);
    border-radius: 22px;
}

.manager-copy {
    max-width: 480px;
}

.manager-search {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(5, max-content);
    gap: 10px;
    align-items: center;
    width: 100%;
    max-width: 1280px;
}

.manager-search .btn-inline {
    min-width: 0;
}

.front-manager-search {
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, max-content));
    align-items: end;
}

.front-manager-search input,
.front-manager-search .btn-inline {
    min-width: 0;
}

.front-manager-search .btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    width: auto;
    min-height: 44px;
    padding: 10px 16px;
    align-self: end;
}

.front-manager-search-stack {
    display: grid;
    gap: 10px;
    align-self: end;
}

.front-manager-search-stack .btn-inline {
    width: 100%;
}

.front-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 2600;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 24, 16, 0.52);
    backdrop-filter: blur(8px);
}

.front-confirm-modal.is-open {
    display: flex;
}

.front-confirm-dialog {
    width: min(520px, 100%);
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(180deg, #f9fbf7, #edf4eb);
    border: 1px solid rgba(45, 90, 39, 0.16);
    box-shadow: 0 26px 60px rgba(10, 24, 16, 0.24);
}

.front-confirm-header h3 {
    margin: 6px 0 0;
    font-size: 1.45rem;
    color: var(--primary-green);
}

.front-confirm-field {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.front-confirm-field label {
    font-weight: 600;
    color: #31533a;
}

.front-confirm-error {
    margin: 0;
    color: #c74b39;
    font-size: 0.92rem;
    font-weight: 600;
}

.front-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

.stock-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 2750;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 24, 16, 0.56);
    backdrop-filter: blur(10px);
}

.stock-edit-modal.is-open {
    display: flex;
}

.stock-edit-dialog {
    width: min(1220px, 96vw);
    max-height: 92vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border-radius: 28px;
    background: linear-gradient(180deg, #f9fbf7, #edf4eb);
    border: 1px solid rgba(45, 90, 39, 0.16);
    box-shadow: 0 28px 70px rgba(10, 24, 16, 0.28);
    overflow: hidden;
}

.stock-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(45, 90, 39, 0.12);
    background: linear-gradient(135deg, rgba(46, 95, 52, 0.12), rgba(249, 251, 247, 0.92));
}

.stock-edit-header strong {
    display: block;
    color: #24452c;
    font-size: 1.18rem;
}

.stock-edit-header span {
    display: block;
    margin-top: 4px;
    color: #5e6f61;
    font-size: 0.92rem;
}

.stock-edit-close {
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    background: rgba(45, 90, 39, 0.12);
    color: #24452c;
    font-weight: 700;
    cursor: pointer;
}

.stock-edit-close:hover {
    background: rgba(45, 90, 39, 0.18);
}

.stock-edit-frame {
    width: 100%;
    height: min(78vh, 980px);
    border: 0;
    background: #fff;
}

@media (max-width: 860px) {
    .stock-edit-modal {
        padding: 10px;
    }

    .stock-edit-dialog {
        width: 100%;
        max-height: 96vh;
        border-radius: 22px;
    }

    .stock-edit-header {
        padding: 14px 16px;
        align-items: flex-start;
    }

    .stock-edit-header strong {
        font-size: 1.04rem;
    }

    .stock-edit-frame {
        height: 84vh;
    }
}

.vehicle-control-filter-search {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: stretch;
    max-width: none;
}

.vehicle-control-filter-search .btn-inline {
    width: 100%;
    justify-content: center;
}

.vehicle-control-filter-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.lookup-input {
    width: 100%;
}

.front-inline-controls {
    display: grid;
    gap: 8px;
}

.front-item-inline-form {
    min-width: 220px;
}

.vehicle-filter-search {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: stretch;
    max-width: none;
}

.employee-filter-search {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    align-items: stretch;
    max-width: none;
}

.vehicle-filter-search input,
.vehicle-filter-search select,
.vehicle-filter-search .btn-inline {
    width: 100%;
    min-width: 0;
}

.vehicle-filter-search .btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.employee-filter-search input,
.employee-filter-search select,
.employee-filter-search .btn-inline {
    width: 100%;
    min-width: 0;
}

.employee-filter-search .btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
    padding: 10px 12px;
}

.vehicle-filter-search input[name="busca"] {
    grid-column: span 2;
}

.employee-filter-search input[name="busca"] {
    grid-column: span 3;
    min-width: 0;
}

.employee-filter-search select {
    min-width: 0;
}

.order-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: stretch;
    max-width: none;
}

.order-report-shell {
    padding: 26px;
    background:
        radial-gradient(circle at top right, rgba(255, 153, 51, 0.16), transparent 28%),
        radial-gradient(circle at top left, rgba(56, 110, 52, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(252, 253, 250, 0.96), rgba(244, 248, 241, 0.98));
}

.order-report-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(39, 87, 37, 0.96), rgba(60, 115, 56, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 38px rgba(10, 38, 18, 0.24);
}

.order-report-hero::after {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 184, 93, 0.28), rgba(255, 184, 93, 0));
    pointer-events: none;
}

.order-report-hero .manager-copy,
.order-report-hero .order-filter-top-actions {
    position: relative;
    z-index: 1;
}

.order-report-hero .order-filter-top-actions {
    display: flex;
    flex: 0 0 auto;
    align-self: flex-start;
    justify-content: flex-end;
}

.order-report-hero .eyebrow,
.order-report-hero h2,
.order-report-hero p {
    color: #f6fbf4;
}

.order-report-hero .eyebrow {
    opacity: 0.86;
}

.order-report-hero p {
    color: rgba(246, 251, 244, 0.82);
}

.order-report-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.order-report-hero-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.order-report-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin: 4px 0 16px;
}

.order-report-section-head .section-description {
    max-width: 520px;
    margin: 0;
    text-align: right;
}

.order-report-section-head-compact {
    margin: 0 0 18px;
}

.order-filter-form {
    margin-top: 0;
}

.order-filter-stats {
    margin: 0 0 22px;
}

.order-filter-top-actions {
    align-items: stretch;
}

.order-filter-top-actions .btn-inline {
    min-width: 220px;
}

.order-report-hero .order-filter-top-actions .primary-inline {
    flex: 0 0 auto;
    width: auto;
    min-width: 240px;
    max-width: 280px;
    min-height: 56px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: linear-gradient(135deg, #ffffff, #eef6e8);
    color: #215126;
    font-weight: 800;
    box-shadow: 0 18px 28px rgba(8, 30, 16, 0.18);
}

.order-report-hero .order-filter-top-actions .primary-inline:hover {
    background: linear-gradient(135deg, #ffffff, #f7fbf4);
    color: #173f1d;
    box-shadow: 0 22px 34px rgba(8, 30, 16, 0.24);
}

.order-report-stat {
    position: relative;
    overflow: hidden;
    min-height: 126px;
    padding: 22px 20px;
    border: 1px solid rgba(72, 111, 66, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 237, 0.96));
    box-shadow: 0 14px 28px rgba(23, 48, 22, 0.08);
}

.order-report-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-green), rgba(236, 125, 37, 0.95));
}

.order-report-stat span {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--text-muted);
}

.order-report-stat strong {
    display: block;
    margin-top: 14px;
    font-size: clamp(1.8rem, 2vw, 2.3rem);
    color: var(--primary-green);
}

.order-report-filter-card {
    padding: 22px;
    border: 1px solid rgba(72, 111, 66, 0.14);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 243, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 16px 30px rgba(23, 48, 22, 0.07);
}

.order-filter-grid input,
.order-filter-grid select,
.order-filter-grid button,
.order-filter-grid a {
    width: 100%;
    min-width: 0;
}

.order-filter-grid input[name="busca"] {
    grid-column: span 2;
}

.order-filter-grid input,
.order-filter-grid select {
    min-height: 54px;
    border-radius: 18px;
    border: 1px solid rgba(82, 114, 72, 0.22);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.order-filter-grid input:focus,
.order-filter-grid select:focus {
    border-color: rgba(55, 102, 49, 0.45);
    box-shadow: 0 0 0 4px rgba(55, 102, 49, 0.12);
}

.order-filter-grid a,
.order-filter-grid button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    min-height: 54px;
    border-radius: 18px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.order-filter-grid a:hover,
.order-filter-grid button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(19, 46, 20, 0.12);
}

.order-filter-apply {
    border: 1px solid rgba(43, 89, 39, 0.28);
    background: linear-gradient(135deg, #2f6630, #4a8745);
    color: #ffffff;
}

.order-filter-clear {
    border: 1px solid rgba(82, 114, 72, 0.16);
    background: linear-gradient(180deg, #f7faf5, #edf4e8);
    color: var(--primary-green);
}

.order-filter-export {
    border: 1px solid rgba(82, 114, 72, 0.2);
    background: linear-gradient(180deg, #eef5ea, #dfeadc);
    color: var(--primary-green);
}

.order-filter-export.excel {
    background: linear-gradient(180deg, #eef7ef, #dcebdc);
}

.order-filter-apply:hover,
.order-filter-clear:hover,
.order-filter-export:hover {
    filter: brightness(1.02);
}

.order-filter-active {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(235, 243, 230, 0.88);
    border: 1px solid rgba(80, 112, 70, 0.12);
}

.order-filter-active-label {
    display: inline-flex;
    margin-bottom: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-green);
}

.order-filter-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.order-filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(82, 114, 72, 0.16);
    color: var(--text-color);
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(23, 48, 22, 0.06);
}

.orders-data-table th:nth-child(4),
.orders-data-table td:nth-child(4) {
    width: 320px;
    min-width: 320px;
}

.orders-data-table th:nth-child(5),
.orders-data-table td:nth-child(5) {
    width: 560px;
    min-width: 560px;
}

.orders-data-table th:nth-child(6),
.orders-data-table td:nth-child(6),
.orders-data-table th:nth-child(7),
.orders-data-table td:nth-child(7),
.orders-data-table th:nth-child(8),
.orders-data-table td:nth-child(8) {
    width: 120px;
    min-width: 120px;
}

.orders-data-table th:last-child,
.orders-data-table td:last-child {
    width: 420px;
    min-width: 420px;
    padding-right: 18px;
}

.orders-data-table th,
.orders-data-table td {
    white-space: nowrap;
    word-break: normal;
    overflow: hidden;
    text-overflow: clip;
}

.orders-data-table .actions-cell {
    min-width: 0;
    transform: none;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.inline-close-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.inline-close-form input[type="date"] {
    width: 146px;
    min-width: 146px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(82, 114, 72, 0.2);
    background: #ffffff;
}

.action-chip.success {
    background: rgba(45, 90, 39, 0.12);
    color: var(--primary-green);
    border: 1px solid rgba(45, 90, 39, 0.18);
}

.status-os-aberta,
.status-os-parcial,
.status-os-encerrada {
    min-width: 112px;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-os-aberta {
    background: rgba(45, 90, 39, 0.12);
    color: var(--primary-green);
}

.status-os-parcial {
    background: rgba(217, 128, 37, 0.14);
    color: #a14f12;
}

.status-os-encerrada {
    background: rgba(121, 92, 60, 0.14);
    color: #755338;
}

.order-report-shell + .list-card {
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 24px 40px rgba(12, 37, 18, 0.12);
}

.order-report-shell + .list-card .list-head {
    padding: 22px 24px 16px;
    background: linear-gradient(180deg, rgba(250, 252, 248, 0.95), rgba(242, 247, 239, 0.92));
}

.order-report-shell + .list-card .table-wrap {
    overflow-x: auto;
    overflow-y: auto;
}

.orders-data-table {
    width: max-content;
    min-width: 1780px;
}

.properties-manager-search {
    grid-template-columns: minmax(220px, 1fr) max-content max-content max-content;
    grid-template-areas:
        "input buscar visualizar mapa"
        "input . pdf excel";
    align-items: start;
}

.properties-manager-search input[name="busca"] {
    grid-area: input;
}

.properties-search-button {
    grid-area: buscar;
}

.properties-visualizar-button {
    grid-area: visualizar;
}

.properties-mapa-button {
    grid-area: mapa;
}

.properties-pdf-button {
    grid-area: pdf;
}

.properties-excel-button {
    grid-area: excel;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stats-row-fit {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.mini-stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 243, 0.95));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 10px 24px rgba(16, 37, 26, 0.08);
}

.mini-stat-card span {
    display: block;
    color: var(--text-light);
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.mini-stat-card strong {
    color: var(--primary-green);
    font-size: 1.8rem;
}

.list-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 24px;
}

.list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.table-wrap {
    overflow-x: auto;
}

.list-card .table-wrap {
    max-height: 420px;
    overflow: auto;
    border: 1px solid rgba(214, 223, 209, 0.8);
    border-radius: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1180px;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}

.data-table th {
    color: var(--primary-green);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.empty-row {
    color: var(--text-light);
    text-align: center;
}

.table-action {
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(45, 90, 39, 0.14);
    background: rgba(45, 90, 39, 0.08);
    cursor: pointer;
    padding: 8px 10px;
    font-size: 0.9rem;
    line-height: 1;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    white-space: nowrap;
}

.table-action.danger-link {
    color: var(--danger);
    border-color: rgba(192, 57, 43, 0.16);
    background: rgba(192, 57, 43, 0.07);
}

.actions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 380px;
    white-space: normal;
    transform: translateX(-18px);
}

.data-table th:last-child,
.data-table td:last-child {
    width: 380px;
    padding-right: 28px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    max-width: 210px;
    width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    max-width: 180px;
    width: 180px;
}

.property-actions-cell {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    align-items: center;
    justify-content: start;
    transform: translateX(-28px);
}

.movement-actions-cell {
    min-width: 290px;
}

.movement-extra-row {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border-radius: 18px;
}

.movement-extra-row.is-highlighted {
    padding: 16px;
    background: linear-gradient(135deg, rgba(217, 182, 111, 0.18), rgba(45, 90, 39, 0.08));
    box-shadow: inset 0 0 0 1px rgba(45, 90, 39, 0.12);
}

.movement-table,
.movement-history-table {
    min-width: 1100px;
}

.form-actions-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.property-actions-cell .inline-delete-form {
    grid-column: 1;
}

.vehicle-actions-cell {
    min-width: 180px;
    transform: none;
}

.vehicle-data-table {
    min-width: 980px;
}

.implement-data-table {
    min-width: 780px;
}

.operations-data-table {
    min-width: 1240px;
}

.operations-data-table th:nth-child(2),
.operations-data-table td:nth-child(2) {
    width: 220px;
    max-width: 220px;
    white-space: normal;
    word-break: break-word;
}

.operations-data-table th:nth-child(3),
.operations-data-table td:nth-child(3) {
    width: 170px;
    max-width: 170px;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
}

.operations-data-table th:nth-child(4),
.operations-data-table td:nth-child(4) {
    width: 360px;
    max-width: 360px;
    white-space: normal;
    word-break: break-word;
}

.operations-data-table th:last-child,
.operations-data-table td:last-child {
    width: 300px;
    min-width: 300px;
    padding-right: 18px;
}

.operations-data-table .actions-cell {
    min-width: 0;
    transform: none;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.operations-data-table .table-action,
.operations-data-table .inline-delete-form {
    flex: 0 0 auto;
}

.brand-pill-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-input-wrap input {
    flex: 1;
    min-width: 0;
}

.brand-input-wrap input {
    flex: 1;
}

.brand-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.04em;
    flex: 0 0 auto;
    box-shadow: 0 10px 24px rgba(16, 37, 26, 0.14);
}

.brand-generic {
    background: linear-gradient(135deg, #6b7f74, #3f564a);
}

.brand-massey {
    background: linear-gradient(135deg, #bf1722, #7d0f17);
}

.brand-valtra {
    background: linear-gradient(135deg, #54595f, #24282c);
}

.brand-john-deere {
    background: linear-gradient(135deg, #2d7f2f, #115319);
}

.brand-mercedes {
    background: linear-gradient(135deg, #6b7380, #313943);
}

.brand-case {
    background: linear-gradient(135deg, #ec6c1f, #b24a11);
}

.brand-chevrolet {
    background: linear-gradient(135deg, #d0aa34, #886712);
}

.inline-delete-form {
    margin: 0;
}

.empty-state {
    min-height: 520px;
}

.section-hero {
    background: linear-gradient(135deg, rgba(45, 90, 39, 0.08), rgba(217, 182, 111, 0.12));
    border-radius: 22px;
    padding: 24px;
    border: 1px solid rgba(45, 90, 39, 0.08);
}

.os-model-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(45, 90, 39, 0.12);
}

.os-model-picker strong,
.os-model-picker span {
    display: block;
}

.os-model-picker strong {
    color: var(--primary-green);
}

.os-model-picker span {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 2px;
}

.os-model-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.section-block + .section-block {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--border-color);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.section-title {
    color: var(--primary-green);
    font-size: 1.2rem;
}

.section-title.large {
    font-size: 1.8rem;
    margin-top: 6px;
}

.section-kicker {
    display: inline-block;
    color: var(--accent-orange);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-description,
.mini-muted {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.93rem;
}

.btn-inline {
    border: none;
    background: rgba(45, 90, 39, 0.11);
    color: var(--primary-green);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-inline:hover {
    transform: translateY(-1px);
    background: rgba(45, 90, 39, 0.16);
    box-shadow: 0 12px 20px rgba(16, 37, 26, 0.08);
}

.stack-list {
    display: grid;
    gap: 16px;
}

.compact-list {
    gap: 12px;
}

.repeat-card {
    background: var(--surface-strong);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
}

.repeat-card-header {
    margin-bottom: 14px;
}

.repeat-card-header h3 {
    color: var(--primary-green);
    font-size: 1rem;
}

.repeat-card-header.between,
.person-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(45, 90, 39, 0.1);
    color: var(--primary-green);
    font-size: 0.86rem;
    font-weight: 700;
}

.turno-card,
.responsavel-card {
    padding: 22px;
}

.people-grid,
.split-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.person-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
}

.person-card.soft-card {
    background: #f5f8f3;
}

.person-card h4 {
    color: var(--primary-green);
    font-size: 1rem;
}

.form-row.two-columns .form-group,
.form-row.three-columns .form-group {
    margin-bottom: 0;
}

.compact-width {
    max-width: 220px;
}

.no-space {
    margin-bottom: 0;
}

.inline-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-field input,
.inline-field select {
    margin: 0;
    flex: 1 1 auto;
}

.remove-inline-button {
    flex: 0 0 auto;
    min-width: 108px;
}

.stock-movement-top-grid {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(260px, 1fr) repeat(3, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

.stock-movement-top-grid .form-group {
    min-width: 0;
    margin-bottom: 0;
}

.stock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.stock-grid .form-group {
    min-width: 0;
    margin-bottom: 0;
}

.stock-movements-table {
    min-width: 1360px;
}

.stock-movements-table th,
.stock-movements-table td {
    text-align: center;
    vertical-align: middle;
    padding-left: 18px;
    padding-right: 18px;
}

.stock-movements-table th:nth-child(1),
.stock-movements-table td:nth-child(1) {
    width: 110px;
    min-width: 110px;
}

.stock-movements-table th:nth-child(2),
.stock-movements-table td:nth-child(2) {
    width: 150px;
    min-width: 150px;
}

.stock-movements-table th:nth-child(3),
.stock-movements-table td:nth-child(3) {
    width: 250px;
    min-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-movements-table th:nth-child(4),
.stock-movements-table td:nth-child(4),
.stock-movements-table th:nth-child(5),
.stock-movements-table td:nth-child(5) {
    width: 230px;
    min-width: 230px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-movements-table th:nth-child(6),
.stock-movements-table td:nth-child(6) {
    width: 190px;
    min-width: 190px;
}

.stock-movements-table th:nth-child(7),
.stock-movements-table td:nth-child(7) {
    width: 170px;
    min-width: 170px;
}

.stock-movements-table th:nth-child(8),
.stock-movements-table td:nth-child(8) {
    width: 90px;
    min-width: 90px;
}

.stock-movements-table th:nth-child(9),
.stock-movements-table td:nth-child(9) {
    width: 150px;
    min-width: 150px;
}

.stock-movements-table th:nth-child(10),
.stock-movements-table td:nth-child(10) {
    width: 220px;
    min-width: 220px;
}

.stock-movements-table .actions-cell {
    justify-content: center;
    transform: none;
}

.stock-datetime-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.stock-datetime-field input {
    width: 100%;
    min-width: 0;
    flex: none;
}

.stock-datetime-button {
    width: fit-content;
    min-width: 180px;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
    line-height: 1.2;
}

.inline-quantity-input {
    width: 96px;
    min-width: 96px;
    flex: 0 0 96px !important;
}

.property-import-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr;
    gap: 18px;
    margin-top: 26px;
    margin-bottom: 26px;
}

.property-guide-card,
.property-upload-card {
    background: linear-gradient(180deg, rgba(248, 251, 245, 0.95), rgba(255, 255, 255, 0.98));
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 18px 35px rgba(18, 39, 24, 0.08);
}

.upload-form {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(45, 90, 39, 0.08);
    border: 1px solid rgba(45, 90, 39, 0.12);
    color: var(--primary-green);
    font-size: 0.88rem;
    font-weight: 600;
}

.permission-grid-form {
    display: grid;
    gap: 10px;
    min-width: 520px;
}

.permission-chip-list {
    align-items: stretch;
    gap: 8px;
}

.permission-chip {
    cursor: pointer;
    gap: 6px;
}

.permission-chip input {
    accent-color: var(--accent-orange);
}

.permission-chip:has(input:checked) {
    background: rgba(211, 84, 0, 0.12);
    border-color: rgba(211, 84, 0, 0.35);
    color: var(--primary-green);
}

.settings-action-stack {
    display: grid;
    gap: 10px;
    min-width: 250px;
}

.password-admin-box {
    border: 1px solid rgba(45, 90, 39, 0.16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(248, 252, 246, 0.98), rgba(255, 255, 255, 0.98));
    padding: 10px 12px;
}

.password-admin-box summary {
    cursor: pointer;
    color: var(--primary-green);
    font-weight: 800;
    list-style: none;
}

.password-admin-box summary::-webkit-details-marker {
    display: none;
}

.password-admin-box summary::after {
    content: "+";
    float: right;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(45, 90, 39, 0.10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.password-admin-box[open] summary::after {
    content: "-";
}

.password-admin-note {
    display: grid;
    gap: 5px;
    margin: 10px 0;
    color: var(--text-light);
    font-size: 0.82rem;
    line-height: 1.45;
}

.password-admin-note strong {
    color: var(--primary-green);
}

.password-reset-form {
    display: grid;
    gap: 9px;
}

.password-reset-form label {
    display: grid;
    gap: 5px;
    color: var(--primary-green);
    font-size: 0.82rem;
    font-weight: 700;
}

.password-reset-form input[type="password"] {
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font: inherit;
}

.password-force-row {
    display: flex !important;
    align-items: center;
    color: var(--text-color) !important;
    font-weight: 600 !important;
}

.password-reset-button {
    justify-content: center;
}

/* Administração de usuários C.E.O */
.settings-page {
    display: grid;
    align-content: start;
    gap: 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.settings-page > *,
.settings-admin-overview,
.settings-users-grid,
.settings-user-card,
.settings-manager-panel,
.settings-audit-card {
    min-width: 0;
    max-width: 100%;
}

.settings-page .settings-hero-header,
.settings-page .form-message,
.settings-page .manager-panel,
.settings-page .list-card {
    margin-bottom: 0;
}

.settings-flash-message {
    position: relative;
    top: auto;
    z-index: 20;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 18px 40px rgba(6, 32, 16, 0.16);
}

.settings-admin-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.settings-admin-overview article {
    display: grid;
    gap: 4px;
    min-height: 132px;
    padding: 20px 22px;
    border: 1px solid rgba(45, 90, 39, 0.14);
    border-radius: 22px;
    background:
        radial-gradient(circle at 90% 10%, rgba(236, 148, 50, 0.16), transparent 36%),
        linear-gradient(145deg, #ffffff, #f2f7ef);
    box-shadow: 0 16px 32px rgba(6, 35, 17, 0.10);
}

.settings-admin-overview span,
.settings-user-meta small {
    color: #687269;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-admin-overview strong {
    color: var(--primary-green);
    font-size: 2rem;
    line-height: 1;
}

.settings-admin-overview small {
    color: var(--text-light);
    font-size: 0.82rem;
}

.settings-create-card,
.settings-archive-card {
    overflow: hidden;
    border: 1px solid rgba(45, 90, 39, 0.16);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 42px rgba(8, 37, 19, 0.12);
}

.settings-create-card > summary,
.settings-archive-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
    background:
        radial-gradient(circle at 100% 0, rgba(236, 148, 50, 0.20), transparent 32%),
        linear-gradient(135deg, #f8fbf5, #ffffff);
}

.settings-create-card > summary::-webkit-details-marker,
.settings-archive-card > summary::-webkit-details-marker {
    display: none;
}

.settings-create-card > summary span:first-child {
    display: grid;
    gap: 2px;
}

.settings-create-card > summary small {
    color: var(--accent-orange);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-create-card > summary strong,
.settings-archive-card > summary {
    color: var(--primary-green);
    font-size: 1.15rem;
    font-weight: 800;
}

.settings-summary-action {
    padding: 10px 15px;
    border-radius: 999px;
    background: var(--primary-green);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
}

.settings-create-card[open] .settings-summary-action::before {
    content: "Fechar ";
}

.settings-create-card[open] .settings-summary-action {
    font-size: 0;
}

.settings-create-card[open] .settings-summary-action::before {
    font-size: 0.82rem;
}

.settings-create-form {
    display: grid;
    gap: 20px;
    padding: 24px;
    border-top: 1px solid rgba(45, 90, 39, 0.12);
}

.settings-form-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.settings-form-heading h2 {
    margin: 4px 0 0;
    color: var(--primary-green);
}

.settings-form-heading p {
    max-width: 520px;
    color: var(--text-light);
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.settings-form-grid label {
    display: grid;
    gap: 7px;
    color: var(--primary-green);
    font-size: 0.82rem;
    font-weight: 800;
}

.settings-form-grid input,
.settings-form-grid select {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    color: var(--text-color);
    font: inherit;
}

.settings-form-grid input:focus,
.settings-form-grid select:focus,
.password-reset-form input:focus {
    outline: 3px solid rgba(236, 148, 50, 0.15);
    border-color: var(--accent-orange);
}

.settings-permission-box {
    min-width: 0;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(45, 90, 39, 0.13);
    border-radius: 20px;
    background: #f6faf3;
}

.settings-create-form .permission-chip-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.settings-create-form .permission-chip {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    border-radius: 15px;
    overflow-wrap: anywhere;
}

.settings-permission-box > div:first-child,
.settings-recovery-actions p {
    display: grid;
    gap: 3px;
}

.settings-permission-box strong,
.settings-recovery-actions strong {
    color: var(--primary-green);
}

.settings-permission-box span,
.settings-recovery-actions span {
    color: var(--text-light);
    font-size: 0.82rem;
}

.settings-create-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.settings-create-options .toggle-row {
    padding: 11px 14px;
    border: 1px solid rgba(45, 90, 39, 0.14);
    border-radius: 14px;
    background: #fff;
}

.settings-create-submit {
    width: min(100%, 420px);
    justify-self: end;
}

.settings-manager-panel {
    border-radius: 24px;
}

.settings-users-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.settings-user-card {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(45, 90, 39, 0.14);
    border-top: 4px solid #9bad94;
    border-radius: 24px;
    background: linear-gradient(155deg, #ffffff, #f5f9f2);
    box-shadow: 0 16px 36px rgba(8, 37, 19, 0.10);
}

.settings-user-card.is-active {
    border-top-color: #4d8c42;
}

.settings-user-card.is-ceo {
    border-top-color: var(--accent-orange);
    background:
        radial-gradient(circle at 100% 0, rgba(236, 148, 50, 0.14), transparent 34%),
        linear-gradient(155deg, #ffffff, #f5f9f2);
}

.settings-user-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.settings-user-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-green), #4c8744);
    color: #fff;
    font-weight: 800;
}

.settings-user-head h3 {
    margin: 0;
    color: var(--primary-green);
    font-size: 1rem;
}

.settings-user-head p {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
    color: var(--text-light);
    font-size: 0.79rem;
}

.settings-status-pill {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.71rem;
    font-weight: 800;
}

.settings-status-pill.active {
    background: #e4f4df;
    color: #2d6b28;
}

.settings-status-pill.inactive {
    background: #f2ece6;
    color: #8a5f43;
}

.settings-user-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.settings-user-meta > span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 11px 12px;
    border-radius: 15px;
    background: rgba(45, 90, 39, 0.06);
}

.settings-user-meta strong {
    overflow-wrap: anywhere;
    color: var(--primary-green);
    font-size: 0.82rem;
}

.settings-user-section {
    overflow: hidden;
    border: 1px solid rgba(45, 90, 39, 0.13);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.82);
}

.settings-user-section > summary {
    padding: 13px 15px;
    cursor: pointer;
    list-style: none;
    color: var(--primary-green);
    font-size: 0.85rem;
    font-weight: 800;
}

.settings-user-section > summary::after {
    content: "+";
    float: right;
}

.settings-user-section[open] > summary::after {
    content: "−";
}

.settings-user-section > form,
.settings-user-section > div {
    margin: 0 14px 14px;
}

.settings-user-card .permission-grid-form {
    min-width: 0;
}

.settings-user-card .permission-chip-list {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.settings-user-actions,
.settings-recovery-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.settings-user-actions form,
.settings-recovery-actions form {
    margin: 0;
}

.table-action.danger {
    border-color: rgba(190, 55, 36, 0.28);
    background: #fff0ec;
    color: #b53926;
}

.table-action.danger-soft {
    color: #a24735;
}

.settings-ceo-protected {
    width: 100%;
    padding: 10px 14px;
    border-radius: 13px;
    background: #fff4df;
    color: #8e5d16;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.settings-recovery-grant {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border: 1px solid rgba(236, 148, 50, 0.46);
    border-radius: 22px;
    background: linear-gradient(135deg, #fff8e9, #ffffff);
    box-shadow: 0 18px 38px rgba(98, 58, 5, 0.14);
}

.settings-recovery-grant h2,
.settings-recovery-grant p {
    margin: 2px 0 0;
    color: var(--primary-green);
}

.settings-recovery-grant p {
    color: var(--text-light);
    font-size: 0.82rem;
}

.recovery-code-copy {
    display: grid;
    gap: 3px;
    min-width: 230px;
    padding: 13px 18px;
    border: none;
    border-radius: 16px;
    background: var(--primary-green);
    color: #fff;
    cursor: pointer;
}

.recovery-code-copy span {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.recovery-code-copy small {
    color: rgba(255, 255, 255, 0.76);
}

.settings-archive-card > summary > span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--primary-green);
    color: #fff;
    font-size: 0.75rem;
}

.settings-archive-list {
    display: grid;
    padding: 0 20px 18px;
}

.settings-archive-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 4px;
    border-top: 1px solid rgba(45, 90, 39, 0.12);
}

.settings-archive-list span {
    display: grid;
}

.settings-archive-list small {
    color: var(--text-light);
}

.settings-audit-card .table-wrap {
    width: 100%;
    max-width: 100%;
    max-height: 520px;
    overflow: auto;
}

/* Recuperação pública autorizada pelo C.E.O */
.auth-recovery-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: var(--primary-green);
    font-weight: 800;
    text-decoration: none;
}

.auth-recovery-link:hover {
    color: var(--accent-orange);
}

.recovery-flow-list {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.recovery-flow-list span {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.recovery-flow-list strong {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--accent-orange);
    color: #fff;
}

.recovery-password-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.recovery-code-input {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

@media (max-width: 1320px) {
    .settings-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-admin-overview,
    .settings-users-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    body:has(.settings-page) .app-shell {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 16px;
    }

    body:has(.settings-page) .sidebar {
        padding: 18px;
    }
}

@media (max-width: 840px) {
    .settings-admin-overview,
    .settings-users-grid {
        grid-template-columns: 1fr;
    }

    .settings-form-heading,
    .settings-recovery-grant {
        align-items: stretch;
        flex-direction: column;
    }

    .recovery-code-copy {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .settings-page {
        gap: 13px;
    }

    .settings-form-grid,
    .recovery-password-grid {
        grid-template-columns: 1fr;
    }

    .settings-create-card > summary,
    .settings-create-form {
        padding: 17px;
    }

    .settings-create-card > summary {
        align-items: flex-start;
    }

    .settings-summary-action {
        padding: 8px 10px;
    }

    .settings-user-card {
        padding: 15px;
        border-radius: 20px;
    }

    .settings-user-head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .settings-status-pill {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .settings-user-meta {
        grid-template-columns: 1fr;
    }

    .settings-user-actions,
    .settings-recovery-actions,
    .settings-archive-list > div {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-user-actions form,
    .settings-user-actions button,
    .settings-recovery-actions form,
    .settings-recovery-actions button,
    .settings-archive-list form,
    .settings-archive-list button {
        width: 100%;
    }
}

@media (max-width: 960px) {
    .recovery-flow-list {
        max-width: 520px;
        margin-right: auto;
        margin-left: auto;
        text-align: left;
    }
}

.property-header-row {
    align-items: flex-end;
}

.property-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: #fff;
}

.property-entry-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.property-entry-table thead th {
    background: linear-gradient(135deg, #2d5a27, #46763f);
    color: #fff;
    text-align: left;
    padding: 14px 12px;
    font-size: 0.86rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.property-entry-table tbody tr:nth-child(even) {
    background: rgba(248, 251, 245, 0.85);
}

.property-entry-table td {
    padding: 10px;
    border-top: 1px solid var(--border-color);
}

.property-entry-table input,
.property-entry-table select {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.property-total-bar {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(45, 90, 39, 0.08), rgba(217, 182, 111, 0.12));
    border: 1px solid rgba(45, 90, 39, 0.12);
    border-radius: 18px;
}

.property-total-bar strong {
    color: var(--primary-green);
    margin-right: auto;
}

.property-total-bar span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(45, 90, 39, 0.12);
    color: var(--primary-green);
    font-weight: 700;
}

.draw-property-card {
    background:
        radial-gradient(circle at top right, rgba(248, 168, 31, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(248, 251, 245, 0.96), rgba(255, 255, 255, 0.98));
}

.draw-property-actions {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) minmax(190px, 1fr);
    gap: 14px;
    align-items: end;
}

.draw-map-toggle {
    min-height: 48px;
    align-self: end;
    white-space: normal;
}

.draw-property-actions .btn-inline {
    width: 100%;
    min-width: 0;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    line-height: 1.2;
}

.draw-property-buttons {
    display: grid;
    gap: 12px;
    align-self: stretch;
}

.soft-danger {
    color: #9b2f23;
    background: rgba(192, 57, 43, 0.1);
}

.soft-danger:hover {
    background: rgba(192, 57, 43, 0.16);
}

.geometry-status {
    margin: 14px 0 0;
    color: var(--muted-text);
    font-weight: 600;
}

.map-draw-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(9, 28, 18, 0.72);
    backdrop-filter: blur(8px);
}

.map-draw-modal.is-open {
    display: flex;
}

.map-draw-dialog {
    width: min(1040px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.map-draw-header,
.map-draw-footer,
.draw-map-toolbar {
    padding: 14px 18px;
}

.map-draw-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    background:
        linear-gradient(135deg, rgba(18, 49, 31, 0.96), rgba(45, 90, 39, 0.92)),
        url("logo_fh_mark.jpeg") right 28px center / 110px auto no-repeat;
}

.map-draw-header .section-title,
.map-draw-header .section-description,
.map-draw-header .section-kicker {
    color: #ffffff;
}

.map-draw-close {
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-weight: 700;
}

.draw-map-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted-text);
    font-weight: 600;
    background: rgba(248, 251, 245, 0.92);
    border-bottom: 1px solid var(--border-color);
}

.draw-map-toolbar span:first-child {
    color: var(--primary-green);
}

.draw-map {
    height: min(58vh, 520px);
    min-height: 360px;
    width: 100%;
}

.map-draw-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
}

.compact-submit {
    width: auto;
    min-width: 190px;
}

/* Regras essenciais do Leaflet mantidas localmente para evitar tela quebrada se o CSS externo falhar. */
.leaflet-container {
    position: relative;
    overflow: hidden;
    outline-offset: 1px;
    background: #d7e1d0;
    font-family: inherit;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}

.leaflet-container img.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
    width: 256px;
    height: 256px;
}

.leaflet-tile {
    user-select: none;
    visibility: hidden;
}

.leaflet-tile-loaded {
    visibility: inherit;
}

.leaflet-map-pane,
.leaflet-tile-pane,
.leaflet-overlay-pane,
.leaflet-shadow-pane,
.leaflet-marker-pane,
.leaflet-tooltip-pane,
.leaflet-popup-pane {
    position: absolute;
    left: 0;
    top: 0;
}

.leaflet-tile-pane {
    z-index: 200;
}

.leaflet-overlay-pane {
    z-index: 400;
}

.leaflet-marker-pane {
    z-index: 600;
}

.leaflet-tooltip-pane {
    z-index: 650;
}

.leaflet-popup-pane {
    z-index: 700;
}

.leaflet-control {
    position: relative;
    z-index: 800;
    pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}

.leaflet-top {
    top: 0;
}

.leaflet-right {
    right: 0;
}

.leaflet-bottom {
    bottom: 0;
}

.leaflet-left {
    left: 0;
}

.leaflet-control-zoom {
    border: 1px solid rgba(18, 49, 31, 0.18);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.leaflet-control-zoom a {
    display: block;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    color: var(--primary-green);
    background: #ffffff;
    text-decoration: none;
    font-weight: 800;
}

.leaflet-draw-toolbar a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    height: 36px;
    padding: 0 12px;
    color: var(--primary-green);
    background: #ffffff !important;
    background-image: none !important;
    text-decoration: none;
    font-size: 0;
    font-weight: 800;
}

.leaflet-draw-draw-polygon::after {
    content: "Desenhar";
    font-size: 12px;
}

.leaflet-draw-edit-edit::after {
    content: "Editar";
    font-size: 12px;
}

.leaflet-draw-edit-remove::after {
    content: "Excluir";
    font-size: 12px;
}

.leaflet-draw-toolbar a:hover {
    background: #2d5a27 !important;
    color: #ffffff !important;
}

.leaflet-control-attribution {
    padding: 3px 8px;
    color: #4f5c52;
    background: rgba(255, 255, 255, 0.82);
    font-size: 11px;
}

.leaflet-draw {
    margin: 12px 0 0 12px;
}

.leaflet-draw-toolbar {
    border: 1px solid rgba(18, 49, 31, 0.18);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.leaflet-control-layers {
    margin: 12px 12px 0 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    font-size: 0.82rem;
    font-weight: 600;
}

.leaflet-control-layers label {
    display: block;
    margin: 4px 0;
}

.os-map .leaflet-control-layers {
    max-width: 210px;
    padding: 8px 10px;
    font-size: 0.76rem;
    opacity: 0.94;
}

.os-map .leaflet-control-layers-toggle {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background-size: 18px 18px;
}

.os-map .leaflet-editing-icon {
    width: 12px !important;
    height: 12px !important;
    margin-left: -6px !important;
    margin-top: -6px !important;
    border-radius: 999px;
    border: 2px solid #ffffff !important;
    background: #f15a24 !important;
    box-shadow: 0 0 0 2px rgba(241, 90, 36, 0.18);
}

.draw-map .leaflet-editing-icon,
.leaflet-container .leaflet-editing-icon {
    width: 14px !important;
    height: 14px !important;
    margin-left: -7px !important;
    margin-top: -7px !important;
    border-radius: 999px !important;
    border: 3px solid #ffffff !important;
    background: #f8a81f !important;
    box-shadow: 0 0 0 2px rgba(45, 90, 39, 0.28) !important;
}

.draw-map .leaflet-middle-icon,
.leaflet-container .leaflet-middle-icon {
    width: 10px !important;
    height: 10px !important;
    margin-left: -5px !important;
    margin-top: -5px !important;
    border-radius: 999px !important;
    border: 2px solid #ffffff !important;
    background: #2d5a27 !important;
    box-shadow: 0 0 0 2px rgba(248, 168, 31, 0.18) !important;
}

.os-map .leaflet-middle-icon {
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.leaflet-draw-actions {
    left: 112px !important;
}

.leaflet-draw-actions li {
    display: inline-flex;
}

.leaflet-draw-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    color: #ffffff;
    background: var(--primary-green);
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 700;
}

.leaflet-draw-actions a:hover {
    background: #193426;
    color: #ffffff;
}

.leaflet-tooltip {
    background: rgba(18, 49, 31, 0.94);
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    color: #ffffff;
    font-weight: 600;
}

.leaflet-tooltip-top:before {
    border-top-color: rgba(18, 49, 31, 0.94);
}

@media (max-width: 960px) {
    .settings-hero-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 22px;
    }

    .settings-hero-header h1 {
        max-width: none;
        font-size: clamp(1.65rem, 7vw, 2.25rem);
    }

    .settings-hero-header p {
        max-width: none;
        font-size: 0.98rem;
    }

    .permission-grid-form {
        min-width: 0;
    }

    .order-report-shell {
        padding: 18px;
    }

    .order-report-section-head {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .order-report-section-head .section-description,
    .order-filter-top-actions {
        text-align: left;
    }

    .order-report-hero-tags {
        gap: 8px;
    }

    .order-filter-top-actions .btn-inline {
        min-width: 0;
        width: 100%;
    }

    .order-report-filter-card {
        padding: 18px;
    }

    .vehicle-filter-search input[name="busca"] {
        grid-column: span 1;
    }

    .employee-filter-search input[name="busca"] {
        grid-column: span 1;
    }

    .order-filter-grid input[name="busca"] {
        grid-column: span 1;
    }

    body.auth-page {
        padding: 16px;
    }

    .page-shell,
    .dashboard-grid,
    .app-shell,
    .people-grid,
    .split-layout,
    .manager-search,
    .stats-row {
        grid-template-columns: 1fr;
    }

    .properties-manager-search {
        grid-template-areas:
            "input"
            "buscar"
            "visualizar"
            "mapa"
            "pdf"
            "excel";
    }

    .login-hero {
        padding: 0;
        text-align: center;
    }

    .login-hero p {
        margin: 0 auto;
    }

    .hero-highlights,
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-sidebar,
    .sidebar {
        margin-bottom: 8px;
    }

    .manager-toolbar,
    .list-head,
    .property-import-grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .property-import-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .settings-hero-header {
        border-radius: 22px;
        padding: 18px;
    }

    .permission-chip-list {
        display: grid;
        grid-template-columns: 1fr;
    }

    body:has(.settings-page) .app-shell {
        width: 100%;
    }

    .stock-movement-top-grid {
        grid-template-columns: 1fr;
    }

    .stock-grid {
        grid-template-columns: 1fr;
    }

    .stock-datetime-button {
        width: 100%;
        min-width: 0;
    }

    .content-subnav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .subnav-link {
        width: 100%;
        min-height: 58px;
        padding: 12px 12px;
        border-radius: 16px;
        font-size: 0.95rem;
        line-height: 1.25;
        white-space: normal;
        word-break: break-word;
    }

    .login-card,
    .dashboard-card,
    .content-card {
        padding: 24px;
        border-radius: 20px;
    }

    .form-row,
    .label-row,
    .form-options,
    .profile-row,
    .hero-highlights,
    .stat-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        max-width: 140px;
    }

    .panel-title {
        font-size: 1.6rem;
    }

    .dashboard-page {
        padding: 16px;
    }

    .dashboard-header {
        padding: 22px;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .repeat-card-header.between,
    .person-card-header {
        flex-direction: column;
    }

    .compact-width {
        max-width: 100%;
    }

    .property-total-bar {
        justify-content: flex-start;
    }

    .property-total-bar strong {
        margin-right: 0;
        width: 100%;
    }

    .draw-property-actions {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .map-draw-modal {
        padding: 10px;
    }

    .map-draw-dialog {
        max-height: 96vh;
        border-radius: 20px;
    }

    .map-draw-header,
    .map-draw-footer,
    .draw-map-toolbar {
        padding: 14px;
    }

    .map-draw-header,
    .draw-map-toolbar,
    .map-draw-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .draw-map {
        min-height: 430px;
    }

    .table-wrap {
        overflow-x: visible;
    }

    .list-card .table-wrap {
        max-height: none;
        overflow: visible;
        border: none;
        border-radius: 0;
    }

    .data-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 14px;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        background: #ffffff;
        border: 1px solid var(--border-color);
        border-radius: 18px;
        padding: 14px;
        box-shadow: 0 12px 24px rgba(16, 37, 26, 0.08);
    }

    .data-table td {
        border-bottom: none;
        padding: 9px 0;
        white-space: normal;
    }

    .data-table td::before {
        content: attr(data-label);
        display: block;
        color: var(--primary-green);
        font-size: 0.76rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        margin-bottom: 4px;
    }

    .actions-cell,
    .property-actions-cell {
        width: 100% !important;
        min-width: 0;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        transform: none;
    }

    .table-action {
        flex: 1 1 calc(50% - 8px);
        min-width: 118px;
    }

    .inline-delete-form {
        flex: 1 1 calc(50% - 8px);
    }

    .inline-delete-form .table-action {
        width: 100%;
    }

    .employee-data-table {
        border-spacing: 0 10px;
    }

    .employee-data-table tr {
        padding: 12px;
        border-radius: 16px;
    }

    .employee-data-table td {
        padding: 6px 0;
        font-size: 0.94rem;
    }

    .employee-data-table td::before {
        margin-bottom: 2px;
        font-size: 0.7rem;
    }

    .employee-data-table .actions-cell {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }

    .employee-data-table .table-action,
    .employee-data-table .inline-delete-form {
        flex: none;
        width: 100%;
        min-width: 0;
    }

    .employee-data-table .table-action,
    .employee-data-table .danger-link {
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.2;
        padding: 9px 10px;
    }
}

.section-inline-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.section-inline-header.no-margin {
    margin-bottom: 12px;
}

.compact-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.field-static {
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: #f6faf3;
    color: var(--primary-green);
    font-weight: 600;
}

.os-property-picker-row,
.os-product-row {
    align-items: end;
}

.property-picker-action,
.product-picker-action {
    max-width: 220px;
}

.os-order-top-grid {
    margin-top: 6px;
}

.os-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: #f6faf3;
    color: var(--primary-green);
    font-weight: 600;
    white-space: nowrap;
}

.os-inline-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-green);
    margin: 0;
}

.primary-inline {
    width: 100%;
    justify-content: center;
}

body.modal-open {
    overflow: hidden;
}

.os-property-flow-copy {
    margin-bottom: 14px;
}

.os-selected-summary-compact {
    max-height: 360px;
}

.os-selected-preview-list {
    display: grid;
    gap: 10px;
}

.os-selected-preview-chip,
.os-selected-preview-more {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 12px 14px;
    background: #ffffff;
}

.os-selected-preview-chip strong {
    display: block;
    margin-bottom: 4px;
}

.os-selected-preview-chip span,
.os-selected-preview-more {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.os-property-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(9, 28, 18, 0.72);
}

.os-property-modal.is-open {
    display: flex;
}

.os-property-dialog {
    width: min(1380px, 100%);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(180deg, #fbfdf9 0%, #f4f8f1 100%);
    box-shadow: 0 28px 60px rgba(8, 30, 16, 0.34);
}

.os-property-dialog-header,
.os-property-dialog-footer {
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.os-property-dialog-header {
    border-bottom: 1px solid var(--border-color);
}

.os-property-dialog-footer {
    border-top: 1px solid var(--border-color);
}

.btn-submit-inline {
    width: auto;
    min-width: 240px;
}

.os-property-dialog-body {
    padding: 24px;
    overflow: auto;
    display: grid;
    gap: 18px;
}

.os-modal-tools {
    display: flex;
    justify-content: flex-end;
}

.os-selection-layout-modal {
    grid-template-columns: minmax(0, 1.75fr) minmax(360px, 0.95fr);
    align-items: stretch;
}

.os-selection-layout-modal .os-map {
    min-height: 640px;
}

.os-selection-layout-modal .os-side-card {
    height: 100%;
    max-height: none;
    min-height: 640px;
}

.os-selection-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.os-map-card,
.os-side-card,
.os-property-group {
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: #fbfdf9;
}

.os-map-card,
.os-side-card {
    overflow: hidden;
}

.os-map-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
}

.os-map {
    min-height: 520px;
}

.map-status-bar {
    padding: 12px 18px 16px;
    color: var(--text-muted);
    font-weight: 600;
}

.os-side-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    height: 820px;
    max-height: 820px;
}

.empty-state-panel {
    padding: 18px;
    border-radius: 18px;
    background: #eef5ea;
    color: var(--text-muted);
    font-weight: 500;
}

.os-summary-total {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.os-summary-total strong {
    font-size: 2rem;
    color: var(--primary-green);
}

.os-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.os-summary-grid div,
.os-selected-item {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 12px 14px;
    background: #ffffff;
}

.os-summary-grid span,
.os-selected-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.os-selected-summary {
    display: grid;
    gap: 14px;
    max-height: 620px;
    overflow: auto;
    padding-right: 4px;
}

.os-selected-summary.empty-state-panel {
    padding: 22px;
}

.os-summary-top {
    display: grid;
    gap: 12px;
}

.os-selected-list {
    display: grid;
    gap: 12px;
    max-height: none;
    overflow: auto;
    padding-right: 4px;
}

.os-selected-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    align-items: stretch;
    padding: 14px 16px;
}

.os-selected-item strong {
    display: block;
    margin-bottom: 4px;
}

.os-selected-item .compact-actions {
    width: 100%;
    justify-content: flex-end;
}

.os-selected-item .action-chip {
    min-width: 128px;
    text-align: center;
}

.os-property-panel {
    display: grid;
    gap: 14px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
    align-content: start;
}

.os-property-group {
    padding: 16px;
    min-width: 0;
}

.compact-table th,
.compact-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.os-talhoes-table-wrap {
    max-height: 320px;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: #fff;
}

.os-selected-summary::-webkit-scrollbar,
.os-property-panel::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.os-selected-summary::-webkit-scrollbar-thumb,
.os-property-panel::-webkit-scrollbar-thumb {
    background: rgba(45, 90, 39, 0.35);
    border-radius: 999px;
}

.os-selected-summary::-webkit-scrollbar-track,
.os-property-panel::-webkit-scrollbar-track {
    background: rgba(214, 223, 209, 0.4);
    border-radius: 999px;
}

.os-talhoes-table-wrap table {
    margin: 0;
    table-layout: fixed;
    width: 100%;
    min-width: 610px;
}

.os-talhao-chooser-table th,
.os-talhao-chooser-table td {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 8px;
    padding-right: 8px;
}

.os-talhao-chooser-table th:first-child,
.os-talhao-chooser-table td:first-child {
    width: 44px;
    min-width: 44px;
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
}

.os-talhao-chooser-table th:nth-child(2),
.os-talhao-chooser-table td:nth-child(2) {
    width: 74px;
    max-width: 74px;
}

.os-talhao-chooser-table th:nth-child(3),
.os-talhao-chooser-table td:nth-child(3) {
    width: 108px;
    max-width: 108px;
}

.os-talhao-chooser-table th:nth-child(4),
.os-talhao-chooser-table td:nth-child(4) {
    width: 90px;
    max-width: 90px;
    text-align: center;
}

.os-talhao-chooser-table th:nth-child(5),
.os-talhao-chooser-table td:nth-child(5),
.os-talhao-chooser-table th:last-child,
.os-talhao-chooser-table td:last-child {
    width: auto;
    max-width: none;
    min-width: 0;
    padding-right: 8px;
}

.os-talhao-chooser-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-green);
}

.os-talhao-hidden-note {
    margin-top: 4px;
}

.os-talhao-number-marker {
    background: transparent;
    border: none;
}

.os-talhao-number-marker span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    text-align: center;
    line-height: 1.05;
    font-weight: 800;
    color: #1f4129;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
}

.os-talhao-number-marker span strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
}

.os-talhao-number-marker span small {
    display: block;
    margin-top: 2px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.05;
}

.table-input {
    width: 100%;
    min-width: 90px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font: inherit;
}

.os-products-table .empty-state-panel {
    margin-top: 8px;
}

.soft-danger {
    background: #fff3f0 !important;
    color: #d94a2b !important;
}

.employee-form-card {
    max-width: 780px;
}

.employee-form-copy {
    max-width: 520px;
}

.employee-form-grid {
    max-width: 500px;
    grid-template-columns: 1fr;
    gap: 0;
}

.employee-form-grid .form-group {
    max-width: 240px;
    margin-bottom: 12px;
}

.employee-form-grid .medium-width {
    max-width: 240px;
}

.employee-form-grid .employee-short-field {
    max-width: 480px;
}

.employee-form-grid .employee-cargo-field {
    max-width: 240px;
}

.employee-form-grid .compact-width {
    max-width: 165px;
}

.employee-form-grid .full,
.employee-form-grid .employee-notes-field {
    max-width: 128px;
}

.employee-form-grid textarea {
    width: 128px;
    min-width: 128px;
    max-width: 128px;
    min-height: 40px;
    padding: 8px 10px;
    resize: vertical;
}

.employee-form-card .btn-submit {
    margin-top: 10px;
}

@media (max-width: 1080px) {
    .os-selection-layout {
        grid-template-columns: 1fr;
    }

    .os-property-dialog {
        width: min(100%, 100%);
        max-height: 96vh;
        border-radius: 24px;
    }

    .os-property-dialog-header,
    .os-property-dialog-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .os-selection-layout-modal .os-map {
        min-height: 500px;
    }

    .os-selection-layout-modal .os-side-card {
        min-height: 560px;
    }

    .os-map {
        min-height: 430px;
    }

    .os-side-card {
        height: 620px;
        max-height: 620px;
    }

    .os-selected-summary {
        max-height: 420px;
    }

    .os-property-panel {
        flex: 1 1 auto;
    }
}

@media (max-width: 640px) {
    .os-property-modal {
        padding: 10px;
    }

    .os-property-dialog-body,
    .os-property-dialog-header,
    .os-property-dialog-footer {
        padding: 16px;
    }

    .os-selection-layout-modal .os-map {
        min-height: 420px;
    }

    .os-selection-layout-modal .os-side-card {
        min-height: 480px;
    }

    .os-selected-summary-compact {
        max-height: 300px;
    }

    .btn-submit-inline {
        min-width: 100%;
    }
}

@media (max-width: 640px) {
    .section-inline-header,
    .os-map-toolbar,
    .os-selected-item {
        flex-direction: column;
        align-items: stretch;
    }

    .os-summary-grid {
        grid-template-columns: 1fr;
    }

    .employee-form-card,
    .employee-form-copy,
    .employee-form-grid,
    .employee-form-grid .form-group,
    .employee-form-grid .medium-width,
    .employee-form-grid .compact-width,
    .employee-form-grid .full,
    .employee-form-grid .employee-notes-field,
    .employee-form-grid textarea {
        max-width: 100%;
        width: 100%;
        min-width: 0;
    }
}
.stock-report-model-picker{
    display:grid;
    gap:6px;
    min-width:190px;
}

.stock-report-model-picker span{
    font-size:.78rem;
    font-weight:700;
    color:#2d5a27;
    line-height:1;
}

.stock-report-model-picker select{
    min-height:44px;
    border-radius:14px;
    border:1px solid #d6dfd1;
    background:#fff;
    color:#213126;
    font:inherit;
    font-weight:600;
    padding:0 14px;
}
.pwa-connection-status {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%) translateY(140%);
    max-width: min(92vw, 680px);
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.22);
    background: #12331f;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 18px 34px rgba(0,0,0,.22);
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
}

.pwa-connection-status.is-online,
.pwa-connection-status.is-offline,
.pwa-connection-status.is-warning {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-connection-status.is-offline {
    background: #fff3e6;
    border-color: #f0ba7a;
    color: #7a3d00;
}

.pwa-connection-status.is-warning {
    background: #fffaf0;
    border-color: #f0cf8a;
    color: #6a4500;
}

.pwa-connection-status button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(18, 51, 31, .12);
    color: inherit;
    font: inherit;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
}

.pwa-connection-status button:hover {
    background: rgba(18, 51, 31, .2);
}

.offline-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 15% 10%, rgba(239,125,0,.22), transparent 28%),
        linear-gradient(135deg, #092516 0%, #173b25 58%, #2d5a27 100%);
}

.offline-card {
    width: min(760px, 100%);
    padding: clamp(24px, 5vw, 46px);
    border-radius: 32px;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(255,255,255,.55);
    box-shadow: 0 30px 70px rgba(0,0,0,.28);
}

.offline-logo {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 18px;
    box-shadow: 0 16px 28px rgba(21,51,35,.16);
}

.offline-card h1 {
    margin: 8px 0 12px;
    color: #174b22;
    font-size: clamp(2rem, 6vw, 3.4rem);
    line-height: 1.02;
}

.offline-card p {
    color: #526156;
    font-size: 1rem;
    line-height: 1.7;
    max-width: 680px;
}

@media (max-width: 720px) {
    .pwa-connection-status {
        width: calc(100vw - 28px);
        border-radius: 18px;
        text-align: center;
    }

    .offline-shell {
        padding: 18px;
    }
}
/* Rendimento de implementos vinculado diretamente as operacoes. */
.implement-operation-yields {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid #d7e1d1;
    border-radius: 22px;
    background: linear-gradient(145deg, #f7fbf4 0%, #f2f7ee 100%);
}

.implement-yield-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin: 5px 0 18px;
}

.implement-yield-heading .section-title {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.implement-yield-heading .section-description {
    max-width: 780px;
    margin: 0;
}

.implement-yield-add,
.implement-yield-remove {
    min-height: 44px;
    border: 0;
    border-radius: 13px;
    padding: 10px 17px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.implement-yield-add {
    flex: 0 0 auto;
    color: #fff;
    background: #2f6a2d;
    box-shadow: 0 10px 24px rgba(32, 89, 38, .16);
}

.implement-yield-list {
    display: grid;
    gap: 12px;
}

.implement-yield-row {
    display: grid;
    grid-template-columns: 42px minmax(180px, .75fr) minmax(280px, 1.45fr) minmax(150px, .65fr) minmax(150px, .65fr) auto;
    align-items: end;
    gap: 12px;
    padding: 15px;
    border: 1px solid #d5dfcf;
    border-radius: 18px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 8px 22px rgba(28, 72, 31, .05);
}

.implement-yield-row .form-group {
    min-width: 0;
    margin: 0;
}

.implement-yield-row .form-group small {
    display: block;
    min-height: 34px;
    margin-top: 6px;
    color: #6c786b;
    font-size: .72rem;
    line-height: 1.35;
}

.implement-yield-row-number {
    align-self: center;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #2f6a2d;
    font-weight: 700;
}

.implement-yield-remove {
    margin-bottom: 1px;
    color: #bd402d;
    background: #fff1ed;
    border: 1px solid #f2c9c0;
}

.implement-yield-empty {
    padding: 18px;
    border: 1px dashed #bdcbb6;
    border-radius: 16px;
    color: #6c786b;
    text-align: center;
    background: rgba(255, 255, 255, .6);
}

.implement-yield-empty[hidden] {
    display: none;
}

@media (max-width: 1180px) {
    .implement-yield-row {
        grid-template-columns: 42px minmax(170px, 1fr) minmax(240px, 1.4fr) minmax(145px, .7fr) minmax(145px, .7fr);
    }

    .implement-yield-remove {
        grid-column: 2 / -1;
        justify-self: end;
    }
}

@media (max-width: 760px) {
    .implement-operation-yields {
        padding: 16px;
    }

    .implement-yield-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .implement-yield-add {
        width: 100%;
    }

    .implement-yield-row {
        grid-template-columns: 36px 1fr;
        align-items: start;
    }

    .implement-yield-row .form-group,
    .implement-yield-remove {
        grid-column: 1 / -1;
        width: 100%;
    }

    .implement-yield-row-number {
        grid-column: 1;
    }
}
