* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* MENU LATERAL */

.sidebar {
    width: 250px;
    background: #111827;
    color: white;
    padding: 28px 18px;
    min-height: 100vh;
}

.logo {
    margin-bottom: 40px;
    padding: 0 12px;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 6px;
}

.logo span {
    color: #9ca3af;
    font-size: 14px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    color: #d1d5db;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 10px;
    transition: 0.2s;
}

.menu-item:hover {
    background: #1f2937;
    color: white;
}

.menu-item.active {
    background: #2563eb;
    color: white;
}

/* ÁREA PRINCIPAL */

.main-content {
    flex: 1;
    padding: 30px;
}

/* TOPO */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.topbar h2 {
    font-size: 30px;
    margin-bottom: 5px;
}

.topbar p {
    color: #6b7280;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-box {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 12px 16px;
    border-radius: 10px;
}

/* BOTÕES */

.btn-primary {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: bold;
    transition: 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 10px 15px;
    border-radius: 9px;
}

.btn-secondary:hover {
    background: #f3f4f6;
}

/* PESQUISA */

.search-area {
    margin-bottom: 25px;
}

.search-area input {
    width: 100%;
    padding: 15px 18px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: white;
    outline: none;
    font-size: 15px;
}

.search-area input:focus {
    border-color: #2563eb;
}

/* CARTÕES */

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef0f3;
}

.card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 14px;
    font-size: 25px;
}

.card p {
    color: #6b7280;
    margin-bottom: 7px;
    font-size: 14px;
}

.card strong {
    font-size: 28px;
}

/* REPARAÇÕES RECENTES */

.recent {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.section-header h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.section-header p {
    color: #6b7280;
    font-size: 14px;
}

/* ESTADO VAZIO */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 45px;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 22px;
}

/* RESPONSIVO */

@media (max-width: 1000px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 750px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }

    .logo h1 {
        font-size: 16px;
    }

    .logo span {
        display: none;
    }

    .menu-item {
        font-size: 0;
        text-align: center;
    }

    .menu-item::first-letter {
        font-size: 20px;
    }

    .main-content {
        padding: 18px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .topbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}
/* =========================================================
   REPARAJA_PASSO_07_MODAL
   Janela Nova Reparacao
   ========================================================= */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(3px);
    z-index: 9999;
    padding: 28px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal {
    width: min(900px, 100%);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    margin: 18px auto;
    animation: reparajaModalEntrada 0.18s ease-out;
}

@keyframes reparajaModalEntrada {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 26px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.modal-header h2 {
    margin: 0 0 6px;
    font-size: 24px;
    color: #111827;
}

.modal-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    color: #374151;
    font-size: 18px;
    line-height: 1;
}

.modal-close:hover {
    background: #e5e7eb;
}

#formReparacao {
    padding: 0 26px 26px;
}

.form-section {
    padding: 24px 0;
    border-bottom: 1px solid #edf0f3;
}

.form-section:last-of-type {
    border-bottom: 0;
}

.form-section h3 {
    margin: 0 0 16px;
    font-size: 17px;
    color: #111827;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px 13px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.service-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.service-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 15px;
    border: 1px solid #dbe1e8;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
}

.service-options label:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.service-options input[type="radio"] {
    accent-color: #2563eb;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 22px;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .modal-overlay {
        padding: 10px;
    }

    .modal {
        border-radius: 14px;
        margin: 6px auto;
    }

    .modal-header {
        padding: 20px;
    }

    #formReparacao {
        padding: 0 20px 20px;
    }

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

    .form-full {
        grid-column: auto;
    }

    .service-options {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions button {
        width: 100%;
    }
}

/* =========================================================
   REPARAJA_PASSO_09_AJUSTE_MODAL
   Mantem cabecalho visivel e melhora o scroll
   ========================================================= */

.modal-overlay.active {
    align-items: center;
}

.modal {
    max-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
}

.modal-header {
    flex: 0 0 auto;
}

#formReparacao {
    overflow-y: auto;
    min-height: 0;
}

.form-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    margin: 0 -26px -26px;
    padding: 18px 26px;
}

@media (max-width: 700px) {
    .modal-overlay.active {
        align-items: flex-start;
    }

    .modal {
        max-height: calc(100vh - 20px);
    }

    .form-actions {
        margin: 0 -20px -20px;
        padding: 16px 20px;
    }
}

