:root {
    --ev-bg: #f3f8ff;
    --ev-card: #ffffff;
    --ev-border: #d8e6f3;
    --ev-title: #123b63;
    --ev-text: #3f5d78;
    --ev-muted: #6a84a0;
    --ev-primary: #0b6cb6;
    --ev-primary-strong: #0a5ea0;
    --ev-primary-soft: #eaf4ff;
    --ev-success-soft: #ecf9f0;
    --ev-success-text: #1e7444;
    --ev-warn-soft: #fff6e8;
    --ev-warn-text: #a1691f;
    --ev-shadow: 0 10px 32px rgba(8, 57, 105, 0.08);
}

.ev-page {
    background: linear-gradient(180deg, var(--ev-bg) 0%, #f9fcff 45%, #ffffff 100%);
    min-height: calc(100vh - 84px);
    padding-bottom: 42px;
}

.ev-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 18px;
}

.ev-hero {
    background: linear-gradient(140deg, #0b5ea7 0%, #0e8fc1 55%, #1db8da 100%);
    color: #fff;
    padding: 52px 0 44px;
    margin-bottom: 22px;
}

.ev-hero .ev-container {
    display: flex;
    flex-direction: column;
}

.ev-hero h1 {
    margin: 0 0 12px;
    font-size: 2rem;
}

.ev-hero p {
    margin: 0 0 22px;
    max-width: 760px;
    line-height: 1.55;
    opacity: 0.94;
}

.ev-topbar {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ev-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ev-chip {
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.ev-chip-stat {
    min-width: 220px;
    min-height: 48px;
    padding: 12px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.ev-hero-actions {
    margin-top: 18px;
    justify-content: center;
}

.ev-panel {
    background: var(--ev-card);
    border: 1px solid var(--ev-border);
    border-radius: 16px;
    box-shadow: var(--ev-shadow);
    padding: 14px;
    margin-bottom: 14px;
}

.ev-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

.ev-filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    align-items: end;
}

.ev-date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ev-advanced details {
    border: 1px dashed #c7d9eb;
    border-radius: 12px;
    padding: 10px 12px;
    background: #f7fbff;
}

.ev-advanced summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--ev-title);
    list-style: none;
}

.ev-advanced summary::marker {
    display: none;
}

.ev-advanced summary::-webkit-details-marker {
    display: none;
}

.ev-advanced .ev-toolbar {
    margin-top: 10px;
}

.ev-field {
    display: grid;
    gap: 6px;
}

.ev-field label {
    font-size: 0.86rem;
    color: var(--ev-muted);
    font-weight: 600;
}

.ev-input,
.ev-select,
.ev-textarea {
    width: 100%;
    border: 1px solid #c7d9eb;
    border-radius: 10px;
    padding: 10px 11px;
    font: inherit;
    color: #204464;
    background: #fff;
}

.ev-textarea {
    min-height: 130px;
    resize: vertical;
}

.ev-input:focus,
.ev-select:focus,
.ev-textarea:focus {
    outline: none;
    border-color: #6faede;
    box-shadow: 0 0 0 3px rgba(27, 126, 202, 0.12);
}

.ev-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ev-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ev-btn.primary {
    background: linear-gradient(135deg, var(--ev-primary), #1684c9);
    color: #fff;
}

.ev-btn.primary:hover {
    background: linear-gradient(135deg, var(--ev-primary-strong), #1278ba);
}

.ev-btn.secondary {
    background: #edf5ff;
    border: 1px solid #d4e6f7;
    color: #1d5f95;
}

.ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.ev-card {
    background: #fff;
    border: 1px solid #dce8f5;
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(10, 66, 120, 0.06);
    padding: 13px;
    display: grid;
    gap: 8px;
}

.ev-card h3 {
    margin: 0;
    color: #0f2f4d;
    font-size: 1.02rem;
}

.ev-card p {
    margin: 0;
    color: var(--ev-text);
    font-size: 0.9rem;
    line-height: 1.45;
}

.ev-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ev-badge {
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--ev-primary-soft);
    color: #1c598f;
}

.ev-badge.success {
    background: var(--ev-success-soft);
    color: var(--ev-success-text);
}

.ev-badge.warn {
    background: var(--ev-warn-soft);
    color: var(--ev-warn-text);
}

.ev-empty {
    border: 1px dashed #bfd7eb;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    background: #f8fcff;
    color: #45647f;
}

.ev-empty h3 {
    margin: 0 0 8px;
    color: #123b63;
}

.stars-read {
    color: #d08a18;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 6px;
}

.rating-picker {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.rating-picker input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-picker label {
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    color: #c9d5e2;
    transition: color 0.15s ease, transform 0.15s ease;
}

.rating-picker label:hover,
.rating-picker label:hover ~ label {
    color: #f0b23e;
    transform: translateY(-1px);
}

.rating-picker input:checked ~ label {
    color: #e4a022;
}

.rating-caption {
    color: #5f7a96;
    font-size: 0.86rem;
}

.ev-detail {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 12px;
}

.ev-cat-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.ev-cat-head h2 {
    margin: 0 0 6px;
    color: var(--ev-title);
    font-size: 1.25rem;
    letter-spacing: 0.2px;
}

.ev-cat-head p {
    margin: 0;
    color: var(--ev-text);
    font-size: 0.92rem;
}

.ev-cat-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 6px 10px;
    scrollbar-width: thin;
}

.ev-cat-card {
    background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
    border: 1px solid #c2dbf3;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--ev-title);
    box-shadow: 0 10px 22px rgba(10, 66, 120, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    min-width: 220px;
}

.ev-cat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(10, 84, 150, 0.22);
    border-color: #7fb2e4;
    background: linear-gradient(180deg, #dfefff 0%, #c6e2ff 100%);
    color: #0d3a62;
}

.ev-cat-text h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.ev-cat-text p {
    margin: 0;
    color: var(--ev-text);
    font-size: 0.88rem;
}

.ev-cat-card:hover .ev-cat-text p,
.ev-cat-card.is-active .ev-cat-text p {
    color: #29567d;
}

.ev-cat-card h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.ev-cat-card.is-active {
    background: linear-gradient(180deg, #dfefff 0%, #c6e2ff 100%);
    color: #0d3a62;
    border-color: #7fb2e4;
    box-shadow: 0 12px 24px rgba(10, 84, 150, 0.22);
}

.ev-cal-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
}

.ev-cal-title h2 {
    margin: 0 0 6px;
    font-size: 1.3rem;
    color: var(--ev-title);
}

.ev-cal-title p {
    margin: 0;
    color: var(--ev-text);
    font-size: 0.95rem;
}

.ev-cal-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ev-cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #cfe0f2;
    background: #f3f8ff;
    color: #1c598f;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    gap: 8px;
}

.ev-cat-btn:hover {
    background: #e6f2ff;
    box-shadow: 0 6px 18px rgba(12, 72, 128, 0.12);
    transform: translateY(-1px);
}

.ev-cat-btn.is-active {
    background: linear-gradient(135deg, var(--ev-primary), #1684c9);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(12, 84, 150, 0.25);
}

.ev-cat-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ev-cat-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.ev-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 10px;
    color: var(--ev-text);
    font-size: 0.85rem;
}

.ev-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.ev-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.ev-sidebar {
    display: grid;
    gap: 12px;
    align-content: start;
}

.fc .fc-toolbar-title {
    color: var(--ev-title);
    font-size: 1.15rem;
}

.fc .fc-button-primary {
    background: var(--ev-primary);
    border-color: var(--ev-primary);
}

.fc .fc-button-primary:hover,
.fc .fc-button-primary:focus {
    background: var(--ev-primary-strong);
    border-color: var(--ev-primary-strong);
}

.fc .fc-daygrid-day-number {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc .fc-daygrid-event,
.fc .fc-event-title,
.fc .fc-event-time {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc .fc-daygrid-event {
    font-size: 0.78rem;
    line-height: 1.2;
    max-width: 100%;
    box-sizing: border-box;
    padding: 2px 4px;
    border-radius: 6px;
}

.fc .fc-daygrid-day-events {
    overflow: hidden;
}

.fc .fc-daygrid-event-harness {
    max-width: 100%;
}

.fc .fc-daygrid-day-frame {
    overflow: hidden;
}

.fc .fc-event-title {
    display: block;
}

.fc .fc-daygrid-event {
    background: transparent;
    border: none;
}

.fc .fc-event-title {
    display: none;
}

.fc .fc-daygrid-event-dot {
    border-color: currentColor;
    width: 12px;
    height: 12px;
    border-width: 7px;
}

.ev-calendar--per-day .fc-daygrid-event {
    display: none;
}

.ev-day-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    height: 28px;
    padding: 0 10px;
    margin-left: 6px;
    border-radius: 999px;
    background: #d9ecff;
    color: #0b6cb6;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid #a9cef3;
    text-decoration: none;
}

.ev-day-marker.is-past {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #d6d9df;
}

@media (max-width: 900px) {
    .ev-detail {
        grid-template-columns: 1fr;
    }

    .ev-cat-head {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .ev-cal-head {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .ev-hero h1 {
        font-size: 1.6rem;
    }

    .ev-chip-stat {
        min-width: 100%;
    }

    .ev-toolbar {
        grid-template-columns: 1fr;
    }

    .ev-filter-bar {
        grid-template-columns: 1fr;
    }

    .ev-date-range {
        grid-template-columns: 1fr;
    }
}
