/**
 * assets/css/frontend.css
 *
 * Estilos principais para o front-end do 1MZ For Artists.
 * Versão Final: Abas, Toasts, Tabelas Mobile e Orçamento Limpo.
 */

/* --- TEMA GERAL (DARK MODE) --- */
.onemz-artist-dashboard, .onemz-login-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #f0f0f0;
    line-height: 1.6;
    box-sizing: border-box;
}

/* --- CONTAINER PRINCIPAL --- */
.onemz-artist-dashboard {
    max-width: 900px;
    margin: 40px auto;
    background-color: #1e1e1e;
    border-radius: 12px;
    border: 1px solid #333;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Títulos */
.onemz-artist-dashboard h2 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 700;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.onemz-artist-dashboard h3 {
    font-size: 18px;
    color: #f0b90b; /* Amarelo 1MZ */
    margin-top: 25px;
    margin-bottom: 15px;
}

.onemz-artist-dashboard p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 15px;
}

/* --- TOAST NOTIFICATIONS (UX) --- */
#rmbz-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.rmbz-toast {
    background: #333;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-left: 5px solid #555;
    min-width: 250px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    font-size: 14px;
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.rmbz-toast span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rmbz-toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Cores dos Toasts */
.rmbz-toast.success { border-left-color: #2ecc71; }
.rmbz-toast.error { border-left-color: #e74c3c; }
.rmbz-toast.info { border-left-color: #f0b90b; }


/* --- CAIXAS DE STATUS (Subscrição) --- */
.status-box {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    border: 1px solid #333;
    background-color: #252525;
}

.status-box.active {
    background-color: rgba(46, 204, 113, 0.1);
    border-color: #2ecc71;
}

.status-box.blocked {
    background-color: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
}

.status-box h3 {
    margin-top: 0;
    font-size: 20px;
    margin-bottom: 10px;
}

.status-box.active h3 { color: #2ecc71; }
.status-box.blocked h3 { color: #e74c3c; }

.status-box .price-tag {
    font-size: 32px;
    font-weight: 800;
    color: #f0b90b;
    display: block;
    margin: 15px 0;
}

/* --- ABAS DE NAVEGAÇÃO --- */
.account-tabs {
    margin-top: 40px;
    border-bottom: 1px solid #333;
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.tab-link {
    background: none;
    border: none;
    color: #888; /* Cor padrão inativa */
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tab-link:hover {
    color: #fff;
}

/* ESTADO ATIVO: Texto Amarelo e Borda Amarela */
.tab-link.active {
    color: #f0b90b; 
    border-bottom-color: #f0b90b;
}

/* --- CONTEÚDO DAS ABAS --- */
.account-tab-content {
    display: none; /* Escondido por padrão */
    animation: fadeIn 0.4s ease;
}

.account-tab-content.active {
    display: block; /* Mostra apenas se tiver a classe active */
}

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


/* --- TABELAS GERAIS (Responsive) --- */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-table th, .history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #333;
    color: #ddd;
}

.history-table th {
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    font-size: 12px;
}

/* Transformação para Mobile */
@media screen and (max-width: 768px) {
    .responsive-table thead { display: none; }
    
    .responsive-table tr {
        display: block;
        background: #252525;
        margin-bottom: 15px;
        border-radius: 8px;
        padding: 15px;
        border: 1px solid #333;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #333;
        padding: 10px 0;
        font-size: 14px;
        text-align: right;
    }
    
    .responsive-table td:last-child { border-bottom: none; }
    
    .responsive-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #888;
        text-transform: uppercase;
        font-size: 11px;
        margin-right: 15px;
        text-align: left;
    }
}


/* --- FORMULÁRIOS E INPUTS --- */
.onemz-artist-dashboard label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ccc;
    font-size: 13px;
    text-transform: uppercase;
}

.onemz-artist-dashboard input[type="text"],
.onemz-artist-dashboard input[type="number"],
.onemz-artist-dashboard input[type="email"],
.onemz-artist-dashboard input[type="tel"],
.onemz-artist-dashboard input[type="password"],
.onemz-artist-dashboard select,
.onemz-artist-dashboard textarea {
    width: 100%;
    padding: 12px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.onemz-artist-dashboard input:focus,
.onemz-artist-dashboard select:focus,
.onemz-artist-dashboard textarea:focus {
    border-color: #f0b90b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.1);
}

/* Upload de Ficheiro */
.onemz-artist-dashboard input[type="file"] {
    width: 100%;
    padding: 10px;
    background-color: #2a2a2a;
    border: 1px dashed #555;
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
}

.onemz-artist-dashboard input[type="file"]::file-selector-button {
    background-color: #444;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    margin-right: 15px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: bold;
}

.onemz-artist-dashboard input[type="file"]::file-selector-button:hover {
    background-color: #555;
}


/* --- BOTÕES --- */
.onemz-btn {
    display: inline-block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.onemz-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.onemz-btn:active {
    transform: translateY(1px);
}

.btn-primary { background-color: #f0b90b; color: #1e1e1e; }
.btn-success { background-color: #2ecc71; color: #fff; }
.btn-secondary { background-color: #444; color: #fff; }

.btn-outline {
    background: transparent;
    border: 1px solid #555;
    color: #ccc;
}
.btn-outline:hover {
    background-color: #333;
    color: #fff;
    border-color: #777;
}


/* --- MODAIS (Popups) --- */
.tickets-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    animation: fadeInModal 0.3s forwards;
}

@keyframes fadeInModal {
    to { opacity: 1; }
}

.tickets-modal-content {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    border: 1px solid #444;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    color: #f0f0f0;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close-btn:hover { color: #fff; }


/* --- PROJECT CARD (Contratos) --- */
.project-card {
    background: #222;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #f0b90b;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* --- BUDGET TABLE (Orçamento Limpo) --- */
.budget-table {
    width: 100%;
    border-collapse: collapse;
    color: #ccc;
    font-size: 14px;
    border: none; /* Remove borda externa */
}

.budget-table td {
    padding: 8px 0;
    border-bottom: 1px solid #333; /* Apenas linha divisória */
    border-top: none;
    border-left: none;
    border-right: none;
}

.budget-table tr:last-child td {
    border-bottom: none; /* Remove linha no último item */
}

.budget-table .total-row td {
    border-top: 2px solid #444; /* Linha mais grossa para o total */
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    padding-top: 15px;
}


/* --- AVISOS (Compatibilidade) --- */
.rmbz-login-warning, .rmbz-notice {
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.rmbz-notice.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}
.rmbz-notice.success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}


/* --- RESPONSIVIDADE EXTRA --- */
@media screen and (max-width: 600px) {
    .onemz-artist-dashboard {
        margin: 15px 10px;
        padding: 20px;
    }
    .onemz-artist-dashboard h2 { font-size: 20px; }
    .status-box .price-tag { font-size: 28px; }
    .onemz-btn { padding: 12px; font-size: 14px; }
    
    .account-tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    .tab-link {
        flex: 1;
        text-align: center;
        font-size: 13px;
        padding: 8px;
    }
}