/* =========================================================
   REPARAJA_PASSO_09B_RODAPE
   Evita que os botoes tapem o Tipo de servico
   ========================================================= */

#formReparacao .form-section:last-of-type {
    padding-bottom: 95px;
}

.form-actions {
    margin: 0 -26px -26px;
    padding: 16px 26px;
    box-shadow: 0 -8px 18px rgba(255, 255, 255, 0.96);
}

@media (max-width: 700px) {
    #formReparacao .form-section:last-of-type {
        padding-bottom: 125px;
    }

    .form-actions {
        margin: 0 -20px -20px;
        padding: 14px 20px;
    }
}

/* =========================================================
   REPARAJA_PASSO_10_STORAGE
   Lista de reparacoes e notificacoes
   ========================================================= */

.repair-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
}

.repair-row {
    display: grid;
    grid-template-columns: 140px 1.2fr 1.4fr 150px 140px;
    gap: 14px;
    align-items: center;
    padding: 15px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
}

.repair-row:hover {
    background: #f9fbff;
    border-color: #cbd5e1;
}

.repair-process {
    font-weight: 700;
    color: #1d4ed8;
}

.repair-main strong,
.repair-device strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
}

.repair-main span,
.repair-device span,
.repair-date {
    color: #6b7280;
    font-size: 13px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #eff6ff;
    color: #1d4ed8;
    white-space: nowrap;
}

.repair-service {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.reparaja-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 20000;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 15px 40px rgba(0,0,0,.22);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: .22s ease;
}

.reparaja-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1100px) {
    .repair-row {
        grid-template-columns: 120px 1fr 1fr;
    }

    .repair-date,
    .repair-service {
        display: none;
    }
}

@media (max-width: 720px) {
    .repair-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .repair-date,
    .repair-service {
        display: block;
    }
}

/* =========================================================
   REPARAJA_PASSO_11_ESTADOS
   Detalhes e alteracao de estado
   ========================================================= */

.repair-row {
    cursor: pointer;
}

.repair-row:active {
    transform: scale(0.998);
}

.repair-detail-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 21000;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(3px);
    padding: 24px;
    align-items: center;
    justify-content: center;
}

.repair-detail-overlay.active {
    display: flex;
}

.repair-detail-modal {
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.24);
}

.repair-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 22px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.repair-detail-header h2 {
    margin: 0 0 5px;
    font-size: 22px;
}

.repair-detail-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.repair-detail-body {
    padding: 22px 24px;
}

.repair-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.repair-detail-item {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.repair-detail-item.full {
    grid-column: 1 / -1;
}

.repair-detail-item span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 5px;
}

.repair-detail-item strong {
    color: #111827;
    word-break: break-word;
}

.repair-detail-status {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.repair-detail-status label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.repair-detail-status select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: white;
}

.repair-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    position: sticky;
    bottom: 0;
}

@media (max-width: 650px) {
    .repair-detail-grid {
        grid-template-columns: 1fr;
    }

    .repair-detail-item.full {
        grid-column: auto;
    }

    .repair-detail-actions {
        flex-direction: column-reverse;
    }

    .repair-detail-actions button {
        width: 100%;
    }
}

/* =========================================================
   REPARAJA_PASSO_12_REPARACOES_PAGE
   ========================================================= */

.repairs-page { display: none; }
.repairs-page.active { display: block; }

.repairs-toolbar {
    display: grid;
    grid-template-columns: 1fr 230px;
    gap: 14px;
    margin-bottom: 20px;
}

.repairs-toolbar input,
.repairs-toolbar select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 11px;
    background: #fff;
    color: #111827;
    outline: none;
}

.repairs-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 14px;
}

.repairs-table-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.04);
}

.repairs-table-head {
    display: grid;
    grid-template-columns: 140px 1.15fr 1.45fr 160px 150px;
    gap: 14px;
    align-items: center;
    padding: 13px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.repairs-table-body { padding: 10px; }

.repairs-empty {
    padding: 55px 20px;
    text-align: center;
    color: #6b7280;
}

.status-badge.status-new {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-badge.status-repair {
    background: #fff7ed;
    color: #c2410c;
}

.status-badge.status-supplier {
    background: #fefce8;
    color: #a16207;
}

.status-badge.status-ready {
    background: #ecfdf5;
    color: #047857;
}

@media (max-width: 760px) {
    .repairs-toolbar {
        grid-template-columns: 1fr;
    }

    .repairs-table-head {
        display: none;
    }

    .repairs-summary {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   REPARAJA_PASSO_13_CLIENTES_PAGE
   ========================================================= */

.clients-page {
    display: none;
}

.clients-page.active {
    display: block;
}

.clients-toolbar {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    margin-bottom: 20px;
}

.clients-toolbar input,
.clients-toolbar select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 11px;
    background: #fff;
    color: #111827;
    outline: none;
}

.clients-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 14px;
}

.clients-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.04);
}

