/* Calendar Application Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
                'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
                sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f5fcff;
    color: #1e293b;
}

/* App container */
.app-container {
    min-height: 100vh;
    background-color: #f5fcff;
}

/* Calendar container */
.calendar-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Use min-height instead of fixed height */
    background-color: transparent !important;
    overflow: visible; /* Allow page to scroll */
    margin: 0 20px;
    max-width: calc(100vw - 40px);
    padding: 0 0 80px 0 !important; /* Add bottom padding for fixed bottom navigation */
    box-shadow: none !important;
    border-radius: 0 !important;
}

.calendar-layout {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 80px); /* Minimum height but allow growth */
    overflow: visible; /* Allow content to overflow for scrolling */
    background-color: #f5fcff;
    margin: 0;
}

/* Unified Calendar Header */
.unified-calendar-header {
    background-color: #66A6FF;
    padding: 28px 40px;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
    margin: 0;
}

.unified-calendar-header h2,
.unified-calendar-header .calendar-main-title,
h2.calendar-main-title {
    margin: 0 !important;
    font-size: 30px !important;
    font-family: "Nunito Sans", sans-serif !important;
    font-weight: bold !important;
    color: #FFFFFF !important;
}

.new-event-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0px 12px !important;
    border: none !important;
    border-radius: 8px !important;
    background: #FFFFFF !important;
    color: #66A6FF !important;
    font-family: "Nunito Sans", sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    height: 36px !important;
}

.new-event-btn span {
    color: #66A6FF !important;
}

.new-event-btn svg {
    width: 16px !important;
    height: 16px !important;
    stroke: #66A6FF !important;
    fill: none !important;
}

.new-event-btn svg path {
    stroke: #66A6FF !important;
}

.new-event-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Header Actions Container */
.unified-calendar-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Ensure notification bell is positioned outside header on calendar page ONLY */
/* Scoped to calendar page to avoid affecting other pages */
.calendar-container .notification-container,
.calendar-page-wrapper .notification-container,
body:has([data-page="calendar"]) .notification-container,
body:has(.calendar-container) .notification-container,
body:has(.calendar-page-wrapper) .notification-container {
    position: fixed !important;
    top: calc(20px + env(safe-area-inset-top, 0px)) !important;
    right: calc(16px + env(safe-area-inset-right, 0px)) !important;
    z-index: 1000 !important;
    display: inline-block !important;
    /* Prevent any parent container from affecting positioning */
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Ensure it's not affected by flexbox or grid layouts */
    flex: none !important;
    align-self: auto !important;
    order: 0 !important;
}

/* Desktop Notification Button - matches standard bell-button style */
.desktop-notification-button {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.desktop-notification-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.desktop-notification-button svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.desktop-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid #fff;
}

/* Old styles kept for backwards compatibility */
.header-left {
    display: flex;
    align-items: center;
}

.calendar-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-icon {
    color: #3b82f6;
}

.header-right {
    display: flex;
    align-items: center;
}

/* Sidebar */
.sidebar-container {
    width: 300px;
    min-width: 200px;
    max-width: 500px;
    background-color: #f5fcff;
    display: flex;
    border-right: 1px solid #f4ff81;
    flex-direction: column;
    transition: transform 0.3s ease;
    position: relative;
    overflow: visible; /* Allow content to overflow for scrolling */
    min-height: calc(100vh - 80px); /* Minimum height but allow growth */
}

.sidebar-vertical-line {
    width: 1px;
    background-color: #e2e8f0;
    position: absolute;
    top: 80px; /* Start from bottom of sidebar header */
    left: 300px; /* Position at the right edge of sidebar */
    height: calc(100vh - 80px); /* Full height minus header height */
    z-index: 1;
}


.sidebar-container.visible {
    transform: translateX(0);
}

.calendar-sidebar {
    padding: 24px;
    height: 100%;
    display: flex; 
    flex-direction: column;
    gap: 24px;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.sidebar-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.calendar-icon {
    color: #3b82f6;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-footer {
    margin-top: auto;
}

/* Today section */
.today-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.today-date {
    font-size: 0.875rem;
    color: #64748b;
}

.no-events {
    font-size: 0.875rem;
    color: #94a3b8;
    font-style: italic;
}

/* Event items */
.today-events, .upcoming-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}


.event-dot {
    width: 1px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.event-details {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-time, .event-date {
    font-size: 0.75rem;
    color: #64748b;
}

.more-events {
    font-size: 0.75rem;
    color: #3b82f6;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-align: center;
    margin-top: 4px;
    font-weight: 500;
}

.more-events:hover {
    background-color: #f0f9ff;
    color: #1d4ed8;
}

/* Children section */
.children-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.children-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.children-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-button:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

.icon-button.add-button {
    background-color: #3b82f6;
    color: white;
}

.icon-button.add-button:hover {
    background-color: #2563eb;
    transform: scale(1.05);
}

.children-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.child-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}


.child-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.child-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.child-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.child-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.child-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.info-circle:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.2s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input:checked + .toggle-slider {
    background-color: #3b82f6;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.no-children {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    text-align: center;
}

.no-children-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.add-first-child-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-first-child-button:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.child-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background-color: #f5fcff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.child-item:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.child-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.child-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

.child-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.child-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.child-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.child-info-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 4px;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.child-info-button:hover {
    background-color: #e2e8f0;
    color: #3b82f6;
}

.child-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

.child-toggle {
    margin-left: 12px;
    flex-shrink: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #3b82f6;
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* No children state */
.no-children {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    text-align: center;
}

.no-children-text {
    font-size: 0.875rem;
    color: #64748b;
    font-style: italic;
}

.add-first-child-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background-color: transparent;
    color: #64748b;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.add-first-child-button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background-color: #f0f9ff;
}

/* Child Availability Modal */
.availability-modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
}

