* {
    box-sizing: border-box;
}

/* Premium Cell Tech visual refresh */
body {
    background: #f4f7fa;
    color: #1e293b;
}

.topbar {
    min-height: 118px;
    padding: 18px 32px;
    background: #030607;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 38px rgba(7, 19, 26, 0.14);
}

.brand-block {
    gap: 22px;
}

.brand-logo {
    width: 320px;
    height: 88px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.brand-separator {
    width: 1px;
    height: 58px;
    background: rgba(116, 228, 239, 0.34);
}

.brand-cnpj {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 18px;
    border-right: 1px solid rgba(116, 228, 239, 0.34);
}

.user-chip strong,
.user-chip small {
    display: block;
}

.user-chip small {
    color: #05bcd4;
    font-weight: 700;
}

.user-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
}

.app-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 0;
    min-height: calc(100vh - 118px);
    padding: 0;
}

.side-nav {
    position: static;
    min-height: calc(100vh - 118px);
    background: linear-gradient(180deg, #061015 0%, #0c1820 100%);
    border: 0;
    border-radius: 0;
    padding: 28px 12px;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #dbe7ea;
    padding: 13px 16px;
    font-size: 15px;
}

.side-nav-item.active,
.side-nav-item:hover {
    background: linear-gradient(90deg, #008a9a 0%, #05a7b9 100%);
    border-color: rgba(5, 188, 212, 0.48);
    color: #fff;
    box-shadow: 0 10px 18px rgba(5, 188, 212, 0.16);
}

.side-nav-item span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font-size: 11px;
    font-weight: 900;
}

.side-nav-note {
    padding: 0 12px;
}

main {
    padding: 28px 24px;
}

.section-title-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.header-action-button {
    margin-left: auto;
    min-height: 42px;
    white-space: nowrap;
}

.section-title-line h2 {
    margin: 0;
    font-size: 25px;
}

.section-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(5, 188, 212, 0.12);
    color: #08899a;
    font-size: 12px;
    font-weight: 900;
}

.dashboard-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-grid article {
    position: relative;
    min-height: 108px;
    background: #fff;
    border: 1px solid #dfe7ec;
    border-radius: 9px;
    padding: 24px 20px 20px 92px;
    box-shadow: 0 10px 26px rgba(15, 32, 38, 0.07);
}

