/* css/partials/components.css
   Botões, cards, modals, formulários, tabelas, timeline e outros componentes
*/

/* FORM UTILITIES & CHECKBOXES */
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.form-group-checkbox input {
    width: auto;
    margin-bottom: 0;
}
.form-group-checkbox label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 400;
}
.radio-group {
    display: flex;
    gap: 20px;
    padding-top: 5px;
    padding-bottom: 5px;
    flex-wrap: wrap;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.radio-label input {
    width: auto;
    margin: 0;
}

/* Flex wrapper for horizontal checkbox layout */
.flex-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}
.flex-checkbox-group .form-group-checkbox {
    flex: 0 1 auto;
    margin-bottom: 0;
}

/* BOTÕES PRINCIPAIS (COM TEXTO) */
.button {
    padding: 10px 20px;
    border: 2px solid #8b6914;
    border-radius: var(--raio-borda);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    text-shadow: none;
}
.button.small { padding: 8px 16px; font-size: 0.8rem; }
.button.tiny { padding: 4px 8px; font-size: 0.75rem; gap: 4px; }

/* Botão de remover slot - mais visível */
.remove-slot-btn {
    padding: 6px 10px !important;
    font-size: 0.85rem !important;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: #fff !important;
    border-color: #a93226 !important;
    border: 2px solid #a93226 !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 32px;
    cursor: pointer;
}

