@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #fafbfe;
    color: #1e293b;
    overflow-x: hidden;
}

#app-root {
    width: 100%;
    min-height: 100vh;
}

.dashboard-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ffe4ef;
    flex-wrap: wrap;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 2.3rem;
    margin: 0;
    background: linear-gradient(135deg, #e11d48, #ff1493, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.festival-pill {
    background: linear-gradient(135deg, #fff1f2, #fce7f3);
    border: 1px solid #fda4af;
    color: #be123c;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.header-subtitle {
    margin: 6px 0 0;
    font-size: 0.92rem;
    color: #64748b;
    font-weight: 500;
}

.header-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.mode-group, .filter-toggles {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.view-toggle {
    background: #ffffff;
    border: 2px solid #f472b6;
    color: #db2777;
    padding: 9px 18px;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle:hover, .view-toggle.active {
    background: linear-gradient(135deg, #e11d48, #db2777);
    border-color: #db2777;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(219, 39, 119, 0.32);
}

.chip-toggle {
    background: #fff;
    border: 1.5px solid #cbd5e1;
    color: #475569;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-toggle:hover {
    border-color: #db2777;
    color: #db2777;
}

.chip-toggle.active, .chip-toggle.admin-active {
    background: #fdf2f8;
    border-color: #db2777;
    color: #be185d;
}

/* Filter Bar */
.filter-bar {
    background: #ffffff;
    border: 1px solid #fce7f3;
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 24px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 240px;
    padding: 11px 16px;
    border: 2px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 0.94rem;
    font-family: inherit;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    background: #ffffff;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.12);
}

.clear-btn {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.clear-btn:hover {
    background: #e11d48;
    color: #ffffff;
}

.pills-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pills-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    min-width: 72px;
    flex-shrink: 0;
}

.pills-scroll {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 4px;
    flex: 1;
    scrollbar-width: thin;
}

.pills-scroll::-webkit-scrollbar {
    height: 4px;
}
.pills-scroll::-webkit-scrollbar-thumb {
    background: #f9a8d4;
    border-radius: 4px;
}

.day-pill, .venue-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.day-pill:hover, .venue-pill:hover {
    border-color: #f472b6;
    background: #fdf2f8;
    color: #be185d;
}

.day-pill.today {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #b45309;
}

.day-pill.active, .venue-pill.active {
    background: linear-gradient(135deg, #e11d48, #db2777);
    border-color: #db2777;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(219, 39, 119, 0.25);
}

/* Ticket Status Pills */
.ticket-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.ticket-pill.large {
    padding: 5px 12px;
    font-size: 0.8rem;
}

.ticket-pill.available {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.ticket-pill.few {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fdba74;
}

.ticket-pill.sold-out {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.ticket-pill.free {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.ticket-pill.closed {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

/* Tags */
.venue-tag {
    font-size: 0.74rem;
    color: #475569;
    font-weight: 600;
}

.section-tag {
    display: inline-block;
    background: #f3e8ff;
    color: #6d28d9;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.event-tag {
    display: inline-block;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* === 1. Calendar View === */
.calendar-container {
    padding: 4px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.calendar-grid.single-day {
    grid-template-columns: 1fr;
    max-width: 960px;
    margin: 0 auto;
}

@media (max-width: 1320px) {
    .calendar-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
    .calendar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .calendar-grid { grid-template-columns: 1fr; }
}

.cal-month {
    background: #ffffff;
    border: 2px solid #fce7f3;
    border-radius: 14px;
    padding: 14px;
    height: 620px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.calendar-grid.single-day .cal-month {
    height: auto;
    max-height: none;
}

.cal-month.today-box {
    border-color: #f43f5e;
    box-shadow: 0 8px 26px rgba(244, 63, 94, 0.12);
}

.cal-month.empty {
    opacity: 0.6;
    background: #f8fafc;
}

.cal-month-header {
    border-bottom: 2px solid #fdf2f8;
    padding-bottom: 10px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.cal-month-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.cal-month-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #be185d;
}

.cal-count-badge {
    background: #fdf2f8;
    color: #db2777;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 12px;
}

.cal-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
    min-width: 0;
    min-height: 0;
}

.cal-events::-webkit-scrollbar {
    width: 5px;
}
.cal-events::-webkit-scrollbar-thumb {
    background-color: #f9a8d4;
    border-radius: 8px;
}

.cal-event {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #ffffff;
    border-radius: 10px;
    padding: 9px;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #94a3b8;
    min-width: 0;
    flex-shrink: 0;
}

.cal-event.available {
    background: #f8fafc;
    border-color: #bae6fd;
    border-left: 5px solid #0284c7;
}

.cal-event.few {
    background: #fffbeb;
    border-color: #fed7aa;
    border-left: 5px solid #ea580c;
}

.cal-event.free {
    background: #f0fdf4;
    border-color: #bbf7d0;
    border-left: 5px solid #16a34a;
}

.cal-event.sold-out {
    background: #fafafa;
    border-color: #e2e8f0;
    border-left: 5px solid #ef4444;
    opacity: 0.72;
}

.cal-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(219, 39, 119, 0.14);
    border-color: #f472b6;
}

.cal-event-img {
    width: 46px;
    height: 62px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}

.cal-event-img.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #fce7f3, #ede9fe);
}

.cal-event-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cal-event-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.cal-time {
    font-size: 0.73rem;
    font-weight: 700;
    color: #0f172a;
}

.cal-event-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cal-event-sub {
    font-size: 0.72rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

/* === 2. Venue View === */
.venue-view-container {
    padding: 4px 0;
}

.venue-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.venue-card {
    background: #ffffff;
    border: 1.5px solid #fce7f3;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.venue-card-header {
    background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 50%, #f5f3ff 100%);
    padding: 16px 22px;
    border-bottom: 1px solid #fce7f3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.venue-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.area-pill {
    background: #db2777;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.venue-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
}

.venue-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 2px;
}

.venue-count-badge {
    background: #ffffff;
    border: 1px solid #f9a8d4;
    color: #be185d;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
}

.venue-screenings-list {
    display: flex;
    flex-direction: column;
    divide-y: 1px solid #f1f5f9;
}

.venue-screening-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s ease;
    border-left: 5px solid transparent;
}

.venue-screening-row.available { border-left-color: #0284c7; }
.venue-screening-row.few { border-left-color: #ea580c; background: #fffdf9; }
.venue-screening-row.free { border-left-color: #16a34a; }
.venue-screening-row.sold-out { border-left-color: #ef4444; opacity: 0.72; }

.venue-screening-row:hover {
    background: #fdf2f8;
}

.vs-datetime {
    width: 128px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vs-date {
    font-size: 0.8rem;
    font-weight: 800;
    color: #be185d;
}

.vs-time {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
}

.vs-runtime {
    font-size: 0.75rem;
    color: #64748b;
}

.vs-screen-badge {
    display: inline-block;
    align-self: flex-start;
    margin-top: 3px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
}

.vs-poster {
    width: 64px;
    height: 86px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}

.vs-poster.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #fce7f3, #ede9fe);
}

.vs-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vs-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vs-title {
    font-size: 1.04rem;
    font-weight: 800;
    color: #0f172a;
}

.vs-title-ja {
    font-size: 0.84rem;
    color: #475569;
}

.vs-submeta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #64748b;
}

.vs-event-badges {
    font-size: 0.78rem;
    font-weight: 700;
    color: #b45309;
}

.vs-guest {
    font-size: 0.76rem;
    color: #475569;
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 6px;
}

.vs-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.vs-ticket-btn {
    background: #ffffff;
    border: 1.5px solid #db2777;
    color: #db2777;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.vs-ticket-btn:hover {
    background: #db2777;
    color: #ffffff;
}

@media (max-width: 720px) {
    .venue-screening-row {
        flex-wrap: wrap;
        padding: 14px;
    }
    .vs-datetime {
        width: auto;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        width: 100%;
    }
    .vs-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 6px;
    }
}

/* === 3. Cards View === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
}

.event-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    border: 1.5px solid #f1f5f9;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.event-card.available {
    border-color: #bae6fd;
}

.event-card.few {
    border: 2px solid #f97316;
    border-left: 7px solid #f97316;
}

.event-card.free {
    border-color: #86efac;
}

.event-card.sold-out {
    opacity: 0.68;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 32px rgba(219, 39, 119, 0.16);
}

.card-image-wrapper {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, #fce7f3, #ede9fe);
    overflow: hidden;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.event-card:hover .card-image {
    transform: scale(1.05);
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #be185d;
}

.card-section-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.card-ticket-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.card-ticket-badge.available { background: #dcfce7; color: #15803d; }
.card-ticket-badge.few { background: #ffedd5; color: #c2410c; }
.card-ticket-badge.sold-out { background: #fee2e2; color: #b91c1c; }
.card-ticket-badge.free { background: #e0f2fe; color: #0369a1; }
.card-ticket-badge.closed { background: #f1f5f9; color: #475569; }

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.08rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: #0f172a;
    line-height: 1.35;
}

.card-subtitle-ja {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 12px;
}

.card-meta {
    font-size: 0.85rem;
    color: #334155;
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.card-meta-icon {
    flex-shrink: 0;
}

.card-event-highlight {
    margin-top: 6px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
}

.card-synopsis {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
    margin: 10px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.card-button {
    display: inline-block;
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid #f9a8d4;
    padding: 7px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.82rem;
}

.card-ticket-link {
    background: linear-gradient(135deg, #e11d48, #db2777);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}

/* Admin Panel */
.admin-panel {
    background: linear-gradient(135deg, #fff1f2 0%, #ffffff 100%);
    border: 2px solid #f43f5e;
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 22px;
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #be123c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-badge {
    background: #e11d48;
    color: #fff;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
}

.admin-submit-btn {
    background: linear-gradient(135deg, #e11d48, #db2777);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.admin-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #fecdd3;
    color: #be123c;
    font-weight: 600;
    font-size: 0.88rem;
}

.loading-state, .empty-state, .empty-box-msg {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-weight: 600;
}