.dashboard-grid article::before {
    content: "$";
    position: absolute;
    left: 24px;
    top: 26px;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: linear-gradient(135deg, #058b98, #05bcd4);
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}

.dashboard-grid article:nth-child(2)::before {
    content: "OS";
    font-size: 17px;
    background: linear-gradient(135deg, #2b7fff, #51a4ff);
}

.dashboard-grid article:nth-child(3)::before {
    content: "SV";
    font-size: 17px;
    background: linear-gradient(135deg, #ff7a00, #ff9d2e);
}

.dashboard-grid article:nth-child(4)::before {
    content: "NF";
    font-size: 17px;
    background: linear-gradient(135deg, #ef4444, #fb7185);
}

.dashboard-grid article:nth-child(5)::before {
    content: "GA";
    font-size: 17px;
    background: linear-gradient(135deg, #047c8a, #0fb5c7);
}

.dashboard-grid article:nth-child(6)::before {
    content: "R$";
    font-size: 17px;
    background: linear-gradient(135deg, #0f766e, #05bcd4);
}

.dashboard-grid span {
    color: #475569;
    font-size: 14px;
}

.dashboard-grid strong {
    margin-top: 8px;
    font-size: 26px;
    color: #03242b;
}

/* Full-screen work dialogs */
.modal:not(.small-modal) {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
    height: calc(100vh - 28px) !important;
    max-height: calc(100vh - 28px) !important;
    margin: auto !important;
    overflow: hidden !important;
}

.modal:not(.small-modal) .modal-panel {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

.modal:not(.small-modal) .modal-head,
.modal:not(.small-modal) .customer-tools,
.modal:not(.small-modal) .report-controls,
.modal:not(.small-modal) .report-period-label {
    flex: 0 0 auto;
}

.modal:not(.small-modal) .customer-layout {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
    overflow: hidden;
}

.modal:not(.small-modal) .customer-list,
.modal:not(.small-modal) .customer-detail,
.modal:not(.small-modal) .status-dialog-orders {
    min-height: 0;
    overflow: auto;
}

.modal:not(.small-modal) .reports {
    overflow: auto !important;
}

.modal:not(.small-modal) .reports .report-grid,
.modal:not(.small-modal) .reports .report-lists {
    flex: 0 0 auto;
}

.modal:not(.small-modal) .status-window-panel {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
}

.modal:not(.small-modal) .modal-form {
    overflow: auto !important;
}

.modal:not(.small-modal) .modal-form .actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #dfe7ec;
    padding-top: 12px;
}

.modal:not(.small-modal) .suppliers-panel,
.modal:not(.small-modal) .customers-panel,
.modal:not(.small-modal) .status-window-panel {
    padding: 22px;
}

.fiado-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -4px 0 18px;
    border: 1px solid #fecaca;
    border-left: 6px solid #dc2626;
    border-radius: 8px;
    background: #fff1f2;
    color: #7f1d1d;
    padding: 13px 16px;
    box-shadow: 0 10px 24px rgba(127, 29, 29, 0.08);
}

.fiado-alert strong {
    white-space: nowrap;
}

.fiado-alert[hidden] {
    display: none;
}

.workspace {
    grid-template-columns: minmax(340px, 500px) 1fr;
    gap: 18px;
    margin-top: 0;
}

.admin-shell {
    padding: 28px 32px 40px;
}

.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-hero h1 {
    margin: 0 0 6px;
    font-size: 28px;
}

.admin-hero p {
    margin: 0;
    color: #52616a;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
    gap: 18px;
}

.admin-form small {
    color: #52616a;
    margin: -8px 0 8px;
}

.shops-list {
    display: grid;
    gap: 10px;
}

.shop-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #dfe7ec;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.shop-card.blocked {
    border-color: #fecaca;
    background: #fff7f7;
}

.shop-card strong,
.shop-card span,
.shop-card small {
    display: block;
}

.shop-card strong {
    font-size: 17px;
    color: #03242b;
}

.shop-card span {
    color: #087e8d;
    font-weight: 800;
}

.shop-card small {
    color: #52616a;
    margin-top: 4px;
}

.shop-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-status {
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.shop-status.blocked {
    background: #fee2e2;
    color: #991b1b;
}

.shop-block-reason {
    color: #991b1b !important;
}

.blocked-box {
    text-align: center;
}

.blocked-reason {
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b !important;
    padding: 10px;
    font-weight: 800;
}

.panel {
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 10px 26px rgba(15, 32, 38, 0.07);
}

/* Final override: large dialogs always open as full-screen workspaces. */
.modal:not(.small-modal) {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
    height: calc(100vh - 28px) !important;
    max-height: calc(100vh - 28px) !important;
    margin: auto !important;
    overflow: hidden !important;
}

.modal:not(.small-modal) .modal-panel {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

.modal:not(.small-modal) .modal-head,
.modal:not(.small-modal) .customer-tools,
.modal:not(.small-modal) .report-controls,
.modal:not(.small-modal) .report-period-label {
    flex: 0 0 auto;
}

.modal:not(.small-modal) .customer-layout {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
    overflow: hidden;
}

.modal:not(.small-modal) .customer-list,
.modal:not(.small-modal) .customer-detail,
.modal:not(.small-modal) .status-dialog-orders {
    min-height: 0;
    overflow: auto;
}

.modal:not(.small-modal) .reports {
    overflow: auto !important;
}

.modal:not(.small-modal) .reports .report-grid,
.modal:not(.small-modal) .reports .report-lists {
    flex: 0 0 auto;
}

.modal:not(.small-modal) .status-window-panel {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
}

.modal:not(.small-modal) .modal-form {
    overflow: auto !important;
}

.modal:not(.small-modal) .modal-form .actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #dfe7ec;
    padding-top: 12px;
}

.modal:not(.small-modal) .suppliers-panel,
.modal:not(.small-modal) .customers-panel,
.modal:not(.small-modal) .status-window-panel {
    padding: 22px;
}

/* Hide text inside dashboard color circles */
.dashboard-grid article::before,
.dashboard-grid article:nth-child(2)::before,
.dashboard-grid article:nth-child(3)::before,
.dashboard-grid article:nth-child(4)::before,
.dashboard-grid article:nth-child(5)::before,
.dashboard-grid article:nth-child(6)::before {
    content: "" !important;
}

/* Customer registry */
.inline-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.compact-button {
    min-height: 42px;
    padding: 0 14px;
}

.selected-customer-hint {
    display: block;
    margin-top: 6px;
    color: #08899a;
    font-weight: 700;
}

.customers-panel {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#customers-dialog {
    width: min(1500px, 96vw);
    max-width: 96vw;
    height: 92vh;
    max-height: 92vh;
}

#status-dialog {
    width: min(1500px, 96vw);
    max-width: 96vw;
    height: 92vh;
    max-height: 92vh;
}

.status-window-panel {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 12px;
}

.status-dialog-orders {
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.customer-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-bottom: 16px;
}

.customer-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 18px;
    height: calc(92vh - 132px);
    min-height: 0;
}

.customer-list {
    max-height: none;
    min-height: 0;
    height: 100%;
    overflow: auto;
    border: 1px solid #dfe7ec;
    border-radius: 10px;
    padding: 10px;
    background: #f8fbfc;
}

.customer-row {
    width: 100%;
    display: grid;
    gap: 4px;
    text-align: left;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid #dfe7ec;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    box-shadow: none;
}

.customer-row:hover {
    border-color: #05bcd4;
    background: #effbfc;
}

.customer-row-final {
    border-left: 5px solid #7dd3fc;
}

.customer-row-lojista {
    border-left: 5px solid #facc15;
}

.customer-row strong {
    color: #03242b;
}

.customer-row span,
.customer-row small {
    color: #475569;
}

.customer-type-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-right: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.customer-type-chip.cliente-final {
    background: #e0f2fe;
    color: #0369a1;
}

.customer-type-chip.lojista {
    background: #fef3c7;
    color: #92400e;
}

.credit-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.manual-credit-form,
.editable-credit {
    display: grid;
    gap: 8px;
}

.manual-credit-form {
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
    margin-bottom: 12px;
}

.editable-credit {
    margin-bottom: 10px;
}

.editable-credit input {
    min-width: 0;
}

.danger-button {
    border-color: #fecaca;
    color: #991b1b;
}

.danger-button:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.pattern-field {
    align-self: start;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(3, 44px);
    gap: 8px;
    margin-top: 8px;
}

.pattern-grid button {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    box-shadow: none;
    font-weight: 800;
}

.pattern-grid button.active {
    background: #05a7b9;
    border-color: #02899a;
    color: #fff;
}

.customer-detail {
    display: grid;
    grid-template-columns: minmax(280px, 450px) minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.customer-form {
    display: grid;
    gap: 10px;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.customer-code-card {
    border-radius: 10px;
    padding: 16px;
    background: linear-gradient(135deg, #031116, #06353d);
    color: #fff;
}

.customer-code-card span,
.customer-code-card strong {
    display: block;
}

.customer-code-card span {
    color: #9feaf2;
    font-size: 13px;
}

.customer-code-card strong {
    margin-top: 4px;
    font-size: 30px;
}

.customer-history {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.customer-history h3 {
    margin-top: 0;
}

.order-parts-box {
    margin-top: 16px;
    border: 1px solid #dfe7ec;
    border-radius: 8px;
    background: #f8fafc;
    padding: 14px;
}

.section-head-inline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-head-inline h3,
.section-head-inline p {
    margin: 0;
}

.section-head-inline p {
    color: #52616a;
    font-size: 13px;
}

.parts-add-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.supplier-picker-field {
    position: relative;
    min-width: 0;
}

.supplier-picker-field input {
    width: 100%;
}

.supplier-suggestions {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 260px;
    overflow: auto;
    border: 1px solid #cfd8df;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    padding: 6px;
}

.supplier-suggestions[hidden] {
    display: none;
}

.supplier-suggestions button {
    width: 100%;
    display: grid;
    gap: 2px;
    text-align: left;
    border-radius: 6px;
    margin-bottom: 4px;
    padding: 9px;
    background: #fff;
    color: #0f172a;
}

.supplier-suggestions button:hover {
    background: #effbfc;
}

.supplier-suggestions strong,
.supplier-suggestions small {
    display: block;
}

.supplier-suggestions small {
    color: #64727c;
}

.parts-list,
#supplier-parts-list {
    display: grid;
    gap: 9px;
}

.supplier-part-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid #dfe7ec;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.supplier-part-card strong,
.supplier-part-card span,
.supplier-part-card small {
    display: block;
}

.supplier-part-card strong {
    color: #03242b;
}

.supplier-part-card span {
    color: #334155;
    font-weight: 700;
    margin-top: 4px;
}

.supplier-part-card small {
    color: #64727c;
    margin-top: 3px;
}

.part-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 260px;
}

.part-actions button {
    padding: 7px 9px;
    font-size: 12px;
}

.suppliers-panel {
    width: min(1360px, calc(100vw - 28px));
}

.supplier-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.supplier-summary article {
    border: 1px solid #dfe7ec;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.supplier-summary span,
.supplier-summary strong {
    display: block;
}

.supplier-summary span {
    color: #52616a;
    font-size: 13px;
    font-weight: 800;
}

.supplier-summary strong {
    margin-top: 6px;
    color: #03242b;
    font-size: 24px;
}

.part-action-field[hidden] {
    display: none;
}

.part-action-field {
    display: grid;
    gap: 6px;
}

.customer-order-row {
    cursor: pointer;
}

@media (max-width: 980px) {
    .customer-layout,
    .customer-detail {
        grid-template-columns: 1fr;
        height: auto;
        overflow: auto;
    }

    .customer-list {
        max-height: 300px;
        height: auto;
    }

    .parts-add-grid {
        grid-template-columns: 1fr;
    }

    .supplier-part-card {
        align-items: stretch;
        flex-direction: column;
    }

    .part-actions {
        justify-content: flex-start;
        min-width: 0;
    }

    #customers-dialog {
        width: 96vw;
        height: 94vh;
        max-height: 94vh;
    }

    #status-dialog {
        width: 96vw;
        height: 94vh;
        max-height: 94vh;
    }
}

.dashboard-grid article::before,
.dashboard-grid article:nth-child(2)::before,
.dashboard-grid article:nth-child(3)::before,
.dashboard-grid article:nth-child(4)::before,
.dashboard-grid article:nth-child(5)::before,
.dashboard-grid article:nth-child(6)::before {
    content: "";
}

body {
    margin: 0;
    background: #e9eef1;
    color: #172026;
    font-family: "Segoe UI", Arial, sans-serif;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 18% 18%, rgba(0, 188, 212, 0.18), transparent 32%),
        linear-gradient(135deg, #061015 0%, #101b22 45%, #eef2f5 45%, #eef2f5 100%);
}

.login-box {
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid #dce5ea;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 22px 70px rgba(7, 19, 26, 0.22);
}

.login-brand {
    margin-bottom: 18px;
}

.login-brand img {
    display: block;
    width: 100%;
    max-height: 128px;
    object-fit: contain;
    background: #050505;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
}

.login-box h1 {
    margin: 0;
    font-size: 28px;
}

.login-box p {
    margin: 4px 0 20px;
    color: #5a6972;
}

label {
    display: block;
    margin: 10px 0 5px;
    color: #47545c;
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #c9d1d8;
    border-radius: 6px;
    padding: 10px;
    font: inherit;
    background: #fff;
}

textarea {
    min-height: 92px;
    resize: vertical;
}

button {
    border: 0;
    border-radius: 6px;
    padding: 10px 13px;
    background: #0897a7;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.secondary {
    background: #e8eef2;
    color: #1f2a30;
}

.login-box button {
    width: 100%;
    margin-top: 16px;
}

.login-error,
.message.error {
    color: #b42318;
    font-weight: 700;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 28px;
    background:
        linear-gradient(90deg, #05090d 0%, #071319 48%, #09232b 100%);
    border-bottom: 3px solid #05bcd4;
    color: #fff;
    box-shadow: 0 14px 34px rgba(7, 19, 26, 0.18);
}

.brand-block {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 20px;
}

.brand-logo {
    width: 286px;
    height: 104px;
    object-fit: contain;
    background: #050505;
    border: 1px solid rgba(5, 188, 212, 0.55);
    border-radius: 10px;
    padding: 6px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 14px 28px rgba(0, 0, 0, 0.28);
}

.brand-copy h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: 0;
    line-height: 1;
}

.brand-copy p {
    display: inline-flex;
    margin: 10px 0 0;
    color: #d7f7fb;
    font-size: 13px;
    font-weight: 700;
    background: rgba(5, 188, 212, 0.13);
    border: 1px solid rgba(5, 188, 212, 0.34);
    border-radius: 999px;
    padding: 7px 11px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-layout {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    gap: 18px;
    padding: 18px 24px 24px;
}

.side-nav {
    position: sticky;
    top: 18px;
    align-self: start;
    min-height: calc(100vh - 168px);
    background: #071319;
    border: 1px solid #12323b;
    border-radius: 10px;
    padding: 16px;
    color: #e6f7fa;
    box-shadow: 0 16px 36px rgba(7, 19, 26, 0.14);
}

.side-nav-title {
    color: #74e4ef;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.side-nav-item {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    border: 1px solid rgba(116, 228, 239, 0.16);
    border-radius: 8px;
    background: transparent;
    color: #e6f7fa;
    padding: 11px 12px;
    text-align: left;
    text-decoration: none;
    font-weight: 800;
}

.side-nav-item.active,
.side-nav-item:hover {
    background: rgba(5, 188, 212, 0.14);
    border-color: rgba(5, 188, 212, 0.48);
}

.side-nav-divider {
    height: 1px;
    margin: 14px 0;
    background: rgba(116, 228, 239, 0.16);
}

.side-nav-note {
    color: #a9cdd3;
    font-size: 12px;
    line-height: 1.45;
}

main {
    min-width: 0;
}

.panel {
    background: #fff;
    border: 1px solid #dce5ea;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 32, 38, 0.05);
}

h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 10px;
}

.report-grid article {
    background: #f7faf9;
    border: 1px solid #d9e3e0;
    border-radius: 8px;
    padding: 12px;
}

.report-grid span {
    display: block;
    color: #55636b;
    font-size: 12px;
    font-weight: 700;
}

.report-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 20px;
}

.report-controls {
    display: grid;
    grid-template-columns: minmax(120px, 170px) minmax(150px, 190px) minmax(150px, 190px) auto;
    align-items: end;
    gap: 8px 10px;
    margin-bottom: 10px;
}

.report-controls label {
    display: none;
}

.report-period-label {
    margin: 0 0 12px;
    color: #47545c;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-grid article {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
    border: 1px solid #dce5ea;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 8px 22px rgba(15, 32, 38, 0.05);
}

.dashboard-action {
    cursor: pointer;
}

.dashboard-grid span {
    display: block;
    color: #55636b;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 22px;
    color: #03242b;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(320px, 430px) 1fr;
    gap: 18px;
    margin-top: 18px;
}

.actions,
.orders-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.actions {
    justify-content: flex-end;
    margin-top: 14px;
}

.orders-head {
    justify-content: space-between;
}

.orders-meta {
    margin: -8px 0 0;
    color: #64727c;
    font-size: 13px;
    font-weight: 700;
}

.status-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.status-filter {
    border: 1px solid #c9d1d8;
    border-radius: 999px;
    background: #fff;
    color: #25313a;
    padding: 8px 11px;
    white-space: nowrap;
}

.status-filter.active {
    background: #0897a7;
    border-color: #0897a7;
    color: #fff;
}

.status-filter.filter-evaluation {
    background: #e8f0f7;
    border-color: #b8d4e8;
    color: #24506b;
}

.status-filter.filter-budget {
    background: #fff4d8;
    border-color: #f3d27a;
    color: #7a4f00;
}

.status-filter.filter-service {
    background: #ffedd5;
    border-color: #fdba74;
    color: #9a3412;
}

.status-filter.filter-ready {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.status-filter.filter-delivered {
    background: #fff;
    border-color: #aeb8c2;
    color: #1f2a30;
}

.status-filter.filter-returned {
    background: #ffe4ef;
    border-color: #f9a8d4;
    color: #9d174d;
}

.status-filter.filter-cannot {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.status-filter.filter-warranty {
    background: #f1e8ff;
    border-color: #c4b5fd;
    color: #5b21b6;
}

.status-filter.active {
    outline: 3px solid rgba(15, 118, 110, 0.25);
}

.search {
    margin-bottom: 12px;
}

.orders {
    max-height: 560px;
    overflow: auto;
}

.order {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid #e3e8ed;
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 12px;
    cursor: pointer;
}

.order:hover {
    border-color: #b8c4cc;
    background: #fbfcfd;
}

.order.fiado-open {
    border-color: #f4a3a3;
    background: #fff1f1;
    box-shadow: inset 4px 0 0 #dc2626;
}

.order.fiado-open:hover {
    border-color: #dc2626;
    background: #ffe7e7;
}

.receive-payment-button {
    background: #16a34a;
    color: #fff;
}

.receive-payment-button:hover {
    background: #15803d;
}

.order-main-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
}

.order-number {
    color: #087e8d;
    font-weight: 800;
}

.order-customer {
    font-weight: 800;
}

.order-device {
    color: #46545d;
    font-weight: 700;
}

.customer-type {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
}

.customer-type.cliente-final {
    background: #e8f0f7;
    color: #24506b;
}

.customer-type.lojista {
    background: #fef3c7;
    color: #92400e;
}

.order-summary {
    margin: 0;
    color: #52616a;
    font-size: 13px;
    line-height: 1.35;
}

.order-side {
    display: grid;
    justify-items: end;
    gap: 7px;
}

.order-date {
    color: #64727c;
    font-size: 12px;
    font-weight: 700;
}

.warranty-badge {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
    white-space: nowrap;
}

.warranty-badge.warranty-ok {
    background: #dcfce7;
    color: #166534;
}

.warranty-badge.warranty-ending {
    background: #fef3c7;
    color: #92400e;
}

.warranty-badge.warranty-expired {
    background: #fee2e2;
    color: #991b1b;
}

.quick-budget-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.authorize-button,
.decline-button {
    padding: 7px 10px;
    font-size: 12px;
}

.authorize-button {
    background: #16a34a;
}

.authorize-button:hover {
    background: #15803d;
}

.decline-button {
    background: #dc2626;
}

.decline-button:hover {
    background: #b91c1c;
}

.status-badge {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
    white-space: nowrap;
}

.status-badge.avaliacao {
    background: #e8f0f7;
    color: #24506b;
}

.status-badge.orcamento {
    background: #fff4d8;
    color: #7a4f00;
}

.status-badge.servico {
    background: #e9f7ef;
    color: #17603a;
}

.status-badge.pronto {
    background: #dcfce7;
    color: #166534;
}

.status-badge.nao-faz {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.garantia {
    background: #f1e8ff;
    color: #5b21b6;
}

.status-badge.finalizado {
    background: #eef1f3;
    color: #5c6870;
}

.order-info {
    display: block;
    color: #8a4b08;
    font-weight: 700;
}

.order-info.delivered {
    color: #166534;
}

.order-info.returned {
    color: #8a4b08;
}

.order-info.waiting-return {
    color: #991b1b;
}

.message {
    min-height: 24px;
    margin-top: 12px;
    color: #087e8d;
    font-weight: 700;
}

.modal {
    width: min(920px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: transparent;
}

.small-modal {
    width: min(520px, calc(100vw - 28px));
}

.modal::backdrop {
    background: rgba(15, 23, 42, 0.42);
}

.modal-panel {
    background: #fff;
    border: 1px solid #d7dde2;
    border-radius: 8px;
    padding: 18px;
}

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

.modal-head h2 {
    margin: 0;
}

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

.modal-form textarea {
    min-height: 210px;
}

.report-lists {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.report-lists section,
.credit-row {
    border: 1px solid #d7dde2;
    border-radius: 8px;
    padding: 12px;
}

.report-lists h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.report-lists p,
.credit-row small,
.credit-row span {
    display: block;
    margin: 4px 0;
    color: #52616a;
}

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

.report-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 420px;
    font-size: 14px;
}

.report-table th,
.report-table td {
    border-bottom: 1px solid #e7ecef;
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.report-table th {
    color: #52616a;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.report-table td:nth-child(3),
.report-table td:nth-child(4) {
    white-space: nowrap;
}

@media (max-width: 980px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .report-grid {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .report-controls {
        grid-template-columns: 1fr;
    }

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

    .order-side {
        justify-items: start;
    }

    .topbar,
    .topbar-actions,
    .modal-head {
        align-items: stretch;
        flex-direction: column;
    }

    .brand-block {
        align-items: stretch;
        flex-direction: column;
    }

    .brand-logo {
        width: 100%;
        max-width: 280px;
    }

    .app-layout {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .side-nav {
        position: static;
        min-height: auto;
    }

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

    .report-lists {
        grid-template-columns: 1fr;
    }
}

/* Final premium overrides for the Cell Tech branded layout */
body {
    background: #f4f7fa;
    color: #1e293b;
}

.topbar {
    min-height: 118px;
    padding: 18px 32px;
    background: #030607;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 38px rgba(7, 19, 26, 0.14);
}

.brand-block {
    gap: 22px;
}

.brand-logo {
    width: 320px;
    height: 88px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.brand-separator {
    width: 1px;
    height: 58px;
    background: rgba(116, 228, 239, 0.34);
}

.brand-cnpj {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 18px;
    border-right: 1px solid rgba(116, 228, 239, 0.34);
}

.user-chip strong,
.user-chip small {
    display: block;
}

.user-chip small {
    color: #05bcd4;
    font-weight: 700;
}

.user-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
}

.app-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 0;
    min-height: calc(100vh - 118px);
    padding: 0;
}

.side-nav {
    position: static;
    min-height: calc(100vh - 118px);
    background: linear-gradient(180deg, #061015 0%, #0c1820 100%);
    border: 0;
    border-radius: 0;
    padding: 28px 12px;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #dbe7ea;
    padding: 13px 16px;
    font-size: 15px;
}

.side-nav-item.active,
.side-nav-item:hover {
    background: linear-gradient(90deg, #008a9a 0%, #05a7b9 100%);
    border-color: rgba(5, 188, 212, 0.48);
    color: #fff;
    box-shadow: 0 10px 18px rgba(5, 188, 212, 0.16);
}

.side-nav-item span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font-size: 11px;
    font-weight: 900;
}

.side-nav-note {
    padding: 0 12px;
}

main {
    padding: 28px 24px;
}

.section-title-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.section-title-line h2 {
    margin: 0;
    font-size: 25px;
}

.section-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(5, 188, 212, 0.12);
    color: #08899a;
    font-size: 12px;
    font-weight: 900;
}

.dashboard-grid {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-grid article {
    position: relative;
    min-height: 108px;
    background: #fff;
    border: 1px solid #dfe7ec;
    border-radius: 9px;
    padding: 24px 20px 20px 92px;
    box-shadow: 0 10px 26px rgba(15, 32, 38, 0.07);
}

.dashboard-grid article::before {
    content: "$";
    position: absolute;
    left: 24px;
    top: 26px;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: linear-gradient(135deg, #058b98, #05bcd4);
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}

.dashboard-grid article:nth-child(2)::before {
    content: "OS";
    font-size: 17px;
    background: linear-gradient(135deg, #2b7fff, #51a4ff);
}

.dashboard-grid article:nth-child(3)::before {
    content: "SV";
    font-size: 17px;
    background: linear-gradient(135deg, #ff7a00, #ff9d2e);
}

.dashboard-grid article:nth-child(4)::before {
    content: "NF";
    font-size: 17px;
    background: linear-gradient(135deg, #ef4444, #fb7185);
}

.dashboard-grid article:nth-child(5)::before {
    content: "GA";
    font-size: 17px;
    background: linear-gradient(135deg, #047c8a, #0fb5c7);
}

.dashboard-grid article:nth-child(6)::before {
    content: "R$";
    font-size: 17px;
    background: linear-gradient(135deg, #0f766e, #05bcd4);
}

.dashboard-grid span {
    color: #475569;
    font-size: 14px;
}

.dashboard-grid strong {
    margin-top: 8px;
    font-size: 26px;
    color: #03242b;
}

.workspace {
    grid-template-columns: minmax(340px, 500px) 1fr;
    gap: 18px;
    margin-top: 0;
}

.panel {
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 10px 26px rgba(15, 32, 38, 0.07);
}
