/* =============================================================================
   CSS CONSOLIDADO - SISTEMA DE GESTÃO TÉCNICA
   Apenas estilos utilizados nos arquivos HTML fornecidos
   ============================================================================= */

/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    gap: 26px;
}

.instalacoes-tabs {
    display: flex;
.demandas-hero,
.demandas-list-card {
    background: rgba(25, 25, 25, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}
        margin-bottom: 16px;
        padding: 14px 16px;
        background: rgba(45,45,45,0.6);
        border: 1px solid rgba(255,255,255,0.04);
        border-radius: 10px;
    }
    .users-form .form-row{
        display:flex;
        gap:12px;
        flex-wrap:wrap;
        align-items:center;
    }
    .users-form .form-col{ flex:1; min-width:220px }
    .users-form .form-col--small{ width:180px }
    .users-form .form-col--tiny{ width:120px; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-end }
    .users-form label{ display:block; margin-bottom:6px; color:var(--dash-muted); font-size:13px }
    .users-form input[type="text"], .users-form input[type="email"], .users-form select, .users-form input[type="search"]{
        width:100%; padding:8px 10px; border-radius:6px; border:1px solid rgba(255,255,255,0.06); background:rgba(0,0,0,0.08); color:var(--dash-text);
    }
    .users-actions{ margin-top:12px; display:flex; gap:8px; align-items:center }
    .users-actions .filter{ margin-left:auto; display:flex; gap:8px; align-items:center }
.demandas-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 16px;
}

.demandas-form label span,
.demandas-form label {
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
}

.demandas-form label span,
.demandas-form label {
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
}

.demandas-form input,
.demandas-form select,
.demandas-form textarea {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
}

.demandas-form textarea {
    min-height: 120px;
    background: rgba(20, 20, 20, 0.9);
}
    .users-actions .filter input{ min-width:240px }
    .users-table{ width:100%; border-collapse:collapse; font-size:14px }
    .users-table thead th{ text-align:left; padding:10px 8px; border-bottom:1px solid rgba(255,255,255,0.06); color:var(--dash-text) }
    .users-table td{ padding:10px 8px; border-bottom:1px solid rgba(255,255,255,0.02); color:var(--dash-text) }
    .users-form input[disabled], .users-form select[disabled]{ opacity:0.7 }
    padding: 30px;
    min-height: calc(100vh - 120px);
}


.no-data {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    padding: 40px;
    grid-column: 1/-1;
}

    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(220, 20, 60, 0.3);
    font-weight: 500;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}


@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}


/* Loading animation for button */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 20, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0); }
}



/* Tech icons decoration */
.tech-icon {
    position: absolute;
    color: rgba(220, 20, 60, 0.1);
    font-size: 1.5rem;
    animation: techFloat 15s ease-in-out infinite;
}

.tech-icon:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.tech-icon:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: 5s;
}

.tech-icon:nth-child(3) {
    bottom: 30%;
    left: 5%;
    animation-delay: 10s;
}

.tech-icon:nth-child(4) {
    bottom: 10%;
    right: 15%;
    animation-delay: 2s;
}

@keyframes techFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.2;
    }
}

