/**
 * Ajuste de Dados Item - CSS Específico
 * Estende app.css para funcionalidades de coleta de dados
 */

/* === BARRA DE PROGRESSO === */
.app-progresso-section {
    background: var(--app-superficie);
    border: 1px solid var(--app-borda);
    border-radius: var(--app-raio);
    padding: 1rem;
}

.app-progresso-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.app-progresso-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--app-texto-opaco);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.app-progresso-label i {
    color: var(--app-marca);
}

.app-progresso-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--app-texto);
}

.app-progresso-bar {
    height: 8px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.app-progresso-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--app-marca), var(--app-sucesso));
    border-radius: 9999px;
    transition: width 0.5s ease;
    position: relative;
}

.app-progresso-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: app-progresso-shine 2s infinite;
}

/* === CARD PRODUTO === */
.app-produto-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05));
    border: 2px solid var(--app-marca);
    border-radius: var(--app-raio-grande);
    padding: 1.25rem;
    position: relative;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

.app-produto-ordem {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--app-marca);
}

.app-produto-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--app-texto-opaco);
    margin-bottom: 0.375rem;
}

.app-produto-nome {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--app-texto);
    margin: 0 0 0.75rem 0;
}

.app-produto-tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.app-produto-tag {
    padding: 0.125rem 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--app-borda);
    border-radius: 0.375rem;
    font-size: 0.625rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: var(--app-texto-opaco);
}

.app-produto-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.app-stat-box {
    background: var(--app-superficie);
    border: 1px solid var(--app-borda);
    border-radius: var(--app-raio);
    padding: 0.75rem;
}

.app-stat-box-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    color: var(--app-texto-opaco);
    margin-bottom: 0.25rem;
}

.app-stat-box-value {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--app-texto);
}

.app-stat-box-value .unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--app-texto-opaco);
    margin-left: 0.25rem;
}

/* === CARD COLETA === */
.app-coleta-card {
    background: var(--app-superficie);
    border: 1px solid var(--app-borda);
    border-radius: var(--app-raio-grande);
    padding: 1.25rem;
}

.app-coleta-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.app-coleta-icone {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: var(--app-raio);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-marca);
    font-size: 1.125rem;
}

.app-coleta-titulo {
    font-size: 1rem;
    font-weight: 600;
    color: var(--app-texto);
    margin: 0;
}

.app-coleta-vazio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--app-raio);
    color: var(--app-info);
    font-size: 0.875rem;
}

/* === FORM === */
.app-form-group {
    margin-bottom: 1rem;
}

.app-form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--app-texto);
    margin-bottom: 0.375rem;
}

.app-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--app-superficie-elevada);
    border: 1px solid var(--app-borda);
    border-radius: var(--app-raio);
    color: var(--app-texto);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.app-form-input:focus {
    outline: none;
    border-color: var(--app-marca);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* === EXTRATO === */
.app-extrato {
    background: var(--app-superficie);
    border: 1px solid var(--app-borda);
    border-radius: var(--app-raio-grande);
    padding: 1rem;
}

.app-extrato-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--app-texto-opaco);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.app-extrato-header i {
    color: var(--app-marca);
}

.app-extrato-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.app-extrato-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--app-borda);
}

.app-extrato-item:last-child {
    border-bottom: none;
}

.app-extrato-icone {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.app-extrato-icone.done {
    background: rgba(16, 185, 129, 0.15);
    color: var(--app-sucesso);
}

.app-extrato-icone.skipped {
    background: rgba(245, 158, 11, 0.15);
    color: var(--app-alerta);
}

.app-extrato-info {
    flex: 1;
    min-width: 0;
}

.app-extrato-nome {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--app-texto);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-extrato-meta {
    font-size: 0.6875rem;
    color: var(--app-texto-opaco);
}

.app-extrato-tempo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--app-texto-opaco);
}

.app-extrato-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--app-borda);
    color: var(--app-texto-opaco);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.app-extrato-btn:hover {
    background: var(--app-marca);
    border-color: var(--app-marca);
    color: white;
}

/* === BOTÕES DE AÇÃO === */
.app-acoes-duo {
    display: flex;
    gap: 0.75rem;
}

.app-btn-pular {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--app-borda);
    border-radius: var(--app-raio);
    color: var(--app-texto-opaco);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.app-btn-pular:hover {
    background: var(--app-alerta);
    border-color: var(--app-alerta);
    color: white;
}

.app-btn-concluir-item {
    flex: 2;
    padding: 1rem;
    background: linear-gradient(135deg, var(--app-marca), var(--app-marca-escuro));
    border: none;
    border-radius: var(--app-raio);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.app-btn-concluir-item::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;
}

.app-btn-concluir-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--app-brilho-marca);
}

.app-btn-concluir-item:hover::before {
    left: 100%;
}

/* === LINKS DE SOLICITAÇÃO === */
.app-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.app-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--app-texto-opaco);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.app-link:hover {
    color: var(--app-marca);
}

.app-link.danger:hover {
    color: var(--app-perigo);
}

/* === MODAL === */
.app-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.9);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.app-modal-overlay.ativo {
    display: flex;
}

.app-modal {
    background: var(--app-superficie);
    border: 1px solid var(--app-borda);
    border-radius: var(--app-raio-grande);
    width: 100%;
    max-width: 400px;
    animation: app-slide-up 0.3s ease-out;
}

.app-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--app-borda);
}

.app-modal-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--app-texto);
    margin: 0;
}

.app-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--app-perigo);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-modal-close:hover {
    background: var(--app-perigo);
    color: white;
}

.app-modal-body {
    padding: 1.25rem;
}

.app-modal-body p {
    color: var(--app-texto-opaco);
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

.app-modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--app-borda);
}

.app-modal-footer .app-btn {
    flex: 1;
}

/* === BOTÃO TRIGGER EXTRATO === */
.app-btn-extrato-trigger {
    width: 100%;
    padding: 0.875rem;
    background: rgba(139, 92, 246, 0.05);
    border: 1px dashed var(--app-borda);
    border-radius: var(--app-raio);
    color: var(--app-texto-opaco);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

.app-btn-extrato-trigger:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--app-marca);
    color: var(--app-marca);
}

.app-btn-extrato-trigger i {
    font-size: 1rem;
}

/* === MODAL EXTRATO OVERRIDES === */
.extrato-modal {
    max-width: 500px !important;
}

.extrato-modal .app-extrato-lista {
    padding-bottom: 1rem;
}

.extrato-modal .app-extrato-item {
    transition: background 0.2s ease;
}

.extrato-modal .app-extrato-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* --- Pulse animation for danger timer --- */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}