/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Accessibility and Focus Management */
*:focus {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
    border-radius: 4px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #1976d2;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f4f8 100%);
    color: #1a1a1a; /* Improved contrast for WCAG AA */
    min-height: 100vh;
    line-height: 1.6;
    font-size: 16px; /* Base font size for accessibility */
}

/* Merriweather for headings and special text */
h1, h2, h3, h4, h5, h6,
.nav-brand h1,
.dashboard-header h2,
.today-header h2,
.settings-header h2,
.settings-section h3,
.summary-title {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Montserrat for body text and UI elements */
.nav-btn,
.stat-label,
.form-group label,
.medication-name,
.checklist-medication-name,
.btn-action,
.setting-btn {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Bubble Animation Container */
.bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.6), rgba(33, 150, 243, 0.4));
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
    animation: bubbleRise 4s ease-out forwards;
    pointer-events: none;
}

.bubble::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 30%;
    height: 30%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    filter: blur(2px);
}

.bubble.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.6), rgba(129, 199, 132, 0.4));
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.bubble.warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.6), rgba(255, 183, 77, 0.4));
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

@keyframes bubbleRise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        transform: translateY(80vh) scale(1);
        opacity: 1;
    }
    90% {
        transform: translateY(20vh) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(0.3);
        opacity: 0;
    }
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(20px) translateY(-10px);
    }
    50% {
        transform: translateX(-10px) translateY(5px);
    }
    75% {
        transform: translateX(15px) translateY(-5px);
    }
}

@keyframes bubblePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Success celebration bubbles */
.celebration-bubble {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: celebrationFloat 3s ease-out forwards;
}

.celebration-bubble.blue {
    background: #1976d2;
    box-shadow: 0 0 10px rgba(25, 118, 210, 0.6);
}

.celebration-bubble.green {
    background: #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.6);
}

.celebration-bubble.light {
    background: #e3f2fd;
    box-shadow: 0 0 8px rgba(227, 242, 253, 0.8);
}