.config-section,
.tickets-section {
    background: rgba(45, 45, 45, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.usuarios-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 10px 0 30px;
}

.usuarios-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.usuarios-header h2 {
    margin-bottom: 4px;
}

.usuarios-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.usuarios-search {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.usuarios-search input {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 12px;
    background: rgba(10, 10, 10, 0.9);
    color: #fff;
}

.usuarios-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.usuarios-grid {
    padding: 0;
}

.usuarios-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

body.modal-open {
    overflow: hidden;
}

.usuarios-modal.is-open {
    display: flex;
}

.usuarios-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.usuarios-modal-content {
    position: relative;
    z-index: 2;
    background: rgba(5, 5, 5, 0.95);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
    width: min(860px, 95vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.usuarios-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

.usuarios-modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

.usuarios-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.usuarios-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.usuarios-form-grid input,
.usuarios-form-grid select {
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(5, 5, 5, 0.9);
    color: #fff;
}

.usuarios-checkbox {
    justify-content: flex-end;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
}

.usuarios-access-panel {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px;
    margin-top: 10px;
    background: rgba(15, 15, 15, 0.95);
}

.usuarios-access-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.usuarios-access-table-wrap {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.usuarios-access-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.usuarios-modal-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.tab,
.tab-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tab.active,
.tab-btn.active {
    background: rgba(255, 255, 255, 0.12);
}

.tab:hover,
.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    .usuarios-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .usuarios-modal-content {
        width: 95vw;
    }
}

.demandas-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 10px 0 30px;
    min-height: calc(100vh - 120px);
}

.demandas-hero,
.demandas-list-card {
    background: rgba(25, 25, 25, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

.demandas-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.demandas-hero h2 {
    font-size: 2rem;
}

.demandas-hero p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 620px;
}

.demandas-hero .btn {
    white-space: nowrap;
}

.demandas-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 16px;
}


.demandas-form input,
.demandas-form select,
.demandas-form textarea {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
}

.demandas-form textarea {
    min-height: 120px;
    background: rgba(20, 20, 20, 0.9);
}

.demandas-form-observacao textarea {
    color: #ffffff;
}

.demandas-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.demandas-modal.is-open {
    display: flex;
}

.demandas-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.demandas-modal-content {
    position: relative;
    z-index: 2;
    background: rgba(16, 16, 16, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    width: min(520px, 95vw);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.demandas-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}

.demandas-modal-header h3 {
    margin-bottom: 4px;
}

.demandas-modal-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.demandas-tab-bar {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
}

.demandas-tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    padding: 6px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.demandas-search input {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 14px;
    background: rgba(10, 10, 10, 0.9);
    color: #fff;
    min-width: 220px;
}

@media (max-width: 640px) {
    .demandas-tab-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .demandas-search input {
        width: 100%;
    }
}

.demandas-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.demandas-count {
    font-weight: 600;
    color: #f8f9fa;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.demandas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.demandas-card {
    background: rgba(36, 36, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 180px;
    position: relative;
}

.demandas-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.demandas-card h4 {
    margin-bottom: 4px;
}

.demandas-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.demandas-card .muted {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.demandas-card small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.demandas-status-pill {
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.08);
}

.demandas-status-pill.pendente {
    color: #f6c343;
    border: 1px solid rgba(246, 195, 67, 0.6);
}

.demandas-status-pill.concluido {
    color: #5cd65c;
    border: 1px solid rgba(92, 214, 92, 0.5);
}

.demandas-card-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.demandas-card-button {
    padding: 6px 12px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s ease;
}

.demandas-card-button:hover {
    background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
    .demandas-form-grid {
        grid-template-columns: 1fr;
    }
    .demandas-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

.hidden {
    display: none;
}

.status {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    color: white;
    background: #667eea;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 25px;
    min-width: 300px;
    background: rgba(26, 26, 26, 0.8);
    color: #ffffff;
    outline: none;
}

.search-box:focus {
    border-color: #dc143c;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.tickets-grid {
    display: flex;
    flex-direction: column;
    /* grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); */
    gap: 20px;
}

.ticket-id {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9rem;
}

.ticket-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-novo {
    background: #74b9ff;
    color: white;
}

.status-processando {
    background: #fdcb6e;
    color: #2d3436;
}

.status-resolvido {
    background: #00b894;
    color: white;
}

.ticket-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.ticket-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Make ticket info rows wrap on narrow cards so labels/selects don't overflow */
.ticket-info-row {
    display: flex;
    flex-wrap: wrap; /* allow items to wrap to next line */
    gap: 8px;
    align-items: center;
}

.ticket-info-row .ticket-info {
    flex: 1 1 140px; /* base width; will shrink when needed */
    min-width: 0; /* allow shrinking */
}

/* Ensure the .ticket-actions block (template inline-styled) doesn't overlap content.
   Use !important to override inline 'top' when necessary and keep the button below status. */
    flex-wrap: wrap;
    justify-content: space-between;
.ticket-card .ticket-actions {
    position: absolute !important;
    right: 12px !important;
    bottom: 12px !important; /* place actions in the bottom-right of the card */
    top: auto !important;
    z-index: 3 !important;
    display: flex !important;
    gap: 8px !important;
}

.ticket-status-row select {
    min-width: 160px;
}

.ticket-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 80px; /* ensure actions do not overlap new row */
}

/* Align meta (status + actions) to the right inside the header */
.ticket-meta {
    text-align: right;
}

/* Technician row styling */
.ticket-technician-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start; /* align technician to the left */
    overflow: visible; /* ensure children are not clipped */
}
.ticket-tech-label {
    font-weight: 600;
    color: #ffffff;
    display: inline-block;
    margin-right: 6px;
    font-size: 0.95rem;
    line-height: 1;
    z-index: 10; /* ensure label sits above actions if overlapping */
    text-shadow: 0 1px 0 rgba(0,0,0,0.4);
    opacity: 1 !important;
    visibility: visible !important;
}

.ticket-status-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
}

.ticket-status-label {
    font-weight: 600;
    color: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

/* Give the card extra bottom padding so the bottom-right action button doesn't overlap content */
.ticket-card {
    padding-bottom: 64px; /* space for actions */
}

.ticket-card .ticket-actions {
    z-index: 2 !important; /* slightly lower so labels can sit above if needed */
}

/* Ensure header has space for actions placed at top */
.ticket-header {
    position: relative;
    padding-bottom: 8px;
}

/* Modal header meta: stack items vertically under the title */
.modal-header-left .modal-header-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}
.modal-header-left .modal-meta-item {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
}
.modal-header-left .modal-meta-item strong {
    color: #ffffff;
    font-weight: 700;
    margin-left: 6px;
}

/* Small screens: make info stack vertically for readability */
@media (max-width: 480px) {
    .ticket-info-row .ticket-info {
        flex-basis: 100%;
        text-align: left !important;
    }
    .ticket-card .ticket-actions {
        top: auto !important;
        bottom: 12px !important;
        right: 12px !important;
    }
}

.ticket-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    max-height: 100px;
    overflow-y: auto;
}

/* Botões do sistema - base e variantes para combinar com o tema escuro */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(180deg, #6c7af7 0%, #5863e8 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(102, 126, 234, 0.14);
}

.btn-secondary {
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    color: #fff;
    border: 1px solid rgba(255,255,255,0.06);
}

.btn-success {
    background: linear-gradient(180deg, #00d084 0%, #00b894 100%);
    color: #042018;
}

.btn-warning {
    /* Alinhado com badge de status 'processando' (amarelo) */
    background: linear-gradient(180deg, #fdcb6e 0%, #f6c358 100%);
    color: #2d2d2d;
}

.btn-accent {
    /* Variante de destaque — aproximada ao tom azul dos status 'novo' */
    background: linear-gradient(180deg, #74b9ff 0%, #5aa3ff 100%);
    color: #0b2546;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.98;
}

/* Aparência quando desabilitado */
.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Acessibilidade: contorno visível ao focar por teclado */
.btn:focus {
    outline: 3px solid rgba(116,185,255,0.18);
    box-shadow: 0 0 0 6px rgba(116,185,255,0.06);
}

/* Use focus-visible when supported to avoid focus styles on mouse click */
@supports selector(:focus-visible) {
    .btn:focus { outline: none; box-shadow: none; }
    .btn:focus-visible {
        outline: 3px solid rgba(116,185,255,0.22);
        box-shadow: 0 0 0 6px rgba(116,185,255,0.08);
    }
}

/* Botões pequenos utilizados nos quick-actions dos tickets (compactos) */
.quick-action-btn {
    padding: 2px 6px;
    font-size: 0.68rem;
    border-radius: 6px;
    min-width: 54px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ticket-quick-actions {
    z-index: 2;
}

/* Open ticket button — moved to header actions (aligned right under status). */
.open-ticket-btn {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    color: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 6px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 64px;
}
.open-ticket-btn:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Garantir que o botão de abrir seja posicionado no canto direito do cartão
   tanto quando o botão é renderizado diretamente pelo JS quanto quando
   está dentro de um wrapper .ticket-actions no template server-side */
.ticket-card > .open-ticket-btn,
.ticket-card .ticket-actions > .open-ticket-btn {
    position: absolute;
    right: 12px;
    bottom: 12px; /* place button in bottom-right for both server and client rendered cards */
    top: auto;
    z-index: 3;
}

@media (max-width: 480px) {
    .ticket-card > .open-ticket-btn,
    .ticket-card .ticket-actions > .open-ticket-btn {
        top: 50px; /* slightly adjusted for narrow layouts */
        right: 10px;
        min-width: 48px;
        padding: 4px 8px;
    }
}

/* Styled selects for filters and inline controls */
.styled-select, .compact-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    color: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 8px 36px 8px 12px; /* space for custom caret */
    font-size: 0.95rem;
    border-radius: 10px;
    outline: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.styled-select:focus, .compact-select:focus {
    box-shadow: 0 6px 18px rgba(116,185,255,0.06);
    border-color: rgba(116,185,255,0.25);
}

/* Compact, subtle selects for inline priority/technician */
.compact-select {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 4px 8px;
    font-size: 0.85rem;
    border-radius: 6px;
    outline: none;
    display: inline-block; /* allow it to sit beside text */
    vertical-align: middle;
    width: auto; /* don't force full width */
    min-width: 64px;
    max-width: 160px; /* limit width so it fits beside labels */
    text-overflow: ellipsis;
    overflow: hidden;
}
.compact-select:focus {
    box-shadow: 0 0 0 4px rgba(116,185,255,0.06);
    border-color: rgba(116,185,255,0.2);
}

/* Smaller variant used in very compact card areas */
.compact-select.small {
    min-width: 48px;
    max-width: 120px;
    padding: 3px 6px;
    font-size: 0.8rem;
}

/* Responsividade: reduz a pegada dos botões rápidos em telas pequenas */
@media (max-width: 768px) {
    .ticket-quick-actions {
        position: static !important;
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .quick-action-btn {
        padding: 4px 6px;
        font-size: 0.7rem;
    }

    .ticket-card {
        padding-bottom: 40px; /* espaço para ações que fluem abaixo */
    }
}

.status-message {
    margin: 15px 0;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
}

.floating-ticket-btn {
    position: fixed;
    right: 28px;
    bottom: 28px;
    background: linear-gradient(180deg, #f6c358 0%, #f2a01c 100%);
    color: #1c1c1c;
    border: none;
    border-radius: 999px;
    padding: 14px 22px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 900;
}

.floating-ticket-btn:hover {
    transform: translateY(-2px);
}

.modal-register {
    display: none;
}

.modal-register.open {
    display: block;
}

.modal-register-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 890;
}

.modal-register-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    border-radius: 16px;
    padding: 24px;
    min-width: 320px;
    max-width: 460px;
    width: 95%;
    z-index: 891;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-register .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}

.register-form .form-group {
    margin-bottom: 12px;
}

.register-form .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.register-form input,
.register-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 0.95rem;
}

.register-form textarea {
    min-height: 100px;
    resize: vertical;
}

.register-form input:focus,
.register-form textarea:focus {
    outline: none;
    border-color: rgba(244, 190, 66, 0.8);
    box-shadow: 0 0 0 3px rgba(244, 190, 66, 0.15);
}

.register-actions {
    margin-top: 18px;
    text-align: right;
}

.register-error {
    color: #ff7b7b;
    min-height: 1.2em;
    margin-top: 4px;
    text-align: center;
}

.register-success {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 900;
    align-items: center;
    justify-content: center;
}

.register-success.visible {
    display: flex;
}

.register-success-content {
    background: #0c111a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.register-success p {
    margin-bottom: 16px;
    font-size: 1rem;
    color: #fff;
}

.status.info {
    background: rgba(116, 185, 255, 0.2);
    color: #74b9ff;
    border: 1px solid rgba(116, 185, 255, 0.3);
}

.status.success {
    background: rgba(0, 184, 148, 0.2);
    color: #00b894;
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.status.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* =============================================================================
   SCROLLBAR STYLING
   ============================================================================= */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(128, 128, 128, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(220, 20, 60, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 20, 60, 0.5);
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar .nav-btn .text {
        opacity: 0;
    }

    .main-content {
        margin-left: 70px;
    }

    .header {
        padding: 20px 25px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .content-area {
        padding: 25px;
    }

    .input-group-fixed {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-group-fixed label {
        text-align: left;
        width: 100%;
        margin-bottom: 5px;
        padding-right: 0;
    }

    .input-group-fixed input {
        width: 100%;
    }

    #form_fundo {
        margin: 20px;
        padding: 30px 25px;
    }

    #form_fundo h1 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .config-form {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }

    .tickets-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .status-cards {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    #form_fundo h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    #btnLogin {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

/* =============================================================================
   Menu topo dos tickets.html
   ============================================================================= */

.top-header {
    background: transparent;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.header-toggle-section {
    padding: 15px 20px;
}

.header-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    justify-content: flex-start;
}

.header-toggle:hover {
    opacity: 0.8;
}

.toggle-arrow {
    transition: transform 0.3s ease;
    margin-left: auto;
}

.toggle-arrow.rotated {
    transform: rotate(180deg);
}

/* Conteúdo colapsável */
.header-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: rgba(255,255,255,0.1);
}

.header-content.expanded {
    max-height: 200px;
    padding: 20px;
}

.filters-row {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.filter-group label {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: transparent;
}

.filters-container {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
}

.filters-left {
    display: flex;
    gap: 20px;
    align-items: end;
}

.filters-right {
    display: flex;
    align-items: end;
}

.apply-btn {
    padding: 10px 20px;
    background: #00b894;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.apply-btn:hover {
    background: #00a085;
    transform: translateY(-2px);
}

/* Responsividade */
@media (max-width: 768px) {
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
}

/* Início técnico */
.inicio-page {
    padding: 12px 18px;
}

.inicio-page h2 {
    color: #0f5b88;
    margin-bottom: 10px;
}

.inicio-summary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.summary-card {
    flex: 1 1 280px;
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #111827, #1f2933);
    color: #f4f5f7;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45);
}

.summary-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    color: #9ca3af;
}

.summary-value {
    font-size: 2.8rem;
    margin: 10px 0 4px;
    font-weight: 700;
}

.summary-subtext {
    color: #d1d5db;
    font-size: 0.95rem;
}

.summary-hint {
    font-size: 0.85rem;
    color: #a3bffa;
    margin-top: 6px;
}

.status-breakdown-grid {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.status-breakdown-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 12px;
}

.status-breakdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #cbd5f5;
    display: block;
    margin-bottom: 4px;
}

.status-breakdown-value {
    font-size: 2rem;
    font-weight: 600;
    color: #f8fafc;
}

.filters-container .filters-left {
    flex: 1;
}

.filters-container .filters-right {
    display: flex;
    align-items: flex-end;
}

.tickets-section {
    margin-top: 8px;
}

.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.tickets-grid.vertical-stack {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.inicio-tab-control {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.inicio-tab {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease;
}

.inicio-tab.active {
    background: #2563eb;
    border-color: #3b82f6;
}

.inicio-tab-panels {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.inicio-tab-panel {
    display: none;
}

.inicio-tab-panel.active {
    display: block;
}

.inicio-demandas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.inicio-demandas-header h2 {
    margin-bottom: 4px;
}

.inicio-demandas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.inicio-demandas-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inicio-demandas-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}

.inicio-demandas-card .status-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.inicio-demandas-card .status-pill.status-pendente {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}

.inicio-demandas-card .status-pill.status-concluido {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
}

.inicio-demandas-card .status-pill.status-padrao {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.12);
}

.inicio-demandas-card .demanda-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.inicio-demandas-card .demanda-meta span::before {
    content: '•';
    margin-right: 4px;
    color: rgba(255, 255, 255, 0.5);
}

.inicio-demandas-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.inicio-demandas-card .muted {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.tickets-count {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .summary-card {
        flex: 1 1 100%;
    }
}

/* =============================================================================
   FIM TICKETS.HTML MENU TOPO
   ============================================================================= */

/* =============================================================================
   INICIO ticket-modal.HTML (NOVO LAYOUT DE THREAD)
   ============================================================================= */

/* Fundo do modal (Mantido) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

/* Conteúdo principal do modal (Layout de Flex Column) */
.modal-content-ticket {
    /* Fullscreen quando aberto - ocupa toda a tela */
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border-radius: 0;
    box-shadow: none;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    overflow: hidden;
    border: 0;
    display: flex; /* LAYOUT PRINCIPAL */
    flex-direction: column; /* Organiza em Cabeçalho, Corpo, Rodapé */
    margin: 0;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
}

/* Cabeçalho do Modal (Fixo) */
.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    background: rgba(26, 26, 26, 0.8);
    flex-shrink: 0; /* Não encolhe */
}
.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #ffffff;
}
.ticket-icon {
    color: #dc143c;
    margin-right: 8px;
}

/* Corpo do Modal (Scrollável) */
.modal-body-thread {
    flex: 1; /* Ocupa todo o espaço disponível */
    overflow-y: auto; /* Permite scroll */
    padding: 25px;
    background: rgba(26, 26, 26, 0.5); /* Fundo levemente diferente */
}

/* Rodapé de Ações (Fixo) */
.modal-footer-actions {
    flex-shrink: 0; /* Não encolhe */
    padding: 15px 25px;
    background: rgba(26, 26, 26, 0.9);
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    display: flex;
    justify-content: flex-end;
}
.reply-btn {
    background: linear-gradient(90deg, #ff6b6b, #ff1744);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(220,20,60,0.18);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.reply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.reply-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

/* Modal de resposta (centralizado maior e com textarea expansível) */
.modal-content-resposta {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    width: 92vw;
    max-width: 1000px;
    height: 88vh;
    max-height: 88vh;
    overflow: hidden;
    border: 1px solid rgba(128, 128, 128, 0.18);
    display: flex;
    flex-direction: column;
    margin: auto;
    box-sizing: border-box;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Pequena animação ao abrir modal-resposta/solicitação */
@keyframes modalPop {
    0% {
        transform: translate(-50%, -52%) scale(0.98);
        opacity: 0;
        filter: blur(2px);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

.modal-content-resposta {
    animation: modalPop 220ms cubic-bezier(.2,.9,.3,1) both;
}

@media (prefers-reduced-motion: reduce) {
    .modal-overlay { animation: none !important; }
    .modal-content-resposta { animation: none !important; }
}

/* Form e textarea para ocupar o espaço disponível */
.modal-content-resposta .modal-body {
    padding: 18px 20px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    overflow: hidden;
}
.modal-content-resposta form#formResposta,
.modal-content-resposta form#formRespostaNew {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    overflow: hidden;
}
.modal-content-resposta .form-group { 
    display: flex;
    flex-direction: column;
}
.modal-content-resposta .form-group label {
    margin-bottom: 6px;
    opacity: 0.9;
}
.modal-content-resposta .form-group input[type="email"],
.modal-content-resposta .form-group input[type="text"] {
    background: rgba(255,255,255,0.03);
    color: #fff;
    border: 1px solid rgba(128,128,128,0.12);
    padding: 10px 12px;
    border-radius: 8px;
}
.modal-content-resposta .form-group textarea {
    width: 100%;
    height: 100%;
    min-height: 140px;
    resize: none;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(128,128,128,0.12);
    background: rgba(0,0,0,0.12);
    color: #fff;
    line-height: 1.6;
    overflow: auto;
    flex: 1 1 auto;
}

/* Rodapé do modal de resposta: botões estilizados */
.modal-content-resposta .modal-footer {
    padding: 14px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid rgba(128,128,128,0.08);
    background: rgba(0,0,0,0.04);
    flex-shrink: 0;
}
.btn-primary {
    background: linear-gradient(90deg, #00c853, #00b894);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0,184,148,0.14);
}
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
    background: rgba(255,255,255,0.04);
    color: #fff;
    border: 1px solid rgba(128,128,128,0.12);
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
}
.btn-secondary:hover { background: rgba(255,255,255,0.06); }

/* Pequeno ajuste para o botão fechar no fullscreen */
.modal-content-ticket .btn-fechar {
    background: rgba(0,0,0,0.25);
    color: #fff;
    border-radius: 6px;
    padding: 6px 10px;
}



/* --- Estilos da Thread de Mensagens --- */

.message-item {
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Para o radius funcionar no header */
}

/* Cabeçalho de cada mensagem */
.message-header {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-sender {
    font-weight: 700;
    color: #ffffff;
    font-size: 1rem;
}

.message-date {
    font-size: 0.85rem;
    color: #b0b0b0;
}

/* Corpo de cada mensagem */
.message-body {
    padding: 25px;
    font-size: 15px;
    line-height: 1.7;
    color: #ffffff;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* --- Destaque para Email Original vs Respostas --- */

/* Email Original (Pai) */
.message-item.original-post {
    border-color: #667eea; /* Cor secundária (Azul/Roxo) */
    background: rgba(102, 126, 234, 0.03);
}
.message-item.original-post .message-header {
    background: rgba(102, 126, 234, 0.1); /* Header do original */
}
.message-item.original-post .message-sender {
    color: #74b9ff; /* Destaque no sender original */
}

/* Respostas (Filhos) */
.message-item.reply-post {
    border-color: #dc143c; /* Cor primária (Vermelho) */
    background: rgba(220, 20, 60, 0.02);
}
.message-item.reply-post .message-header {
    background: rgba(220, 20, 60, 0.1); /* Header da resposta */
}
.message-item.reply-post .message-sender {
    color: #ff7979; /* Destaque no sender da resposta */
}

/* --- Classificações adicionais: mensagens recebidas, enviadas por nós e de terceiros --- */
/* Mensagem que recebemos do cliente (azul) */
.message-item.reply-post.message-received {
    border-color: #2980b9; /* azul */
    background: rgba(41, 128, 185, 0.03);
}
.message-item.reply-post.message-received .message-header {
    background: rgba(41, 128, 185, 0.06);
}
.message-item.reply-post.message-received .message-sender {
    color: #3498db;
    text-align: left;
}

/* Mensagem enviada por nós (verde) - alinhar remetente à direita */
.message-item.reply-post.message-sent {
    border-color: #2ecc71; /* verde */
    background: rgba(46, 204, 113, 0.03);
}
.message-item.reply-post.message-sent .message-header {
    background: rgba(46, 204, 113, 0.06);
    /* inverter ordem para mostrar nome à direita */
    flex-direction: row-reverse;
}
.message-item.reply-post.message-sent .message-sender {
    color: #27ae60;
    /* garantir alinhamento à direita */
    text-align: right;
}

/* Mensagem de outra pessoa (neutra) - manter à esquerda */
.message-item.reply-post.message-other {
    border-color: rgba(128, 128, 128, 0.18);
    background: rgba(0,0,0,0.06);
}

/* Pequenas ajustes responsivos para cabeçalho quando invertido */
.message-item .message-header {
    /* permite que row-reverse funcione corretamente */
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* --- Estilos de Anexos --- */
.message-attachments {
    border-top: 1px solid rgba(128, 128, 128, 0.1);
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.1);
}
.message-attachments .attachments-header h4 {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-weight: 600;
}
.attachments-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
/* Estilo para cada item de anexo (reutilizado do seu css antigo) */
.attachment-item-small {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(45, 45, 45, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(128, 128, 128, 0.2);
    min-width: 200px;
}
.attachment-icon {
    font-size: 1rem;
    margin-right: 10px;
    opacity: 0.7;
}
.attachment-details {
    flex: 1;
}
.attachment-name {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 2px;
}
.attachment-size {
    font-size: 0.75rem;
    color: #b0b0b0;
}
.download-btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
    background: #dc143c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.download-btn-small:hover {
    background: #b71c1c;
}

/* --- FORMATAÇÃO DO CONTEÚDO DO EMAIL (Imagens, Citações, etc.) --- */
/* Esta parte é crucial para formatar o HTML que vem do email */

.message-body p, 
.message-body div, 
.message-body span, 
.message-body li, 
.message-body h1, 
.message-body h2, 
.message-body h3 {
    color: #ffffff !important; /* Força cor clara (Dark Mode) */
    background: transparent !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
}

.message-body .texto-simples {
    font-family: 'Consolas', 'Courier New', monospace;
    color: #f0f0f0 !important;
}

/* IMAGENS APARECENDO (Corrigido) */
.message-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid rgba(128, 128, 128, 0.3);
}

/* TABELAS (Formatadas) */
.message-body table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    max-width: 100%;
    overflow-x: auto; 
    display: block; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}
.message-body td, 
.message-body th {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}
.message-body th {
    background: rgba(220, 20, 60, 0.2);
    color: #dc143c;
}

/* CITAÇÕES (Formatadas) */
.message-body blockquote {
    border-left: 5px solid #667eea; /* Cor secundária (Azul/Roxo) */
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    background: rgba(102, 126, 234, 0.05); 
    border-radius: 0 8px 8px 0;
    padding-top: 10px;
    padding-bottom: 10px;
    color: #b0b0b0 !important; 
}

.message-body a {
    color: #74b9ff;
    text-decoration: underline;
}

/* =============================================================================
   FIM ticket-modal.HTML
   ============================================================================= */

/* *********************************************************
* Inicio CSS dos Buttons
********************************************************* */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

/* Button shimmer effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

#btnLogin {
    background: linear-gradient(135deg, #dc143c 0%, #b71c1c 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#btnLogin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.4);
    background: linear-gradient(135deg, #ff1744 0%, #dc143c 100%);
}

#btnLogin:active {
    transform: translateY(0);
}

#btnLogin::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#btnLogin:hover::before {
    left: 100%;
}

#btnLogin.loading {
    animation: pulse 2s infinite;
}


/* *********************************************************
* Inicio CSS dos Cards
********************************************************* */

.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.status-card {
    background: rgba(45, 45, 45, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.1);
}

.status-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.status-card h3 {
    color: #dc143c;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.status-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.modern-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 0;
    margin: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    color: white;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-5px);
}

.card-header {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    display: flex;
    justify-content: space-between;
}

.card-body {
    padding: 20px;
}

.ticket-card {
    background: rgba(45, 45, 45, 0.9);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.ticket-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.1);
}

.modern-card.tempo-urgente {
    background: linear-gradient(135deg, #dc143c 0%, #b71c1c 100%) !important;
    border: 2px solid #ff1744;
    animation: pulseUrgent 2s ease-in-out infinite;
}

.modern-card.tempo-critico {
    background: linear-gradient(135deg, #ff5722 0%, #d84315 100%) !important;
    border: 2px solid #ff6347;
}

.modern-card.tempo-alto {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
    border: 2px solid #ffa726;
}

/* Cores baseadas em assunto específico */
.modern-card.assunto-erro {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%) !important;
    border: 2px solid #ba68c8;
}

.modern-card.assunto-bug {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%) !important;
    border: 2px solid #f06292;
}

.modern-card.assunto-urgente {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
    border: 2px solid #ef5350;
    animation: pulseUrgent 2s ease-in-out infinite;
}

/* Animação para casos urgentes */
@keyframes pulseUrgent {
    0% { 
        box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.7);
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(220, 20, 60, 0);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(220, 20, 60, 0);
    }
}

/* Texto em cards urgentes */
.modern-card.tempo-urgente .value,
.modern-card.assunto-urgente .value {
    color: #ffffff !important;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.modern-card.tempo-urgente .label,
.modern-card.assunto-urgente .label {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* *********************************************************
* Inicio CSS dos Forms
********************************************************* */

#form_fundo {
    background: rgba(45, 45, 45, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(220, 20, 60, 0.1);
    position: relative;
    transition: all 0.3s ease;
    margin: 0 auto;
}

#form_fundo:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(220, 20, 60, 0.2);
}

#form_fundo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc143c, transparent);
    border-radius: 16px 16px 0 0;
}

#form_fundo h1 {
    text-align: center;
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 30px;
    position: relative;
}

#form_fundo h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc143c, transparent);
}

#form_frente {
    width: 100%;
}

#form_frente form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.config-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #b0b0b0;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #dc143c;
    background: rgba(26, 26, 26, 0.95);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.form-group select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* *********************************************************
* Inicio CSS dos Header
********************************************************* */

.header {
    padding: 30px 40px;
    background: rgba(45, 45, 45, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    font-weight: 400;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* *********************************************************
* Inicio CSS dos home
********************************************************* */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    color: #ffffff;
    overflow-x: hidden;
}

/* Background tech pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(220, 20, 60, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(220, 20, 60, 0.03) 0%, transparent 25%),
        linear-gradient(45deg, transparent 49%, rgba(128, 128, 128, 0.02) 50%, transparent 51%);
    background-size: 100px 100px, 80px 80px, 20px 20px;
    z-index: -1;
    animation: float 30s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.menu-configuracoes {
    position: relative;
}

.config-toggle {
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    color: #b0b0b0;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
}

.config-toggle:hover {
    background: transparent;
    color: #b0b0b0;
}

.config-opcoes {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: transparent;
    color: #b0b0b0;
    border-radius: 4px;
    /* box-shadow: 0 2px 10px rgba(0,0,0,0.1); */
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
}

.config-opcoes.show {
    display: block;
}

.config-opcoes li:last-child {
    border-bottom: none;
}

.config-opcoes a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #b0b0b0;
}

.config-opcoes a:hover {
    background: transparent;
}

.arrow {
    transition: transform 0.2s;
}

.arrow.rotated {
    transform: rotate(180deg);
}

.nav-btn {
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: #b0b0b0;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn:hover {
    background: rgba(220, 20, 60, 0.1);
    color: #ffffff;
    padding-left: 25px;
}

.nav-btn.active {
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.2), transparent);
    color: #dc143c;
    border-right: 3px solid #dc143c;
}

.nav-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #dc143c;
}

.nav-btn .icon {
    font-size: 1.2rem;
    min-width: 20px;
}

.nav-btn .text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-btn .text {
    opacity: 0;
}

.sidebar.collapsed .nav-btn {
    justify-content: center;
    padding: 15px 10px;
}


.main-content.expanded {
    margin-left: 70px;
}

.header {
    padding: 30px 40px;
    background: rgba(45, 45, 45, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    font-weight: 400;
}

.content-area {
    padding: 40px;
    min-height: calc(100vh - 120px);
}

.welcome {
    background: rgba(45, 45, 45, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.welcome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc143c, transparent);
    border-radius: 16px 16px 0 0;
}

.welcome h2 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.welcome p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Loading animation */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(128, 128, 128, 0.3);
    border-top: 3px solid #dc143c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* Status indicators */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.status-card {
    background: rgba(45, 45, 45, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.1);
}

.status-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.status-card h3 {
    color: #dc143c;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.status-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar .nav-btn .text {
        opacity: 0;
    }

    .main-content {
        margin-left: 70px;
    }

    .header {
        padding: 20px 25px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .content-area {
        padding: 25px;
    }

    .welcome {
        padding: 40px 25px;
    }

    .welcome h2 {
        font-size: 1.8rem;
    }
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(128, 128, 128, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(220, 20, 60, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 20, 60, 0.5);
}

/* *********************************************************
* Inicio CSS dos Input
********************************************************* */

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: #b0b0b0;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.input-group-fixed {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.input-group-fixed label {
    width: 120px;
    color: #ffffff;
    font-weight: 500;
    text-align: right;
    padding-right: 15px;
    flex-shrink: 0;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus {
    border-color: #dc143c;
    background: rgba(26, 26, 26, 0.95);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

input::placeholder {
    color: rgba(176, 176, 176, 0.6);
}

/* *********************************************************
* Inicio CSS dos Login
********************************************************* */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Background tech pattern */
.login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(220, 20, 60, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(220, 20, 60, 0.05) 0%, transparent 25%),
        linear-gradient(45deg, transparent 49%, rgba(128, 128, 128, 0.03) 50%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, rgba(128, 128, 128, 0.03) 50%, transparent 51%);
    background-size: 100px 100px, 80px 80px, 20px 20px, 20px 20px;
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

/* Flash message styling */
.flash_alerta {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #dc143c, #ff1744);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(220, 20, 60, 0.3);
    font-weight: 500;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

#form_fundo {
    background: rgba(45, 45, 45, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(220, 20, 60, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

#form_fundo:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(220, 20, 60, 0.2);
}

#form_fundo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc143c, transparent);
    border-radius: 16px 16px 0 0;
}

h1 {
    text-align: center;
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 30px;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc143c, transparent);
}

#form_frente {
    width: 100%;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    position: relative;
}

label {
    display: block;
    color: #b0b0b0;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #dc143c;
    background: rgba(26, 26, 26, 0.95);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

input[type="text"]:focus + label,
input[type="password"]:focus + label {
    color: #dc143c;
}

input::placeholder {
    color: rgba(176, 176, 176, 0.6);
}

#btnLogin {
    background: linear-gradient(135deg, #dc143c 0%, #b71c1c 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#btnLogin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.4);
    background: linear-gradient(135deg, #ff1744 0%, #dc143c 100%);
}

#btnLogin:active {
    transform: translateY(0);
}

#btnLogin::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#btnLogin:hover::before {
    left: 100%;
}

/* Responsive design */
@media (max-width: 480px) {
    #form_fundo {
        margin: 20px;
        padding: 30px 25px;
    }

    h1 {
        font-size: 1.8rem;
    }

    input[type="text"],
    input[type="password"] {
        padding: 12px 14px;
    }

    #btnLogin {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

/* Loading animation for button */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 20, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0); }
}