.remove-slot-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%) !important;
    box-shadow: 0 4px 10px rgba(199, 56, 39, 0.5) !important;
    transform: translateY(-1px) !important;
}
.button.primary, .button { background: linear-gradient(135deg, #8b6914 0%, #6b5010 100%); color: #ffffff; border-color: #d4af37; box-shadow: 0 4px 12px rgba(139,105,20,0.3); }
.button.primary:hover, .button:hover { background: linear-gradient(135deg, #a67c1a 0%, #8b6914 100%); color: #ffffff; border-color: #ffd700; box-shadow: 0 6px 16px rgba(139,105,20,0.5); transform: translateY(-2px); }
.button.secondary { background: linear-gradient(135deg, #ebe4d8 0%, #f5f0e8 100%); color: #3d2817; border-color: #8b6914; font-weight: 700; }
.button.secondary:hover { background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); color: #1a0f0a; border-color: #d4af37; box-shadow: 0 4px 12px rgba(139,105,20,0.25); }
.button.danger, .button.alert { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); color: #fff; border-color: #d4af37; }
.button.danger:hover, .button.alert:hover { background: linear-gradient(135deg, #c0392b 0%, #a93226 100%); box-shadow: 0 6px 16px rgba(199, 56, 39, 0.5); }
.button.success { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); color: white; border-color: #1e8449; }
.button.success:hover { background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%); box-shadow: 0 6px 16px rgba(46, 204, 113, 0.5); }

/* BOTÕES DE AÇÃO (CIRCULARES) */
button.action-btn {
    width: 36px; height: 36px; border-radius: 50%; border: 2px solid #8b6914; cursor: pointer; transition: all 0.3s ease; position: relative; background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); color: #3d2817; padding: 0; box-shadow: 0 2px 6px rgba(139,105,20,0.2); display: flex; align-items: center; justify-content: center; font-size: 14px;
}
button.action-btn:hover { transform: translateY(-2px); color: #fff; background: linear-gradient(135deg, #d4a856 0%, #c99845 100%); border-color: #ffd700; }
button.action-btn i, button.action-btn::before { font-size: 12px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
button.action-btn.edit-client-btn:hover, button.action-btn.edit-team-btn:hover, button.action-btn.edit-hunt-team-btn:hover { background-color: var(--cor-primaria); }
button.action-btn.delete-client-btn:hover, button.action-btn.delete-quest-team-btn:hover, button.action-btn.delete-hunt-team-btn:hover, button.action-btn.alert:hover { background-color: var(--cor-alerta); }
button.action-btn.edit-client-btn::before, button.action-btn.delete-client-btn::before { display: none; }

.drop-card .button.small, .timeline-item .button.small { 
    width: 38px; 
    height: 38px; 
    border-radius: 10px;
    padding: 0; 
    font-size: 0; 
    position: relative; 
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.3) 100%),
        linear-gradient(135deg, #2a1f1a 0%, #1a0f0a 100%);
    border: 2px solid rgba(212,175,55,0.5);
    color: #d4af37;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.drop-card .button.small::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #ffd700, #d4af37);
    border-radius: 10px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.drop-card .button.small:hover, .timeline-item .button.small:hover { 
    color: #ffd700;
    border-color: #ffd700;
    transform: translateY(-4px);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.6),
        0 0 15px rgba(212,175,55,0.5),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.drop-card .button.small:hover::before {
    opacity: 0.15;
}

.drop-card .button.small.edit-status-btn:hover, .drop-card .button.small.pay-log-btn:hover { 
    color: #fff;
    border-color: var(--cor-primaria);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.6),
        0 0 20px rgba(46,204,113,0.6),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.drop-card .button.small.edit-status-btn:hover::before, 
.drop-card .button.small.pay-log-btn:hover::before { 
    background: linear-gradient(135deg, var(--cor-primaria), #27ae60);
    opacity: 0.3;
}

.drop-card .button.small.edit-drop-btn:hover, 
.timeline-item .button.small.edit-drop-btn:hover, 
.drop-card .button.small.edit-log-btn:hover, 
.timeline-item .button.small.edit-log-btn:hover { 
    color: #fff;
    border-color: #8b6914;
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.6),
        0 0 20px rgba(139,105,20,0.6),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.drop-card .button.small.edit-drop-btn:hover::before,
.drop-card .button.small.edit-log-btn:hover::before {
    background: linear-gradient(135deg, #8b6914, #d4af37);
    opacity: 0.3;
}

.timeline-item .button.small.divide-item-btn:hover { 
    color: #fff;
    border-color: var(--cor-sucesso);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.6),
        0 0 20px rgba(46,204,113,0.6);
}

.drop-card .button.small.alert:hover {
    border-color: #e74c3c;
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.6),
        0 0 20px rgba(231,76,60,0.6);
}

.drop-card .button.small i, .timeline-item .button.small i { 
    font-size: 15px; 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 4px currentColor);
    transition: filter 0.3s ease;
}

.drop-card .button.small:hover i {
    filter: drop-shadow(0 0 8px currentColor);
}

/* SLOT COMPOSITION - Times Modal */
.members-slots-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px 0;
}

.member-slot {
    background: linear-gradient(135deg, #ffffff 0%, #faf8f4 100%);
    border: 2px solid #8b6914;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.member-slot:hover {
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(139, 105, 20, 0.15);
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d4a856;
}

.slot-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #3d2817;
}

.member-slot .form-group {
    margin-bottom: 12px;
}

.member-slot .form-group:last-child {
    margin-bottom: 0;
}

.member-slot select {
    background: linear-gradient(135deg, #faf8f4 0%, #f5f0e8 100%);
    border: 2px solid #8b6914;
    border-radius: 6px;
}

.member-slot select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}

.composition-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 12px 0;
    border-top: 1px solid #d4a856;
    padding-top: 16px;
}

.composition-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #3d2817;
    display: flex;
    align-items: center;
    gap: 8px;
}

.composition-header h4 i {
    color: #8b6914;
    font-size: 1.2rem;
}

/* CLIENT GRID & CARDS */
.client-grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.client-card-themed { 
    background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); 
    border: 3px solid #8b6914; 
    border-radius: 12px; 
    box-shadow: 0 8px 20px rgba(139,105,20,0.2), inset 0 1px 0 rgba(255,255,255,0.5); 
    transition: all 0.3s ease; 
    overflow: visible;
    perspective: 1000px;
    position: relative;
    min-height: 300px;
}
.client-card-themed:hover { 
    box-shadow: 0 12px 32px rgba(139,105,20,0.3), inset 0 1px 0 rgba(255,255,255,0.7); 
    border-color: #d4af37; 
}
.card-themed-header { 
    padding: 18px; 
    border-bottom: 2px solid #8b6914; 
    background: linear-gradient(135deg, #8b6914 0%, #6b5010 100%);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}
.char-identity { display: flex; align-items: center; gap: 15px; }
.vocation-icon { font-size: 2rem; color: #ffd700; width: 40px; text-align: center; }
.char-name-level .char-name { margin: 0; font-size: 1.2rem; font-weight: 700; color: #ffd700; display: flex; align-items: center; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }
.fixed-char-badge { color: #ffd700; font-size: 0.9rem; margin-left: 8px; background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 12px; }
.char-name-level .char-level { font-size: 0.9rem; color: #d4af37; }
.card-themed-body { 
    padding: 16px 18px; 
    flex: 1; 
    background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%);
    position: relative;
    z-index: 2;
}
.quest-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.quest-status-item { padding: 12px 8px; border-radius: var(--raio-borda); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 500; }
.quest-status-item i { font-size: 1.5rem; }
.quest-status-item.status-done { background-color: #EAF6EC; color: var(--cor-sucesso); }
.quest-status-item.status-todo { background-color: #FFF8E1; color: #B08000; }
.quest-status-item.status-no-access { background-color: #F1F3F5; color: var(--cor-texto-leve); }
.card-themed-footer { padding: 12px 16px; background-color: #ffffff; border-top: 1px solid #EAE0C8; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }
.card-themed-footer .payment-info { color: #1e293b; }
.card-themed-footer .actions { display: flex; gap: 8px; }

/* STATUS BADGES */
.status, .status-badge { padding: 6px 12px; border-radius: 15px; font-size: 0.8rem; font-weight: 700; color: #fff; display: inline-block; border: 1px solid rgba(0,0,0,0.2); text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }
.status-feito, .status-pago { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); }
.status-pendente { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.status-a-fazer { background: linear-gradient(135deg, #f39c12 0%, #d68910 100%); color: #fff; }
.status-nao-contem, .status-sem-acesso { background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%); }
.status-andamento { background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); }

/* QUEST BOXES (Maker cards) */
.quests-boxes { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.quest-pill { background: #FFF4D6; border: 1px solid #F6E7A9; padding: 8px 10px; border-radius: 10px; display:flex; align-items:center; gap:8px; font-size:0.95rem; color: #6b4b00; box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset; }
.quest-pill i { color: #c08f00; font-size: 0.95rem; }
.quest-pill .quest-name { display:inline-block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quest-pill .quest-toggle-btn { background: transparent; border: none; cursor: pointer; padding: 0; margin-left: 6px; width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; transition: background 0.18s ease, transform 0.12s ease; color: #6b4b00; }
.quest-pill .quest-toggle-btn i { font-size: 0.9rem; }
.quest-pill .quest-toggle-btn:hover { transform: translateY(-2px); }
.quest-pill.done { background: #E6FFF0; border-color: #BEECCF; color: #11632b; }
.quest-pill.done i { color: #0f8b3a; }

/* Ensure icons inside quest-toggle buttons are centered and visually consistent */
.quest-pill .quest-toggle-btn i { display: inline-block; width:20px; height:20px; line-height:20px; text-align:center; border-radius:50%; background: rgba(0,0,0,0.03); color:#8a5b12; font-weight:700; font-size:14px; }
.quest-pill .quest-toggle-btn:hover i { background: rgba(0,0,0,0.06); }

/* Action buttons styled like team cards */
button.action-btn { 
    padding: 8px 16px; 
    border-radius: 8px; 
    border: 2px solid #8b6914; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    font-size: 0.9rem; 
    font-weight: 600;
    background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); 
    color: #2c1810; 
    box-shadow: 0 2px 4px rgba(139, 105, 20, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
button.action-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(139, 105, 20, 0.3); 
    border-color: #d4af37;
}
button.action-btn i { 
    font-size: 0.9rem; 
}
button.action-btn.edit-client-btn { 
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); 
    border-color: #2471a3;
    color: white;
}
button.action-btn.edit-client-btn:hover { 
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%); 
}
button.action-btn.delete-client-btn { 
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); 
    border-color: #a93226;
    color: white;
}
button.action-btn.delete-client-btn:hover { 
    background: linear-gradient(135deg, #ec7063 0%, #e74c3c 100%); 
}

/* Small visual tweaks for header */
.char-identity { gap: 12px; }
.vocation-icon { width: 44px; height: 44px; display:flex; align-items:center; justify-content:center; border-radius: 8px; background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.01)); }
.char-name-level .char-name { font-size: 1.05rem; }

/* RPG-themed tweaks: parchment header, subtle runes divider, and ornate badges */
.client-card-themed.rpg { background: linear-gradient(180deg, #fffdfa, #fbf7f0); border: 1px solid rgba(80,55,20,0.06); box-shadow: 0 10px 30px rgba(30,20,10,0.07); }
.client-card-themed.rpg .card-themed-header { background: linear-gradient(180deg, #fffdfa, #fff6e6); padding: 18px 20px; border-bottom: 1px dashed rgba(160,120,40,0.12); box-shadow: inset 0 -6px 12px rgba(255,255,255,0.6); }
.client-card-themed.rpg .vocation-icon { background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6), rgba(0,0,0,0.02)); border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.client-card-themed.rpg .char-name-level .char-name { font-weight: 700; color: #2b220f; letter-spacing: 0.2px; }
.client-card-themed.rpg .char-level { color: #7a5a28; font-size: 0.9rem; }
.client-card-themed.rpg .card-themed-body { background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(250,246,237,0.6)); padding: 18px; }
.client-card-themed.rpg .card-themed-footer { background: linear-gradient(180deg, #fffdf8, #f8f4ec); border-top: 1px solid rgba(200,170,100,0.06); padding: 12px 16px; }

/* Quest pill ornament for RPG look */
.client-card-themed.rpg .quest-pill { background: linear-gradient(180deg,#fff3cb,#ffeb9a); border: 1px solid rgba(170,130,40,0.18); padding: 8px 12px; border-radius: 12px; box-shadow: 0 2px 0 rgba(0,0,0,0.03), inset 0 1px 0 rgba(255,255,255,0.7); font-weight: 600; }
.client-card-themed.rpg .quest-pill i { margin-right: 6px; }
.client-card-themed.rpg .quest-pill .quest-toggle-btn { background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.04); width:30px; height:30px; display:flex; align-items:center; justify-content:center; padding:0; }
/* Ensure the icon inside the toggle button is centered and has no extra margin */
.client-card-themed.rpg .quest-pill .quest-toggle-btn i { margin:0 !important; display:inline-block; width:16px; height:16px; line-height:16px; font-size:12px; transform:none !important; }
.client-card-themed.rpg .quest-pill.done { background: linear-gradient(180deg,#e6ffef,#d6f9e6); border-color: rgba(40,150,80,0.12); color: #0f6b37; }

/* Small decorative divider line to emulate parchment sections */
.client-card-themed .parchment-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(200,180,120,0.25), transparent); margin: 12px 0; }

/* Make header icons more ornate */
.client-card-themed .fixed-char-badge { background: linear-gradient(180deg,#fff9e8,#fff2c9); padding: 4px 8px; border-radius: 8px; color: #8a5b12; font-weight:700; box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset; }

/* Footer layout improvements to avoid cutting and overlapping */
.card-themed-footer { 
    padding: 12px 16px; 
    background: linear-gradient(180deg, #fffdf8, #f8f4ec);
    border-top: 1px solid rgba(200,170,100,0.2);
    display: flex; 
    flex-direction: column;
    gap: 10px; 
    font-size: 0.9rem;
    flex-shrink: 0;
}

.footer-actions-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.footer-actions-row .action-btn {
    flex: 1;
}

.flip-details-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #8b6914 0%, #6b5010 100%);
    border: 2px solid #d4af37;
    color: #ffd700;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 0 0 9px 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(139, 105, 20, 0.3), inset 0 1px 0 rgba(255, 215, 0, 0.2);
    flex-shrink: 0;
}

.flip-details-btn:hover {
    background: linear-gradient(135deg, #d4af37 0%, #8b6914 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 105, 20, 0.4);
}

.flip-details-btn i {
    font-size: 1.1rem;
}

.card-back-note {
    display: none !important;
}

/* Action buttons styled like team cards */
button.action-btn { 
    padding: 10px 16px; 
    border-radius: 8px; 
    border: 2px solid #8b6914; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    font-size: 0.9rem; 
    font-weight: 700;
    background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); 
    color: #2c1810; 
    box-shadow: 0 2px 4px rgba(139, 105, 20, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
button.action-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(139, 105, 20, 0.3); 
    border-color: #d4af37;
}
button.action-btn.edit-client-btn { 
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); 
    border-color: #2471a3;
    color: white;
}
button.action-btn.edit-client-btn:hover { 
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%); 
}
button.action-btn.delete-client-btn { 
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); 
    border-color: #a93226;
    color: white;
}
button.action-btn.delete-client-btn:hover { 
    background: linear-gradient(135deg, #ec7063 0%, #e74c3c 100%); 
}

.card-themed-footer .footer-left { display:flex; gap:8px; align-items:center; min-width:0; }
.card-themed-footer .footer-center { display:flex; flex-direction:row; gap:12px; align-items:center; min-width:0; flex:1; }
.card-themed-footer .footer-right { display:flex; gap:8px; align-items:center; flex:0 0 auto; }
.card-themed-footer .link-status { flex: 0 0 auto; }
.card-themed-footer .payment-info { color: #1e293b; white-space: normal; overflow: visible; text-overflow: unset; min-width:0; flex:1 1 auto; }

/* On small cards, allow payment text to wrap onto a second line instead of truncating */
@media (max-width: 420px) {
    .card-themed-footer .footer-center { flex-direction: column; align-items: flex-start; gap:6px; }
    .card-themed-footer .payment-info { white-space: normal; }
}

/* Link status badge */
.link-status { display:inline-block; padding:6px 10px; border-radius:10px; font-size:0.85rem; font-weight:700; margin-bottom:2px; }
.link-status.pending { background:#fff4e6; color:#8a6d00; border:1px solid #ffe4b5; }
.link-status.accepted { background:#e6ffed; color:#137a10; border:1px solid #c7f0d0; }
.link-status.rejected { background:#ffecec; color:#a00; border:1px solid #f5c6c6; }

/* Make quests vertical in cards to match design */
.quests-boxes { display:flex; flex-direction:column; gap:10px; margin-top:8px; }
.quest-pill { background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); border: 2px solid #8b6914; padding: 10px 14px; border-radius: 12px; display:flex; align-items:center; gap:8px; font-size:0.95rem; color: #3d2817; box-shadow: 0 4px 10px rgba(139,105,20,0.15), inset 0 1px 0 rgba(255,255,255,0.7); font-weight: 600; transition: all 0.3s ease; }
.quest-pill:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(139,105,20,0.25), inset 0 1px 0 rgba(255,255,255,0.7); border-color: #d4af37; }

/* MODAL (GERAL) */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s 0.2s; backdrop-filter: blur(4px); }
.modal-overlay.active { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }
.modal-content { background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); border-radius: 15px; box-shadow: 0 20px 50px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.5); width: 92%; max-width: 600px; transform: scale(0.95); transition: transform 0.2s ease; display: flex; flex-direction: column; max-height: 90vh; border: 3px solid #8b6914; overflow-y: auto; box-sizing: border-box; padding: 24px; }
.modal-content.large { max-width: 800px; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-header, .modal-footer, .modal-body { padding: 20px 24px; }
.modal-header { border-bottom: 2px solid #8b6914; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; background: rgba(212, 175, 55, 0.1); }
.modal-footer, .modal-actions { border-top: 2px solid #8b6914; padding: 14px 24px; flex-shrink: 0; background-color: rgba(212, 175, 55, 0.05); display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 0 -24px -24px -24px; }
.modal-body { overflow-y: auto; color: #f0ead2; }
.modal-overlay#alert-modal .modal-body { color: #3d2817; }
.modal-overlay#alert-modal #alert-modal-message { color: #3d2817; font-weight: 500; line-height: 1.45; }
.modal-overlay#alert-modal #alert-modal-title { color: #facc15; }

/* Ensure alert modal is above other page-specific modals (e.g. .up-modal) */
.modal-overlay#alert-modal {
    z-index: 1000001;
}
.modal-overlay#alert-modal .modal-content {
    z-index: 1000002;
}
.modal-header h2 { margin: 0; border: none; padding: 0; font-size: 1.2rem; font-weight: 700; color: #f0ead2; text-shadow: none; }
.close-modal-btn { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: #f0ead2; line-height: 1; transition: all 0.2s ease; font-weight: 700; }
.close-modal-btn:hover { color: #ffffff; transform: scale(1.1); }
.modal-footer .button { min-width: 120px; height: 40px; padding: 0 16px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }

/* Team Log Modals - Title styling */
.modal-content h2 { margin: 0 0 20px 0; padding-bottom: 12px; border-bottom: 2px solid #8b6914; font-size: 1.2rem; font-weight: 700; color: #1a0f0a; text-shadow: none; }
.modal-content form { flex: 1; display: flex; flex-direction: column; }
.modal-content .form-group:last-of-type { margin-bottom: 20px; }

/* Custom scrollbar for modals */
.modal-content::-webkit-scrollbar { width: 10px; }
.modal-content::-webkit-scrollbar-track { background: rgba(139, 105, 20, 0.1); border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #d4af37 0%, #c99845 100%); border-radius: 10px; border: 2px solid rgba(245, 240, 232, 0.5); }
.modal-content::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, #c99845 0%, #b8893a 100%); }
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: rgba(139, 105, 20, 0.05); border-radius: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.5); border-radius: 8px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.7); }

/* Confirm & Prompt modal refinements */
#delete-confirm-modal .modal-content,
#prompt-modal .modal-content {
    max-width: 520px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(124, 58, 237, 0.18);
    box-shadow: 0 18px 40px rgba(30, 41, 59, 0.25);
}

#delete-confirm-modal .modal-body,
#prompt-modal .modal-body {
    padding: 18px 24px 12px;
    color: #475569;
    font-size: 0.98rem;
}

/* ========== SPLIT DETAILS MODAL - RPG STYLING (SEM REWRITE JS) ========== */
#split-details-modal .modal-content {
    border: 2px solid #b8860b;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    max-width: 860px;
    width: 96%;
    max-height: 92vh;
    overflow: visible; /* allow internal scrolling via modal-body */
    padding: 0 !important;
}

#split-details-modal .modal-header {
    background: linear-gradient(135deg, #3a1f10 0%, #4b2712 60%, #2f180d 100%);
    border-bottom: 2px solid #b8860b;
    padding: 12px 16px !important;
}

#split-details-modal .modal-header h2 {
    color: #d4af37 !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

#split-details-modal .close-modal-btn {
    color: #f2d77a !important;
}

#split-details-modal .modal-body {
    background: linear-gradient(135deg, #1e110a 0%, #2b160c 55%, #1a0f09 100%);
    color: #f0ead2 !important;
    border-top: 1px solid rgba(212, 175, 55, 0.25);
    padding: 8px 10px !important;
    /* internal vertical scroll allowed, horizontal overflow hidden to avoid scrollbars */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(92vh - 84px) !important;
}

#split-details-modal .results-wrapper {
    background: transparent !important;
    padding: 8px 10px !important;
    color: #f0ead2 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

#split-details-modal .results-wrapper > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 6px;
}

#split-details-modal .results-wrapper > div:first-child > div {
    background: rgba(212, 175, 55, 0.06) !important;
    border: 1px solid rgba(212, 175, 55, 0.24) !important;
    border-radius: 8px;
    padding: 8px 10px !important;
}

#split-details-modal .transfer-text {
    color: #f0ead2 !important;
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
}

/* Allow explicit line breaks inside transfer-text to render normally */
#split-details-modal .transfer-text br {
    display: initial !important;
}

/* Make the Hunt title in details modal stand out in yellow */
#split-details-modal .solo-title h5 {
    color: #ffd700 !important;
}

#split-details-modal .transfer-text small {
    display: inline;
    margin-left: 6px;
    font-size: 0.82rem !important;
}

#split-details-modal .transfer-text strong {
    color: #ffd700 !important;
    font-weight: 700;
}

#split-details-modal .copy-to-clipboard-btn {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.1)) !important;
    border: 1px solid rgba(212, 175, 55, 0.55) !important;
    color: #ffe08a !important;
    border-radius: 7px !important;
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
}

/* Transfer copy buttons with icon */
#split-details-modal .results-wrapper > div:first-child .copy-to-clipboard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 22px;
    min-width: 58px;
    padding: 0 8px 0 7px !important;
    border-radius: 7px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    color: #efcc70 !important;
    border: 1px solid #8f6f1e !important;
    background: linear-gradient(180deg, #6e5718 0%, #5e4a14 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 221, 120, 0.22), 0 1px 3px rgba(0, 0, 0, 0.35);
    position: relative;
}

#split-details-modal .results-wrapper > div:first-child .copy-to-clipboard-btn::before {
    content: '\f0c5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    line-height: 1;
    color: #d7b355;
}

#split-details-modal .results-wrapper > div:first-child .copy-to-clipboard-btn i {
    display: none !important;
}

#split-details-modal .copy-to-clipboard-btn:hover {
    color: #ffe08a !important;
    background: linear-gradient(180deg, #7a611c 0%, #685317 100%) !important;
    border-color: #a9832b !important;
    box-shadow: inset 0 1px 0 rgba(255, 230, 140, 0.3), 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Inline split result below "Analisar Log" should match modal visuals */
#split-results-container {
    border: 2px solid #b8860b !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #1e110a 0%, #2b160c 55%, #1a0f09 100%) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55) !important;
    overflow: hidden;
}

#split-results-container .results-wrapper {
    background: transparent !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #f0ead2 !important;
    font-family: inherit !important;
    box-shadow: none !important;
}

#split-results-container .results-wrapper > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 6px;
}

#split-results-container .results-wrapper > div:first-child > div {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    margin-bottom: 0 !important;
    background: rgba(212, 175, 55, 0.06) !important;
    border: 1px solid rgba(212, 175, 55, 0.24) !important;
    border-left: 3px solid rgba(212, 175, 55, 0.45) !important;
    border-radius: 8px;
    padding: 8px 10px 8px 36px !important;
    position: relative;
}

#split-results-container .results-wrapper > div:first-child > div::before {
    content: '\2694';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #ffd700;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}

#split-results-container .results-wrapper > div:first-child > div:nth-child(2)::before {
    content: '\26A1';
}

#split-results-container .results-wrapper > div:first-child > div:nth-child(3)::before {
    content: '\1F6E1';
}

#split-results-container .transfer-text,
#split-results-container .results-wrapper p,
#split-results-container .results-wrapper span {
    color: #f0ead2 !important;
}

#split-results-container .transfer-text small {
    display: inline;
    margin-left: 6px;
    font-size: 0.82rem !important;
}

#split-results-container .transfer-text strong,
#split-results-container .results-wrapper p strong {
    color: #ffd700 !important;
    font-weight: 700 !important;
}

#split-results-container .results-wrapper > div:nth-child(2) {
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(212, 175, 55, 0.35) !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    padding: 8px !important;
}

#split-results-container .results-wrapper p {
    margin: 0 !important;
    text-align: center !important;
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
    position: relative;
    padding: 7px 9px 7px 30px !important;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
}

#split-results-container .results-wrapper > div:nth-child(2) p::before {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffd700;
    font-size: 0.9rem;
}

#split-results-container .results-wrapper > div:nth-child(2) p:nth-child(1)::before {
    content: '\1F4B0';
}

#split-results-container .results-wrapper > div:nth-child(2) p:nth-child(2)::before {
    content: '\23F1';
}

#split-results-container .results-wrapper > div:nth-child(2) p:nth-child(3)::before {
    content: '\2694';
}

#split-results-container .results-wrapper > div:nth-child(2) p:nth-child(4)::before,
#split-results-container .results-wrapper > div:nth-child(2) p:nth-child(5)::before {
    content: '\1F98E';
}

#split-results-container .results-wrapper > div:nth-child(2) p:nth-child(3),
#split-results-container .results-wrapper > div:nth-child(2) p:nth-child(4),
#split-results-container .results-wrapper > div:nth-child(2) p:nth-child(5) {
    grid-column: 1 / -1;
}

#split-results-container .results-wrapper p[style*="margin-top: 20px"] {
    margin-top: 0 !important;
}

#split-results-container .results-wrapper .copy-to-clipboard-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    height: 22px !important;
    min-width: 58px !important;
    padding: 0 8px 0 7px !important;
    border-radius: 7px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    color: #efcc70 !important;
    border: 1px solid #8f6f1e !important;
    background: linear-gradient(180deg, #6e5718 0%, #5e4a14 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 221, 120, 0.22), 0 1px 3px rgba(0, 0, 0, 0.35) !important;
    position: relative;
}

#split-results-container .results-wrapper > div:first-child .copy-to-clipboard-btn::before {
    content: '\f0c5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    line-height: 1;
    color: #d7b355;
}

#split-results-container .results-wrapper > div:first-child .copy-to-clipboard-btn i {
    display: none !important;
}

