/* Dippel Holdings Calendar - Google Calendar Inspired Dark Theme */

/* ═══════════════════════════════════════
   1. RESET & VARIABLES
   ═══════════════════════════════════════ */
:root {
    /* Category Colors */
    --cat-meeting: #4285f4;
    --cat-appointment: #ea4335;
    --cat-reminder: #fbbc04;
    --cat-personal: #34a853;
    --cat-work: #7b1fa2;
    --cat-invest-system: #ff6d00;
    --cat-imported: #00897b;
    --cat-other: #757575;
    --cat-default: #4285f4;

    /* Core Palette */
    --primary: #8ab4f8;
    --primary-dark: #4285f4;
    --primary-surface: rgba(138, 180, 248, 0.08);

    --bg: #111111;
    --bg-elevated: #1e1e1e;
    --bg-surface: #282828;
    --bg-hover: #333333;
    --bg-active: #3c3c3c;

    --text: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;
    --text-on-color: #ffffff;

    --border: #333333;
    --border-light: #444444;

    --danger: #ea4335;
    --success: #34a853;
    --warning: #fbbc04;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);

    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 50%;

    --sidebar-width: 260px;
    --topbar-height: 56px;

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ═══════════════════════════════════════
   2. LAYOUT
   ═══════════════════════════════════════ */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-area {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ═══════════════════════════════════════
   3. TOP BAR
   ═══════════════════════════════════════ */
.top-bar {
    height: var(--topbar-height);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 200;
    flex-shrink: 0;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-right: 16px;
    white-space: nowrap;
}

.logo i { color: var(--primary); }

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.icon-btn:hover { background: var(--bg-hover); color: var(--text); }

.btn-today {
    background: none;
    border: 1px solid var(--border-light);
    color: var(--text);
    padding: 6px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-today:hover { background: var(--bg-hover); }

.nav-arrows { display: flex; gap: 2px; }

.period-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 0 12px;
    width: 240px;
    transition: var(--transition);
}

.search-box:focus-within {
    background: var(--bg);
    box-shadow: 0 0 0 2px var(--primary-dark);
    width: 320px;
}

.search-box i { color: var(--text-muted); font-size: 0.85rem; }

.search-box input {
    background: none;
    border: none;
    color: var(--text);
    padding: 8px;
    width: 100%;
    outline: none;
    font-size: 0.85rem;
}

.search-box input::placeholder { color: var(--text-muted); }

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 500;
    box-shadow: var(--shadow-lg);
}

.search-results.active { display: block; }

.search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-hover); }

.search-result-item .result-title {
    font-weight: 500;
    font-size: 0.85rem;
}

.search-result-item .result-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* View Switcher */
.view-switcher {
    display: flex;
    background: var(--bg-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.view-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.view-btn:hover { color: var(--text); background: var(--bg-hover); }
.view-btn.active { color: var(--primary); background: var(--primary-surface); }

/* ═══════════════════════════════════════
   4. SIDEBAR
   ═══════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    padding: 16px;
    overflow-y: auto;
    flex-shrink: 0;
    transition: width var(--transition), padding var(--transition);
}

.sidebar.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
    border-right: none;
}

.btn-create {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.btn-create:hover {
    background: var(--bg-hover);
    box-shadow: var(--shadow-md);
}

.btn-create i { color: var(--primary); font-size: 1.1rem; }

/* Mini Calendar */
.mini-calendar {
    margin-bottom: 20px;
}

.mini-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
}

.mini-cal-header span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.mini-cal-nav {
    display: flex;
    gap: 2px;
}

.mini-cal-nav button {
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
}

.mini-cal-nav button:hover { background: var(--bg-hover); }

.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    text-align: center;
}

.mini-cal-weekday {
    font-size: 0.65rem;
    color: var(--text-muted);
    padding: 4px 0;
    font-weight: 600;
}

.mini-cal-day {
    font-size: 0.75rem;
    padding: 0;
    width: 28px;
    height: 28px;
    line-height: 28px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    margin: 0 auto;
}

.mini-cal-day:hover { background: var(--bg-hover); }
.mini-cal-day.other-month { color: var(--text-muted); opacity: 0.4; }
.mini-cal-day.today { background: var(--primary-dark); color: var(--text-on-color); font-weight: 600; }
.mini-cal-day.selected { background: var(--primary-surface); color: var(--primary); }
.mini-cal-day.has-events { font-weight: 700; color: var(--text); }

/* Category Legend */
.category-legend {
    margin-bottom: 20px;
}

.category-legend h4,
.upcoming-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    padding: 0 4px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.category-item:hover { background: var(--bg-hover); }
.category-item.active { color: var(--text); }

.category-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.category-item.inactive .category-dot { opacity: 0.3; }
.category-item.inactive { opacity: 0.5; }