#btnLogin.loading {
    animation: pulse 2s infinite;
}

/* Tech icons decoration */
.tech-icon {
    position: absolute;
    color: rgba(220, 20, 60, 0.1);
    font-size: 1.5rem;
    animation: techFloat 15s ease-in-out infinite;
}

.tech-icon:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.tech-icon:nth-child(2) {
    top: 20%;
    right: 10%;
    animation-delay: 5s;
}

.tech-icon:nth-child(3) {
    bottom: 30%;
    left: 5%;
    animation-delay: 10s;
}

.tech-icon:nth-child(4) {
    bottom: 10%;
    right: 15%;
    animation-delay: 2s;
}

@keyframes techFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.2;
    }
}

/* *********************************************************
* Inicio CSS dos Nav
********************************************************* */

.nav-menu {
    padding: 20px 0;
}

.nav-menu-inferior {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.menu-configuracoes {
    position: relative;
}

.config-toggle {
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    color: #b0b0b0;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
}

.config-opcoes {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: transparent;
    color: #b0b0b0;
    border-radius: 4px;
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
}

.config-opcoes.show {
    display: block;
}

.arrow {
    transition: transform 0.2s;
}

.arrow.rotated {
    transform: rotate(180deg);
}

.nav-btn {
    width: 100%;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: #b0b0b0;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn:hover {
    background: rgba(220, 20, 60, 0.1);
    color: #ffffff;
    padding-left: 25px;
}

.nav-btn.active {
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.2), transparent);
    color: #dc143c;
    border-right: 3px solid #dc143c;
}

