/* =========================================================
   EQUIPAMENTOS
========================================================= */


/* ---------------------------------------------------------
   CABEÇALHO
--------------------------------------------------------- */


/* ---------------------------------------------------------
   BOTÕES
--------------------------------------------------------- */

.equipamentos-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 0 18px;

    border: 0;
    border-radius: 8px;

    background: #173d6d;
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.15s ease;
}

.equipamentos-btn-primary:hover {
    background: #102f57;
}

.equipamentos-btn-primary:active {
    transform: translateY(1px);
}

.equipamentos-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 0 18px;

    border: 1px solid #dce1e8;
    border-radius: 8px;

    background: #ffffff;
    color: #465166;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.equipamentos-btn-secondary:hover {
    background: #f7f8fa;
}


/* ---------------------------------------------------------
   CARD DA TABELA
--------------------------------------------------------- */

.equipamentos-card {
    overflow: visible;

    background: #ffffff;
    border: 1px solid #e5e8ed;
    border-radius: 12px;
}

.equipamentos-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 20px;

    border-bottom: 1px solid #edf0f3;
}

.equipamentos-card-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #172033;
}

.equipamentos-card-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #8992a3;
}


/* ---------------------------------------------------------
   TABELA
--------------------------------------------------------- */

.equipamentos-table-wrapper {
    width: 100%;
    overflow: visible;
}

.equipamentos-table {
    width: 100%;
    border-collapse: collapse;
}

.equipamentos-table th {
    padding: 11px 16px;

    background: #f8f9fb;
    border-bottom: 1px solid #e9ecf0;

    color: #7c8698;

    font-size: 11px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;

    white-space: nowrap;
}

.equipamentos-table td {
    padding: 14px 16px;

    border-bottom: 1px solid #eef0f3;

    color: #465166;
    font-size: 13px;

    vertical-align: middle;
}

.equipamentos-table tbody tr:last-child td {
    border-bottom: 0;
}

.equipamentos-table tbody tr {
    transition: background 0.15s ease;
}

.equipamentos-table tbody tr:hover {
    background: #fafbfc;
}


/* ---------------------------------------------------------
   EQUIPAMENTO / CÓDIGO
--------------------------------------------------------- */

.equipamento-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.equipamento-info strong {
    color: #172033;
    font-size: 14px;
    font-weight: 650;
}

.equipamento-info span {
    color: #929baa;
    font-size: 12px;
}


/* ---------------------------------------------------------
   ESTADOS
--------------------------------------------------------- */

.equipamento-status {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}

.equipamento-status.disponivel {
    background: #eaf7ef;
    color: #25834b;
}

.equipamento-status.em-obra {
    background: #eaf2fb;
    color: #28679f;
}

.equipamento-status.manutencao {
    background: #fff4df;
    color: #a96a09;
}

.equipamento-status.inativo {
    background: #f0f1f3;
    color: #747d8c;
}


/* ---------------------------------------------------------
   AÇÕES
--------------------------------------------------------- */

.equipamento-actions {
    width: 48px;
    text-align: right;
}

.equipamento-action-btn {
    width: 32px;
    height: 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: #7c8697;

    cursor: pointer;
}

.equipamento-action-btn:hover {
    background: #eef1f5;
    color: #172033;
}


/* ---------------------------------------------------------
   EMPTY STATE
--------------------------------------------------------- */

.equipamentos-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 260px;
    padding: 40px;

    text-align: center;
}

.equipamentos-empty i {
    margin-bottom: 14px;

    color: #bdc4ce;
    font-size: 32px;
}

.equipamentos-empty strong {
    margin-bottom: 5px;

    color: #394357;
    font-size: 14px;
}

.equipamentos-empty span {
    color: #929baa;
    font-size: 13px;
}


/* =========================================================
   MODAL
========================================================= */

.equipamentos-modal {
    position: fixed;
    inset: 0;

    z-index: 2000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(15, 25, 40, 0.48);

    backdrop-filter: blur(2px);
}

.equipamentos-modal.is-open {
    display: flex;
}

.equipamentos-modal-box {
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);

    overflow-y: auto;

    background: #ffffff;
    border-radius: 14px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.16);
}


/* ---------------------------------------------------------
   MODAL HEADER
--------------------------------------------------------- */

.equipamentos-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    padding: 20px 22px;

    border-bottom: 1px solid #eceff3;
}

.equipamentos-modal-header h3 {
    margin: 0;

    color: #172033;

    font-size: 18px;
    font-weight: 700;
}

.equipamentos-modal-header p {
    margin: 5px 0 0;

    color: #8992a3;
    font-size: 13px;
}

.equipamentos-modal-close {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: #778195;

    cursor: pointer;
}

.equipamentos-modal-close:hover {
    background: #f1f3f6;
    color: #172033;
}


/* ---------------------------------------------------------
   MODAL BODY
--------------------------------------------------------- */

.equipamentos-modal-body {
    padding: 22px;
}


/* ---------------------------------------------------------
   FORMULÁRIO
--------------------------------------------------------- */

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

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

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

.equipamentos-form-group label {
    color: #465166;

    font-size: 12px;
    font-weight: 650;
}

.equipamentos-form-group input,
.equipamentos-form-group select,
.equipamentos-form-group textarea {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid #dce1e8;
    border-radius: 8px;

    background: #ffffff;
    color: #263043;

    font-family: inherit;
    font-size: 14px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.equipamentos-form-group input,
.equipamentos-form-group select {
    height: 42px;
    padding: 0 12px;
}

.equipamentos-form-group textarea {
    min-height: 100px;

    padding: 11px 12px;

    resize: vertical;
}

.equipamentos-form-group input:focus,
.equipamentos-form-group select:focus,
.equipamentos-form-group textarea:focus {
    border-color: #4775a9;

    box-shadow:
        0 0 0 3px rgba(71, 117, 169, 0.1);
}

.equipamentos-form-group input::placeholder,
.equipamentos-form-group textarea::placeholder {
    color: #abb2bd;
}


/* ---------------------------------------------------------
   MODAL FOOTER
--------------------------------------------------------- */

.equipamentos-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    padding: 16px 22px;

    border-top: 1px solid #eceff3;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 700px) {

    .equipamentos-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .equipamentos-btn-primary {
        width: 100%;
    }

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

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

    .equipamentos-modal {
        padding: 12px;
    }

    .equipamentos-modal-box {
        max-height: calc(100vh - 24px);
    }

}

/* =========================================================
   MENU DE AÇÕES
========================================================= */

.equipamento-menu-wrapper {
    position: relative;
    display: inline-block;
}

.equipamento-menu {
    position: absolute;
    top: 38px;
    right: 0;

    z-index: 100;

    display: none;

    min-width: 150px;

    padding: 6px;

    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 9px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.12);
}

.equipamento-menu.is-open {
    display: block;
}

.equipamento-menu-item {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 9px 10px;

    border: 0;
    border-radius: 6px;

    background: transparent;
    color: #394357;

    font-family: inherit;
    font-size: 13px;
    text-align: left;

    cursor: pointer;
}

.equipamento-menu-item:hover {
    background: #f3f5f7;
}

.equipamento-menu-item i {
    width: 16px;
    color: #7d8796;
}

.equipamento-nome-link {
    color: #202939;
    font-weight: 700;
    text-decoration: none;
}

.equipamento-nome-link:hover {
    color: #1f4f7f;
    text-decoration: underline;
}