/* ============================================
   AGENDA - MOBILE-FIRST COMPACT REDESIGN
   Matches EventsList styling patterns
   ============================================ */

/* ====== CSS VARIABLES ====== */
:root {
    /* Brand Colors */
    --brand-primary: #0d2b35;
    --brand-primary-hover: #1a4255;
    --brand-gold: #d4af37;
    --brand-gold-hover: #c49a2a;

    /* Status Colors */
    --status-draft: #94a3b8;
    --status-reserved: #3b82f6;
    --status-confirmed: #16a34a;
    --status-live: #ef4444;
    --status-completed: #8b5cf6;
    --status-closed: #475569;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ====== ANIMATIONS ====== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== BASE STYLES (Mobile First) ====== */
.ag-page {
    min-height: 100vh;
    background: var(--gray-50);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

.ag-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0.75rem;
}

/* ====== BREADCRUMB ====== */
.ag-breadcrumb {
    display: none;
}

.ag-breadcrumb-item,
.ag-breadcrumb-separator {
    display: none;
}

/* ====== HEADER ====== */
.ag-header {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.ag-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.ag-header-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-hover));
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.ag-header-text {
    min-width: 0;
}

.ag-header-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.ag-header-subtitle {
    display: none;
}

.ag-header-actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
}

/* ====== BUTTONS ====== */
.ag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: var(--font-sans);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.ag-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ag-btn i {
    font-size: 0.875rem;
}

.ag-btn span {
    display: none;
}

.ag-btn-primary {
    background: linear-gradient(135deg, var(--brand-gold), var(--brand-gold-hover));
    color: var(--gray-900);
    border-color: var(--brand-gold);
}

.ag-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.ag-btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border-color: transparent;
}

.ag-btn-ghost:hover:not(:disabled) {
    background: var(--gray-100);
}

/* ====== LOADING ====== */
.ag-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 0.75rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.ag-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--gray-200);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.ag-loading-container span {
    font-size: 0.8125rem;
    color: var(--gray-700);
}

/* ====== MAIN CONTENT LAYOUT ====== */
.ag-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ====== SIDEBAR ====== */
.ag-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ag-sidebar-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    box-shadow: var(--shadow-xs);
}

.ag-sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.5rem 0;
}

.ag-sidebar-title i {
    color: var(--brand-primary);
    font-size: 0.875rem;
}

/* ====== VIEW SELECTOR ====== */
.ag-view-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
}

.ag-view-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.625rem 0.5rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    color: var(--gray-700);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.ag-view-btn i {
    font-size: 1rem;
}

.ag-view-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.ag-view-btn.active {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-hover));
    border-color: var(--brand-primary);
    color: white;
}

/* ====== MINI CALENDAR ====== */
.ag-mini-calendar {
    width: 100%;
}

.ag-mini-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ag-current-month {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.ag-nav-btn {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.75rem;
}

.ag-nav-btn:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.ag-mini-calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ag-weekday-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.125rem;
}

.ag-weekday-label {
    text-align: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
}

.ag-day-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.125rem;
}

.ag-day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--gray-900);
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.ag-day-cell:hover {
    background: var(--gray-50);
}

.ag-day-cell.other-month {
    color: var(--gray-400);
    background: var(--gray-50);
}

.ag-day-cell.today {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    font-weight: 700;
}

.ag-day-cell.selected {
    background: var(--brand-gold);
    color: white;
    border-color: var(--brand-gold);
}

.ag-day-cell.has-events::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    background: var(--brand-gold);
    border-radius: 50%;
}

.ag-day-cell.today.has-events::after,
.ag-day-cell.selected.has-events::after {
    background: white;
}

/* ====== STATS ====== */
.ag-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.375rem;
}

.ag-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.ag-stat-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.625rem;
    flex-shrink: 0;
}

.ag-stat-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

.ag-stat-label {
    font-size: 0.5625rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
}

.ag-stat-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

/* ====== FILTERS ====== */
.ag-filter-group {
    margin-bottom: 0.5rem;
}

.ag-search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    transition: all var(--transition);
}

.ag-search-input:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.ag-search-input::placeholder {
    color: var(--gray-400);
}

.ag-status-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
}

.ag-status-filter-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.ag-status-filter-item:hover {
    background: var(--gray-50);
}

.ag-status-filter-item input[type="checkbox"] {
    width: 0.875rem;
    height: 0.875rem;
    cursor: pointer;
}

.ag-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 600;
    color: white;
    flex: 1;
}