.nav-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #dc143c;
}

.nav-btn .icon {
    font-size: 1.2rem;
    min-width: 20px;
}

.nav-btn .text {
    transition: opacity 0.3s ease;
}

/* *********************************************************
* Inicio CSS dos Pesquisa
********************************************************* */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(45, 45, 45, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(220, 20, 60, 0.1);
    animation: slideIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc143c, transparent);
    border-radius: 16px 16px 0 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.modal-header h3 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.btn-fechar {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    line-height: 1;
}

.btn-fechar:hover {
    color: #dc143c;
    background: rgba(220, 20, 60, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px 30px 30px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#campoPesquisa {
    width: 100%;
    padding: 14px 16px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

#campoPesquisa:focus {
    border-color: #dc143c;
    background: rgba(26, 26, 26, 0.95);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

#campoPesquisa::placeholder {
    color: rgba(176, 176, 176, 0.6);
}

.resultados {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 8px;
    background: rgba(26, 26, 26, 0.4);
}

.resultados:empty::before {
    content: 'Digite pelo menos 2 caracteres para pesquisar...';
    display: block;
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.resultado-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    color: #ffffff;
    transition: all 0.2s ease;
    position: relative;
}

.resultado-item:last-child {
    border-bottom: none;
}

.resultado-item:hover {
    background: rgba(220, 20, 60, 0.1);
    color: #dc143c;
    transform: translateX(5px);
}

.resultado-item:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #dc143c;
}