.clients-head,
.client-row {
    display: grid;
    grid-template-columns: 1.2fr 180px 1.2fr 130px 150px;
    gap: 14px;
    align-items: center;
}

.clients-head {
    padding: 13px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.clients-body {
    padding: 10px;
}

.client-row {
    padding: 15px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
}

.client-row:last-child {
    margin-bottom: 0;
}

.client-row:hover {
    background: #f9fbff;
    border-color: #cbd5e1;
}

.client-name strong {
    display: block;
    color: #111827;
    margin-bottom: 3px;
}

.client-name span,
.client-muted {
    color: #6b7280;
    font-size: 13px;
}

.client-count {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.client-status {
    font-size: 13px;
    font-weight: 700;
}

.client-status.open {
    color: #c2410c;
}

.client-status.done {
    color: #047857;
}

.clients-empty {
    padding: 55px 20px;
    text-align: center;
    color: #6b7280;
}

@media (max-width: 1050px) {
    .clients-head,
    .client-row {
        grid-template-columns: 1fr 150px 1fr;
    }

    .clients-head span:nth-child(4),
    .clients-head span:nth-child(5),
    .client-row > :nth-child(4),
    .client-row > :nth-child(5) {
        display: none;
    }
}

@media (max-width: 760px) {
    .clients-toolbar {
        grid-template-columns: 1fr;
    }

    .clients-head {
        display: none;
    }

    .client-row {
        grid-template-columns: 1fr;
    }

    .client-row > :nth-child(4),
    .client-row > :nth-child(5) {
        display: block;
    }

    .clients-summary {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   REPARAJA_PASSO_14_EQUIPAMENTOS_PAGE
   ========================================================= */

.equipments-page {
    display: none;
}

.equipments-page.active {
    display: block;
}

.equipments-toolbar {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    margin-bottom: 20px;
}

.equipments-toolbar input,
.equipments-toolbar select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 11px;
    background: #fff;
    color: #111827;
    outline: none;
}

.equipments-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 14px;
}

.equipments-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.04);
}

.equipments-head,
.equipment-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.15fr 140px 150px;
    gap: 14px;
    align-items: center;
}

.equipments-head {
    padding: 13px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.equipments-body {
    padding: 10px;
}

.equipment-row {
    padding: 15px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
}

.equipment-row:last-child {
    margin-bottom: 0;
}

.equipment-row:hover {
    background: #f9fbff;
    border-color: #cbd5e1;
}

.equipment-main strong,
.equipment-client strong {
    display: block;
    margin-bottom: 3px;
    color: #111827;
}

.equipment-main span,
.equipment-client span,
.equipment-muted {
    color: #6b7280;
    font-size: 13px;
}

.equipment-count {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.equipments-empty {
    padding: 55px 20px;
    text-align: center;
    color: #6b7280;
}

@media (max-width: 1050px) {
    .equipments-head,
    .equipment-row {
        grid-template-columns: 1.2fr 1fr 1fr;
    }

    .equipments-head span:nth-child(4),
    .equipments-head span:nth-child(5),
    .equipment-row > :nth-child(4),
    .equipment-row > :nth-child(5) {
        display: none;
    }
}

@media (max-width: 760px) {
    .equipments-toolbar {
        grid-template-columns: 1fr;
    }

    .equipments-head {
        display: none;
    }

    .equipment-row {
        grid-template-columns: 1fr;
    }

    .equipment-row > :nth-child(4),
    .equipment-row > :nth-child(5) {
        display: block;
    }

    .equipments-summary {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   REPARAJA_FASE_LOCAL_COMPLETA
   Equipamentos + Alertas + Configuracoes + utilitarios
   ========================================================= */

.mvp-page {
    display: none;
}

.mvp-page.active {
    display: block;
}

.mvp-toolbar {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 14px;
    margin-bottom: 18px;
}

.mvp-toolbar input,
.mvp-toolbar select,
.settings-form input,
.settings-form textarea,
.settings-form select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    outline: none;
}

.mvp-toolbar input:focus,
.mvp-toolbar select:focus,
.settings-form input:focus,
.settings-form textarea:focus,
.settings-form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.mvp-summary {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 14px;
}

.mvp-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.04);
}

.mvp-table-head,
.mvp-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.1fr 140px 150px;
    gap: 14px;
    align-items: center;
}