.availability-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    margin-bottom: 24px;
}

.child-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.child-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    flex-shrink: 0;
}

.child-header-info h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.info-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.info-button:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

.availability-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 24px;
    margin-bottom: 24px;
}

.control-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.availability-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.availability-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 5px;
}

.toggle-label {
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    margin-top: 5px;
}

.toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 24px;
    margin-top: 5px;
}

.weekly-repeat-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #64748b;
}

.repeat-label {
    color: #64748b;
    font-size: 0.875rem;
}

/* Ghost Mode Info */
.ghost-mode-info {
    padding: 0 24px;
    margin-bottom: 24px;
}

.ghost-mode-message {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #6b7280;
}

.ghost-mode-message svg {
    color: #6b7280;
    flex-shrink: 0;
    margin-top: 5px;
}

.ghost-mode-message h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 4px 0;
}

.ghost-mode-message p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Availability Legend */
.availability-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    margin-bottom: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #64748b;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-dot.available {
    background-color: #60a5fa;
}

.legend-dot.unavailable {
    background-color: #e5e7eb;
}

.legend-instruction {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-left: auto;
}

.clear-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-button:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

/* Availability Calendar */
.availability-calendar {
    padding: 0 24px;
    margin-bottom: 24px;
}

.calendar-header {
    display: grid;
    grid-template-columns: 60px repeat(7, 120px);
    gap: 1px;
    margin-bottom: 1px;
}

.time-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    background-color: #f8fafc;
}

.day-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    background-color: #f1f5f9;
    text-align: center;
    border-radius: 0;
}

.day-header:first-child {
    border-radius: 8px 0 0 8px;
}

.day-header:last-child {
    border-radius: 0 8px 8px 0;
}

.time-row {
    display: grid;
    grid-template-columns: 60px repeat(7, 120px);
    gap: 1px;
    margin-bottom: 1px;
}

.time-slot {
    height: 32px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.time-slot:hover {
    background-color: #dbeafe;
    border-color: #93c5fd;
}

.time-slot.selected {
    background-color: #60a5fa;
    border-color: #3b82f6;
}

.time-slot.selected:hover {
    background-color: #3b82f6;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-top: 1px solid #e5e7eb;
}

.selected-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.save-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #60a5fa;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-button:hover {
    background-color: #3b82f6;
}

/* Children Management Modal */
.children-management-modal {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
}

.children-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.back-button:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-icon {
    color: #f59e0b;
}

.header-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.add-child-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #60a5fa;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-child-button:hover {
    background-color: #3b82f6;
}

/* Children List Container */
.children-list-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.child-management-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.child-management-card:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.child-card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.child-info-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.child-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
    color: white;
    flex-shrink: 0;
}

.child-details-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.child-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.child-name-large {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.child-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.child-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.eye-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.child-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.child-age {
    font-size: 0.875rem;
    color: #64748b;
    padding: 2px 8px;
    background-color: #f1f5f9;
    border-radius: 12px;
}

.child-status-badge-large {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
}

.child-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-button, .delete-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-button {
    color: #64748b;
}

.edit-button:hover {
    background-color: #e0f2fe;
    color: #0891b2;
}

.delete-button {
    color: #ef4444;
}

.delete-button:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

/* No Children State */
.no-children-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-children-icon {
    margin-bottom: 16px;
    color: #d1d5db;
}

.no-children-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}

.no-children-state p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 24px 0;
    max-width: 300px;
    line-height: 1.5;
}

.add-first-child-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #60a5fa;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-first-child-btn:hover {
    background-color: #3b82f6;
}

/* Children Management Page */
.children-page {
    min-height: 100vh;
    background-color: #f8fafc;
    padding-bottom: 80px; /* Space for bottom navigation */
}

.children-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.back-button:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    color: #f59e0b;
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.add-child-page-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #60a5fa;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.875rem;
}

.add-child-page-button:hover {
    background-color: #3b82f6;
}

.children-page-content {
    padding: 24px;
}