.resultado-item:active {
    background: rgba(220, 20, 60, 0.2);
    transform: translateX(3px);
}

/* Scrollbar personalizada para resultados */
.resultados::-webkit-scrollbar {
    width: 8px;
}

.resultados::-webkit-scrollbar-track {
    background: rgba(128, 128, 128, 0.1);
    border-radius: 4px;
}

.resultados::-webkit-scrollbar-thumb {
    background: rgba(220, 20, 60, 0.3);
    border-radius: 4px;
}

.resultados::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 20, 60, 0.5);
}

/* Estados de loading */
.resultados.loading::before {
    content: 'Pesquisando...';
    display: block;
    padding: 20px;
    text-align: center;
    color: #dc143c;
    font-style: italic;
}

.resultados.no-results::before {
    content: 'Nenhum resultado encontrado';
    display: block;
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.resultados.error::before {
    content: 'Erro ao carregar resultados';
    display: block;
    padding: 20px;
    text-align: center;
    color: #e74c3c;
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .resultados {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 10px;
    }
    
    .modal-header,
    .modal-body {
        padding: 15px;
    }
    
    #campoPesquisa {
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .resultados {
        max-height: 200px;
    }
    
    .resultado-item {
        padding: 12px 15px;
    }
}

/* Estilos para pesquisa */
.resultado-item {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s;
}

.resultado-item:hover {
    background-color: rgba(220, 20, 60, 0.2);
}

.usuario-nome {
    font-weight: 600;
    color: #ffffff;
}

.loading {
    padding: 20px;
    text-align: center;
    color: #74b9ff;
    font-style: italic;
}

.sem-resultados {
    padding: 20px;
    text-align: center;
    color: #888;
    font-style: italic;
}

.erro-pesquisa {
    padding: 20px;
    text-align: center;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
    margin: 10px;
}

.resultado-item {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s;
}

.resultado-item:hover {
    background-color: rgba(220, 20, 60, 0.2);
}

.resultado-item strong {
    color: #ffffff;
    font-weight: 600;
}

.resultado-item small {
    color: #b0b0b0;
}

#resultadosPesquisa {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 10px;
    background: rgba(26, 26, 26, 0.5);
}

