:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --background: #0f172a;
    --surface: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

[v-cloak] {
    display: none;
}

body {
    background-color: var(--background);
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.auth-container, .report-container {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.report-container {
    max-width: 600px;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

h1, h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    color: #ffffff;
}

p.subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

input, select, textarea {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

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

button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

button:active {
    transform: translateY(0) scale(0.98);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-bar > div {
    min-width: 0;
    flex: 1;
}

.btn-logout {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
    flex-shrink: 0;
}

.btn-logout:hover {
    color: var(--text);
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: all 0.3s;
}

.priority-high { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.priority-low { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }

.camera-button {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.camera-button:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
    color: var(--primary);
}

.camera-button svg {
    width: 36px;
    height: 36px;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.file-input {
    display: none;
}

.file-name {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--primary);
    text-align: center;
    background: rgba(79, 70, 229, 0.1);
    padding: 0.5rem;
    border-radius: 0.5rem;
    word-break: break-all;
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    width: 100%;
}
.attachment-item {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fade-in 0.3s;
}
.attachment-item.new-item {
    border-color: rgba(16, 185, 129, 0.2);
}
.attachment-item .thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 0.3rem;
    margin-right: 0.75rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}
.attachment-item .file-name {
    flex: 1;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0;
    margin: 0;
    background: transparent;
    text-align: left;
    color: var(--text-muted);
}
.attachment-item .btn-remove {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.35rem 0.6rem;
    border-radius: 0.3rem;
    font-size: 0.75rem;
    margin-top: 0;
    width: auto;
    box-shadow: none;
}
.attachment-item .btn-remove:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: none;
}

.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    animation: fade-in 0.3s;
}

.success-box {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fade-in 0.5s;
}

.success-box h3 {
    color: #10b981;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* ========================================= */
/* ESTILOS DO NOVO DASHBOARD                 */
/* ========================================= */

.dashboard-container {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 1050px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-actions {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.btn-new-ticket {
    width: auto;
    margin-top: 0;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    box-shadow: 0 0px 15px rgba(79, 70, 229, 0.4);
}

.section-title {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.5rem;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.tickets-list::-webkit-scrollbar {
    width: 6px;
}
.tickets-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.ticket-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: transform 0.2s, border-color 0.2s;
    animation: fade-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ticket-card:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.5);
    background: rgba(15, 23, 42, 0.6);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ticket-id {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.ticket-status {
    font-size: 0.70rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 1rem;
    text-transform: uppercase;
}

.ticket-status.pendente { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }
.ticket-status.em_analise { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.3); }
.ticket-status.concluido { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }

.ticket-type {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ticket-desc {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.5;
    background: rgba(0,0,0,0.2);
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 3.5rem;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.3);
    border-radius: 1rem;
    border: 1px dashed rgba(255,255,255,0.1);
    font-size: 0.95rem;
}

.loading-state {
    text-align: center;
    padding: 2rem;
    color: var(--primary);
    font-weight: 600;
}

/* TABLE GRID STYLES */
.tickets-grid-container {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 600px;
}

.tickets-table th, .tickets-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tickets-table th {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(0,0,0,0.2);
}

.tickets-table tbody tr {
    transition: background 0.2s;
}

.tickets-table tbody tr:hover {
    background: rgba(79, 70, 229, 0.1);
}

.td-id { font-weight: 600; color: var(--text-muted); font-size: 0.85rem; }
.td-type { color: var(--primary); font-size: 0.85rem; font-weight: 600; }
.td-desc { max-width: 400px; font-size: 0.9rem; color: var(--text); line-height: 1.4; padding-right: 2rem !important; }
.td-date { font-size: 0.8rem; color: var(--text-muted); }
.td-status, .td-priority { white-space: nowrap; }

.td-priority .priority-badge {
    margin-top: 0;
}

.btn-edit {
    padding: 0.4rem 0.75rem; 
    font-size: 0.8rem; 
    font-weight: 600;
    border-radius: 0.5rem; 
    background: rgba(56, 189, 248, 0.15); 
    color: #7dd3fc; 
    border: 1px solid rgba(56, 189, 248, 0.4); 
    width: auto; 
    margin: 0; 
    box-shadow: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-edit:hover {
    background: rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

.btn-edit-admin {
    padding: 0.4rem 0.75rem; 
    font-size: 0.8rem; 
    font-weight: 600;
    border-radius: 0.5rem; 
    background: rgba(139, 92, 246, 0.15); 
    color: #c4b5fd; 
    border: 1px solid rgba(139, 92, 246, 0.4); 
    width: auto; 
    margin: 0; 
    box-shadow: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-edit-admin:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.tech-feedback {
    margin: 0;
    font-size: 0.85rem;
    background: rgba(16, 185, 129, 0.08);
    border-left: 4px solid #10b981;
    padding: 1rem 1.5rem;
    color: #a7f3d0;
    border-radius: 0 0.5rem 0.5rem 0;
}

.tech-feedback-label {
    font-weight: 700;
    color: #10b981;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.tech-feedback-content {
    line-height: 1.6;
}

.feedback-row td {
    padding: 0 1rem 1rem 1rem !important;
    border-bottom: 2px solid rgba(255,255,255,0.03);
}

.feedback-row:hover {
    background: transparent !important;
}

.admin-theme {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.2);
}

.admin-response-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.admin-response-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.btn-save {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-close-x {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.btn-close-x:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
    transform: rotate(90deg);
}

.admin-view-details {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.detail-group {
    margin-bottom: 1rem;
}

.detail-group:last-child {
    margin-bottom: 0;
}

.detail-group label {
    display: block;
    color: var(--primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.client-desc-box {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
    white-space: pre-wrap;
}

.admin-attachments-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.admin-thumb-container {
    width: 80px;
    height: 80px;
    border-radius: 0.4rem;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.admin-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.admin-thumb:hover {
    transform: scale(1.1);
}

/* LIGHTBOX */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 0.5rem;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.1);
}

.btn-close-lightbox {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    transition: transform 0.2s;
}

.btn-close-lightbox:hover {
    transform: scale(1.05);
    background: #4338ca;
}

/* RESPONSIVE STYLES */
@media (max-width: 768px) {
    body {
        display: block;
        padding: 1rem;
    }
    .auth-container, .report-container, .dashboard-container {
        padding: 1.25rem;
        border-radius: 1rem;
        margin: 0 auto 2rem auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        box-shadow: none;
    }
    .header-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        flex-wrap: wrap;
    }
    .btn-logout {
        margin-top: 0;
        padding-top: 0.5rem;
    }
    .dashboard-actions {
        justify-content: flex-start;
    }
    .dashboard-actions button {
        width: 100%;
        text-align: center;
    }
    .hide-mobile {
        display: none;
    }
    .table-responsive {
        border-radius: 0.5rem;
    }
    .tickets-table {
        min-width: 100%;
    }
    .tickets-table th, .tickets-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    .td-id {
        font-size: 0.75rem;
    }
    .td-type {
        font-size: 0.75rem;
    }
    .td-desc {
        max-width: 90px;
        font-size: 0.8rem;
    }
    .btn-edit .text {
        display: none;
    }
    .btn-edit {
        padding: 0.4rem;
        font-size: 0.9rem;
    }
    .camera-button {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    .camera-button span {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}