.children-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.child-page-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.child-page-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.child-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.child-info-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.child-avatar-page {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.child-details-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.child-name-row-page {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.child-name-page {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.child-status-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.child-toggle-page {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    cursor: pointer;
}

.child-toggle-page input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider-page {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider-page:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.child-toggle-page input:checked + .toggle-slider-page {
    background-color: #3b82f6;
}

.child-toggle-page input:focus + .toggle-slider-page {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.child-toggle-page input:checked + .toggle-slider-page:before {
    transform: translateX(20px);
}

.eye-icon-page {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.child-meta-page {
    display: flex;
    align-items: center;
    gap: 12px;
}

.child-age-page {
    font-size: 0.875rem;
    color: #64748b;
    padding: 4px 12px;
    background-color: #f1f5f9;
    border-radius: 16px;
    font-weight: 500;
}

.child-status-badge-page {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    transition: background-color 0.3s;
}

.child-actions-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-button-page, .delete-button-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-button-page {
    color: #64748b;
}

.edit-button-page:hover {
    background-color: #e0f2fe;
    color: #0891b2;
}

.delete-button-page {
    color: #ef4444;
}

.delete-button-page:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

/* No Children Page State */
.no-children-page-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
    max-width: 500px;
    margin: 0 auto;
}

.no-children-page-icon {
    margin-bottom: 24px;
    color: #d1d5db;
    opacity: 0.5;
}

.no-children-page-state h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

.no-children-page-state p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.magic-wand {
    font-size: 2rem;
    margin-bottom: 24px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.add-first-child-page-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background-color: #60a5fa;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.add-first-child-page-btn:hover {
    background-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    padding: 16px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    z-index: 1000;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-success {
    /* No special border for success */
}

.toast-info {
    /* No special border for info */
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 5px;
}

.toast-success .toast-icon {
    /* No special styling for emoji */
}

.toast-info .toast-icon {
    /* No special styling for emoji */
}

.toast-message {
    flex: 1;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.toast-text {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    /* Make desktop header look like mobile header at mobile widths */
    .unified-calendar-header {
        padding: 20px 24px !important;
        padding-top: calc(20px + env(safe-area-inset-top, 0px)) !important;
        border-radius: 0 !important;
        box-shadow: 
            0 4px 16px rgba(59, 130, 246, 0.25),
            0 2px 8px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%) !important;
        background-size: 200% 200% !important;
    }

    .unified-calendar-header h2,
    .unified-calendar-header .calendar-main-title,
    h2.calendar-main-title {
        font-size: 2rem !important;
        letter-spacing: -0.5px !important;
        line-height: 1.2 !important;
    }

    /* Only scope to calendar page to avoid affecting other pages */
    .calendar-container .unified-calendar-header .new-event-btn,
    .calendar-page-wrapper .unified-calendar-header .new-event-btn,
    .unified-calendar-header .new-event-btn {
        padding: 10px 16px !important;
        background: #ffffff !important;
        border-radius: 12px !important;
        font-size: 0.875rem !important;
        height: auto !important;
        box-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
        white-space: nowrap !important;
        color: #3b82f6 !important;
    }

    .calendar-container .unified-calendar-header .new-event-btn:hover,
    .calendar-page-wrapper .unified-calendar-header .new-event-btn:hover,
    .unified-calendar-header .new-event-btn:hover {
        transform: translateY(-1px) !important;
        box-shadow: 
            0 4px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
        background: #ffffff !important;
    }

    .calendar-container .unified-calendar-header .new-event-btn:hover svg,
    .calendar-page-wrapper .unified-calendar-header .new-event-btn:hover svg,
    .unified-calendar-header .new-event-btn:hover svg {
        transform: scale(1.1) !important;
    }

    .calendar-container .unified-calendar-header .new-event-btn svg,
    .calendar-page-wrapper .unified-calendar-header .new-event-btn svg,
    .unified-calendar-header .new-event-btn svg {
        width: 1.125rem !important;
        height: 1.125rem !important;
        stroke: #3b82f6 !important;
    }

    .calendar-container .unified-calendar-header .new-event-btn svg path,
    .calendar-page-wrapper .unified-calendar-header .new-event-btn svg path,
    .unified-calendar-header .new-event-btn svg path {
        stroke: #3b82f6 !important;
    }

    /* Hide "Event" text on mobile, show only "New" - scoped to calendar page only */
    .calendar-container .unified-calendar-header .new-event-btn span,
    .calendar-page-wrapper .unified-calendar-header .new-event-btn span,
    .unified-calendar-header .new-event-btn span {
        font-size: 0 !important;
        line-height: 0 !important;
        opacity: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        display: none !important;
        visibility: hidden !important;
    }

    .calendar-container .unified-calendar-header .new-event-btn::after,
    .calendar-page-wrapper .unified-calendar-header .new-event-btn::after,
    .unified-calendar-header .new-event-btn::after {
        content: "New" !important;
        color: #3b82f6 !important;
        font-weight: 600 !important;
        font-size: 0.875rem !important;
        margin-left: 6px !important;
        display: inline-block !important;
    }

    /* Desktop notification button styles at mobile width - scoped to calendar page only */
    .calendar-container .unified-calendar-header .desktop-notification-button,
    .calendar-page-wrapper .unified-calendar-header .desktop-notification-button,
    .unified-calendar-header .desktop-notification-button {
        width: 40px !important;
        height: 40px !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 12px !important;
        color: #ffffff !important;
    }

    .calendar-container .unified-calendar-header .desktop-notification-button:hover,
    .calendar-page-wrapper .unified-calendar-header .desktop-notification-button:hover,
    .unified-calendar-header .desktop-notification-button:hover {
        background: rgba(255, 255, 255, 0.3) !important;
        border-color: rgba(255, 255, 255, 0.4) !important;
    }

    .calendar-container .unified-calendar-header .desktop-notification-button svg,
    .calendar-page-wrapper .unified-calendar-header .desktop-notification-button svg,
    .unified-calendar-header .desktop-notification-button svg {
        width: 20px !important;
        height: 20px !important;
        stroke: #ffffff !important;
    }

    /* Ensure header is visible on mobile (not hidden by other media queries) */
    .unified-calendar-header {
        display: flex !important;
    }

    /* Override any potential conflicting styles */
    .calendar-container .unified-calendar-header,
    .calendar-page-wrapper .unified-calendar-header {
        display: flex !important;
        padding: 20px 24px !important;
        padding-top: calc(20px + env(safe-area-inset-top, 0px)) !important;
    }

    .calendar-container .unified-calendar-header h2,
    .calendar-container .unified-calendar-header .calendar-main-title,
    .calendar-page-wrapper .unified-calendar-header h2,
    .calendar-page-wrapper .unified-calendar-header .calendar-main-title {
        font-size: 2rem !important;
        letter-spacing: -0.5px !important;
        line-height: 1.2 !important;
    }

    .calendar-container .unified-calendar-header .new-event-btn,
    .calendar-page-wrapper .unified-calendar-header .new-event-btn {
        padding: 10px 16px !important;
        background: #ffffff !important;
        border-radius: 12px !important;
        font-size: 0.875rem !important;
        height: auto !important;
        color: #3b82f6 !important;
    }

    .calendar-container .unified-calendar-header .new-event-btn span,
    .calendar-page-wrapper .unified-calendar-header .new-event-btn span {
        display: none !important;
        visibility: hidden !important;
        font-size: 0 !important;
        width: 0 !important;
        opacity: 0 !important;
    }

    .calendar-container .unified-calendar-header .new-event-btn::after,
    .calendar-page-wrapper .unified-calendar-header .new-event-btn::after {
        content: "New" !important;
        color: #3b82f6 !important;
        font-weight: 600 !important;
        font-size: 0.875rem !important;
        margin-left: 6px !important;
        display: inline-block !important;
    }

    .children-page-header {
        padding: 16px 20px;
    }
    
    .header-title h1 {
        font-size: 1.25rem;
    }
    
    .add-child-page-button {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .children-page-content {
        padding: 20px;
    }
    
    .child-page-card {
        padding: 16px;
    }
    
    .child-avatar-page {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
    
    .child-name-page {
        font-size: 1.1rem;
    }
    
    .toast-notification {
        top: 20px;
        right: 16px;
        left: 16px;
        bottom: auto;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
        transition: transform 0.3s ease-out;
    }
    
    .toast-notification.show {
        transform: translateY(0);
    }
}

.icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-button:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

.add-button {
    background-color: #3b82f6;
    color: white;
}

.add-button:hover {
    background-color: #2563eb;
    color: white;
}

/* Main calendar area */
.main-calendar {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 1px; /* Add padding between sidebar and calendar */
    margin-bottom: 24px; /* Add bottom margin to replace removed calendar grid margin */
    overflow: visible; /* Allow content to flow naturally for page scrolling */
    min-height: calc(100vh - 80px); /* Minimum height but allow growth */
}

/* Top navigation */
.top-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

.spacer {
    flex: 1;
}

.new-event-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(to right, #3b82f6, #60a5fa);
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
    transform: scale(1);
    height: 36px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.new-event-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.new-event-button:active {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.25);
}

.new-event-button svg {
    width: 16px;
    height: 16px;
    color: white;
    pointer-events: none;
    flex-shrink: 0;
}

.new-event-button span {
    color: white;
}

/* Calendar header */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
}

.calendar-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-button:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

.month-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

/* View Toggle Buttons - Separate Pill Style */
.view-toggle {
    display: flex;
    gap: 8px;
    margin-right: 12px;
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.view-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    background-color: #ffffff;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-width: 80px;
    justify-content: center;
}

.view-button:hover:not(.active) {
    color: #000000;
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.view-button.active {
    background-color: #66A6FF !important;
    color: #ffffff !important;
    border-color: #66A6FF !important;
    box-shadow: none;
    font-weight: 500;
}

.view-button svg {
    width: 16px;
    height: 16px;
}

.today-button {
    padding: 10px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    background-color: #ffffff;
    color: #000000;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.today-button:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

/* Week title styling */
.week-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Calendar weekdays */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 120px);
    gap: 1px;
    background-color: #e2e8f0;
    margin: 0 8px 0 8px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    border-right: none !important;
    border-bottom: none !important;
}

/* Force remove all borders from calendar containers */
.calendar-container .calendar-weekdays,
.calendar-container .calendar-grid {
    border-right: none !important;
    border-bottom: none !important;
}

/* Force remove borders from all calendar date cells in last column and last row */
.calendar-date:nth-child(7n) {
    border-right: none !important;
}

.calendar-date:nth-last-child(-n+7) {
    border-bottom: none !important;
}

.weekday {
    padding: 12px;
    background-color: #f8fafc;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Calendar grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 120px);
    gap: 1px;
    background-color: #e2e8f0;
    margin: 0 8px 0 8px;
    border-radius: 0 0 8px 8px;
    overflow: visible; /* Allow content to overflow for scrolling */
    border-right: none !important;
    border-bottom: none !important;
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.calendar-date {
    min-height: 120px;
    background-color: #ffffff;
    padding: 8px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

/* Remove bottom border from last row */
.calendar-date:nth-last-child(-n+7) {
    border-bottom: none;
}

.calendar-date:hover {
    background-color: #f8fafc;
}

.calendar-date.today {
    background-color: #dbeafe;
}

.calendar-date.today:hover {
    background-color: #bfdbfe;
}

.calendar-date.other-month {
    background-color: #f8fafc;
    color: #94a3b8;
}

.calendar-date.other-month:hover {
    background-color: #f1f5f9;
}

.calendar-date.weekend {
    background-color: #fefefe;
}

.calendar-date.has-events {
    border-left: 3px solid #3b82f6;
}

.date-number {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.calendar-date.today .date-number {
    color: #1d4ed8;
    font-weight: 600;
}

.calendar-date.other-month .date-number {
    color: #94a3b8;
}

/* Event indicators */
.event-indicators {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.event-indicators .event-dot {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    font-size: 0.75rem;
}

.event-more {
    font-size: 0.625rem;
    color: #64748b;
    margin-top: 5px;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    margin-bottom: 24px;
    border-bottom: none !important;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.close-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.close-button:hover {
    background-color: #f1f5f9;
    color: #ef4444;
}

.modal-body {
    padding: 0 24px 24px;
}

/* Form styles */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* Modal actions */
.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #f8fafc;
    color: #64748b;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    color: #374151;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Bottom navigation */
.bottom-navigation {
    display: flex;
    flex-direction: row;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 8px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    text-decoration: none;
    color: white;
    transition: none;
    border: none;
    background: transparent !important;
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    color: white;
    background: transparent !important;
}

.nav-item.active .nav-icon {
    background-color: white !important;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item.active .nav-icon svg {
    color: #3b82f6 !important;
}

.nav-item .nav-icon {
    background-color: transparent !important;
    margin-bottom: 2px;
}

.nav-item .nav-icon svg,
.nav-item .nav-icon svg * {
    color: white !important;
    fill: white !important;
    stroke: white !important;
}

.nav-item.active .nav-icon svg,
.nav-item.active .nav-icon svg * {
    color: #3b82f6 !important;
    fill: #3b82f6 !important;
    stroke: #3b82f6 !important;
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
    color: white !important;
}

.nav-item.add-button {
    position: relative;
}

.add-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.nav-item.add-button:hover .add-circle {
    background-color: #2563eb;
    transform: scale(1.05);
}

/* Validation messages */
.validation-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Mobile-like responsive design - hide calendar content and show centered text */
@media (max-width: 768px) {
    .sidebar-container {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar-toggle {
        display: none !important;
    }

    .calendar-layout {
        flex-direction: column;
    }

    .main-calendar {
        flex: 1;
        margin-left: 0; /* Remove margin on mobile */
    }

    /* Hide calendar content, sidebar, and top navigation on mobile-like screens */
    .sidebar-container,
    .calendar-top-header,
    .calendar-header,
    .calendar-weekdays,
    .calendar-grid,
    .calendar-week-view {
        display: none !important;
    }

    /* Mobile UI Container */
    .mobile-ui-container {
        display: flex !important;
        flex-direction: column;
        height: 100vh;
        background-color: #f5fcff;
        padding: 0;
        margin: 0;
        overflow: hidden; /* Prevent container from scrolling */
        width: 100%;
        max-width: 100%;
    }

    .mobile-calendar-content {
        display: flex;
        flex-direction: row;
        gap: 6px;
        width: 100%;
        height: 100%;
        overflow: hidden;
        border-radius: 10px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        background: transparent;
        padding: 0px;
    }
    .mobile-calendar-left-area{
        width: 30%;
    }
    /* Mobile Calendar Card */
    .mobile-calendar-card {
        flex: 1;
        background-color: white;
        margin: 0px; /* Match segment buttons horizontal padding (20px) */
        border-radius: 16px;
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        overflow: visible;
        min-height: 0; /* Allow flex shrinking */
        width: calc(100% - 40px); /* Match segment buttons container width */
    }

    /* Month Navigation */
    .mobile-month-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 5px;
        background: #fff;
        border-radius: 15px;
    }

    .mobile-nav-arrow {
        width: 32px;
        height: 32px;
        border: none;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
    }

    .mobile-month-title {
        font-size: 1.25rem;
        font-weight: 600;
        color: #1e293b;
    }

    /* View Toggle - Separate Pill Style */
    .mobile-view-toggle {
        display: flex;
        background-color: transparent;
        border-radius: 0;
        padding: 0;
        margin-bottom: 5px;
        margin-top: 5px;
        gap: 8px;
    }

    .mobile-view-button {
        flex: 1;
        padding: 10px 20px;
        border: none !important; /* No border for view buttons */
        border-radius: 25px;
        background-color: transparent;
        color: #1e293b;
        font-size: 0.875rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        white-space: nowrap;
        position: relative;
    }

    .mobile-view-button.active {
        background: linear-gradient(135deg, #66A6FF 0%, #5a96e8 100%) !important;
        color: #ffffff !important;
        border-radius: 25px;
        box-shadow: 
            0 2px 8px rgba(102, 166, 255, 0.3),
            0 1px 4px rgba(0, 0, 0, 0.1);
        font-weight: 600;
        border: none !important;
    }

    .mobile-view-button.active:hover {
        background: linear-gradient(135deg, #5a96e8 0%, #4d86d9 100%) !important;
        box-shadow: 
            0 4px 12px rgba(102, 166, 255, 0.4),
            0 2px 6px rgba(0, 0, 0, 0.15);
        transform: translateY(-1px);
    }

    .mobile-view-button:not(.active) {
        background-color: transparent;
        color: #64748b !important; /* Gray text for inactive buttons */
        border-radius: 25px;
        border: none !important;
    }

    .mobile-view-button:not(.active):hover {
        background-color: rgba(241, 245, 249, 0.6);
        color: #3b82f6;
        border: none !important;
    }

    /* Weekdays */
    .mobile-weekdays {
        display: grid;
        grid-template-columns: repeat(4, 1fr) !important;
        margin-bottom: 8px;
        width: 100%;
        min-width: 0; /* Prevent grid from overflowing */
    }

    .mobile-weekday {
        text-align: center;
        font-size: 0.75rem;
        font-weight: 500;
        color: #64748b;
        padding: 8px 4px;
    }

    /* Calendar Grid */
    .mobile-calendar-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 4px !important;
        width: 100% !important;
        min-width: 0 !important; /* Prevent grid from overflowing */
        flex: 1 !important;
        align-content: start !important;
    }

    .mobile-date {
        aspect-ratio: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        font-size: 0.9375rem !important;
        font-weight: 500 !important;
        color: #1e293b !important;
        cursor: pointer !important;
        border-radius: 8px !important;
        transition: all 0.2s ease !important;
        position: relative !important;
        background-color: transparent !important; /* No background for dates in mobile */
        border: none !important; /* No border for dates in mobile */
        padding: 2px !important;
        min-height: 0 !important;
    }

    .mobile-date-number {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.875rem;
        line-height: 3;
        margin-bottom: 2px;
    }

    .mobile-children-pills {
        display: flex;
        flex-direction: column;
        gap: 2px;
        width: 100%;
        margin-top: 2px;
        flex: 1;
        overflow: hidden;
        align-items: stretch;
        justify-content: flex-start;
    }

    .mobile-child-pill {
        font-size: 0.625rem;
        color: #1e293b !important;
        padding: 2px 4px;
        border-radius: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        min-height: 14px;
        max-height: 16px;
        width: 100%;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }

    .mobile-child-pill:active {
        transform: scale(0.95);
        opacity: 0.9;
    }

    .mobile-child-pill-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: 100%;
        text-align: center;
        font-weight: 500;
        line-height: 1.2;
    }

    .mobile-date.today .mobile-child-pill {
        color: #ffffff !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    .mobile-date.today .mobile-child-pill-name {
        color: #ffffff !important;
    }

    .mobile-date:hover {
        background-color: transparent !important; /* No hover background in mobile */
        border: none !important;
    }

    .mobile-date.today {
        background-color: #66A6FF !important;
        color: #ffffff !important;
        border-radius: 50% !important;
        font-weight: 600 !important;
        border: none !important;
    }

    .mobile-date.today:hover {
        background-color: #5a96e8 !important;
        border: none !important;
    }

    .mobile-date.other-month {
        color: #cbd5e1 !important;
        background-color: transparent !important;
        border: none !important;
    }

    .mobile-date.other-month:hover {
        background-color: transparent !important;
        border: none !important;
    }

    /* Bottom Navigation */
    .mobile-bottom-nav {
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 12px 20px 16px 20px;
        background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
        border-radius: 30px 30px 0 0;
        box-shadow: 0 -4px 12px rgba(59, 130, 246, 0.15);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px;
        border: none;
        background: transparent !important;
        cursor: pointer;
        color: white !important;
        font-size: 0.75rem;
        font-weight: 500;
        transition: none;
    }

    .mobile-nav-item:hover {
        background: transparent !important;
        color: white !important;
    }

    .mobile-nav-item.active .mobile-nav-icon {
        background-color: white !important;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav-icon {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        background-color: transparent !important;
        margin-bottom: 2px;
    }

    .mobile-nav-icon svg,
    .mobile-nav-icon svg * {
        fill: white !important;
        stroke: white !important;
    }

    .mobile-nav-item.active .mobile-nav-icon svg,
    .mobile-nav-item.active .mobile-nav-icon svg * {
        fill: #3b82f6 !important;
        stroke: #3b82f6 !important;
    }

    .mobile-add-button {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background-color: white;
        border: none;
        color: #3b82f6;
        font-size: 1.5rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
        margin-bottom: 2px;
    }

    .mobile-add-button:hover {
        background: #3b82f6 !important;
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    }

    .mobile-add-button:hover svg,
    .mobile-add-button:hover svg * {
        stroke: white !important;
        color: white !important;
    }

    .mobile-add-button svg {
        color: #3b82f6 !important;
    }

    .mobile-add-button svg * {
        stroke: #3b82f6 !important;
    }

    /* Mobile Header */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 24px;
        padding-top: calc(20px + env(safe-area-inset-top, 0px)); /* Extend into safe area */
        padding-bottom: 20px; /* Add bottom padding for spacing from tabs */
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
        background-size: 200% 200%;
        box-shadow: 
            0 4px 16px rgba(59, 130, 246, 0.25),
            0 2px 8px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        position: relative;
        overflow: hidden;
        margin-bottom: 0; /* Ensure no extra margin */
    }

    .mobile-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
        pointer-events: none;
    }

    .mobile-header > * {
        position: relative;
        z-index: 1;
    }

    .mobile-header-title {
        font-size: 2rem;
        font-weight: 700;
        color: #ffffff;
        margin: 0;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        letter-spacing: -0.5px;
        line-height: 1.2;
    }

    .mobile-new-button {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 16px;
        background: #ffffff;
        color: #3b82f6;
        border: none;
        border-radius: 12px;
        font-size: 0.875rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
        position: relative;
        overflow: hidden;
        white-space: nowrap;
    }

    .mobile-new-button:hover {
        transform: translateY(-1px);
        box-shadow: 
            0 4px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
        background: #ffffff;
    }

    .mobile-new-icon {
        font-size: 1.125rem;
        font-weight: 700;
        line-height: 1;
        transition: transform 0.2s ease;
    }

    .mobile-new-button:hover .mobile-new-icon {
        transform: scale(1.1);
    }

    /* Mobile Tabs */
    .mobile-tabs-container {
        padding: 16px 20px; /* Top and bottom padding for spacing */
        margin-top: 0; /* Space is handled by padding */
        background-color: transparent; /* Ensure no background conflicts */
    }

    .mobile-tabs-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        background-color: #f1f5f9;
        border-radius: 15px;
        padding: 4px;
        gap: 2px;
    }

    .mobile-tab {
        padding: 6px 12px;
        border: none;
        border-radius: 15px;
        font-size: 14px;
        font-family: Inter, sans-serif;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        background: transparent;
        color: #262F40;
        text-align: center;
    }

    .mobile-tab.active {
        background-color: #F5FCFF;
        color: #000000;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    .mobile-tab:not(.active) {
        background-color: transparent;
        color: #262F40;
    }

    .mobile-tab:not(.active):hover {
        background-color: #e2e8f0;
    }

    /* Tab Content */
    .mobile-tab-content {
        flex: 1;
        padding: 0 20px 20px 20px; /* Add bottom padding for bottom navigation */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        max-height: calc(100vh - 160px); /* Account for header and tabs height */
    }

    /* Agenda Tab Styles */
    .mobile-agenda-content {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-agenda-card {
        background-color: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .mobile-agenda-header {
        padding: 10px 5px 0px 5px;
    }

    .mobile-agenda-title {
        font-size: 1.125rem;
        font-weight: 600;
        color: #1e293b;
        margin: 0;
    }

    .mobile-agenda-body {
        padding: 10px 5px;
    }

    .mobile-agenda-empty {
        color: #64748b;
        font-size: 0.875rem;
        margin: 0;
    }

    .mobile-event-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 12px;
        background-color: #f8fafc;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .mobile-event-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .mobile-event-details {
        flex: 1;
    }

    .mobile-event-title {
        font-size: 0.875rem;
        font-weight: 500;
        color: #1e293b;
        margin: 0 0 2px 0;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        width: 4rem;
    }

    .mobile-event-time {
        font-size: 0.75rem;
        color: #64748b;
        margin: 0;
    }

    /* Manage Tab Styles */
    .mobile-manage-content {
        display: flex;
        flex-direction: column;
    }

    .mobile-manage-card {
        background-color: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .mobile-manage-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #e2e8f0;
    }

    .mobile-manage-title {
        font-size: 1.125rem;
        font-weight: 600;
        color: #1e293b;
        margin: 0;
    }

    .mobile-settings-button {
        width: 32px;
        height: 32px;
        border: none;
        background: transparent;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }

    .mobile-manage-body {
        padding: 16px 20px;
    }

    .mobile-no-children {
        text-align: center;
        padding: 40px 20px;
    }

    .mobile-no-children-icon {
        font-size: 3rem;
        margin-bottom: 16px;
        opacity: 0.5;
    }

    .mobile-no-children-text {
        color: #64748b;
        font-size: 0.875rem;
        margin: 0 0 16px 0;
    }

    .mobile-add-child-button {
        padding: 12px 24px;
        background-color: #3b82f6;
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.2s;
    }

    .mobile-add-child-button:hover {
        background-color: #2563eb;
    }

    .mobile-child-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        background-color: #f8fafc;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .mobile-child-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 600;
        font-size: 0.875rem;
        flex-shrink: 0;
    }

    .mobile-child-details {
        flex: 1;
    }

    .mobile-child-name {
        font-size: 0.875rem;
        font-weight: 500;
        color: #1e293b;
        margin: 0 0 2px 0;
    }

    .mobile-child-age {
        font-size: 0.75rem;
        color: #64748b;
        margin: 0;
    }

    .mobile-child-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-child-info-button {
        width: 20px;
        height: 20px;
        border: none;
        background: transparent;
        border-radius: 4px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
    }

    .mobile-child-toggle {
        position: relative;
        display: inline-block;
        width: 36px;
        height: 20px;
    }

    .mobile-child-toggle input {
        opacity: 0;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        cursor: pointer;
        z-index: 1;
    }

    .mobile-toggle-slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #cbd5e1;
        transition: 0.3s;
        border-radius: 20px;
    }

    .mobile-toggle-slider:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: 0.3s;
        border-radius: 50%;
    }

    .mobile-child-toggle input:checked + .mobile-toggle-slider {
        background-color: #3b82f6;
    }

    .mobile-child-toggle input:checked + .mobile-toggle-slider:before {
        transform: translateX(16px);
    }

    .mobile-child-status {
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 500;
    }

    .mobile-child-status.available {
        background-color: #dbeafe;
        color: #1d4ed8;
    }

    .mobile-child-status.away {
        background-color: #f3f4f6;
        color: #6b7280;
    }

    .bottom-navigation {
        display: none !important;
    }

    /* Hide desktop calendar container on mobile */
    .calendar-container {
        display: none !important;
    }

    /* Ensure mobile UI is visible */
    .mobile-ui-container {
        display: flex !important;
    }

    .new-event-button {
        display: none;
    }

    .modal-overlay {
        padding: 8px;
        align-items: flex-end;
    }

    .modal-content {
        border-radius: 12px 12px 0 0;
        max-height: 85vh;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    /* Ensure calendar content, sidebar, and top navigation are hidden on small mobile screens too */
    .sidebar-container,
    .calendar-top-header,
    .calendar-header,
    .calendar-weekdays,
    .calendar-grid,
    .calendar-week-view {
        display: none !important;
    }

    /* Adjust mobile message for smaller screens */
    .main-calendar::after {
        font-size: 1rem;
        padding: 30px 16px;
        margin: 16px;
    }
}

/* Yearly view placeholder */
.yearly-view-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 20px;
}

.yearly-view-placeholder h3 {
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.yearly-view-placeholder p {
    color: #6b7280;
    font-size: 1rem;
}

/* Animation utilities */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Weekly View Styles */
.calendar-week-view {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow-y: auto; /* Enable vertical scrolling for week view */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    background-color: #ffffff;
    margin: 0 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Week view specific time slot styles with higher specificity */
.calendar-week-view .time-column .time-slot {
    height: 50px !important;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start !important;
    justify-content: center;
    padding: 2px 4px !important;
    position: relative;
}

.calendar-week-view .time-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    background-color: transparent !important;
    padding: 0 !important;
    display: inline !important;
}

/* All-day row integrated with grid */
.week-all-day-row {
    display: grid;
    grid-template-columns: 60px repeat(7, 120px);
    border-bottom: 1px solid #e5e7eb;
    background-color: #f8fafc;
    min-height: 60px;
}

.all-day-label {
    padding: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e5e7eb;
    background-color: #f1f5f9;
}

.all-day-cell {
    padding: 8px;
    border-right: 1px solid #e5e7eb;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.all-day-cell:hover {
    background-color: #f8fafc;
}

.all-day-cell.today {
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.all-day-spacer {
    border-right: 1px solid #e5e7eb;
    background-color: #f1f5f9;
}

.all-day-event {
    background-color: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.all-day-event:hover {
    background-color: #2563eb;
}

.week-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 120px);
    border-bottom: 1px solid #e5e7eb;
    background-color: #f8fafc;
}

.time-label-header {
    padding: 12px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e5e7eb;
    background-color: #f1f5f9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.week-day-header {
    padding: 16px 8px;
    text-align: center;
    border-right: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
    cursor: pointer;
    position: relative;
}

.week-day-header:last-child {
    border-right: none;
}

.week-day-header.today {
    background-color: #eff6ff;
}

.day-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.week-day-header.today .day-name {
    color: #87CEEB;
    font-weight: 600;
}

.day-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.week-day-header.today .day-number {
    background-color: #87CEEB;
    color: #1E293B;
    font-weight: 700;
}

.week-content {
    display: grid;
    grid-template-columns: 80px repeat(7, 120px);
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.time-column {
    border-right: 1px solid #e5e7eb;
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
}

.time-slot {
    height: 50px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2px 4px;
    position: relative;
}

.time-slot::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #e5e7eb;
}

.time-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
}

.days-grid {
    display: contents;
}

.day-column {
    border-right: 1px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.day-column:last-child {
    border-right: none;
}

.day-column.today {
    background-color: #fefffe;
}

.hour-slot {
    height: 50px;
    border-bottom: 1px solid #f0f0f0;
    padding: 2px;
    position: relative;
    transition: background-color 0.2s ease;
    border-right: 1px solid #f0f0f0;
}

.hour-slot:last-child {
    border-bottom: none;
}

.hour-slot:hover {
    background-color: #f9fafb;
}

.day-column.today .hour-slot:hover {
    background-color: #eff6ff;
}

.week-event {
    border-radius: 6px;
    padding: 6px 8px;
    margin: 2px;
    font-size: 0.75rem;
    line-height: 1.3;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Event color variants */
.week-event.event-blue {
    background-color: #87CEEB;
    color: #1E293B;
}

.week-event.event-orange {
    background-color: #FFB6C1;
    color: #1E293B;
}

.week-event.event-green {
    background-color: #98FB98;
    color: #1E293B;
}

.week-event.event-purple {
    background-color: #DDA0DD;
    color: #1E293B;
}

.week-event.event-pink {
    background-color: #FFC0CB;
    color: #1E293B;
}

.week-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.event-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    font-size: 0.8rem;
}

.event-time {
    font-size: 0.65rem;
    opacity: 0.8;
    font-weight: 500;
}

.more-events {
    font-size: 0.6rem;
    color: #6b7280;
    padding: 1px 4px;
    text-align: center;
    font-weight: 500;
}


.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Focus styles for accessibility */
.calendar-date:focus,
.nav-button:focus,
.today-button:focus,
.new-event-button:focus,
.icon-button:focus,
.btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .sidebar-container,
    .bottom-navigation,
    .top-navigation,
    .modal-overlay {
        display: none !important;
    }

    .main-calendar {
        margin: 0;
    }

    .calendar-date {
        break-inside: avoid;
    }
}