/* ====== VENUE FILTERS ====== */
.ag-venue-filters {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.ag-venue-filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.ag-venue-filter-item:hover {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

.ag-venue-filter-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    flex-shrink: 0;
}

.ag-venue-indicator {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.ag-venue-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-800);
    flex: 1;
}

/* ====== LEGEND ====== */
.ag-legend-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
}

.ag-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--gray-800);
}

.ag-legend-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ====== CALENDAR MAIN ====== */
.ag-calendar-main {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ag-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.ag-calendar-navigation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ag-calendar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    min-width: 0;
    text-align: center;
}

/* ====== MONTH VIEW ====== */
.ag-month-view {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ag-weekday-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.ag-weekday-header {
    padding: 0.5rem 0.25rem;
    text-align: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
}

.ag-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex: 1;
}

.ag-month-grid .ag-day-cell {
    aspect-ratio: auto;
    min-height: 60px;
    border: 1px solid var(--gray-200);
    border-radius: 0;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.25rem;
    cursor: pointer;
    transition: all var(--transition);
}

.ag-month-grid .ag-day-cell:hover {
    background: var(--gray-50);
}

.ag-month-grid .ag-day-cell.other-month {
    background: var(--gray-50);
    color: var(--gray-400);
}

.ag-month-grid .ag-day-cell.today {
    background: rgba(13, 43, 53, 0.05);
    border: 2px solid var(--brand-primary);
}

.ag-day-number {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.125rem;
}

.ag-month-grid .ag-day-cell.other-month .ag-day-number {
    color: var(--gray-400);
}

.ag-month-grid .ag-day-cell.today .ag-day-number {
    color: var(--brand-primary);
}

