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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.widget {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.widget:hover {
    transform: translateY(-5px);
}

.widget h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

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

.time-display {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    margin: 20px 0;
}

.date-display {
    font-size: 1.2rem;
    color: #666;
}

.tasks-widget ul {
    list-style: none;
}

.tasks-widget li {
    padding: 10px;
    margin: 5px 0;
    background: #f5f5f5;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.tasks-widget li.clickable-task {
    cursor: pointer;
    transition: all 0.3s ease;
}

.tasks-widget li.clickable-task:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

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

.weather-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.weather-temp {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.weather-condition {
    font-size: 1.2rem;
    color: #333;
    margin: 10px 0;
}

.weather-humidity {
    color: #666;
    font-size: 0.9rem;
}

/* Calendar Widget */
.calendar-widget {
    grid-column: span 2;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #5568d3;
}

#events-list {
    margin-top: 15px;
}

.event-item {
    background: #f5f5f5;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    position: relative;
}

.event-date {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.event-title {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 5px;
}

.event-description {
    color: #666;
    font-size: 0.9rem;
}

.event-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.event-delete:hover {
    background: #e84118;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

@media (max-width: 768px) {
    .calendar-widget {
        grid-column: span 1;
    }
}

/* Theme Switcher */
.theme-switcher {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Cat Theme */
body.cat-theme {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ffeaa7 100%);
}

body.cat-theme .widget {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8f0 100%);
    border: 2px solid #ffb3d9;
}

body.cat-theme .widget h2 {
    color: #ff6b9d;
}

body.cat-theme .widget h2::before {
    content: "🐾 ";
}

body.cat-theme .time-display,
body.cat-theme .weather-temp {
    color: #ff6b9d;
}

body.cat-theme .tasks-widget li {
    background: #fff0f6;
    border-left: 4px solid #ff6b9d;
}

body.cat-theme .tasks-widget li.clickable-task:hover {
    background: #ff6b9d;
}

body.cat-theme .btn-primary {
    background: #ff6b9d;
}

body.cat-theme .btn-primary:hover {
    background: #ff4d88;
}

body.cat-theme .event-item {
    background: #fff0f6;
    border-left: 4px solid #ff6b9d;
}

body.cat-theme .event-date {
    color: #ff6b9d;
}

body.cat-theme header h1::after {
    content: " 🐱";
}

/* Dark Theme */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-theme .widget {
    background: #0f3460;
    color: #e0e0e0;
}

body.dark-theme .widget h2 {
    color: #00d4ff;
}

body.dark-theme .time-display,
body.dark-theme .weather-temp {
    color: #00d4ff;
}

body.dark-theme .date-display,
body.dark-theme .weather-location,
body.dark-theme .weather-condition,
body.dark-theme .weather-humidity {
    color: #b0b0b0;
}

body.dark-theme .tasks-widget li {
    background: #1a2332;
    border-left: 4px solid #00d4ff;
    color: #e0e0e0;
}

body.dark-theme .tasks-widget li.clickable-task:hover {
    background: #00d4ff;
    color: #1a1a2e;
}

body.dark-theme .btn-primary {
    background: #00d4ff;
    color: #1a1a2e;
}

body.dark-theme .btn-primary:hover {
    background: #00b8e6;
}

body.dark-theme .event-item {
    background: #1a2332;
    border-left: 4px solid #00d4ff;
    color: #e0e0e0;
}

body.dark-theme .event-date {
    color: #00d4ff;
}

body.dark-theme .event-title {
    color: #e0e0e0;
}

body.dark-theme .event-description {
    color: #b0b0b0;
}

body.dark-theme .modal-content {
    background: #0f3460;
    color: #e0e0e0;
}

body.dark-theme .form-group label {
    color: #e0e0e0;
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea {
    background: #1a2332;
    border-color: #00d4ff;
    color: #e0e0e0;
}

/* Meal Planner Widget */
.meal-planner-widget {
    grid-column: span 2;
}

#meals-list {
    margin-top: 15px;
}

.meals-by-day {
    margin-bottom: 20px;
}

.day-header {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #667eea;
}

.meal-item {
    background: #f5f5f5;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.meal-icon {
    font-size: 1.5rem;
}

.meal-details {
    flex: 1;
}

.meal-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

.meal-type {
    font-size: 0.85rem;
    color: #667eea;
    text-transform: capitalize;
}

.meal-source {
    font-size: 0.75rem;
    color: #999;
    margin-top: 3px;
}

.meal-source.everyplate {
    color: #ff6b6b;
    font-weight: 500;
}

.meal-notes {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.meal-delete {
    background: #ff4757;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.meal-delete:hover {
    background: #e84118;
}

.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Cat theme for meals */
body.cat-theme .meal-item {
    background: #fff0f6;
    border-left: 4px solid #ff6b9d;
}

body.cat-theme .day-header {
    color: #ff6b9d;
    border-bottom-color: #ff6b9d;
}

body.cat-theme .meal-type {
    color: #ff6b9d;
}

/* Dark theme for meals */
body.dark-theme .meal-item {
    background: #1a2332;
    color: #e0e0e0;
    border-left: 4px solid #00d4ff;
}

body.dark-theme .day-header {
    color: #00d4ff;
    border-bottom-color: #00d4ff;
}

body.dark-theme .meal-name {
    color: #e0e0e0;
}

body.dark-theme .meal-type {
    color: #00d4ff;
}

body.dark-theme .meal-notes {
    color: #b0b0b0;
}

body.dark-theme .form-group select {
    background: #1a2332;
    border-color: #00d4ff;
    color: #e0e0e0;
}

@media (max-width: 768px) {
    .meal-planner-widget {
        grid-column: span 1;
    }
}


/* ============================================================================
   AUTHENTICATION PAGES - Login and Registration
   ============================================================================ */

/* Auth page body styling */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Auth container - centers the card */
.auth-container {
    width: 100%;
    max-width: 450px;
}

/* Auth card - white box with form */
.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.auth-card h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
}

.auth-card h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 30px;
    font-weight: normal;
}

/* Form styling */
.auth-card form {
    text-align: left;
}

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

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Error message styling */
.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid #fcc;
}

