/* ==========================================================================
   Quest Log — Tema "Warcraft" (dark fantasy)
   ========================================================================== */

:root {
    --gold: #c8a24a;
    --gold-light: #e6c66a;
    --gold-dark: #8a6d2f;
    --bg-deep: #0e0b08;
    --bg-panel: #16100a;
    --border-dark: #3a2d18;
    --text-main: #e8e0d0;
    --text-muted: #a89c82;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    -webkit-tap-highlight-color: transparent;
    background-image:
        radial-gradient(1100px 560px at 85% -10%, rgba(200, 162, 74, 0.10), transparent 60%),
        radial-gradient(900px 520px at -10% 110%, rgba(59, 130, 246, 0.07), transparent 60%),
        radial-gradient(700px 400px at 50% 120%, rgba(139, 92, 246, 0.05), transparent 60%);
    background-attachment: fixed;
}

/* Tipografía épica para títulos */
h1, h2, h3, h4 {
    font-family: 'Cinzel', serif;
    color: var(--gold-light);
    letter-spacing: 0.02em;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

/* Barra de desplazamiento */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a140c;
}

::-webkit-scrollbar-thumb {
    background: #4a3a1e;
    border-radius: 4px;
    border: 1px solid #6b5220;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b5220;
}

/* Panel con marco dorado estilo tooltip de WoW */
.glass-panel {
    background: linear-gradient(180deg, rgba(40, 30, 18, 0.88), rgba(18, 14, 10, 0.94));
    border: 1px solid var(--border-dark);
    box-shadow:
        inset 0 1px 0 rgba(230, 198, 106, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 6px 22px rgba(0, 0, 0, 0.5);
}

/* Elemento de navegación (sidebar) */
.nav-item {
    color: var(--text-muted);
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(200, 162, 74, 0.08);
    color: var(--gold-light);
}

.nav-item.tab-active {
    background: linear-gradient(90deg, rgba(200, 162, 74, 0.20), rgba(200, 162, 74, 0.02));
    color: var(--gold-light);
    border-color: rgba(200, 162, 74, 0.25);
    box-shadow: inset 2px 0 0 var(--gold);
}

.nav-item.tab-active:hover {
    background: linear-gradient(90deg, rgba(200, 162, 74, 0.28), rgba(200, 162, 74, 0.04));
    color: #ffe08a;
}

.nav-item-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

/* Botón estilo WoW */
.btn-wow {
    background: linear-gradient(180deg, #5a4318, #3a2c10);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 1px 0 rgba(230, 198, 106, 0.25), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.btn-wow:hover {
    background: linear-gradient(180deg, #6b5220, #4a3812);
    color: #ffe08a;
    border-color: var(--gold-light);
}

/* Icono de objeto de WoW */
.wow-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid var(--gold-dark);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    flex-shrink: 0;
    display: inline-block;
}

.wow-icon-lg {
    width: 30px;
    height: 30px;
}

.wow-icon-sm {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* Selector de días (Candados) */
.day-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    background: rgba(30, 22, 14, 0.5);
    transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.day-toggle:hover {
    border-color: var(--gold-dark);
    color: var(--text-main);
}

.day-toggle:has(input:checked) {
    background: rgba(200, 162, 74, 0.22);
    border-color: var(--gold);
    color: var(--gold-light);
}

/* Selector de iconos en Configuración */
.wow-icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.wow-icon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
    background: rgba(30, 22, 14, 0.6);
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, transform 0.12s;
}

.wow-icon-option:hover {
    border-color: var(--gold);
    background: rgba(200, 162, 74, 0.12);
    transform: translateY(-1px);
}

.wow-icon-option.selected {
    border-color: var(--gold-light);
    background: rgba(200, 162, 74, 0.18);
    box-shadow: 0 0 0 1px rgba(200, 162, 74, 0.4);
}

.wow-icon-option img {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid var(--gold-dark);
}

/* Animación de aparición */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* ==========================================================================
   Vista Calendario
   ========================================================================== */

.cal-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.cal-nav-btn {
    background: linear-gradient(180deg, #3a2c10, #241b0b);
    border: 1px solid var(--gold-dark);
    color: var(--gold-light);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cal-nav-btn:hover {
    background: linear-gradient(180deg, #4a3812, #332710);
    color: #ffe08a;
    border-color: var(--gold);
}

.cal-month {
    margin-left: auto;
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--gold-light);
    text-transform: capitalize;
}

.cal-scroll {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-dark);
    background: rgba(14, 11, 8, 0.8);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
}

.cal-grid {
    min-width: 720px;
}

.cal-header,
.cal-body {
    display: grid;
    grid-template-columns: 56px repeat(7, 1fr);
}

.cal-header {
    border-bottom: 1px solid var(--border-dark);
    position: sticky;
    top: 0;
    z-index: 5;
    background: #141009;
}

.cal-gutter-spacer {
    border-right: 1px solid var(--border-dark);
}

.cal-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 4px;
    border-right: 1px solid var(--border-dark);
}

.cal-day-name {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cal-day-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.cal-day-today .cal-day-num {
    color: #0e0b08;
    background: var(--gold);
    border-radius: 9999px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-day-today .cal-day-name {
    color: var(--gold-light);
}

.cal-gutter {
    position: relative;
    border-right: 1px solid var(--border-dark);
}

.cal-hour-label {
    position: absolute;
    right: 8px;
    transform: translateY(-50%);
    font-size: 10px;
    color: #6b5a38;
    user-select: none;
}

.cal-col {
    position: relative;
    border-right: 1px solid var(--border-dark);
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 59px,
        rgba(74, 58, 30, 0.35) 59px,
        rgba(74, 58, 30, 0.35) 60px
    );
}

.cal-event {
    position: absolute;
    left: 3px;
    right: 3px;
    border-radius: 5px;
    padding: 4px 6px;
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    cursor: grab;
    user-select: none;
    touch-action: none;
    border: 1px solid rgba(0, 0, 0, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: filter 0.15s;
}

.cal-event:active {
    cursor: grabbing;
}

.cal-event:hover {
    filter: brightness(1.12);
}

.cal-resize-handle {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 7px;
    cursor: ns-resize;
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.cal-event-head {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cal-event-title {
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.cal-event-time {
    font-size: 10px;
    opacity: 0.9;
}

.cal-event-task {
    margin-top: 3px;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cal-event-task .wow-icon {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Vista Configuración
   ========================================================================== */

.config-sub {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border: 1px solid;
    border-radius: 9999px;
    font-size: 12px;
    color: var(--text-main);
    background: rgba(30, 22, 14, 0.6);
}

.config-sub-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8a6d2f;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    line-height: 1;
    transition: color 0.15s;
}

.config-sub-del:hover {
    color: #f87171;
}
