/* dashboard.css */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
    --bg-color: #f4f4f9;
    --card-color: #ffffff;
    --text-color: #1a1a1a;
    --primary-color: #3a0ca3;
    --secondary-color: #4361ee;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --font-family: 'Roboto', sans-serif;
    --line-color: #4A4A4A;
}

body.dark-mode {
    --bg-color: #121212;
    --card-color: #1e1e1e;
    --text-color: #e0e0e0;
    --primary-color: #7b2cbf;
    --secondary-color: #4cc9f0;
    --line-color: #555;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--card-color);
    border-radius: 8px;
    margin-bottom: 30px;
}

.welcome-message h1 { margin: 0; font-size: 1.5rem; }
.welcome-message span { color: var(--primary-color); font-weight: bold; }
.header-actions { display: flex; align-items: center; gap: 15px; }

.theme-btn {
    background: none; border: 1px solid var(--secondary-color); color: var(--text-color);
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.2rem;
    display: flex; justify-content: center; align-items: center; transition: all 0.3s ease;
}
.theme-btn:hover { background: var(--secondary-color); color: var(--card-color); }

.logout-btn {
    background-color: var(--danger-color); color: white; border: none; padding: 10px 15px;
    border-radius: 5px; cursor: pointer; font-weight: bold; transition: background-color 0.3s;
}
.logout-btn:hover { background-color: #c82333; }

.dashboard-section {
    background-color: var(--card-color); padding: 20px; border-radius: 8px; margin-bottom: 20px;
}

.requests-list { display: flex; flex-direction: column; gap: 15px; }
.request-card {
    display: flex; justify-content: space-between; align-items: center; padding: 15px;
    background-color: var(--bg-color); border-radius: 5px; border-left: 5px solid var(--primary-color);
}
.request-info { display: flex; align-items: center; gap: 15px; }
.request-info img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.request-info p { margin: 0; }
.request-info .name { font-weight: bold; font-size: 1.1rem; }
.request-info .type { font-style: italic; color: #aaa; text-transform: uppercase; }
.request-actions button {
    padding: 8px 12px; border: none; border-radius: 5px; cursor: pointer;
    font-weight: bold; margin-left: 10px; transition: transform 0.2s;
}
.request-actions button:hover { transform: scale(1.05); }
.approve-btn { background-color: var(--success-color); color: white; }
.reject-btn { background-color: var(--danger-color); color: white; }
.empty-state { text-align: center; padding: 40px; color: #aaa; }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); display: flex; justify-content: center;
    align-items: center; z-index: 1000; opacity: 0;
    transition: opacity 0.3s ease; pointer-events: none;
}
.modal-overlay.visible { opacity: 1; pointer-events: auto; }
.modal-content {
    background-color: var(--card-color); padding: 30px; border-radius: 8px;
    width: 90%; max-width: 600px; position: relative;
    transform: scale(0.9); transition: transform 0.3s ease;
}
.modal-overlay.visible .modal-content { transform: scale(1); }
.close-modal {
    position: absolute; top: 15px; right: 15px; background: none; border: none;
    color: var(--text-color); font-size: 2rem; cursor: pointer;
}
.modal-body { margin-top: 20px; }
.details-list { list-style-type: none; padding: 0; }
.details-list li { display: flex; padding: 10px 0; border-bottom: 1px solid #333; }
.details-list li:last-child { border-bottom: none; }
.details-list .detail-title { font-weight: bold; color: var(--secondary-color); width: 200px; flex-shrink: 0; }
.details-list .detail-value { word-break: break-all; }
.details-list .detail-value a { color: var(--primary-color); text-decoration: none; }
.details-list .detail-value a:hover { text-decoration: underline; }
.details-btn { background-color: var(--secondary-color); color: white; }

.edition-modal-content { min-height: 400px; display: flex; flex-direction: column; }
.modal-step { display: none; }
.modal-step.active { display: block; }
.modal-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid #333; display: flex; justify-content: space-between; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.input-group { display: flex; flex-direction: column; margin-bottom: 15px; }
.input-group label { margin-bottom: 5px; font-weight: bold; font-size: 0.9rem; color: #aaa; }
.input-group input, .input-group select {
    padding: 10px; border: 1px solid #444; border-radius: 5px; background-color: var(--bg-color);
    color: var(--text-color); font-size: 1rem; width: 100%; box-sizing: border-box;
}
.input-group input:disabled, .input-group select:disabled { background-color: #222; cursor: not-allowed; }
.modal-btn { padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; background-color: var(--secondary-color); color: white; }
.modal-btn.primary { background-color: var(--primary-color); }

.approved-mcs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-top: 15px; }
.mc-card { display: flex; align-items: center; gap: 10px; background-color: var(--bg-color); padding: 10px; border-radius: 5px; cursor: pointer; transition: background-color 0.2s; }
.mc-card:hover { background-color: #2a2a2a; }
.mc-card img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

.matchup-group { margin-bottom: 20px; }
.matchup-group h4 { color: var(--secondary-color); margin-bottom: 10px; }
.matchup-input { display: grid; grid-template-columns: 1fr 50px auto 50px 1fr; gap: 10px; align-items: center; margin-bottom: 10px; }
.matchup-input span { text-align: center; font-weight: bold; }

.profile-card-layout { display: flex; align-items: flex-start; gap: 20px; }
.profile-avatar img { width: 120px; height: 120px; border-radius: 8px; object-fit: cover; border: 3px solid var(--secondary-color); }

.editions-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.edition-item { padding: 15px; background-color: var(--bg-color); border-radius: 5px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background-color 0.2s; }
.edition-item:hover { background-color: #2a2a2a; }
.edition-item span { font-weight: bold; }

/* --- ESTILOS PARA O CHAVEAMENTO --- */
.edition-view-modal .modal-content { max-width: 95%; width: 1400px; }
.edition-view-header { text-align: center; border-bottom: 1px solid #444; padding-bottom: 15px; margin-bottom: 20px; position: relative; }
.edition-view-header h2 { color: var(--primary-color); margin: 0; }
.edition-view-header p { margin: 5px 0 0 0; color: #aaa; }
.edition-view-header .mvp-logo { width: 80px; position: absolute; top: 0; right: 0; }

.bracket-container { display: flex; overflow-x: auto; padding: 20px 10px; }
.bracket-round { display: flex; flex-direction: column; justify-content: space-around; flex-grow: 1; min-width: 280px; }
.bracket-round h4 { text-align: center; color: var(--secondary-color); }
.bracket-matchup { background-color: var(--bg-color); border-radius: 5px; margin: 10px 0; border: 1px solid #333; position: relative; }
.bracket-matchup::after { content: ''; position: absolute; right: -22px; top: 50%; width: 22px; height: 2px; background-color: var(--line-color); }
.bracket-round:last-child .bracket-matchup::after { display: none; }
.bracket-matchup:nth-child(odd)::before, .bracket-matchup:nth-child(even)::before { content: ''; position: absolute; right: -22px; width: 2px; background-color: var(--line-color); }
.bracket-matchup:nth-child(odd)::before { top: 50%; height: calc(50% + 20px); }
.bracket-matchup:nth-child(even)::before { bottom: 50%; height: calc(50% + 20px); }

.competitor { display: flex; align-items: center; justify-content: space-between; padding: 8px; }
.competitor.winner { font-weight: bold; color: var(--text-color); }
.competitor.loser { opacity: 0.6; }
.competitor-info { display: flex; align-items: center; gap: 10px; }
.competitor-info img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.score { font-weight: bold; font-size: 1.1rem; color: var(--primary-color); }

.champion-container { text-align: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid #444; }
.champion-container h3 { color: #ffd700; font-size: 1.5rem; }
.champion-card { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 10px; }
.champion-card img { width: 100px; height: 100px; border-radius: 50%; border: 4px solid #ffd700; }
.champion-card span { font-size: 1.2rem; font-weight: bold; }

/* --- ESTILOS PARA SEÇÃO RETRÁTIL (SANFONA) --- */
.collapsible-section {
    border: none;
    padding: 0;
    margin: 0;
}
.collapsible-section summary {
    list-style: none;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding-bottom: 10px;
    margin: 0;
    width: 100%;
}
.collapsible-section summary::-webkit-details-marker { display: none; }
.collapsible-section summary h2 {
    margin: 0; display: flex; align-items: center;
    gap: 15px; width: 100%; padding: 0; border: none;
}
.request-count {
    background-color: var(--primary-color); color: white; font-size: 0.9rem; font-weight: bold;
    padding: 4px 10px; border-radius: 15px; min-width: 20px; text-align: center;
}
.collapsible-section summary::after {
    content: '▼'; font-size: 0.8rem; color: var(--text-color);
    margin-left: auto; transition: transform 0.2s;
}
.collapsible-section[open] > summary::after { transform: rotate(180deg); }
.collapsible-section-content {
    padding-top: 15px;
    border-top: 1px solid #333;
}

/* --- OUTROS ESTILOS --- */
.profile-photo-upload {
    display: flex; flex-direction: column; align-items: center;
    gap: 15px; margin-bottom: 20px;
}
.profile-photo-preview {
    width: 120px; height: 120px; border-radius: 50%;
    border: 3px solid var(--primary-color); object-fit: cover;
}
.details-list li.clickable-edition {
    cursor: pointer;
    transition: background-color 0.2s;
}
.details-list li.clickable-edition:hover {
    background-color: var(--bg-color);
}