/* RESET E BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(90deg, #0F182E 0%, #1C388B 100%);
    color: #FFFFFF;
    min-height: 100vh;
    padding: 0;
}

/* CONTAINER PRINCIPAL */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* HEADER */
.header {
    margin-bottom: 50px;
}

.header h1 {
    font-size: 38px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.header p {
    color: #CBD5E0;
    font-size: 18px;
    max-width: 500px;
}

/* STATS SECTION */
.stats-section {
    margin-bottom: 60px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.stat-card {
    background: #172440;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
}

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

.stat-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-text {
    flex: 1;
}

.stat-label {
    font-size: 16px;
    font-weight: 500;
    color: #CBD5E0;
    margin-bottom: 8px;
    display: block;
}

.stat-number {
    font-size: 28px;
    font-weight: 400;
    color: #FFFFFF;
    line-height: 1;
    display: block;
}

.stat-icon {
    font-size: 32px;
    margin-left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.stat-card:nth-child(1) .stat-icon {
    color: #4299E1;
    background: rgba(66, 153, 225, 0.1);
}

.stat-card:nth-child(2) .stat-icon {
    color: #F6AD55;
    background: rgba(246, 173, 85, 0.1);
}

.stat-card:nth-child(3) .stat-icon {
    color: #FC8181;
    background: rgba(252, 129, 129, 0.1);
}

.stat-card:nth-child(4) .stat-icon {
    color: #68D391;
    background: rgba(104, 211, 145, 0.1);
}

/* FORM SECTION */
.form-section {
    background: #172440;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 60px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-title {
    font-size: 24px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

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

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #CBD5E0;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 16px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    cursor: pointer;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #4299E1;
    background: rgba(66, 153, 225, 0.05);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A0AEC0' 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 16px center;
    background-size: 16px;
}

/* Estilos para options dos selects */
.form-select option {
    background-color: #172440;
    color: #FFFFFF;
    padding: 12px;
    font-size: 14px;
}

.form-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 16px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    min-height: 140px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

/* RATING STARS */
.rating-section {
    margin-bottom: 25px;
}

.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 12px;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    font-size: 36px;
    color: #CBD5E0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-stars label:hover,
.rating-stars label:hover ~ label,
.rating-stars input:checked ~ label {
    color: #F6AD55;
}

.rating-stars label:after {
    content: '☆';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-stars input:checked + label:after,
.rating-stars label:hover:after,
.rating-stars label:hover ~ label:after {
    content: '★';
}

.rating-value {
    margin-top: 10px;
    font-size: 14px;
    color: #CBD5E0;
}

/* UPLOAD SECTION */
.upload-section {
    margin-bottom: 25px;
}

.upload-label {
    display: block;
    padding: 40px 20px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    color: #CBD5E0;
    background: rgba(255, 255, 255, 0.03);
}

.upload-label:hover {
    border-color: #4299E1;
    background: rgba(66, 153, 225, 0.05);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #4299E1;
}

.upload-text {
    font-size: 16px;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 12px;
    color: #A0AEC0;
}

.upload-input {
    display: none;
}

.file-preview {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 14px;
    color: #CBD5E0;
}

.file-preview-item button {
    background: none;
    border: none;
    color: #FC8181;
    cursor: pointer;
    font-size: 12px;
}

.submit-btn {
    background: #4299E1;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: block;
    width: 100%;
}

.submit-btn:hover {
    background: #3182CE;
}

/* FEEDBACKS SECTION */
.feedbacks-section {
    background: #172440;
    border-radius: 16px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feedbacks-header {
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.feedbacks-title {
    font-size: 24px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 30px;
}

/* BARRA DE BUSCA - NOVO LAYOUT */
.search-container {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 16px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: #4299E1;
    background: rgba(66, 153, 225, 0.05);
    box-shadow: 0 4px 16px rgba(66, 153, 225, 0.15);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #A0AEC0;
    font-size: 16px;
}

/* CONTAINER DOS FILTROS - 3 COLUNAS */
.filters-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .filters-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #CBD5E0;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #4299E1;
    background: rgba(66, 153, 225, 0.05);
}

.filter-btn-submit {
    background: #4299E1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    grid-column: 1 / -1;
    width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.filter-btn-submit:hover {
    background: #3182CE;
    transform: translateY(-1px);
}

/* CONTADOR DE RESULTADOS */
.results-counter {
    font-size: 14px;
    color: #CBD5E0;
    margin-top: 10px;
    text-align: right;
    padding: 10px 0;
    display: flex;
    align-items: flex-start;
}

/* FEEDBACK CARDS GRID */
.feedbacks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

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

/* FEEDBACK CARD - NOVO DESIGN REORGANIZADO */
.feedback-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.feedback-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* LINHA SUPERIOR: Avatar + Nome + Status à direita */
.user-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* NO MOBILE: Status fica abaixo MAS ALINHADO À ESQUERDA */
@media (max-width: 768px) {
    .user-info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-info-header .feedback-status {
        align-self: flex-start; /* ALTERADO: de center para flex-start */
        margin-top: 10px;
        margin-left: 0;
        order: 3;
        width: auto; /* ALTERADO: de 100% para auto */
        justify-content: flex-start; /* ALTERADO: de center para flex-start */
    }
    
    .user-avatar-container {
        width: 100%;
        justify-content: flex-start;
    }
}

.user-avatar-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4299E1 0%, #667EEA 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .user-name {
        font-size: 15px;
    }
}

/* Status do feedback - à direita */
.feedback-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(104, 211, 145, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #68D391;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.feedback-status.pendente {
    background: rgba(246, 173, 85, 0.2);
    color: #F6AD55;
}

.feedback-status.revisado {
    background: rgba(104, 211, 145, 0.2);
    color: #68D391;
}

.feedback-status.rejeitado {
    background: rgba(252, 129, 129, 0.2);
    color: #FC8181;
}

.feedback-status.proxima_atualizacao {
    background: rgba(159, 122, 234, 0.2);
    color: #9F7AEA;
}

@media (max-width: 768px) {
    .feedback-status {
        padding: 10px 16px;
        font-size: 12px;
        width: auto; /* ALTERADO: de 100% para auto */
        align-self: flex-start; /* ALTERADO: de stretch para flex-start */
        text-align: left; /* ALTERADO: de center para left */
        justify-content: flex-start; /* ALTERADO: de center para flex-start */
        margin-top: 10px;
    }
}

/* LINHA DO MEIO: Tipo + App badge + Conteúdo */
.feedback-middle-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .feedback-middle-row {
        flex-direction: column;
        gap: 15px;
    }
}

.feedback-content-area {
    flex: 1;
}

.type-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #A0AEC0;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.type-badge.feedback { 
    background: rgba(66, 153, 225, 0.2);
    color: #4299E1;
}

.type-badge.bug { 
    background: rgba(252, 129, 129, 0.2);
    color: #FC8181;
}

.type-badge.sugestao { 
    background: rgba(104, 211, 145, 0.2);
    color: #68D391;
}

/* App badge à direita */
.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(59, 89, 152, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #8BA5FF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.app-badge.meshtv {
    background: rgba(59, 89, 152, 0.2);
    color: #8BA5FF;
}

.app-badge.launcher_meshtv {
    background: rgba(155, 89, 182, 0.2);
    color: #D6A3FF;
}

@media (max-width: 768px) {
    .app-badge {
        margin-top: 10px;
    }
}

/* Rating stars layout */
.feedback-rating {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-rating-stars {
    display: flex;
    gap: 4px;
}

.feedback-rating-star {
    font-size: 20px;
    color: #F6AD55;
}

.feedback-rating-value {
    font-size: 24px;
    font-weight: 700;
    color: #F6AD55;
}

/* Mensagem do feedback */
.feedback-content {
    color: #CBD5E0;
    line-height: 1.6;
    font-size: 14px;
    margin: 15px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 3px solid #4299E1;
}

@media (max-width: 768px) {
    .feedback-content {
        padding: 15px;
        font-size: 13px;
    }
}

/* ARQUIVOS ANEXADOS */
.feedback-files {
    margin-top: 15px;
}

.files-label {
    font-size: 12px;
    color: #A0AEC0;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 768px) {
    .files-list {
        flex-direction: column;
    }
}

.file-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 12px;
    color: #CBD5E0;
    text-decoration: none;
    transition: all 0.2s;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #4299E1;
}

.file-item.video {
    background: rgba(252, 129, 129, 0.1);
    color: #FC8181;
}

.file-item.image {
    background: rgba(104, 211, 145, 0.1);
    color: #68D391;
}

/* Botões de ação */
.feedback-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .feedback-actions {
        flex-direction: column;
    }
}

.action-btn {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #CBD5E0;
    text-decoration: none;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.action-btn.primary {
    background: rgba(66, 153, 225, 0.2);
    border-color: rgba(66, 153, 225, 0.3);
    color: #4299E1;
}

.action-btn.primary:hover {
    background: rgba(66, 153, 225, 0.3);
}

/* RODAPÉ DO CARD com data */
.feedback-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .feedback-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
}

.feedback-date {
    font-size: 13px;
    color: #A0AEC0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #A0AEC0;
    grid-column: 1 / -1;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #CBD5E0;
}

/* DIVIDER */
.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 40px 0;
    border: none;
}

/* ALERTAS */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(104, 211, 145, 0.1);
    color: #68D391;
    border: 1px solid rgba(104, 211, 145, 0.2);
}

.alert-error {
    background: rgba(252, 129, 129, 0.1);
    color: #FC8181;
    border: 1px solid rgba(252, 129, 129, 0.2);
}

/* MELHORIAS ADICIONAIS PARA MOBILE */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .form-section,
    .feedbacks-section {
        padding: 25px 20px;
    }
    
    .feedbacks-title {
        font-size: 20px;
    }
    
    .feedback-card {
        padding: 20px;
    }
}