.ag-day-events {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.ag-event-item {
    padding: 0.125rem 0.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.5rem;
    color: white;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.125rem;
    overflow: hidden;
}

.ag-event-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.ag-venue-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

.ag-event-time {
    font-weight: 600;
    flex-shrink: 0;
}

.ag-event-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ag-more-events {
    font-size: 0.5625rem;
    color: var(--gray-700);
    font-weight: 600;
}

/* ====== WEEK VIEW ====== */
.ag-week-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ag-week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.ag-week-day-header {
    padding: 0.5rem 0.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.ag-week-day-header.today {
    background: var(--brand-primary);
    color: white;
}

.ag-day-name {
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ag-week-day-header .ag-day-number {
    font-size: 0.875rem;
    font-weight: 700;
}

.ag-week-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 40px 1fr;
    overflow-y: auto;
    max-height: 400px;
}

.ag-time-labels {
    border-right: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.ag-time-label {
    height: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.125rem;
    font-size: 0.5625rem;
    color: var(--gray-700);
    font-weight: 500;
    border-bottom: 1px solid var(--gray-100);
}

.ag-week-columns {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.ag-day-column {
    position: relative;
    border-right: 1px solid var(--gray-200);
}

.ag-day-column.today {
    background: rgba(13, 43, 53, 0.02);
}

.ag-day-column:last-child {
    border-right: none;
}

.ag-time-slots {
    position: absolute;
    inset: 0;
}

.ag-time-slot {
    height: 40px;
    border-bottom: 1px solid var(--gray-100);
}

.ag-week-event {
    position: absolute;
    left: 1px;
    right: 1px;
    border-radius: var(--radius-sm);
    padding: 0.125rem;
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition);
    z-index: 10;
    font-size: 0.5rem;
}

.ag-week-event:hover {
    transform: translateX(-1px);
    box-shadow: var(--shadow-md);
    z-index: 20;
}

.ag-event-content {
    font-size: 0.5rem;
    overflow: hidden;
}

.ag-event-time-range {
    font-weight: 600;
}

.ag-event-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ag-event-location {
    opacity: 0.9;
    font-size: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ====== DAY VIEW ====== */
.ag-day-view {
    flex: 1;
    overflow: hidden;
}

.ag-day-timeline {
    display: grid;
    grid-template-columns: 50px 1fr;
    overflow-y: auto;
    max-height: 400px;
}

.ag-day-timeline .ag-time-label {
    height: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0.125rem 0.25rem 0 0;
    font-size: 0.625rem;
    color: var(--gray-600);
    font-weight: 500;
    border-bottom: 1px solid var(--gray-100);
}

.ag-timeline-content {
    position: relative;
    border-left: 1px solid var(--gray-200);
}

.ag-timeline-content .ag-time-slots {
    position: absolute;
    inset: 0;
}

.ag-timeline-content .ag-time-slot {
    height: 40px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
}

.ag-half-hour {
    flex: 1;
    border-bottom: 1px dashed var(--gray-100);
}

.ag-half-hour:last-child {
    border-bottom: none;
}

.ag-day-event {
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    border-radius: var(--radius-md);
    padding: 0.5rem;
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition);
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.ag-day-event:hover {
    transform: translateX(-2px);
    box-shadow: var(--shadow-lg);
    z-index: 20;
}

.ag-day-event .ag-event-content {
    font-size: 0.6875rem;
}

.ag-day-event .ag-event-time-range {
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.ag-day-event .ag-event-title {
    font-weight: 600;
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
}

.ag-event-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0.95;
    font-size: 0.625rem;
}

.ag-event-details > div {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ag-event-details i {
    width: 0.75rem;
    text-align: center;
    font-size: 0.5rem;
}

.ag-current-time-line {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.ag-time-marker {
    width: 8px;
    height: 8px;
    background: var(--status-live);
    border: 1px solid white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    margin-left: -4px;
}

.ag-time-line {
    flex: 1;
    height: 1px;
    background: var(--status-live);
}

/* ====== LIST VIEW ====== */
.ag-list-view {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.ag-list-date-group {
    margin-bottom: 0.75rem;
}

.ag-list-date-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--gray-200);
}

.ag-date-badge {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-hover));
    border-radius: var(--radius-md);
    color: white;
    flex-shrink: 0;
}

.ag-date-month {
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ag-date-day {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
}

.ag-date-info {
    flex: 1;
}

.ag-date-weekday {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.ag-event-count {
    font-size: 0.6875rem;
    color: var(--gray-700);
}

.ag-list-events {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.ag-list-event {
    display: flex;
    gap: 0.5rem;
    padding: 0.625rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-xs);
}

.ag-list-event:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow-md);
}

.ag-venue-icon-container {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.ag-list-event .ag-event-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    min-width: 3rem;
    padding: 0.375rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.ag-time-start,
.ag-time-end {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.ag-time-separator {
    color: var(--gray-600);
    font-size: 0.5rem;
}

.ag-event-info {
    flex: 1;
    min-width: 0;
}

.ag-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

.ag-event-header .ag-event-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.ag-event-status {
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.5rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    flex-shrink: 0;
}

.ag-event-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.ag-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--gray-800);
}

.ag-meta-item i {
    color: var(--gray-600);
    width: 0.625rem;
    text-align: center;
    font-size: 0.5625rem;
}

.ag-event-description {
    font-size: 0.6875rem;
    color: var(--gray-700);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ====== EVENT BADGES ====== */
.ag-event-badges {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.ag-booking-slot-badge {
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--gray-900);
    background: var(--brand-gold);
    text-transform: uppercase;
    flex-shrink: 0;
}

/* ====== CONFLICT WARNING ====== */
.ag-conflict-warning {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: #fef2f2;
    border: 1px solid #dc2626;
    border-left: 3px solid #dc2626;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    color: #991b1b;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in-out;
}

.ag-conflict-warning i {
    color: #dc2626;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ====== EXPIRY WARNING ====== */
.ag-expiry-warning {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-left: 3px solid #f59e0b;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    color: #92400e;
    font-weight: 500;
    animation: pulse-warning 2s infinite;
}

.ag-expiry-warning i {
    color: #f59e0b;
    font-size: 0.875rem;
    flex-shrink: 0;
}

@keyframes pulse-warning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0);
    }
}

/* ====== MONTH VIEW CONFLICT INDICATOR ====== */
.ag-event-item.ag-event-conflict {
    position: relative;
    animation: pulse 2s infinite;
}

.ag-event-item.ag-event-conflict::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent #dc2626 transparent transparent;
}

.ag-event-item.ag-event-conflict .ag-event-name i {
    margin-right: 0.125rem;
    color: #fef2f2;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0);
    }
}

/* ====== EMPTY STATE ====== */
.ag-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.ag-empty-state > i {
    font-size: 2rem;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.ag-empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
}

.ag-empty-state p {
    font-size: 0.8125rem;
    color: var(--gray-700);
    margin: 0 0 0.75rem 0;
}