#split-results-container .results-wrapper .copy-to-clipboard-btn:hover {
    color: #ffe08a !important;
    background: linear-gradient(180deg, #7a611c 0%, #685317 100%) !important;
    border-color: #a9832b !important;
    box-shadow: inset 0 1px 0 rgba(255, 230, 140, 0.3), 0 2px 6px rgba(0, 0, 0, 0.35) !important;
}

#split-results-container .results-wrapper > div:last-child {
    margin-top: 14px !important;
}

#split-results-container .results-wrapper > div:last-child .copy-to-clipboard-btn {
    min-width: 210px;
    padding: 7px 12px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px;
}

@media (max-width: 700px) {
    #split-results-container .results-wrapper {
        padding: 8px 6px !important;
    }

    #split-results-container .results-wrapper > div:first-child > div {
        padding: 8px 8px 8px 30px !important;
    }

    #split-results-container .transfer-text {
        font-size: 0.84rem !important;
    }

    #split-results-container .results-wrapper > div:nth-child(2) {
        grid-template-columns: 1fr;
    }

    #split-results-container .results-wrapper > div:nth-child(2) p {
        font-size: 0.86rem !important;
        text-align: left !important;
    }
}

#split-details-modal .results-wrapper > div:nth-child(2) {
    margin-top: 8px !important;
    padding-top: 8px !important;
    border-top: 1px solid rgba(212, 175, 55, 0.35) !important;
}