/* Primary button (submit) */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Link to other auth page */
.auth-link {
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* ============================================================================
   HEADER UPDATES - User Info and Logout
   ============================================================================ */

/* Header layout for user info and logout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* User email display */
.user-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Logout button */
.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Responsive header for mobile */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-left,
    .header-right {
        flex-direction: column;
        width: 100%;
    }
    
    .theme-switcher {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}

/* ============================================================================
   PWA (Progressive Web App) Styles
   ============================================================================ */

/* PWA Install Button */
.btn-install {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: none;
    margin-left: 10px;
}

.btn-install:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-install:active {
    transform: translateY(0);
}

/* PWA Update Notification */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    backdrop-filter: blur(10px);
    animation: slideInRight 0.3s ease;
}

.update-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-update {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-update:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-dismiss {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* PWA-specific body classes */
.pwa-installed {
    /* Styles when running as installed PWA */
}

.pwa-browser {
    /* Styles when running in browser */
}

/* Standalone mode adjustments (when installed as PWA) */
@media (display-mode: standalone) {
    body {
        /* Remove any browser-specific padding/margins */
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Hide install button when in standalone mode */
    .btn-install {
        display: none !important;
    }
    
    /* Adjust header for standalone mode */
    header {
        padding-top: 10px;
    }
}

/* iOS Safari specific adjustments */
@supports (-webkit-touch-callout: none) {
    /* iOS-specific styles */
    .container {
        /* Account for iOS safe areas */
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Responsive PWA styles */
@media (max-width: 768px) {
    .btn-install {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin-left: 5px;
    }
    
    .update-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .update-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-install {
        border-width: 3px;
        font-weight: bold;
    }
    
    .update-notification {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn-install,
    .btn-update,
    .btn-dismiss {
        transition: none;
    }
    
    .update-notification {
        animation: none;
    }
    
    .btn-install:hover,
    .btn-update:hover {
        transform: none;
    }
}

/* Dark mode support for PWA elements */
@media (prefers-color-scheme: dark) {
    .update-notification {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* Print styles - hide PWA elements */
@media print {
    .btn-install,
    .update-notification {
        display: none !important;
    }
}

/* Location Settings Modal */
.location-settings {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.location-settings-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.location-settings h3 {
    color: #667eea;
    margin-bottom: 15px;
    text-align: center;
}

.location-settings p {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.location-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-location {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.btn-location:hover {
    background: #5a6fd8;
}

.manual-location {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#location-search {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#location-search:focus {
    border-color: #667eea;
}

#location-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #f9f9f9;
}

.location-result {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.location-result:hover {
    background: #e8f0fe;
}

.location-result:last-child {
    border-bottom: none;
}

.location-name {
    font-weight: 600;
    color: #333;
}

.location-country {
    font-size: 14px;
    color: #666;
}

.no-results, .error {
    padding: 12px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.btn-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Weather Widget Location Buttons */
.btn-set-location, .btn-change-location {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.btn-set-location:hover, .btn-change-location:hover {
    background: #5a6fd8;
}

.btn-change-location {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-widget {
    position: relative;
}

.weather-no-location, .weather-error {
    text-align: center;
    color: #666;
}

.weather-message {
    font-size: 14px;
    margin: 10px 0;
}

/* Timezone Info */
.timezone-info {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .location-settings-content {
        padding: 20px;
        margin: 20px;
    }
    
    .location-options {
        gap: 10px;
    }
    
    .btn-location {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* ============================================================================
   DASHBOARD SHARING STYLES
   ============================================================================ */

/* Share button in header */
.btn-share {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    margin-left: 10px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    color: #667eea;
    margin: 0;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s;
}

.close:hover {
    color: #667eea;
}

.modal-body {
    padding: 25px;
}

/* Tab styles */
.tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Form styles for sharing */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

/* Shared access list styles */
.shared-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.shared-item-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.shared-item-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.shared-item-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-danger {
    background: #f44336;
    color: white;
}

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

.btn-info {
    background: #2196F3;
    color: white;
}

.btn-info:hover {
    background: #1976D2;
}

/* Permission badges */
.permission-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.permission-view {
    background: #e3f2fd;
    color: #1976d2;
}

.permission-edit {
    background: #f3e5f5;
    color: #7b1fa2;
}

.permission-admin {
    background: #ffebee;
    color: #c62828;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-accepted {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-declined {
    background: #ffebee;
    color: #c62828;
}

/* Responsive design for sharing modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header,
    .modal-body {
        padding: 15px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: left;
        border-bottom: 1px solid #eee;
        border-right: none;
    }
    
    .tab-btn.active {
        border-bottom-color: #eee;
        border-left: 3px solid #667eea;
    }
    
    .shared-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .shared-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Animation for modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* Shopping List Widget */
.shopping-list-widget {
    grid-column: span 2;
}

.shopping-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

#shopping-list {
    margin-top: 15px;
}

.shopping-section {
    margin-bottom: 20px;
}

.shopping-section h4 {
    font-size: 1rem;
    color: #95a5a6;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shopping-item {
    background: #f5f5f5;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.shopping-item.checked {
    background: #e8f5e9;
    border-left-color: #4caf50;
    opacity: 0.7;
}

.shopping-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.shopping-item label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.shopping-item.checked label {
    text-decoration: line-through;
    color: #999;
}

.item-icon {
    font-size: 1.3rem;
}

.item-name {
    font-weight: 500;
    color: #333;
}

.shopping-item.checked .item-name {
    color: #999;
}

.item-quantity {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.item-delete {
    background: #ff4757;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.item-delete:hover {
    background: #e84118;
}

/* Cat theme for shopping list */
body.cat-theme .shopping-item {
    background: #fff0f6;
    border-left-color: #ff6b9d;
}

body.cat-theme .shopping-item.checked {
    background: #f0e6ff;
    border-left-color: #9b59b6;
}

body.cat-theme .shopping-item input[type="checkbox"] {
    accent-color: #ff6b9d;
}

/* Dark theme for shopping list */
body.dark-theme .shopping-item {
    background: #2c3e50;
    border-left-color: #3498db;
}

body.dark-theme .shopping-item.checked {
    background: #1e2a38;
    border-left-color: #27ae60;
}

body.dark-theme .item-name {
    color: #ecf0f1;
}

body.dark-theme .shopping-item.checked .item-name {
    color: #7f8c8d;
}

body.dark-theme .item-quantity {
    color: #95a5a6;
}

body.dark-theme .shopping-section h4 {
    color: #7f8c8d;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .shopping-list-widget {
        grid-column: span 1;
    }
    
    .shopping-controls {
        flex-direction: column;
    }
}