/* Upcoming Section */
.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upcoming-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
}

.upcoming-item:hover { background: var(--bg-hover); }

.upcoming-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    margin-top: 5px;
    flex-shrink: 0;
}

.upcoming-info { flex: 1; min-width: 0; }
.upcoming-title { font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming-date { font-size: 0.7rem; color: var(--text-muted); }

/* ═══════════════════════════════════════
   5. CALENDAR MAIN
   ═══════════════════════════════════════ */
.calendar-main {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.calendar-view {
    display: none;
    height: 100%;
}

.calendar-view.active { display: flex; flex-direction: column; }

/* ═══════════════════════════════════════
   6. MONTH VIEW
   ═══════════════════════════════════════ */
.month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.month-weekday {
    padding: 8px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    flex: 1;
    overflow: hidden;
    min-height: 0;
    border: 1px solid var(--border);
}

.month-cell {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 2px;
    min-height: 0;
    overflow: hidden;
    cursor: pointer;
    transition: background var(--transition);
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
}

.month-cell:nth-child(7n) { border-right: none; }
.month-cell:hover { background: var(--bg-hover); }
.month-cell.other-month { opacity: 0.35; }

.month-cell.today .cell-date-num {
    background: var(--primary-dark);
    color: var(--text-on-color);
    border-radius: var(--radius-full);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-cell.drag-over {
    background: var(--primary-surface) !important;
    outline: 2px dashed var(--primary);
    outline-offset: -2px;
}

.cell-date-num {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin: 0 auto 2px auto;
    flex-shrink: 0;
}

.cell-events {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cell-event {
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-on-color);
    font-weight: 500;
    line-height: 1.6;
    flex-shrink: 0;
}

.cell-event:hover {
    filter: brightness(1.15);
    transform: translateX(1px);
}

.cell-event.dragging {
    opacity: 0.5;
}

.cell-event.all-day {
    font-weight: 600;
}

.cell-more {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 1px 6px;
    cursor: pointer;
    font-weight: 600;
    flex-shrink: 0;
    transition: var(--transition);
}

.cell-more:hover { color: var(--primary); background: var(--primary-surface); border-radius: var(--radius-sm); }

/* ═══════════════════════════════════════
   7. WEEK VIEW
   ═══════════════════════════════════════ */
.week-header {
    display: grid;
    grid-template-columns: 56px repeat(7, 1fr);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.week-header-spacer {
    border-right: 1px solid var(--border);
}

.week-header-day {
    text-align: center;
    padding: 8px 4px;
    border-right: 1px solid var(--border);
}

.week-header-day:last-child { border-right: none; }

.week-header-day .day-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.week-header-day .day-num {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    line-height: 36px;
    margin: 2px auto 0;
    border-radius: var(--radius-full);
}

.week-header-day.today .day-num {
    background: var(--primary-dark);
    color: var(--text-on-color);
    font-weight: 500;
}

/* All-day events row in week view */
.week-allday-row {
    display: grid;
    grid-template-columns: 56px repeat(7, 1fr);
    border-bottom: 1px solid var(--border);
    min-height: 28px;
    flex-shrink: 0;
}

.week-allday-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    padding: 4px 8px;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
}

.week-allday-cell {
    border-right: 1px solid var(--border);
    padding: 2px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.week-allday-cell:last-child { border-right: none; }

/* Time grid */
.week-body {
    display: grid;
    grid-template-columns: 56px repeat(7, 1fr);
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.week-time-col {
    border-right: 1px solid var(--border);
}

.week-time-label {
    height: 48px;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: right;
    padding-right: 8px;
    position: relative;
    top: -6px;
}

.week-day-col {
    border-right: 1px solid var(--border);
    position: relative;
}

.week-day-col:last-child { border-right: none; }

.week-hour-slot {
    height: 48px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.week-hour-slot.drag-over { background: var(--primary-surface); }

.week-event {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    font-size: 0.7rem;
    color: var(--text-on-color);
    cursor: pointer;
    overflow: hidden;
    z-index: 10;
    transition: filter var(--transition);
    box-shadow: var(--shadow-sm);
}

.week-event:hover { filter: brightness(1.15); z-index: 20; }

.week-event .event-title { font-weight: 600; font-size: 0.7rem; }
.week-event .event-time { font-size: 0.6rem; opacity: 0.85; }

/* Current time indicator */
.time-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--danger);
    z-index: 50;
    pointer-events: none;
}

.time-indicator::before {
    content: '';
    position: absolute;
    left: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--danger);
}

/* ═══════════════════════════════════════
   8. DAY VIEW
   ═══════════════════════════════════════ */
.day-header {
    text-align: center;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.day-header .day-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.day-header .day-num {
    font-size: 2rem;
    font-weight: 400;
    color: var(--text);
    width: 48px;
    height: 48px;
    line-height: 48px;
    margin: 4px auto;
    border-radius: var(--radius-full);
}

.day-header.today .day-num {
    background: var(--primary-dark);
    color: var(--text-on-color);
}

.day-allday-row {
    display: grid;
    grid-template-columns: 56px 1fr;
    border-bottom: 1px solid var(--border);
    min-height: 28px;
    flex-shrink: 0;
}

.day-allday-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    padding: 4px 8px;
    border-right: 1px solid var(--border);
}

.day-allday-events {
    padding: 2px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.day-body {
    display: grid;
    grid-template-columns: 56px 1fr;
    flex: 1;
    overflow-y: auto;
}

.day-time-col {
    border-right: 1px solid var(--border);
}

.day-events-col {
    position: relative;
}

/* ═══════════════════════════════════════
   9. EVENT POPOVER
   ═══════════════════════════════════════ */
.event-popover {
    position: fixed;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 320px;
    z-index: 400;
    display: none;
    overflow: hidden;
}

.event-popover.active { display: block; }

.popover-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 8px 0;
    position: relative;
}

.popover-color-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.popover-body {
    padding: 4px 16px 12px;
}

.popover-body h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.popover-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.popover-meta i { width: 18px; margin-right: 6px; }

.popover-body p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    padding: 8px 12px;
    border-top: 1px solid var(--border);
}

/* More Popover ("+X more") */
.more-popover {
    position: fixed;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 260px;
    max-height: 350px;
    z-index: 400;
    display: none;
    overflow: hidden;
}

.more-popover.active { display: block; }

.more-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.more-popover-header h4 {
    font-size: 0.85rem;
    font-weight: 600;
}

.more-popover-events {
    padding: 6px;
    overflow-y: auto;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.more-popover-event {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-on-color);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.more-popover-event:hover { filter: brightness(1.15); }

/* ═══════════════════════════════════════
   10. MODAL
   ═══════════════════════════════════════ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.modal.active { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--bg-elevated);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content { transform: translateY(0) scale(1); }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 1.1rem; font-weight: 600; }

form { padding: 20px; }

.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group label i { margin-right: 6px; color: var(--text-muted); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.input-title {
    font-size: 1.2rem !important;
    border: none !important;
    border-bottom: 2px solid var(--border) !important;
    border-radius: 0 !important;
    padding: 8px 0 !important;
    background: transparent !important;
}

.input-title:focus { border-bottom-color: var(--primary) !important; }

input, textarea, select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.85rem;
    transition: var(--transition);
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.15);
}

textarea { resize: vertical; }

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa0a6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.action-right { display: flex; gap: 8px; }

.btn-flat {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-flat:hover { background: var(--bg-hover); color: var(--text); }

.btn-save {
    background: var(--primary-dark);
    color: var(--text-on-color);
    border: none;
    padding: 8px 24px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-save:hover { background: #5a9cf5; }

.btn-delete {
    background: none;
    border: none;
    color: var(--danger);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-delete:hover { background: rgba(234, 67, 53, 0.1); }

/* ═══════════════════════════════════════
   11. TOAST NOTIFICATIONS
   ═══════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--bg-surface);
    color: var(--text);
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toastIn 0.3s ease forwards;
    border-left: 4px solid var(--primary);
    min-width: 280px;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast.removing { animation: toastOut 0.3s ease forwards; }

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

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

/* ═══════════════════════════════════════
   12. KEYBOARD SHORTCUT HELP
   ═══════════════════════════════════════ */
.shortcut-help {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.shortcut-help.active { opacity: 1; visibility: visible; }

.shortcut-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 340px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.shortcut-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.shortcut-content > .icon-btn {
    position: absolute;
    top: 12px;
    right: 12px;
}

.shortcut-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

kbd {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    font-size: 0.75rem;
    font-family: inherit;
    min-width: 28px;
    text-align: center;
    color: var(--text);
}

/* ═══════════════════════════════════════
   13. SCROLLBAR
   ═══════════════════════════════════════ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ═══════════════════════════════════════
   14. RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .search-box { width: 180px; }
    .search-box:focus-within { width: 240px; }
    .logo span { display: none; }
    .period-label { font-size: 0.9rem; }
}

@media (max-width: 600px) {
    .top-bar { padding: 0 8px; }
    .top-bar-left { gap: 6px; }
    .view-switcher { display: none; }
    .search-box { width: 140px; }
    .month-cell { padding: 1px; }
    .cell-date-num { font-size: 0.7rem; width: 22px; height: 22px; }
    .cell-event { font-size: 0.6rem; padding: 0 4px; }
    .btn-today { padding: 4px 10px; font-size: 0.75rem; }
}