#split-details-modal .results-wrapper > div:nth-child(2) p {
    color: #f0ead2 !important;
    font-size: 0.92rem !important;
    margin: 0 !important;
}

#split-details-modal .results-wrapper > div:nth-child(2) p strong {
    color: #ffd700 !important;
}

#split-details-modal .results-wrapper > div:last-child {
    margin-top: 14px !important;
}

/* RPG refinement: clearer sections + thematic icons */
#split-details-modal .results-wrapper > div:first-child > div {
    position: relative;
    padding: 8px 10px 8px 36px !important;
    border-left: 3px solid rgba(212, 175, 55, 0.45) !important;
}

#split-details-modal .results-wrapper > div:first-child > div:before {
    content: '\2694';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #ffd700;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}

#split-details-modal .results-wrapper > div:first-child > div:nth-child(2):before {
    content: '\26A1';
}

#split-details-modal .results-wrapper > div:first-child > div:nth-child(3):before {
    content: '\1F6E1';
}

#split-details-modal .results-wrapper > div:nth-child(2) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    padding: 8px !important;
}

#split-details-modal .results-wrapper > div:nth-child(2) p {
    position: relative;
    margin: 0 !important;
    padding: 7px 9px 7px 30px !important;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
}

#split-details-modal .results-wrapper > div:nth-child(2) p:before {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffd700;
    font-size: 0.9rem;
}

#split-details-modal .results-wrapper > div:nth-child(2) p:nth-child(3),
#split-details-modal .results-wrapper > div:nth-child(2) p:nth-child(4),
#split-details-modal .results-wrapper > div:nth-child(2) p:nth-child(5) {
    grid-column: 1 / -1;
}

#split-details-modal .results-wrapper > div:nth-child(2) p:nth-child(1):before {
    content: '\1F4B0';
}

#split-details-modal .results-wrapper > div:nth-child(2) p:nth-child(2):before {
    content: '\23F1';
}

#split-details-modal .results-wrapper > div:nth-child(2) p:nth-child(3):before {
    content: '\2694';
}

#split-details-modal .results-wrapper > div:nth-child(2) p:nth-child(4):before,
#split-details-modal .results-wrapper > div:nth-child(2) p:nth-child(5):before {
    content: '\1F98E';
}

#split-details-modal .results-wrapper > div:last-child .copy-to-clipboard-btn {
    min-width: 210px;
    padding: 7px 12px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px;
}

@media (max-width: 700px) {
    #split-details-modal .results-wrapper {
        padding: 8px 6px !important;
    }

    #split-details-modal .results-wrapper > div:first-child > div {
        padding: 8px 8px 8px 30px !important;
    }

    #split-details-modal .transfer-text {
        font-size: 0.84rem !important;
    }

    #split-details-modal .results-wrapper > div:nth-child(2) {
        grid-template-columns: 1fr;
    }

    #split-details-modal .results-wrapper > div:nth-child(2) p {
        font-size: 0.86rem !important;
        text-align: left !important;
    }
}

#delete-confirm-modal .modal-header,
#prompt-modal .modal-header {
    background: rgba(124, 58, 237, 0.05);
}

#delete-confirm-modal .modal-header h2,
#prompt-modal .modal-header h2 {
    color: #1e1b4b;
    letter-spacing: 0.3px;
}

#delete-confirm-modal .modal-footer,
#prompt-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#delete-confirm-modal .modal-footer .button,
#prompt-modal .modal-footer .button {
    width: 50%;
    height: 42px;
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 42px;
    font-weight: 700;
}

#delete-confirm-modal .button.secondary,
#prompt-modal .button.secondary {
    background: linear-gradient(135deg, #ebe4d8 0%, #e0d8cc 100%);
    color: #3d2817;
    border: 2px solid #8b6914;
    box-shadow: 0 4px 10px rgba(139,105,20,0.15);
    font-weight: 700;
}

#delete-confirm-modal .button.alert,
#prompt-modal .button.primary {
    background: linear-gradient(135deg, #d4a856 0%, #c99845 100%);
    color: #1a0f0a;
    border: 2px solid #8b6914;
    box-shadow: 0 8px 18px rgba(139,105,20,0.3);
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(255, 215, 0, 0.2);
}

/* HARD OVERRIDE: confirmation modal alignment */
.confirm-modal .confirm-modal-content {
    max-width: 520px !important;
    background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%) !important;
    border: 3px solid #8b6914 !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.5) !important;
    overflow: hidden !important;
}

.confirm-modal .modal-header {
    background: rgba(212, 175, 55, 0.15) !important;
}

.confirm-modal .modal-header h2 {
    color: #3d2817 !important;
    letter-spacing: 0.3px !important;
    text-shadow: 1px 1px 2px rgba(255, 215, 0, 0.2) !important;
}

.confirm-modal .confirm-modal-footer {
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 12px !important;
}

.confirm-modal .confirm-modal-footer .button {
    width: 50% !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    line-height: 42px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    align-self: stretch !important;
}

@media (max-width: 480px) {
    .confirm-modal .confirm-modal-footer {
        flex-direction: column !important;
    }
    .confirm-modal .confirm-modal-footer .button {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    #delete-confirm-modal .modal-footer,
    #prompt-modal .modal-footer {
        flex-direction: column;
    }
    #delete-confirm-modal .modal-footer .button,
    #prompt-modal .modal-footer .button {
        width: 100%;
    }
}

#delete-confirm-modal .button.secondary,
#prompt-modal .button.secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid rgba(51, 65, 85, 0.12);
}

#delete-confirm-modal .button.alert,
#prompt-modal .button.primary {
    border: none;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}
label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 0.9rem; color: #2c1810; text-shadow: none; }
input[type="text"], input[type="number"], input[type="search"], input[type="date"], input[type="password"], select, textarea { width: 100%; padding: 12px; border: 2px solid #8b6914; border-radius: 8px; box-sizing: border-box; margin-bottom: 16px; transition: all 0.3s ease; font-family: inherit; font-size: 1rem; background: linear-gradient(135deg, #faf8f4 0%, #f5f0e8 100%); color: #3d2817; }\ninput::placeholder, textarea::placeholder { color: #8b6914; opacity: 0.7; }\ninput:focus, select:focus, textarea:focus { outline: none; border-color: #d4af37; box-shadow: 0 0 12px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255,255,255,0.5); background: linear-gradient(135deg, #ffffff 0%, #faf8f4 100%); }
select option:disabled { color: #999; opacity: 0.6; font-style: italic; }

/* FILTROS E PESQUISA */
.filter-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.search-wrapper { position: relative; }
.search-wrapper .search-icon { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); width: 20px; height: 20px; fill: #8b6914; pointer-events: none; }
#client-search-input { width: 250px; padding: 10px 15px 10px 40px; border: 2px solid #8b6914; border-radius: 8px; font-size: 0.9rem; transition: all 0.3s ease; background: linear-gradient(135deg, #faf8f4 0%, #f5f0e8 100%); box-sizing: border-box; margin-bottom: 0; color: #3d2817; }\n#client-search-input:focus { outline: none; border-color: #d4af37; box-shadow: 0 0 12px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255,255,255,0.5); }
#client-search-input::placeholder { color: #8b6914; opacity: 0.7; }

/* Quest filter buttons */
.quest-filter-controls { display:flex; gap:8px; align-items:center; }
.quest-filter-btn { background: linear-gradient(135deg, #ebe4d8 0%, #e0d8cc 100%); border: 2px solid #8b6914; color: #3d2817; padding:8px 12px; border-radius:10px; font-weight:700; transition: all 0.3s ease; }
.quest-filter-btn.active, .quest-filter-btn:hover { background: linear-gradient(135deg, #d4a856 0%, #c99845 100%); color: #1a0f0a; border-color: #8b6914; box-shadow: 0 4px 10px rgba(139,105,20,0.25); }

/* Add buttons - align to right */
.add-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-bottom: 20px;
    width: 100%;
}

/* header position so status badge can be absolutely placed */
.card-themed-header { position: relative; }

/* Status badge in header (moved from footer) */
.card-themed-header .status-badge { position: absolute; right: 16px; top: 12px; padding:6px 10px; border-radius:10px; font-weight:700; font-size:0.85rem; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.card-themed-header .status-badge.pending { background:#fff4e6; color:#8a6d00; border:1px solid #ffe4b5; }
.card-themed-header .status-badge.accepted { background:#e6ffed; color:#0f6b37; border:1px solid #c7f0d0; }
.card-themed-header .status-badge.rejected { background:#ffecec; color:#8a1b1b; border:1px solid #f5c6c6; }

/* small badge for filter result counts */
.filter-count-badge { display:inline-block; min-width:28px; padding:6px 8px; background: linear-gradient(135deg, #d4a856 0%, #c99845 100%); color:#1a0f0a; border-radius:12px; font-weight:700; font-size:0.85rem; text-align:center; margin-left:8px; border: 1px solid #8b6914; text-shadow: 1px 1px 2px rgba(255, 215, 0, 0.2); }

/* DROPS & TEAM LOG */
.count-badge { background: linear-gradient(135deg, #d4a856 0%, #c99845 100%); color: #1a0f0a; font-size: 0.75rem; padding: 4px 10px; border-radius: 10px; font-weight: 700; border: 1px solid #8b6914; text-shadow: 1px 1px 2px rgba(255, 215, 0, 0.2); }
.drop-cards-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 28px;
    padding: 10px;
}

.empty-drop-message {
    color: #ffffff;
}

.empty-tab-state {
    min-height: 0;
    display: block;
    padding-top: 0;
}

.drop-card { 
    background: 
        radial-gradient(circle at top right, rgba(212,175,55,0.15), transparent 60%),
        radial-gradient(circle at bottom left, rgba(139,105,20,0.1), transparent 60%),
        linear-gradient(135deg, #2a1f1a 0%, #1a0f0a 100%);
    border: 3px solid #d4af37;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 0 1px rgba(212,175,55,0.4),
        inset 0 2px 1px rgba(255,255,255,0.1),
        inset 0 -2px 10px rgba(0,0,0,0.3);
    padding: 32px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Moldura ornamental superior */
.drop-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #d4af37 15%, 
        #ffd700 50%, 
        #d4af37 85%, 
        transparent 100%);
    box-shadow: 0 0 10px rgba(212,175,55,0.8);
}

/* Efeito de brilho holográfico animado */
.drop-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255,255,255,0.03) 40%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.03) 60%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shimmer 8s infinite linear;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.drop-card:hover::after {
    opacity: 1;
}

.drop-card:hover { 
    transform: translateY(-10px) rotateX(2deg);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.8),
        0 0 30px rgba(212,175,55,0.5),
        0 0 0 1px rgba(212,175,55,0.6),
        inset 0 2px 1px rgba(255,255,255,0.2),
        inset 0 -2px 10px rgba(0,0,0,0.3);
    border-color: #ffd700;
}

.drop-card h3 { 
    margin: 0 0 24px 0; 
    font-size: 1.2rem; 
    color: #ffd700; 
    border: none; 
    padding: 0 0 12px;
    display: block; 
    font-weight: 800;
    text-shadow: 
        0 0 10px rgba(255,215,0,0.8),
        0 2px 4px rgba(0,0,0,0.8),
        0 0 20px rgba(255,215,0,0.4);
    text-align: center; 
    width: 100%;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: 'Trebuchet MS', 'Lucida Grande', sans-serif;
    border-bottom: 2px solid rgba(212,175,55,0.3);
    position: relative;
}

.drop-card h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    box-shadow: 0 0 10px rgba(255,215,0,0.6);
}

.drop-card p { 
    margin: 8px 0; 
    font-size: 0.95rem; 
    color: #e8dfc8; 
    line-height: 1.8; 
    width: 100%; 
    text-align: center;
    position: relative;
    padding: 4px 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    border-left: 2px solid rgba(212,175,55,0.4);
}

.drop-card p strong { 
    font-weight: 700; 
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255,215,0,0.6);
    margin-right: 6px;
}

.drop-card .card-actions { 
    position: static; 
    flex-shrink: 0; 
    display: flex; 
    gap: 10px; 
    margin-top: 24px; 
    padding-top: 20px; 
    border-top: 2px solid rgba(212,175,55,0.3);
    justify-content: center; 
    width: 100%; 
    flex-wrap: wrap;
}

.drop-card .card-actions::before {
    content: '⚔';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    color: #d4af37;
    background: #1a0f0a;
    padding: 0 10px;
    text-shadow: 0 0 10px rgba(212,175,55,0.8);
}

/* TIMELINE */
.history-timeline { 
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    padding: 10px;
    margin-top: 20px;
}

.timeline-item { 
    position: relative;
    margin-bottom: 0;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot { 
    display: none;
}

@keyframes timelinePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 40px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.8), 0 0 60px rgba(255, 215, 0, 0.5); }
}

.timeline-content { 
    position: relative; 
    background: linear-gradient(135deg, #2a1f1a 0%, #1a0f0a 100%);
    border-radius: 20px; 
    padding: 28px 24px; 
    border: 3px solid #d4af37;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(212, 175, 55, 0.4),
                inset 0 2px 1px rgba(255, 255, 255, 0.1),
                inset 0 -2px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #d4af37 15%, 
        #ffd700 50%, 
        #d4af37 85%, 
        transparent 100%);
    box-shadow: 0 0 10px rgba(212,175,55,0.8);
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        transparent 0%, 
        rgba(212, 175, 55, 0.05) 25%, 
        transparent 50%, 
        rgba(255, 215, 0, 0.05) 75%, 
        transparent 100%);
    pointer-events: none;
    animation: shimmer 8s linear infinite;
}

.timeline-content:hover { 
    border-color: #ffd700;
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(212, 175, 55, 0.3),
                inset 0 1px 0 rgba(255, 215, 0, 0.2);
}

.timeline-header { 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    margin-bottom: 16px; 
    gap: 16px;
    position: relative;
    z-index: 1;
}

.timeline-header .item-image-container {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 14px;
    flex-grow: 1;
}

.timeline-header .item-image-container img {
    object-fit: contain;
    transition: all 0.3s ease;
}

.timeline-content:hover .item-image-container img {
    filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.8));
    transform: scale(1.05);
}

.timeline-header .item-image-container h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5),
                 0 2px 4px rgba(0, 0, 0, 0.8);
    text-align: center;
}