/* ====== TABLET BREAKPOINT (640px+) ====== */
@media (min-width: 640px) {
    .ag-container {
        padding: 1rem;
    }

    .ag-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .ag-header-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.125rem;
    }

    .ag-header-title {
        font-size: 1.25rem;
    }

    .ag-header-subtitle {
        display: block;
        font-size: 0.8125rem;
        color: var(--gray-600);
        margin: 0;
    }

    .ag-btn span {
        display: inline;
    }

    .ag-content {
        gap: 1rem;
    }

    .ag-sidebar-section {
        padding: 1rem;
    }

    .ag-sidebar-title {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .ag-view-btn {
        padding: 0.625rem;
        font-size: 0.6875rem;
    }

    .ag-view-btn i {
        font-size: 1rem;
    }

    .ag-stats-grid {
        gap: 0.5rem;
    }

    .ag-stat-card {
        padding: 0.625rem;
    }

    .ag-stat-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
    }

    .ag-stat-value {
        font-size: 1rem;
    }

    .ag-stat-label {
        font-size: 0.5625rem;
    }

    .ag-status-filters {
        grid-template-columns: repeat(3, 1fr);
    }

    .ag-calendar-header {
        padding: 0.875rem 1rem;
    }

    .ag-calendar-title {
        font-size: 1rem;
    }

    .ag-month-grid .ag-day-cell {
        min-height: 80px;
        padding: 0.375rem;
    }

    .ag-day-number {
        font-size: 0.75rem;
    }

    .ag-event-item {
        font-size: 0.5625rem;
        padding: 0.25rem 0.375rem;
    }

    .ag-week-grid,
    .ag-day-timeline {
        max-height: 500px;
    }

    .ag-list-event {
        padding: 0.75rem;
    }

    .ag-event-header .ag-event-title {
        font-size: 0.875rem;
    }

    .ag-meta-item {
        font-size: 0.6875rem;
    }
}

/* ====== DESKTOP BREAKPOINT (1024px+) ====== */
@media (min-width: 1024px) {
    .ag-container {
        padding: 1.25rem;
    }

    .ag-breadcrumb {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
        font-size: 0.8125rem;
    }

    .ag-breadcrumb-item {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        color: var(--gray-600);
        text-decoration: none;
        padding: 0.375rem 0.5rem;
        border-radius: var(--radius-md);
    }

    a.ag-breadcrumb-item:hover {
        color: var(--brand-primary);
        background: var(--gray-100);
    }

    .ag-breadcrumb-current {
        color: var(--gray-900);
        font-weight: 500;
    }

    .ag-breadcrumb-separator {
        display: block;
        color: var(--gray-400);
        font-size: 0.625rem;
    }

    .ag-header {
        padding: 1rem 1.25rem;
    }

    .ag-header-icon {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.25rem;
    }

    .ag-header-title {
        font-size: 1.375rem;
    }

    .ag-content {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 1rem;
    }

    .ag-sidebar {
        gap: 0.75rem;
    }

    .ag-view-btn {
        padding: 0.75rem;
        font-size: 0.75rem;
    }

    .ag-stats-grid {
        grid-template-columns: 1fr;
    }

    .ag-stat-card {
        flex-direction: row;
        padding: 0.75rem;
    }

    .ag-stat-details {
        align-items: flex-start;
    }

    .ag-stat-value {
        font-size: 1.25rem;
    }

    .ag-stat-label {
        font-size: 0.625rem;
    }

    .ag-status-filters {
        grid-template-columns: 1fr;
    }

    .ag-legend-items {
        grid-template-columns: 1fr;
    }

    .ag-calendar-title {
        font-size: 1.125rem;
        min-width: 200px;
    }

    .ag-month-grid .ag-day-cell {
        min-height: 100px;
        padding: 0.5rem;
    }

    .ag-day-number {
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
    }

    .ag-event-item {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }

    .ag-week-grid,
    .ag-day-timeline {
        max-height: 600px;
    }

    .ag-time-label {
        height: 50px;
        font-size: 0.625rem;
    }

    .ag-time-slot {
        height: 50px;
    }

    .ag-nav-btn:hover,
    .ag-btn:hover:not(:disabled) {
        transform: translateY(-1px);
    }
}

/* ====== LARGE DESKTOP (1280px+) ====== */
@media (min-width: 1280px) {
    .ag-container {
        padding: 1.5rem;
        max-width: 1600px;
    }

    .ag-content {
        grid-template-columns: 300px 1fr;
        gap: 1.25rem;
    }

    .ag-sidebar-section {
        padding: 1.125rem;
    }

    .ag-calendar-title {
        font-size: 1.25rem;
        min-width: 250px;
    }

    .ag-month-grid .ag-day-cell {
        min-height: 120px;
    }

    .ag-event-item {
        font-size: 0.6875rem;
    }

    .ag-week-grid,
    .ag-day-timeline {
        max-height: 700px;
    }

    .ag-list-event {
        padding: 1rem;
    }

    .ag-event-header .ag-event-title {
        font-size: 1rem;
    }

    .ag-event-meta {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ====== PRINT ====== */
@media print {
    .ag-header-actions,
    .ag-sidebar,
    .ag-calendar-navigation {
        display: none !important;
    }
}

/* ====== ACCESSIBILITY ====== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
