* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

.admin-container {
    max-width: 1400px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
}

.header i {
    font-size: 48px;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1em;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.form-container {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group label i {
    color: #667eea;
    margin-right: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-group small i {
    margin-right: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.required {
    color: #e74c3c;
    font-size: 14px;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.file-upload input[type="file"] {
    display: none;
}

.file-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.file-label:hover {
    transform: translateY(-2px);
}

#file-name {
    color: #666;
    font-size: 14px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.info {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.info-item i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.info-item p {
    margin: 0;
    color: #555;
}

.info-item strong {
    color: #333;
}

/* Admin Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #f8f9fa;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

.filters {
    padding: 20px 30px;
    display: flex;
    gap: 15px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    position: relative;
}

.filter-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.refresh-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.refresh-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.tickets-list {
    padding: 30px;
    max-height: 600px;
    overflow-y: auto;
}

.ticket-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.ticket-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

.ticket-left {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-protocolo {
    font-weight: bold;
    color: #667eea;
    font-size: 18px;
}

.ticket-date {
    font-size: 12px;
    color: #999;
}

.ticket-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-pendente {
    background: #fff3cd;
    color: #856404;
}

.status-respondido {
    background: #d1ecf1;
    color: #0c5460;
}

.status-resolvido {
    background: #d4edda;
    color: #155724;
}

.ticket-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.info-item {
    margin: 5px 0;
}

.info-item strong {
    color: #555;
}

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

.ticket-descricao {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
}

.ticket-respostas {
    margin-top: 15px;
}

.resposta-item {
    background: #f8f9fa;
    padding: 15px;
    margin-top: 10px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.resposta-header {
    margin-bottom: 8px;
}

.resposta-date {
    font-size: 12px;
    color: #666;
}

.resposta-mensagem {
    margin-top: 8px;
    line-height: 1.5;
}

.ticket-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-response,
.btn-status,
.btn-view {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-response {
    background: #667eea;
    color: white;
}

.btn-status {
    background: #ff9800;
    color: white;
}

.btn-view {
    background: #6c757d;
    color: white;
}

.btn-response:hover,
.btn-status:hover,
.btn-view:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 85%;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #ddd;
}

.ticket-info-modal {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.modal-content .form-group {
    padding: 20px;
    margin: 0;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.login-box i {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 20px;
}

.login-box h2 {
    color: #333;
    margin-bottom: 30px;
}

.login-box .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 14px;
}

/* Track Page */
.track-container {
    max-width: 800px;
}

.track-form {
    padding: 40px;
}

.track-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    margin-bottom: -2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.track-result {
    padding: 30px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    animation: slideDown 0.3s ease;
}

.ticket-detail {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.resposta-card {
    background: #f8f9fa;
    padding: 15px;
    margin-top: 15px;
    border-radius: 10px;
    border-left: 3px solid #667eea;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading i {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin: 10px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ticket-actions {
        width: 100%;
    }
    
    .ticket-actions button {
        flex: 1;
    }
    
    .info {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}