.mvp-table-head {
    padding: 13px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.mvp-table-body {
    padding: 10px;
}

.mvp-row {
    padding: 15px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
}

.mvp-row:last-child {
    margin-bottom: 0;
}

.mvp-row:hover {
    background: #f9fbff;
    border-color: #cbd5e1;
}

.mvp-main strong {
    display: block;
    margin-bottom: 3px;
    color: #111827;
}

.mvp-muted {
    color: #6b7280;
    font-size: 13px;
}

.mvp-count {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.alert-card-row {
    display: grid;
    grid-template-columns: 140px 1.2fr 1.4fr 120px 150px;
    gap: 14px;
    align-items: center;
    padding: 15px 16px;
    border-bottom: 1px solid #eef0f3;
}

.alert-card-row:last-child {
    border-bottom: 0;
}

.alert-level {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.alert-level.warning {
    background: #fff7ed;
    color: #c2410c;
}

.alert-level.critical {
    background: #fef2f2;
    color: #b91c1c;
}

.settings-wrap {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 20px;
}

.settings-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 4px 18px rgba(0,0,0,.04);
}

.settings-card h3 {
    margin: 0 0 16px;
}

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

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-group.full {
    grid-column: 1 / -1;
}

.settings-group label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.utility-buttons {
    display: grid;
    gap: 10px;
}

.utility-buttons button {
    width: 100%;
}

.detail-extra-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.detail-extra-actions button {
    flex: 1;
    min-width: 160px;
}

.notes-area {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
}

.notes-area label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.notes-area textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px;
}

.mvp-empty {
    padding: 50px 20px;
    text-align: center;
    color: #6b7280;
}

@media (max-width: 900px) {
    .settings-wrap {
        grid-template-columns: 1fr;
    }

    .mvp-table-head,
    .mvp-row {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .mvp-table-head span:nth-child(4),
    .mvp-table-head span:nth-child(5),
    .mvp-row > :nth-child(4),
    .mvp-row > :nth-child(5) {
        display: none;
    }

    .alert-card-row {
        grid-template-columns: 120px 1fr 1fr;
    }

    .alert-card-row > :nth-child(4),
    .alert-card-row > :nth-child(5) {
        display: none;
    }
}

@media (max-width: 700px) {
    .mvp-toolbar,
    .settings-form {
        grid-template-columns: 1fr;
    }

    .settings-group.full {
        grid-column: auto;
    }

    .mvp-table-head {
        display: none;
    }

    .mvp-row,
    .alert-card-row {
        grid-template-columns: 1fr;
    }

    .mvp-row > :nth-child(4),
    .mvp-row > :nth-child(5),
    .alert-card-row > :nth-child(4),
    .alert-card-row > :nth-child(5) {
        display: block;
    }

    .mvp-summary {
        flex-direction: column;
    }
}

/* =========================================================
   REPARAJA_ADMIN_LOCAL
   ========================================================= */

.user-box {
    cursor: pointer;
    user-select: none;
}

.user-box:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 30000;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(3px);
    padding: 24px;
    align-items: center;
    justify-content: center;
}

.admin-overlay.active {
    display: flex;
}

.admin-modal {
    width: min(820px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-header h2 {
    margin: 0 0 4px;
    font-size: 23px;
}

.admin-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.admin-body {
    padding: 22px 24px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
    margin-top: 16px;
}

.admin-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    background: #f9fafb;
}

.admin-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.admin-stat {
    font-size: 30px;
    font-weight: 800;
    color: #111827;
}

.admin-muted {
    color: #6b7280;
    font-size: 13px;
}

.admin-form {
    display: grid;
    gap: 10px;
}

.admin-form label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.admin-form input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
}

.admin-form input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.10);
}

.admin-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
    margin-top: 10px;
}

.admin-actions button {
    width: 100%;
}

.admin-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    position: sticky;
    bottom: 0;
}

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

    .admin-actions {
        grid-template-columns: 1fr;
    }
}