/* Garante que o texto do item no histórico seja amarelo */
.timeline-header .item-drop-text,
.timeline-header h4 .item-drop-text,
.timeline-header .item-image-container .item-drop-text {
    color: #ffd700 !important;
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5),
                 0 2px 4px rgba(0, 0, 0, 0.8);
    text-align: center.5),
                 0 2px 4px rgba(0, 0, 0, 0.8);
}

.header-right-content { 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    gap: 12px; 
    width: 100%;
}

.timeline-header .price { 
    font-size: 1.2rem; 
    font-weight: 700; 
    color: #2ecc71;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.4),
                 0 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    text-align: center;
}

/* Price variants inside timeline header: green pill for positive, red for negative (waste) */
.timeline-header .price.price-paid {
    background: rgba(46, 204, 113, 0.12);
    padding: 6px 12px;
    border-radius: 8px;
    color: #27ae60;
    text-shadow: 0 0 6px rgba(39, 174, 96, 0.25);
}

.timeline-header .price.text-danger {
    background: rgba(231, 76, 60, 0.08);
    padding: 6px 12px;
    border-radius: 8px;
    color: #c53030;
    text-shadow: none;
}

.timeline-body { 
    font-size: 0.9rem; 
    color: #d4c5b0;
    line-height: 2; 
    font-weight: 400;
    position: relative;
    z-index: 1;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 16px;
}

.timeline-body strong { 
    font-weight: 700; 
    color: #ffd700; 
}

.timeline-body em { 
    color: #f39c12; 
    font-style: normal; 
    font-size: 0.85rem; 
    font-weight: 600;
    text-shadow: 0 0 8px rgba(243, 156, 18, 0.3);
}