/* *********************************************************
* Inicio CSS dos select
********************************************************* */

select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
    /* Remove a aparência padrão do select */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Adiciona uma seta customizada */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px; /* Espaço para a seta */
}

select:focus {
    border-color: #dc143c;
    background-color: rgba(26, 26, 26, 0.95);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

select:hover {
    border-color: rgba(128, 128, 128, 0.5);
}

/* *********************************************************
* Inicio CSS dos Sidebar
********************************************************* */

.sidebar {
    width: 280px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(128, 128, 128, 0.2);
    padding: 0;
    position: fixed;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    left: -250px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar:hover {
    left: 0;
    transform: translateX(0);
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, #dc143c 0%, #b71c1c 100%);
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    position: relative;
}

.sidebar-header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    margin: 0;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-header h1 {
    opacity: 0;
}

.sidebar.collapsed .nav-btn .text {
    opacity: 0;
}

.sidebar.collapsed .nav-btn {
    justify-content: center;
    padding: 15px 10px;
}

/* *********************************************************
* Inicio CSS dos Table
********************************************************* */

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.table th {
    background: rgba(220, 20, 60, 0.1);
    color: #dc143c;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.table td {
    color: #ffffff;
}

.table tbody tr:hover {
    background: rgba(220, 20, 60, 0.05);
}

/* *********************************************************
* Inicio CSS dos Anexos
********************************************************* */


.attachment-item-small {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: rgba(45, 45, 45, 0.3);
    border-radius: 6px;
    margin-bottom: 6px;
    border: 1px solid rgba(128, 128, 128, 0.2);
}

.attachment-icon {
    font-size: 0.9rem;
    margin-right: 8px;
    opacity: 0.7;
}

.attachment-details {
    flex: 1;
}

.attachment-name {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 2px;
}

.attachment-size {
    font-size: 0.75rem;
    color: #b0b0b0;
}

.download-btn-small {
    padding: 4px 8px;
    font-size: 0.75rem;
    background: #dc143c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn-small:hover {
    background: #b71c1c;
    transform: translateY(-1px);
}

.instalacoes-page {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 20px 0;
}

.instalacoes-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.instalacoes-hero h2 {
    font-size: 1.6rem;
}

.instalacoes-hero p {
    color: rgba(255, 255, 255, 0.75);
    margin-top: 4px;
}

.instalacoes-fab {
    background: linear-gradient(135deg, #667eea, #8d82ff);
    color: #fff;
    border-radius: 999px;
    padding: 12px 22px;
    border: none;
    font-weight: 600;
    box-shadow: 0 12px 20px rgba(102, 126, 234, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.instalacoes-fab:hover {
    transform: translateY(-2px);
}

.instalacoes-section {
    background: rgba(26, 26, 26, 0.85);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.instalacoes-tabs {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.instalacoes-tab-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tab-btn {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tab-btn.active {
    border-color: rgba(116, 185, 255, 0.5);
    background: linear-gradient(180deg, rgba(116, 185, 255, 0.16), rgba(116, 185, 255, 0.08));
    box-shadow: 0 8px 20px rgba(116, 185, 255, 0.25);
    transform: translateY(-1px);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.instalacoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

@media (max-width: 900px) {
    .instalacoes-detail-history {
        max-height: 220px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .instalacoes-detail-main {
        display: flex;
        gap: 16px;
        margin-bottom: 12px;
    }

    .instalacoes-detail-section {
        flex: 1;
        min-width: 260px;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 14px;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .instalacoes-detail-observacao-form {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .instalacoes-detail-observacao-form label span {
        font-size: 0.8rem;
        letter-spacing: 0.05em;
        color: rgba(255, 255, 255, 0.7);
        text-transform: uppercase;
    }

    .instalacoes-detail-observacao-form textarea {
        min-height: 70px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.04);
        color: #fff;
        color: #ffffff;
    }
    color: #fff;
}

.instalacoes-modal-checklist-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
}

.instalacoes-modal-checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.9rem;
    color: #fff;
}

.instalacoes-modal-checklist-item button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 10px;
    cursor: pointer;
}

.modal-checklist-empty {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.instalacao-card {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.instalacao-card:hover,
.instalacao-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.instalacoes-detail-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1300;
}

.instalacoes-detail-modal.is-open {
    display: flex;
}

.instalacoes-detail-modal .instalacoes-modal-content {
    width: min(780px, 96%);
    padding: 32px 28px;
}

.instalacoes-detail-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
}

.instalacoes-detail-status-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.instalacoes-detail-status-select {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.instalacoes-detail-status-select select {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    border: none;
    padding: 6px 16px;
    font-size: 0.8rem;
    color: #fff;
    cursor: pointer;
    min-width: 180px;
}

.instalacoes-detail-label {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

.instalacoes-detail-date {
    margin: 4px 0 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.instalacoes-detail-status {
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.instalacoes-detail-history {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.instalacoes-detail-main {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    align-items: stretch;
}

.instalacoes-detail-section {
    flex: 1;
    min-width: 260px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.instalacoes-detail-observacao-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.instalacoes-detail-observacao-form label span {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.instalacoes-detail-observacao-form textarea {
    min-height: 70px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    padding: 10px;
}

@media (max-width: 900px) {
    .instalacoes-detail-main {
        flex-direction: column;
    }
}

.instalacoes-detail-section button {
    align-self: flex-start;
}


.instalacao-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.instalacao-card-header h3 {
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.instalacao-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.instalacao-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.instalacao-status-pill {
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.instalacao-status-pill.pendente {
    background: rgba(116, 185, 255, 0.15);
    border: 1px solid rgba(116, 185, 255, 0.35);
    color: #9ec5ff;
}

.instalacao-status-pill.aguardando_cliente {
    background: rgba(253, 203, 110, 0.15);
    border: 1px solid rgba(253, 203, 110, 0.5);
    color: #fddc81;
}

.instalacao-status-pill.concluido {
    background: rgba(0, 184, 148, 0.15);
    border: 1px solid rgba(0, 184, 148, 0.6);
    color: #5fe0c3;
}

.instalacao-observacao-preview {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 14px;
    min-height: 52px;
    color: rgba(255, 255, 255, 0.8);
}

.instalacao-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.instalacao-history,
.instalacao-checklist {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.instalacao-history-title {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.15);
}

.history-item p {
    margin-top: 4px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.history-item .history-type {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.history-item .history-date {
    margin-left: 12px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.history-empty {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.instalacao-checklist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.instalacao-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.instalacao-checklist-item input {
    accent-color: #67d9ff;
    width: 16px;
    height: 16px;
}

.instalacao-checklist-item input:checked + span {
    text-decoration: line-through;
    opacity: 0.6;
}

.checklist-add-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.checklist-add-form input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.instalacao-observacao-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.instalacao-observacao-form textarea {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    color: #fff;
    font-size: 0.9rem;
}

.instalacao-observacao-form button {
    align-self: flex-start;
}

.instalacoes-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.instalacoes-modal.is-open {
    display: flex;
}

.instalacoes-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.instalacoes-modal-content {
    position: relative;
    width: min(480px, 92%);
    background: rgba(26, 26, 26, 0.95);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px 26px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.instalacoes-modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    text-align: center;
}

.instalacoes-modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.instalacoes-modal-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

.instalacoes-modal-form input,
.instalacoes-modal-form textarea,
.instalacoes-modal-form select {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    color: #fff;
}

.instalacoes-modal-form textarea {
    min-height: 70px;
}

/* Atualizações */
.atualizacoes-page {
    padding-top: 28px;
    padding-bottom: 40px;
}

.atualizacoes-page .page-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.atualizacoes-page h2 {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.atualizacoes-page p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.atualizacoes-page .page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.atualizacoes-page .page-actions label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.atualizacoes-page .page-actions input[type="date"] {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.atualizacoes-page .page-actions input[type="search"] {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    min-width: 220px;
}

.atualizacoes-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.atualizacoes-panel .status-line {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
}

.atualizacoes-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.atualizacao-card {
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.atualizacao-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.atualizacao-card span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

.atualizacao-descricao {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.atualizacao-descricao .descricao-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    white-space: pre-wrap;
    word-break: break-word;
}

.empty-state {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    text-align: center;
    padding: 30px 0;
}

@media (max-width: 680px) {
    .atualizacoes-page .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .atualizacoes-page .page-actions {
        width: 100%;
    }

    .atualizacoes-page .page-actions input[type="date"] {
        width: 140px;
    }
}

/* Estilos para os cards de ticket na página de início (mais compactos) */
.tickets-grid.vertical-stack .ticket-card {
    padding: 14px;
    gap: 8px;
    padding-bottom: 56px; /* Espaço para o botão 'Detalhes' */
    padding: 10px 14px;
    gap: 2px;
    padding-bottom: 10px;
    min-height: auto;
}

.tickets-grid.vertical-stack .ticket-title {
    font-size: 1rem; /* um pouco menor */
.tickets-grid.vertical-stack .ticket-header {
    padding-bottom: 0;
    margin-bottom: 4px;
}

.tickets-grid.vertical-stack .ticket-info {
    font-size: 0.85rem; /* um pouco menor */
.tickets-grid.vertical-stack .ticket-id,
.tickets-grid.vertical-stack .ticket-status {
    font-size: 0.75rem;
    padding: 2px 8px;
}

.tickets-grid.vertical-stack .ticket-title {
    font-size: 0.95rem;
    margin-bottom: 2px;
    padding-right: 80px; /* Espaço para o botão no topo */
}

.tickets-grid.vertical-stack .ticket-info {
    font-size: 0.8rem;
    margin-bottom: 1px;
    line-height: 1.3;
}

.tickets-grid.vertical-stack .ticket-technician-row,
.tickets-grid.vertical-stack .ticket-status-row {
    margin-top: 4px;
    gap: 6px;
    margin-top: 2px;
    gap: 4px;
}

.tickets-grid.vertical-stack .open-ticket-btn {
    padding: 4px 8px;
    font-size: 0.8rem;
    bottom: 10px;
    padding: 4px 10px;
    font-size: 0.75rem;
    top: 10px;
    bottom: auto;
    right: 10px;
    min-width: auto;
}