@keyframes celebrationFloat {
    0% {
        transform: translateY(0) translateX(0) scale(0);
        opacity: 1;
    }
    15% {
        transform: translateY(-20px) translateX(10px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(30px) scale(0.3);
        opacity: 0;
    }
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand i {
    font-size: 1.5rem;
    color: #64b5f6;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    text-decoration: none;
}

.nav-btn:hover, .nav-btn:focus {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-btn i {
    font-size: 0.9rem;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .nav-btn {
        border: 2px solid white;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .nav-btn:hover, .nav-btn:focus {
        background: rgba(0, 0, 0, 0.9);
        border-color: #64b5f6;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .nav-btn, .nav-btn:hover, .nav-btn:focus {
        transition: none;
        transform: none;
    }
    
    .bubble, .celebration-bubble {
        animation: none;
    }
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 1.5rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.25rem 1rem;
    border-radius: 16px;
    box-shadow: 
        0 4px 20px rgba(25, 118, 210, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-align: center;
    border: 1px solid rgba(25, 118, 210, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(0);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #1976d2;
    margin-bottom: 0.25rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(25, 118, 210, 0.1);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.stat-icon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #1976d2;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.stat-progress {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    width: 24px;
    height: 24px;
    opacity: 0.3;
}

.stat-progress svg {
    width: 24px;
    height: 24px;
}

/* Today Card - Soft Blue Pastel */
#todayCard {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid rgba(144, 202, 249, 0.3);
    box-shadow: 
        0 4px 20px rgba(100, 181, 246, 0.15),
        0 1px 3px rgba(33, 150, 243, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#todayCard::before {
    background: linear-gradient(90deg, #90caf9, #64b5f6, #42a5f5);
}

#todayCard .stat-number {
    color: #1565c0;
}

#todayCard .stat-icon {
    background: linear-gradient(135deg, #90caf9, #64b5f6);
    color: #1565c0;
}

#todayCard:hover {
    box-shadow: 
        0 12px 40px rgba(100, 181, 246, 0.25),
        0 4px 12px rgba(33, 150, 243, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Upcoming Card - Soft Orange Pastel */
#upcomingCard {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid rgba(255, 183, 77, 0.3);
    box-shadow: 
        0 4px 20px rgba(255, 152, 0, 0.15),
        0 1px 3px rgba(255, 152, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#upcomingCard::before {
    background: linear-gradient(90deg, #ffb74d, #ffa726, #ff9800);
}

#upcomingCard .stat-number {
    color: #e65100;
}

#upcomingCard .stat-icon {
    background: linear-gradient(135deg, #ffb74d, #ffa726);
    color: #e65100;
}

#upcomingCard:hover {
    box-shadow: 
        0 12px 40px rgba(255, 152, 0, 0.25),
        0 4px 12px rgba(255, 152, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Completed Card - Soft Green Pastel */
#completedCard {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border: 1px solid rgba(129, 199, 132, 0.3);
    box-shadow: 
        0 4px 20px rgba(76, 175, 80, 0.15),
        0 1px 3px rgba(76, 175, 80, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#completedCard::before {
    background: linear-gradient(90deg, #81c784, #66bb6a, #4caf50);
}

#completedCard .stat-number {
    color: #2e7d32;
}

#completedCard .stat-icon {
    background: linear-gradient(135deg, #81c784, #66bb6a);
    color: #2e7d32;
}

#completedCard:hover {
    box-shadow: 
        0 12px 40px rgba(76, 175, 80, 0.25),
        0 4px 12px rgba(76, 175, 80, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1976d2, #2196f3, #64b5f6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s ease;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(25, 118, 210, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(25, 118, 210, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1976d2;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(25, 118, 210, 0.1);
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
    color: #1565c0;
}

.stat-label {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-label {
    color: #1976d2;
    transform: translateY(-2px);
}

/* Animated pulse effect for stat cards */
@keyframes statPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stat-card.pulse {
    animation: statPulse 2s ease-in-out infinite;
}

/* Icon background decoration */
.stat-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #1976d2;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: rotate(15deg) scale(1.1);
    opacity: 1;
}

/* Progress ring for each stat */
.stat-progress {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    opacity: 0.3;
}

.stat-progress-circle {
    transform: rotate(-90deg);
    transition: stroke-dashoffset 0.6s ease;
}

/* Enhanced responsive design for compact stat cards */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem 0.75rem;
        min-height: 100px;
        border-radius: 12px;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .stat-progress {
        width: 20px;
        height: 20px;
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .stat-progress svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.875rem 0.75rem;
        min-height: 90px;
        border-radius: 10px;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .stat-icon {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .stat-progress {
        width: 18px;
        height: 18px;
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .stat-progress svg {
        width: 18px;
        height: 18px;
    }
}

/* Loading animation for numbers */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number.counting {
    animation: countUp 0.6s ease-out;
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.stat-card.loading {
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #f8fafc 20%,
        #e3f2fd 40%,
        #f8fafc 60%,
        #ffffff 80%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Medications Grid */
.medications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.medication-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e3f2fd;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.medication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1976d2, #2196f3);
}

.medication-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.medication-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.medication-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 0.25rem;
}

.medication-dosage {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.medication-time {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.medication-details {
    margin-bottom: 1rem;
}

.medication-frequency {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    
}

.medication-notes {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    line-height: 1.4;
}

.medication-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e3f2fd;
}

.btn-action {
    flex: 1;
    padding: 0.3rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 28px;
    min-width: 28px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.15);
}

.btn-action i {
    font-size: 0.85rem;
    transition: all 0.3s ease;
    z-index: 2;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-action::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(25, 118, 210, 0.25);
    background: linear-gradient(135deg, #bbdefb, #90caf9);
}

.btn-action:hover::before {
    opacity: 1;
}

.btn-action:hover::after {
    bottom: -30px;
    opacity: 1;
    visibility: visible;
}

.btn-action:hover i {
    transform: scale(1.05);
}

.btn-take,
.btn-snooze,
.btn-skip,
.btn-delete {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1976d2;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.15);
}

.btn-take:hover,
.btn-snooze:hover,
.btn-skip:hover,
.btn-delete:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    box-shadow: 0 3px 8px rgba(25, 118, 210, 0.25);
}

/* Responsive design for compact action buttons */
@media (max-width: 768px) {
    .btn-action {
        min-height: 26px;
        min-width: 26px;
        padding: 0.25rem;
    }
    
    .btn-action i {
        font-size: 0.75rem;
    }
    
    .btn-action::after {
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
        bottom: -32px;
    }
    
    .btn-action:hover::after {
        bottom: -28px;
    }
    
    .medication-actions {
        gap: 0.4rem;
        padding-top: 0.75rem;
    }
}

@media (max-width: 480px) {
    .btn-action {
        min-height: 24px;
        min-width: 24px;
        padding: 0.2rem;
    }
    
    .btn-action i {
        font-size: 0.7rem;
    }
    
    .btn-action::after {
        font-size: 0.6rem;
        padding: 0.2rem 0.35rem;
        bottom: -30px;
    }
    
    .btn-action:hover::after {
        bottom: -26px;
    }
    
    .medication-actions {
        gap: 0.3rem;
        padding-top: 0.5rem;
    }
}
/* History View */
.history-header {
    margin-bottom: 2rem;
}

.history-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 1.5rem;
}

.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-select,
.date-filter,
.search-input {
    padding: 0.5rem 0.75rem;
    border: 2px solid #e3f2fd;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    background: white;
    transition: all 0.3s ease;
}

.filter-select:focus,
.date-filter:focus,
.search-input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.clear-filters-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.search-controls {
    flex: 1;
    max-width: 300px;
}

.search-input {
    width: 100%;
}

/* History Stats */
.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.history-stat-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(25, 118, 210, 0.15);
    border: 1px solid rgba(144, 202, 249, 0.3);
    transition: all 0.3s ease;
}

.history-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(25, 118, 210, 0.25);
}

.history-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #90caf9, #64b5f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #1565c0;
}

.history-stat-card .stat-content {
    flex: 1;
}

.history-stat-card .stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #1565c0;
    line-height: 1;
}

.history-stat-card .stat-label {
    font-size: 0.85rem;
    color: #1976d2;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* History Timeline */
.history-timeline {
    position: relative;
    padding: 1rem 0;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #1976d2, #64b5f6);
    border-radius: 1px;
}

.history-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease forwards;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 3px solid #1976d2;
    z-index: 2;
}

.history-item.taken::before {
    border-color: #4caf50;
    background: #4caf50;
}

.history-item.skipped::before {
    border-color: #f44336;
    background: #f44336;
}

.history-item.snoozed::before {
    border-color: #ff9800;
    background: #ff9800;
}

.history-content {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e3f2fd;
    transition: all 0.3s ease;
}

.history-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.history-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.history-medication-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 0.25rem;
}

.history-action {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-action.taken {
    background: #e8f5e8;
    color: #2e7d32;
}

.history-action.skipped {
    background: #ffebee;
    color: #c62828;
}

.history-action.snoozed {
    background: #fff3e0;
    color: #e65100;
}

.history-time {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.history-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.history-dosage {
    font-size: 0.9rem;
    color: #64748b;
}

.history-dose-time {
    font-size: 0.85rem;
    color: #1976d2;
    font-weight: 500;
}

/* History Empty State */
.history-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.history-empty i {
    font-size: 4rem;
    color: #bbdefb;
    margin-bottom: 1rem;
}

.history-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1976d2;
}

.history-empty p {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .history-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-controls {
        max-width: none;
    }
    
    .history-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .history-item {
        padding-left: 50px;
    }
    
    .history-timeline::before {
        left: 15px;
    }
    
    .history-item::before {
        left: 7px;
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .history-header-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .history-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .history-stat-card {
        padding: 1rem;
    }
    
    .history-stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .history-stat-card .stat-number {
        font-size: 1.5rem;
    }
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-state i {
    font-size: 4rem;
    color: #bbdefb;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1976d2;
}

.empty-state p {
    font-size: 1rem;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1976d2;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    box-shadow: 
        0 8px 32px rgba(25, 118, 210, 0.2),
        0 4px 16px rgba(25, 118, 210, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.4);
    overflow: hidden;
    position: relative;
    visibility: visible;
    opacity: 1;
    margin-left:90%;
}

.fab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fab::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(25, 118, 210, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.fab:hover {
    transform: translateY(-8px) scale(1.1) rotate(90deg);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 16px 48px rgba(25, 118, 210, 0.3),
        0 4px 20px rgba(25, 118, 210, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(25, 118, 210, 0.4);
    color: #1565c0;
}

.fab:hover::before {
    opacity: 1;
}

.fab:hover::after {
    opacity: 1;
}

.fab:active {
    transform: translateY(-4px) scale(1.05) rotate(45deg);
    transition: all 0.2s ease;
}

.fab i {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
}

.fab:hover i {
    text-shadow: 0 4px 8px rgba(25, 118, 210, 0.3);
}

/* FAB Ripple Effect */
.fab .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* FAB Pulse Animation */
.fab.pulse {
    animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(25, 118, 210, 0.2),
            0 4px 16px rgba(25, 118, 210, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 40px rgba(25, 118, 210, 0.3),
            0 4px 20px rgba(25, 118, 210, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.6),
            inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    }
}

/* Responsive FAB */
@media (max-width: 768px) {
    .fab {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .fab:hover {
        transform: translateY(-6px) scale(1.08) rotate(90deg);
    }
}

@media (max-width: 480px) {
    .fab {
        bottom: 1rem;
        right: 1rem;
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }
    
    .fab:hover {
        transform: translateY(-4px) scale(1.06) rotate(90deg);
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

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

.modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e3f2fd;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1976d2;
}

.close-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #1976d2;
}

.modal-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e3f2fd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

/* Compact frequency dropdown */
.form-group select#frequency {
    width: auto;
    min-width: 200px;
    max-width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .form-group select#frequency {
        min-width: 180px;
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .form-group select#frequency {
        min-width: 160px;
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e3f2fd;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.3);
}

.btn-secondary {
    background: #f5f5f5;
    color: #64748b;
    border: 1px solid #e3f2fd;
}

.btn-secondary:hover {
    background: #e3f2fd;
    color: #1976d2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        width: 100%;
        justify-content: space-around;
    }

    .nav-btn {
        flex-direction: column;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .nav-btn i {
        font-size: 1rem;
    }

    .dashboard-header h2 {
        font-size: 1.5rem;
    }

    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .medications-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .fab {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .modal {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .dashboard-header {
        margin-bottom: 1rem;
    }

    .stat-card {
        padding: 0.75rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .medication-card {
        padding: 1rem;
    }

    .medication-actions {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.medication-card {
    animation: fadeIn 0.5s ease forwards;
}

/* Form Help Text */
.form-help {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Form Validation Errors */
.field-error {
    display: block;
    font-size: 0.85rem;
    color: #f44336;
    margin-top: 0.25rem;
    font-weight: 500;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.2);
}

/* High Contrast Mode Improvements */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }
    
    .stat-card {
        border: 2px solid black;
        background: white;
    }
    
    .medication-card {
        border: 2px solid black;
    }
    
    .nav-btn {
        border: 2px solid white;
        background: black;
        color: white;
    }
    
    .fab {
        background: black;
        border: 2px solid white;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .bubble,
    .celebration-bubble {
        display: none;
    }
}

/* Focus Management for Screen Readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Enhanced Button Accessibility */
.btn-action,
.nav-btn,
.setting-btn,
.fab {
    min-height: 44px;
    min-width: 44px;
    position: relative;
}

.btn-action::before,
.nav-btn::before,
.setting-btn::before,
.fab::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: inherit;
    background: transparent;
    transition: background 0.3s ease;
}

.btn-action:hover::before,
.nav-btn:hover::before,
.setting-btn:hover::before,
.fab:hover::before {
    background: rgba(255, 255, 255, 0.1);
}

/* Time Inputs */
.time-inputs {
    margin-bottom: 1.5rem;
}

.time-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.time-input-group label {
    min-width: 80px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.time-input-group input[type="time"] {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e3f2fd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.time-input-group input[type="time"]:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.time-inputs .form-group-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

/* View Management */
.view {
    display: block;
}

.view.hidden {
    display: none;
}

/* Today View */
.today-header {
    text-align: center;
    margin-bottom: 2rem;
}

.today-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 0.5rem;
}

.today-date {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.progress-bar {
    background: #e3f2fd;
    height: 24px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto 1rem;
}

.progress-fill {
    background: linear-gradient(90deg, #1976d2, #2196f3);
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #f0f0f0;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Today Checklist */
.today-checklist {
    margin-bottom: 2rem;
}

.checklist-section {
    margin-bottom: 2rem;
}

.checklist-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checklist-item {
    background: white;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.checklist-item:hover {
    border-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.checklist-item.taken {
    background: #e8f5e8;
    border-color: #4caf50;
}

.checklist-item.overdue {
    background: #ffebee;
    border-color: #f44336;
}

.checklist-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #1976d2;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checklist-checkbox:hover {
    background: #e3f2fd;
}

.checklist-checkbox.checked {
    background: #4caf50;
    border-color: #4caf50;
}

.checklist-checkbox.checked::after {
    content: '✓';
    color: white;
    font-weight: bold;
}

.checklist-content {
    flex: 1;
}

.checklist-medication-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.checklist-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #64748b;
}

.checklist-time {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-weight: 500;
}

.checklist-dosage {
    color: #64748b;
}

.checklist-status {
    font-size: 0.85rem;
    font-weight: 500;
}

.checklist-status.taken {
    color: #4caf50;
}

.checklist-status.pending {
    color: #ff9800;
}

.checklist-status.overdue {
    color: #f44336;
}

.checklist-timestamp {
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
}

.checklist-actions {
    display: flex;
    gap: 0.5rem;
}

.checklist-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.checklist-btn-take {
    background: #4caf50;
    color: white;
}

.checklist-btn-take:hover {
    background: #45a049;
}

.checklist-btn-undo {
    background: #ff9800;
    color: white;
}

.checklist-btn-undo:hover {
    background: #f57c00;
}

/* Today Summary */
.today-summary {
    background: white;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.summary-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 1rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.summary-stat {
    text-align: center;
}

.summary-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1976d2;
    display: block;
}

.summary-label {
    font-size: 0.9rem;
    color: #64748b;
}

/* Responsive Design for Today View */
@media (max-width: 768px) {
    .checklist-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .checklist-checkbox {
        align-self: flex-start;
    }
    
    .checklist-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .checklist-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .progress-bar {
        max-width: 300px;
    }
}

/* Settings View */
.settings-header {
    margin-bottom: 2rem;
}

.settings-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1976d2;
}

.settings-section {
    background: white;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e3f2fd;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.setting-info p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-btn {
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.setting-btn:hover {
    background: #1565c0;
    transform: translateY(-1px);
}

.setting-btn.danger {
    background: #f44336;
}

.setting-btn.danger:hover {
    background: #d32f2f;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.status-indicator.granted {
    color: #4caf50;
}

.status-indicator.denied {
    color: #f44336;
}

.status-indicator.default {
    color: #ff9800;
}

.status-indicator.unsupported {
    color: #9e9e9e;
}

/* Responsive Design for Settings View */
@media (max-width: 768px) {
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .setting-control {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Time Badges */
.medication-times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.time-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}