.timeline-actions { 
    display: flex; 
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Rateio variants for timeline items */
.timeline-item.rateio-60-40 .timeline-content { border-color: #ffd700; }
.timeline-item.rateio-60-40 .timeline-content:hover { border-color: #ffed4e; box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.4); }

.timeline-item.rateio-especial .timeline-content { border-color: #d4af37; }
.timeline-item.rateio-especial .timeline-content:hover { border-color: #ffd700; box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6), 0 0 40px rgba(212, 175, 55, 0.45); }

.timeline-item.rateio-especial-2 .timeline-content { border-color: #c9a847; }
.timeline-item.rateio-especial-2 .timeline-content:hover { border-color: #d4af37; box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6), 0 0 40px rgba(201, 168, 71, 0.45); }

.timeline-item.serviceiro-80-20 .timeline-content { border-color: #b8941f; }
.timeline-item.serviceiro-80-20 .timeline-content:hover { border-color: #d4af37; box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6), 0 0 40px rgba(184, 148, 31, 0.5); }

.timeline-item.rateio-hunt-80-20 .timeline-content { border-color: #a68417; }
.timeline-item.rateio-hunt-80-20 .timeline-content:hover { border-color: #c9a847; box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6), 0 0 40px rgba(166, 132, 23, 0.5); }

.timeline-item.rateio-cliente .timeline-content { border-color: #d4af37; }
.timeline-item.rateio-time .timeline-content { border-color: #d4af37; }
.timeline-item.com-serviceiro .timeline-content { border-color: #c9a847; }

/* ALERTAS */
.alert { padding: 15px 20px; border-radius: 10px; margin-bottom: 24px; border: 2px solid; position: relative; font-size: 0.95rem; }
.alert p { margin: 0; }
.alert.success { background: linear-gradient(135deg, #e6f7ee 0%, #d4f4e2 100%); border-color: #2ecc71; color: #064c32; }
.alert.error { background: linear-gradient(135deg, #fff1f1 0%, #ffe6e6 100%); border-color: #e74c3c; color: #6b0000; }
.alert.info { background: linear-gradient(135deg, #e8f2ff 0%, #d4e8ff 100%); border-color: #3498db; color: #07315a; }
.alert .close-alert { position: absolute; top: 5px; right: 10px; font-size: 1.5rem; font-weight: bold; color: inherit; cursor: pointer; opacity: 0.7; transition: opacity 0.2s ease; }
.alert .close-alert:hover { opacity: 1; }

/* Alertas dentro de modais - estilo simplificado sem caixa */
.modal-body .alert { 
    background: transparent; 
    border: none; 
    padding: 8px 0; 
    margin-bottom: 16px; 
    border-radius: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.modal-body .alert.info { color: #475569; }
.modal-body .alert.info i { color: #2563eb; }
.modal-body .alert.success { color: #065f46; }
.modal-body .alert.success i { color: #10b981; }
.modal-body .alert.error { color: #991b1b; }
.modal-body .alert.error i { color: #ef4444; }

/* TABELAS */
.dashboard-table { width: 100%; border-collapse: collapse; }
.dashboard-table th, .dashboard-table td { padding: 12px; text-align: left; vertical-align: middle; }
.dashboard-table thead tr { border-bottom: 2px solid #8b6914; background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%); }
.dashboard-table thead th { font-weight: 700; color: #3d2817; text-shadow: 1px 1px 2px rgba(255, 215, 0, 0.1); }
.dashboard-table tbody tr { border-bottom: 1px solid #d4a856; }
.dashboard-table tbody tr:hover { background: rgba(212, 175, 55, 0.08); }
.dashboard-table tbody tr:last-child { border-bottom: 1px solid #8b6914; }
.dashboard-table .item-name { font-weight: 700; color: #3d2817; }
.dashboard-table .price-paid { color: #2ecc71; font-weight: 700; }
.dashboard-table .no-results { padding: 20px; text-align: center; color: #8b6914; }
.dashboard-table .text-danger { color: #e74c3c; font-weight: 700; }

/* IMPORT / EXPORT */
.import-export-card { background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); border: 3px solid #8b6914; border-radius: 12px; box-shadow: 0 8px 20px rgba(139,105,20,0.2), inset 0 1px 0 rgba(255,255,255,0.5); margin-bottom: 24px; }
.import-export-card .card-header { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 2px solid #8b6914; background: rgba(212, 175, 55, 0.1); }
.import-export-card .card-header i { font-size: 1.2rem; color: #8b6914; }
.import-export-card .card-header h2, .import-export-card .card-header h3 { margin: 0; font-size: 1.25rem; font-weight: 700; color: #3d2817; text-shadow: 1px 1px 2px rgba(255, 215, 0, 0.1); }
.import-export-card .card-body { padding: 24px; }
.action-group { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #d4a856; }
.action-group:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.action-group h3, .action-group h4 { margin-top: 0; margin-bottom: 8px; font-size: 1.1rem; font-weight: 700; color: #3d2817; }
.action-group p.description { font-size: 0.95rem; color: #2c1810; margin-top: 0; margin-bottom: 16px; max-width: 600px; line-height: 1.6; font-weight: 500; }
.action-group form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* DESCRIPTION TEXT - Global styling for all description texts */
p.description,
.description-text,
.page-subtitle.description-text,
.section-description.description-text {
    font-size: 1rem !important;
    color: #d4af37 !important;
    line-height: 1.6;
    margin: 0.5rem 0 1rem 0;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.import-export-card.full-sync { border-color: #f39c12; }
.import-export-card.full-sync .card-header { background: rgba(243, 156, 18, 0.15); }
.import-export-card.full-sync .card-header h2, .import-export-card.full-sync .card-header i { color: #d68910; }
.individual-sections-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* RATEIO COLORS - Dark RPG theme with colored glows */
.drop-card.rateio-60-40, .timeline-content.rateio-60-40 { 
    border-color: #2ecc71;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 30px rgba(46,204,113,0.3),
        inset 0 2px 1px rgba(255,255,255,0.1);
}

.drop-card.rateio-especial, .timeline-content.rateio-especial { 
    border-color: #3498db;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 30px rgba(52,152,219,0.3),
        inset 0 2px 1px rgba(255,255,255,0.1);
}

.drop-card.rateio-especial-2, .timeline-content.rateio-especial-2 { 
    border-color: #f39c12;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 30px rgba(243,156,18,0.3),
        inset 0 2px 1px rgba(255,255,255,0.1);
}

.drop-card.rateio-time, .timeline-content.rateio-time { 
    border-color: #2ecc71;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 30px rgba(46,204,113,0.3),
        inset 0 2px 1px rgba(255,255,255,0.1);
}

.drop-card.rateio-cliente, .timeline-content.rateio-cliente { 
    border-color: #3498db;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 30px rgba(52,152,219,0.3),
        inset 0 2px 1px rgba(255,255,255,0.1);
}

.drop-card.com-serviceiro, .timeline-content.com-serviceiro { 
    border-color: #f39c12;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 30px rgba(243,156,18,0.3),
        inset 0 2px 1px rgba(255,255,255,0.1);
}

.drop-card.serviceiro-80-20, .timeline-content.serviceiro-80-20 { 
    border-color: #e74c3c;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 30px rgba(231,76,60,0.3),
        inset 0 2px 1px rgba(255,255,255,0.1);
}

/* Team Log specific rateio rules */
.drop-card.rateio-hunt-especial, .timeline-content.rateio-hunt-especial { 
    border-color: #2ecc71;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 30px rgba(46,204,113,0.4),
        inset 0 2px 1px rgba(255,255,255,0.1);
}

.drop-card.rateio-hunt-especial-2, .timeline-content.rateio-hunt-especial-2 { 
    border-color: #3498db;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 30px rgba(52,152,219,0.4),
        inset 0 2px 1px rgba(255,255,255,0.1);
}

.drop-card.rateio-hunt-80-20, .timeline-content.rateio-hunt-80-20 { 
    border-color: #9b59b6;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.6),
        0 0 30px rgba(155,89,182,0.4),
        inset 0 2px 1px rgba(255,255,255,0.1);
}

/* Hover states for rateio cards */
.drop-card.rateio-60-40:hover, .drop-card.rateio-time:hover,
.drop-card.rateio-hunt-especial:hover {
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.8),
        0 0 40px rgba(46,204,113,0.6),
        inset 0 2px 1px rgba(255,255,255,0.2);
}

.drop-card.rateio-especial:hover, .drop-card.rateio-cliente:hover,
.drop-card.rateio-hunt-especial-2:hover {
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.8),
        0 0 40px rgba(52,152,219,0.6),
        inset 0 2px 1px rgba(255,255,255,0.2);
}

.drop-card.rateio-especial-2:hover, .drop-card.com-serviceiro:hover {
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.8),
        0 0 40px rgba(243,156,18,0.6),
        inset 0 2px 1px rgba(255,255,255,0.2);
}

.drop-card.serviceiro-80-20:hover {
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.8),
        0 0 40px rgba(231,76,60,0.6),
        inset 0 2px 1px rgba(255,255,255,0.2);
}

.drop-card.rateio-hunt-80-20:hover {
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.8),
        0 0 40px rgba(155,89,182,0.6),
        inset 0 2px 1px rgba(255,255,255,0.2);
}

/* DIVISION MODAL */
#division-modal #division-total-value { font-size: 1rem; color: #8b6914; margin-top: -10px; margin-bottom: 20px; font-weight: 700; }
#division-modal .division-list {
    background: linear-gradient(135deg, #3a2014 0%, #26140d 100%);
    border: 2px solid #b8860b;
    border-radius: 8px;
    padding: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #fdf4dc;
    box-shadow: inset 0 0 0 1px rgba(255, 215, 120, 0.15);
}

#division-modal #division-output .division-item {
    border-bottom: 1px solid rgba(255, 223, 140, 0.55) !important;
    background: rgba(255, 255, 255, 0.02);
}

#division-modal #division-output .division-item:nth-child(odd) {
    background: rgba(255, 255, 255, 0.05);
}

#division-modal #division-output .division-item .text-content {
    color: #fff4d6 !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

#division-modal #division-output .copy-line-btn {
    background: linear-gradient(135deg, #fff4d6 0%, #f0d48a 100%);
    border: 1px solid #8b6914;
    color: #3d2817;
}

#division-modal #division-output .copy-line-btn:hover {
    background: linear-gradient(135deg, #fff9e8 0%, #f7df9f 100%);
    box-shadow: 0 0 0 1px rgba(139, 105, 20, 0.25), 0 2px 8px rgba(0, 0, 0, 0.25);
}

#division-modal #division-output .copy-line-btn i {
    color: #3d2817 !important;
}

.division-line { display: flex; justify-content: space-between; align-items: center; padding: 8px; border-bottom: 1px solid #8b6914; }
.division-line:last-child { border-bottom: none; }
.division-line .transfer-text { flex-grow: 1; }

/* CARD LEGEND */
.card-legend { 
    display: inline-flex; 
    flex-direction: row; 
    align-items: center;
    gap: 6px; 
    margin: 0 0 10px auto; 
    padding: 4px 6px; 
    background: rgba(42, 31, 26, 0.35); 
    border-radius: 999px; 
    border: 1px solid rgba(139, 105, 20, 0.22); 
    font-size: 0.7rem; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.18);
    backdrop-filter: blur(4px);
    float: right;
    position: relative;
    cursor: help;
}
.tabs-actions .card-legend {
    margin: 0;
    float: none;
}
.card-legend::before {
    content: "i";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #d4af37;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.card-legend h3 { 
    margin: 0; 
}
.card-legend .legend-items-container { 
    display: grid; 
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    row-gap: 8px;
    column-gap: 12px;
    align-items: start;
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    z-index: 20;
    padding: 12px 14px;
    background: rgba(26, 15, 10, 0.96);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.45);
    min-width: 280px;
    max-width: 480px;
    width: auto;
    max-height: 50vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.tabs-actions .card-legend .legend-items-container {
    top: calc(100% + 6px);
    bottom: auto;
    transform: translateY(-4px);
}
.card-legend:hover .legend-items-container,
.card-legend:focus-within .legend-items-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.legend-item { 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    color: #f3e6cc; 
    font-weight: 500;
    font-size: 0.78rem;
    white-space: normal;
    line-height: 1.35;
    max-width: 480px;
    word-break: normal;
    overflow-wrap: break-word;
    text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}
.legend-color-box { 
    width: 10px; 
    height: 10px; 
    border-radius: 3px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

/* Responsivo: empilha em telas pequenas */
@media (max-width: 768px) {
    .card-legend {
        flex-direction: column;
        align-items: flex-start;
        float: none;
        margin: 0 0 10px 0;
        padding: 6px 10px;
        border-radius: 8px;
    }
    .card-legend::before {
        display: none;
    }
    .card-legend .legend-items-container {
        position: static;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        max-width: none;
        max-height: none;
        overflow: visible;
        grid-template-columns: 1fr;
    }
}

/* Utility: visually hidden (accessible) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* TEAMS LAYOUT */
.teams-and-fila-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.waiting-list-card { background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); border: 3px solid #8b6914; border-radius: 12px; min-height: 300px; display: flex; flex-direction: column; box-shadow: 0 8px 20px rgba(139,105,20,0.2), inset 0 1px 0 rgba(255,255,255,0.5); }
.waiting-list-header { padding: 12px 16px; border-bottom: 2px solid #8b6914; background: rgba(212, 175, 55, 0.1); }
.waiting-list-header h4 { margin: 0; font-size: 1.1rem; font-weight: 700; color: #3d2817; text-shadow: 1px 1px 2px rgba(255, 215, 0, 0.1); }
.waiting-list-container { padding: 8px; flex-grow: 1; overflow-y: auto; }
.waiting-list-container .empty-list-message { padding: 8px; color: #8b6914; font-weight: 600; }
.waiting-list { list-style: none; padding: 0; margin: 0; }
.waiting-list-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 8px; border-bottom: 1px solid #d4a856; transition: all 0.2s ease; }
.waiting-list-item:last-child { border-bottom: none; }
.waiting-list-item:hover { background: rgba(212, 175, 55, 0.08); transform: translateX(2px); }
.waiting-list-item .char-name { font-weight: 700; color: #3d2817; }
.waiting-list-item .char-info { font-size: 0.85rem; color: #8b6914; text-align: right; }

/* CALCULATOR / CONVERTER */
.calculator-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 24px; }
#tc-converter-container .calculator-card .card-header { padding: 12px 16px; background: rgba(212, 175, 55, 0.1); }
#tc-converter-container .calculator-card .card-header h4, #tc-converter-container .calculator-card .card-header h3 { font-size: 1rem; font-weight: 700; color: #3d2817; }
#tc-converter-container .calculator-card .card-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
#tc-converter-container .calculator-card .form-group { margin-bottom: 0; }
#tc-converter-container .calculator-card .form-group label { font-size: 0.85rem; margin-bottom: 6px; color: #8b6914; font-weight: 600; }
#tc-converter-container .calculator-card .form-group input { font-size: 1.1rem; padding: 10px 12px; margin-bottom: 0; }
.input-field { background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); border-color: #8b6914; }
.output-field { background: linear-gradient(135deg, #e8f5e9 0%, #d4f4e2 100%); border-color: #2ecc71; font-weight: bold; color: #064c32; }
.global-settings-card { grid-column: 1 / -1; border-left: 4px solid #d4a856; background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); border: 2px solid #8b6914; }
.save-indicator { margin-left: 10px; color: #2ecc71; opacity: 0; transition: opacity 0.5s ease; font-weight: 700; }
.save-indicator.visible { opacity: 1; }

/* CHART CONTROLS */
.chart-controls { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.chart-controls label { font-weight: 600; color: var(--cor-texto); }
.chart-controls select { max-width: 200px; }
#chart-stats { background: linear-gradient(to right, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05)); }
#chart-stats strong { color: var(--cor-texto); }
#chart-no-data { color: #8b6914; font-size: 0.95rem; font-weight: 600; }
#chart-no-data small { display: block; margin-top: 10px; color: #3d2817; font-weight: 500; }

/* AJUSTES GLOBAIS DE ALINHAMENTO */
.dashboard-table .actions-cell { display: flex; align-items: flex-start; gap: 8px; }
.action-buttons-wrapper { display: none; }
.dashboard-table .actions-cell .action-btn { background-color: #f0f2f5; border: 1px solid #d1d5db; color: var(--cor-texto-leve); }
.dashboard-table .actions-cell .action-btn:hover { color: #fff; border-color: transparent; box-shadow: var(--sombra-suave); }
.action-btn.save-role-btn:hover { background-color: var(--cor-primaria); }
.dashboard-table .actions-cell .button.small { width: 32px; height: 32px; border-radius: 50%; padding: 0; font-size: 0; flex-shrink: 0; position: relative; background-color: #f0f2f5; border: 1px solid #d1d5db; color: var(--cor-texto-leve); transition: all 0.2s ease; }
.dashboard-table .actions-cell .button.small:hover { color: #fff; border-color: transparent; transform: translateY(-2px); box-shadow: var(--sombra-suave); }
.dashboard-table .actions-cell .button.small i { font-size: 13px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.dashboard-table .actions-cell .button.small.view-details-btn:hover { background-color: var(--cor-info); }
.dashboard-table .actions-cell .button.small.alert:hover { background-color: var(--cor-alerta); }

/* FILTERS (HISTÓRICO) */
.filters-container { padding: 16px 24px; margin-bottom: 24px; background-color: #f8f9fa; border: 1px solid var(--cor-borda); border-radius: var(--raio-borda); }
.filter-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px; }
.filter-form .form-group { margin-bottom: 0; }
.filter-form .form-group label { font-size: 0.85rem; font-weight: 600; color: var(--cor-texto-leve); margin-bottom: 8px; }
.filter-form input, .filter-form select { padding: 8px 12px; font-size: 0.9rem; margin-bottom: 0; }
.filter-group-row { display: flex; align-items: center; gap: 8px; }

/* HEADER FLEX CORRECTIONS */
.card-header-flex { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 24px; 
    width: 100%;
    position: relative;
}

.card-header-flex .item-drop { 
    margin: 0; 
    padding: 0; 
    width: 100%; 
    text-align: center; 
}

.item-title-with-image {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 16px;
    width: 100%;
    position: relative;
}

/* Aura mágica por trás do item */
.drop-card .item-title-with-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, 
        rgba(255,215,0,0.4) 0%, 
        rgba(212,175,55,0.2) 40%, 
        transparent 70%);
    border-radius: 50%;
    animation: pulseGlow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.drop-card .item-thumb {
    width: 120px;
    height: 120px;
    object-fit: contain;
    flex-shrink: 0;
    filter: 
        drop-shadow(0 0 15px rgba(255,215,0,0.8))
        drop-shadow(0 4px 12px rgba(0,0,0,0.6));
    padding: 20px;
    background: 
        radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 70%),
        linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.2) 100%);
    border-radius: 20px;
    border: 3px solid rgba(212,175,55,0.5);
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.2),
        inset 0 -2px 8px rgba(0,0,0,0.4),
        0 0 20px rgba(212,175,55,0.3);
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes itemFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

/* Pontos de luz ao redor do item */
.drop-card .item-thumb::before {
    content: '✦';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 16px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255,215,0,0.8);
    animation: sparkle 2s ease-in-out infinite;
}

.drop-card .item-thumb::after {
    content: '✦';
    position: absolute;
    bottom: -8px;
    left: -8px;
}
.modal {
    /* Modal overlay: center content, provide backdrop spacing and scrolling */
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto; /* allow page to scroll when modal content taller than viewport */
    padding: 12px; /* ensure some space from viewport edges */
    background: rgba(0,0,0,0.25); /* subtle backdrop */
}
.modal-content {
    /* allow larger modals when needed but remain responsive */
    width: min(96%, 900px);
    max-width: 900px;
    overflow-x: hidden;
    box-sizing: border-box;
}
.modal-body {
    /* keep header/footer visible while body scrolls internally */
    max-height: calc(90vh - 160px);
    overflow-y: auto;
    overflow-x: hidden;
}
.modal-footer {
    flex-wrap: wrap;
    gap: 10px;
}

/* Specific fixes for team edit permissions modal buttons alignment */
#team-edit-permissions-modal .modal-footer {
    text-align: right;
    padding: 18px 24px;
}
#team-edit-permissions-modal .modal-footer .action-btn {
    min-width: 120px;
    height: 44px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    gap: 8px;
}
#team-edit-permissions-modal .modal-footer .modal-cancel {
    background: transparent;
    border: 2px solid rgba(139,105,20,0.12);
    color: #2c1810;
}
#team-edit-permissions-modal .modal-footer .action-btn + .action-btn { margin-left: 12px; }
.modal-footer .button {
    min-width: 96px;
    max-width: 48%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}
/* Small screens: make buttons full-width stacked for usability */
@media (max-width: 520px) {
    .modal-footer .button { max-width: 100%; flex: 1 1 100%; }
}

/* ========================================================================== */

/* ===== Final modal safety overrides: keep header/footer visible and body scrollable ===== */
/* Ensures footer doesn't get overlapped and prevents horizontal overflow */
.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    box-sizing: border-box;
    overflow: visible; /* body will handle scrolling */
}
.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 12px; /* avoid scrollbar overlapping content */
    padding-bottom: 72px; /* reserve space for footer */
}
.modal-footer {
    flex: 0 0 auto;
    margin: 0; /* remove negative margins that caused overflow */
    padding: 12px 24px;
    position: relative;
    z-index: 3;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.modal-footer .button {
    min-width: 96px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 520px) {
    .modal-footer { flex-direction: column; gap: 8px; }
    .modal-footer .button { width: 100%; max-width: 100%; }
}

/* Force safe overrides for confirmation modals */
.confirm-modal .confirm-modal-content,
#delete-confirm-modal .modal-content,
#prompt-modal .modal-content {
    overflow: visible !important;
}
.confirm-modal .modal-body,
#delete-confirm-modal .modal-body,
#prompt-modal .modal-body {
    max-height: calc(90vh - 140px) !important;
    overflow-y: auto !important;
    padding-bottom: 72px !important;
}

/* ====================================================================================== */

/* Additional safety fixes: prevent footer negative-margins causing horizontal overflow on small viewports */
.modal {
    padding: 12px; /* ensure some space from viewport edges */
}
@media (max-width: 720px) {
    .modal-footer, .modal-actions { margin: 0 !important; padding: 12px !important; }
    .modal-content { width: calc(100% - 24px) !important; max-width: calc(100% - 24px) !important; }
}

/* Force buttons to not overflow due to very long text */
.modal-footer .button { word-break: keep-all; }

/* Fix: removed stray orphaned declarations that broke CSS parsing above */

/* Ensure saved-permissions modal buttons appear as full action buttons */
#team-permissions-saved-modal .modal-footer .action-btn {
    min-width: 120px;
    height: 44px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    gap: 8px;
}

#team-permissions-saved-modal .modal-body,
#team-permissions-saved-modal .modal-body p {
    color: #3d2817; /* ensure readable dark text on pale modal background */
}


@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.drop-card:hover .item-thumb {
    filter: 
        drop-shadow(0 0 25px rgba(255,215,0,1))
        drop-shadow(0 6px 16px rgba(0,0,0,0.8));
    transform: translateY(-4px) scale(1.1);
    border-color: rgba(255,215,0,0.8);
    animation: float 2s ease-in-out infinite;
}

.timeline-header .item-thumb {
    width: 96px;
    height: 96px;
    padding: 14px;
    background: 
        radial-gradient(circle, rgba(255,215,0,0.08) 0%, transparent 70%),
        linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(0,0,0,0.15) 100%);
    border-radius: 16px;
    border: 2px solid rgba(212,175,55,0.4);
    box-shadow: 
        inset 0 1px 3px rgba(255,255,255,0.15),
        inset 0 -1px 6px rgba(0,0,0,0.3),
        0 0 15px rgba(212,175,55,0.2);
    position: relative;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
    animation: itemFloat 4s ease-in-out infinite;
}

.timeline-header .item-thumb::before,
.timeline-header .item-thumb::after {
    content: '✦';
    position: absolute;
    font-size: 12px;
    color: #d4af37;
    text-shadow: 0 0 8px rgba(212,175,55,0.6);
    animation: sparkle 2s ease-in-out infinite;
}

.timeline-header .item-thumb::before {
    top: -6px;
    right: -6px;
}

.timeline-header .item-thumb::after {
    bottom: -6px;
    left: -6px;
    animation-delay: 1s;
}

.item-thumb-failed {
    display: none;
}

.drop-card .item-drop-text {
    font-size: 1.15rem;
    font-weight: 800;
    text-align: center;
    color: #ffd700;
    text-shadow: 
        0 0 10px rgba(255,215,0,0.6),
        0 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ANALYSIS & PERFORMANCE */
.analysis-card { background-color: var(--cor-surface); padding: 24px; border: 1px solid var(--cor-borda) !important; box-shadow: none !important; }
#analysis-form { padding: 0; background: transparent; border: none; margin: 0; }
.filter-top-row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.period-controls { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.date-filter-group { display: flex; gap: 10px; }
.date-filter-group select, .date-filter-group input { margin-bottom: 0; min-width: 150px; }
#analysis-form .filter-actions { display: flex; gap: 10px; flex-shrink: 0; }
.advanced-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.filter-column h4 { margin-top: 0; margin-bottom: 12px; font-size: 0.9rem; font-weight: 600; color: var(--cor-secundaria); }
.checkbox-group { max-height: 180px; overflow-y: auto; border: 1px solid var(--cor-borda); border-radius: var(--raio-borda); padding: 12px; background-color: var(--cor-surface); }
.checkbox-group label { display: block; padding: 6px; font-weight: normal; font-size: 0.9rem; cursor: pointer; border-radius: 4px; transition: background-color 0.2s ease; }
.checkbox-group label:hover { background-color: #f4f5f7; }
.checkbox-group input[type="checkbox"] { margin-right: 8px; vertical-align: middle; }
.checkbox-group .select-all-label { font-weight: 600; color: var(--cor-secundaria); padding-bottom: 8px; margin-bottom: 5px; border-bottom: 1px solid var(--cor-borda); }
.filter-instructions { margin-top: 20px; text-align: center; font-size: 0.9rem; color: var(--cor-texto-leve); }
.analysis-summary { padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--cor-borda); }
.analysis-summary h4 { margin: 0; font-size: 1.2rem; font-weight: 500; }

.filter-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; width: 100%; }
.filter-controls .search-wrapper { flex-shrink: 0; }
.quest-filters { display: flex; flex-wrap: wrap; gap: 16px; flex-grow: 1; }
.quest-filter-select { min-width: 200px; flex: 1; margin-bottom: 0 !important; }

.card-info .card-sub-value { font-size: 0.85rem; color: var(--cor-texto-leve); margin-top: 4px; font-weight: 500; line-height: 1.3; }

/* PERFORMANCE TABLE */
.performance-table th, .performance-table td { text-align: right; vertical-align: middle; padding: 8px 12px; }
.performance-table th:first-child, .performance-table .metric-player-name { text-align: left; }
.performance-table th small { font-weight: normal; color: var(--cor-texto-leve); }
.performance-table .metric-label { font-size: 0.85rem; color: var(--cor-texto-leve); padding-right: 20px; }
.performance-table .metric-balance { font-weight: bold; font-size: 1.1rem; }
.player-row-main td { border-top: 2px solid #555; }
.player-row-last td { border-bottom: 1px solid #ccc; }
.text-success { color: var(--cor-sucesso); font-size: 0.8em; font-weight: bold; }

/* Marketplace item TC display (green, small, below price) */
.marketplace-item-tc {
    color: var(--cor-sucesso);
    font-weight: normal;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    display: block;
    text-align: center;
}
.text-danger { color: var(--cor-alerta); font-size: 0.8em; font-weight: bold; }
.analysis-summary-container { margin-top: 24px; padding: 24px; }
.analysis-summary-container h4 { margin-top: 0; margin-bottom: 16px; font-size: 1.2rem; }
.analysis-summary-container ul { list-style: none; padding-left: 0; }
.analysis-summary-container li { padding: 8px 0; display: flex; align-items: center; gap: 12px; }
.analysis-summary-container li i { width: 20px; text-align: center; }

.solo-details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px 24px; margin-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--cor-borda); }
.solo-details-grid div { font-size: 0.95rem; }
.solo-details-grid strong { color: var(--cor-texto-leve); margin-right: 8px; }
.solo-details-blocks { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.solo-details-blocks h4 { margin-top: 0; margin-bottom: 12px; font-size: 1rem; font-weight: 600; color: var(--cor-secundaria); }
.log-block { background-color: var(--cor-fundo); border: 1px solid var(--cor-borda); border-radius: var(--raio-borda); padding: 12px; font-family: 'Courier New', Courier, monospace; font-size: 0.85rem; white-space: pre-wrap; word-break: break-word; max-height: 250px; overflow-y: auto; }

/* COMPONENTS DO DASHBOARD (migrated) */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* Card padrão para dashboard - NÃO aplica em páginas específicas */
.dashboard-cards .card,
.main-content > .card:not(#user-panel-page .card) {
    background-color: var(--cor-surface);
    border-radius: var(--raio-borda);
    box-shadow: var(--sombra-suave);
    padding: 24px;
    display: flex;
    align-items: center;
    border: 1px solid var(--cor-borda);
}
.card-icon {
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-right: 20px; flex-shrink: 0;
}
.card-icon i { color: #fff; font-size: 1.5rem; }
.card-icon.clients { background-color: var(--cor-info); }
.card-icon.teams { background-color: var(--cor-sucesso); }
.card-info .card-title {
    font-size: 0.9rem;
    color: var(--cor-texto-leve);
    margin: 0;
    text-transform: uppercase;
}
.card-info .card-value {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--cor-texto);
    margin: 0;
}
.card-style-container {
    background-color: var(--cor-surface);
    border-radius: var(--raio-borda);
    box-shadow: var(--sombra-suave);
    padding: 24px;
    border: 1px solid var(--cor-borda);
}

/* CARDS - LAYOUT SIMPLES */
.client-card-themed { 
    background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%); 
    border: 3px solid #8b6914; 
    border-radius: 12px; 
    box-shadow: 0 8px 20px rgba(139,105,20,0.2), inset 0 1px 0 rgba(255,255,255,0.5); 
    transition: all 0.3s ease; 
    display: flex;
    flex-direction: column;
    min-height: 300px;
    overflow: hidden;
}

.client-card-themed:hover { 
    box-shadow: 0 12px 32px rgba(139,105,20,0.3), inset 0 1px 0 rgba(255,255,255,0.7); 
    border-color: #d4af37; 
}

.card-flip-inner {
    display: contents;
}

.card-flip-front {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

.card-flip-back {
    display: none !important;
}

/* MODAL DE DETALHES DO CARD */
.client-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.client-details-modal.active {
    opacity: 1;
    visibility: visible;
}

.client-details-content {
    background: linear-gradient(135deg, #f5f0e8 0%, #ebe4d8 100%);
    border: 3px solid #8b6914;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    padding: 0;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.client-details-header {
    background: linear-gradient(135deg, #8b6914 0%, #6b5010 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #d4af37;
}

.client-details-header h3 {
    margin: 0;
    color: #ffd700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.client-details-close {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.client-details-close:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: rotate(90deg);
}

.client-details-body {
    padding: 24px;
}

.client-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    border-left: 3px solid #d4af37;
    margin-bottom: 12px;
}

.client-detail-item:last-child {
    margin-bottom: 0;
}

.client-detail-item i {
    font-size: 1.5rem;
    color: #8b6914;
    flex-shrink: 0;
    margin-top: 2px;
}

.client-detail-content {
    flex: 1;
}

.client-detail-label {
    display: block;
    font-weight: 700;
    color: #3d2817;
    font-size: 0.9rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.client-detail-value {
    color: #6b5010;
    font-weight: 600;
    font-size: 1.1rem;
}

.client-detail-value.highlight {
    color: #d4af37;
    font-size: 1.2rem;
}

.client-detail-list {
    margin: 8px 0 0 0;
    padding-left: 18px;
}

.client-detail-list li {
    color: #6b5010;
    font-weight: 600;
    margin-bottom: 4px;
}

.flip-details-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #8b6914 0%, #6b5010 100%);
    border: 2px solid #d4af37;
    color: #ffd700;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(139, 105, 20, 0.3), inset 0 1px 0 rgba(255, 215, 0, 0.2);
}

.flip-details-btn:hover {
    background: linear-gradient(135deg, #d4af37 0%, #8b6914 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 105, 20, 0.4);
}

.flip-details-btn i {
    font-size: 1.1rem;
}

/* Verso do Card */
.card-back-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    min-height: 100px;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    border-left: 3px solid #d4af37;
}

.detail-item i {
    font-size: 1.3rem;
    color: #8b6914;
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-item div {
    flex: 1;
}

.detail-item strong {
    display: block;
    color: #3d2817;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: #6b5010;
    font-weight: 600;
    font-size: 1rem;
}

.detail-item .value-highlight {
    color: #d4af37;
    font-weight: 700;
    font-size: 1.1rem;
}

.detail-item .value-highlight.scale-1m,
.detail-item .value-highlight.scale-10m,
.detail-item .value-highlight.scale-100m,
.detail-item .value-highlight.scale-1b {
    color: #ffd700;
}

.card-back-header {
    display: none !important;
}

.card-back-header h4 {
    display: none !important;
}

.flip-back-btn {
    display: none !important;
}

.card-back-body {
    display: none !important;
}

.detail-row {
    display: none !important;
}

.detail-item {
    display: none !important;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(235, 228, 216, 0.6));
    border-left: 4px solid #8b6914;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.detail-item i {
    color: #8b6914;
    font-size: 1.3rem;
    margin-top: 2px;
}

.detail-item div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item strong {
    color: #2c1810;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: #1a0f0a;
    font-size: 1rem;
    font-weight: 600;
}

.value-highlight {
    color: #d4af37 !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

.value-highlight.k,
.value-highlight.kk,
.value-highlight.kkk {
    position: relative;
}

.value-highlight.kkk {
    color: #c0392b !important;
}

.card-back-actions {
    display: flex;
    gap: 12px;
    padding-top: 12px;
    border-top: 2px dashed rgba(139, 105, 20, 0.2);
}

.card-back-actions .action-btn {
    flex: 1;
    width: auto;
    height: auto;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
}

.card-back-actions .edit-client-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: 2px solid #2471a3;
    color: white;
}

.card-back-actions .edit-client-btn:hover {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    transform: translateY(-2px);
}

.card-back-actions .delete-client-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: 2px solid #a93226;
    color: white;
}

.card-back-actions .delete-client-btn:hover {
    background: linear-gradient(135deg, #ec7063 0%, #e74c3c 100%);
    transform: translateY(-2px);
}
