/* ============================================
   Modern Baby Tracker - Popular Design System
   ============================================ */

/* Base styles */
[x-cloak] { display: none !important; }
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Modern gradient background */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

/* Main container with glass effect */
.main-container {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f8fafc;
}

/* Hide file input */
.file-input { display: none; }

/* Lightbox modal */
.lightbox {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

/* Date picker customization */
.date-selector::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0; color: transparent; cursor: pointer;
    height: auto; left: 0; position: absolute; right: 0; top: 0; width: auto;
}

/* Modern Header */
.modern-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 1rem 1.5rem;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* Modern Tab Bar */
.tab-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.tab-button {
    flex: 1;
    padding: 12px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Modern Card Design */
.modern-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.modern-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Type Selection Buttons */
.type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.type-button {
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-button:active {
    transform: scale(0.96);
}

.type-button.milk.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.type-button.food.active {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-color: #f97316;
    color: white;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

.type-button.poo.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.type-button.meds.active {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    border-color: #a855f7;
    color: white;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

/* Modern Form Elements */
.label-title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    outline: none;
    transition: all 0.2s ease;
    font-size: 16px;
}

.input-field:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Modern Checkbox */
.modern-checkbox {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-radius: 14px;
    border: 2px solid #fed7aa;
}

.modern-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: #f97316;
    border-radius: 6px;
}

/* Modern Submit Button */
.submit-button {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    border: none;
    color: white;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.submit-button:active {
    transform: scale(0.98);
}

.submit-button.milk {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.submit-button.food {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
}

.submit-button.poo {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.submit-button.meds {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

/* Date Navigation Card */
.date-nav-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 12px 16px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

/* Modern Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stats-card {
    padding: 16px 12px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2px solid;
}

.stats-card.milk {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}

.stats-card.food {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fed7aa;
}

.stats-card.vitd {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #e9d5ff;
}

.stats-card.vitd.empty {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.stats-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-value {
    font-size: 20px;
    font-weight: 800;
    margin-top: 4px;
}

/* Modern Log Item */
.log-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 16px;
    border-left: 4px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.log-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.log-item.milk {
    border-left-color: #3b82f6;
}

.log-item.food {
    border-left-color: #f97316;
}

.log-item.poo {
    border-left-color: #22c55e;
}

.log-item.meds {
    border-left-color: #a855f7;
}

.log-item.expanded {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Badge styles */
.badge {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.badge.new {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 1px solid #fecaca;
}

.badge.reaction {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #ea580c;
    border: 1px solid #fed7aa;
}

/* Image Upload Area */
.image-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.upload-box {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.upload-box:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.upload-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Vitamin D Reminder */
.vitamind-reminder {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.15);
}

/* Growth Chart Page */
.assessment-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    color: #14532d;
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.15);
    font-size: 14px;
    line-height: 1.7;
}

.assessment-box h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #166534;
    display: flex;
    align-items: center;
    font-weight: 800;
}

.assessment-box h3::before {
    content: '🤖';
    margin-right: 8px;
    font-size: 20px;
}

.assessment-loading {
    color: #64748b;
    font-style: italic;
}

.chart-container {
    background: white;
    border-radius: 20px;
    padding: 20px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.chart-box {
    width: 100%;
    height: 280px;
}

/* Bottom Navigation (optional alternative) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-radius: 12px;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.bottom-nav-item.active {
    color: #667eea;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.bottom-nav-icon {
    font-size: 24px;
}

.bottom-nav-label {
    font-size: 11px;
    font-weight: 600;
}

/* Tooltip */
.tooltip-link {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.tooltip-link::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    font-weight: 500;
}

.tooltip-link::after {
    content: '';
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tooltip-link:hover::before,
.tooltip-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Avatar ring effect */
.avatar-ring {
    position: relative;
}

.avatar-ring::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
    animation: ring-pulse 2s infinite;
}

@keyframes ring-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade transition */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
    transform: translateY(8px);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 14px;
    font-weight: 500;
}
