/* Premium Diet Tracker Styles */
:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --secondary: #10B981;
    --secondary-light: #34D399;
    --danger: #EF4444;
    --dark: #1E293B;
    --text-main: #334155;
    --text-light: #64748B;
    --bg-main: #F8FAFC;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border: #E2E8F0;
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-color: rgba(79, 70, 229, 0.15);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-diyet-container {
    max-width: 800px;
    margin: 30px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    min-height: 100vh;
    padding: 20px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.wp-diyet-header {
    text-align: center;
    margin-bottom: 30px;
}

.wp-diyet-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 10px 0;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wp-diyet-header p {
    color: var(--text-light);
    font-size: 15px;
    margin: 0;
}

.back-link {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    color: var(--primary);
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    transition: var(--transition);
}
.back-link:hover {
    background: var(--primary);
    color: #fff;
}

/* Date Selector */
.date-selector-wrapper {
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 25px;
    scrollbar-width: none;
}
.date-selector-wrapper::-webkit-scrollbar { display: none; }

.date-selector {
    display: flex;
    gap: 12px;
}

.date-item {
    flex: 0 0 auto;
    width: 60px;
    height: 75px;
    background: var(--card-bg);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.date-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.date-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 16px var(--shadow-color);
}

.day-name { font-size: 12px; font-weight: 600; text-transform: uppercase; margin-bottom: 4px; opacity: 0.8; }
.day-num { font-size: 20px; font-weight: 700; }
.date-item.active .day-name, .date-item.active .day-num { opacity: 1; }

/* Dashboard Stats (Calories & Water) */
.dashboard-stats {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cal-card {
    align-items: center;
    padding: 15px;
}

/* Progress Ring */
.ring-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}
.progress-ring {
    transform: rotate(-90deg);
}
.progress-ring-bar {
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease-in-out;
}
.ring-text {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ring-text .val {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}
.ring-text .lbl {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Water Tracker */
.water-card {
    justify-content: space-between;
}
.water-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.water-title {
    font-weight: 700;
    color: var(--dark);
    font-size: 16px;
}
.water-amounts {
    font-weight: 600;
    font-size: 18px;
}
.current-water { color: #0EA5E9; font-weight: 800; }
.target-water { color: var(--text-light); font-size: 14px; }

.water-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.water-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #E0F2FE;
    color: #0284C7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.water-btn:hover { background: #BAE6FD; transform: scale(1.05); }

.water-drops {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 5px;
}
.drop-icon {
    width: 20px;
    height: 20px;
    color: #E2E8F0;
    transition: var(--transition);
}
.drop-icon.filled {
    color: #0EA5E9;
    filter: drop-shadow(0 2px 4px rgba(14, 165, 233, 0.4));
}

/* Accordion Meals */
.meal-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.meal-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.meal-card.open {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.meal-card-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: linear-gradient(to right, #ffffff, #fdfbfb);
    user-select: none;
}
.meal-card-header:hover { background: #F8FAFC; }

.meal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

.toggle-icon {
    color: var(--text-light);
    transition: transform 0.3s ease;
}
.meal-card.open .toggle-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.meal-card-body {
    padding: 0 20px 20px 20px;
    border-top: 1px solid #F1F5F9;
}

.recipe-box {
    background: #FEF3C7;
    color: #92400E;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 15px;
    line-height: 1.5;
}

/* Item List */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.item-row {
    display: flex;
    align-items: center;
    background: #F8FAFC;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: var(--transition);
    gap: 15px;
}
.item-row:hover { background: #F1F5F9; }
.item-row.done {
    background: #ECFDF5;
    border-color: #A7F3D0;
}
.item-row.done .item-name { text-decoration: line-through; color: var(--text-light); }

/* Checkbox */
.item-check {
    position: relative;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: block;
    flex-shrink: 0;
}
.item-check input { opacity: 0; position: absolute; }
.checkmark {
    position: absolute; top: 0; left: 0; width: 24px; height: 24px;
    background-color: #fff;
    border: 2px solid #CBD5E1;
    border-radius: 6px;
    transition: var(--transition);
}
.item-check:hover input ~ .checkmark { border-color: var(--primary-light); }
.item-check input:checked ~ .checkmark {
    background-color: var(--secondary);
    border-color: var(--secondary);
}
.checkmark:after {
    content: ""; position: absolute; display: none;
    left: 7px; top: 3px; width: 6px; height: 12px;
    border: solid white; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.item-check input:checked ~ .checkmark:after { display: block; }

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.item-name { font-weight: 600; font-size: 15px; color: var(--dark); transition: var(--transition); }
.item-desc { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* Actions */
.item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.toggle-substitute {
    background: none; border: none; color: var(--text-light); cursor: pointer; padding: 5px;
    transition: var(--transition); border-radius: 5px;
}
.toggle-substitute:hover { color: var(--primary); background: #E0E7FF; }
.item-substitute-input {
    padding: 6px 10px; font-size: 13px; border: 1px solid #CBD5E1; border-radius: 6px;
    outline: none; transition: var(--transition); width: 140px;
}
.item-substitute-input.hidden { display: none; }
.item-substitute-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1); }

/* Inline Extras */
.meal-extras {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #CBD5E1;
}
.inline-extra-inputs {
    flex-direction: row; gap: 10px;
}
.extra-name, .extra-cal {
    padding: 8px 12px; border: 1px solid #CBD5E1; border-radius: 6px; outline: none; font-size: 13px;
}
.extra-name { flex: 1; }
.extra-cal { width: 80px; }
.remove-extra {
    background: #FEE2E2; color: #EF4444; border: none; width: 32px; height: 32px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition);
}
.remove-extra:hover { background: #FECACA; }

.add-extra-btn {
    width: 100%; padding: 12px; background: #F8FAFC; border: 2px dashed #CBD5E1; border-radius: var(--radius-sm);
    color: var(--text-light); font-weight: 600; font-size: 14px; cursor: pointer; transition: var(--transition);
    margin-top: 10px;
}
.add-extra-btn:hover { background: #F1F5F9; border-color: var(--primary-light); color: var(--primary); }

/* Client List Admin */
.client-list { display: flex; flex-direction: column; gap: 12px; }
.client-card {
    display: flex; align-items: center; justify-content: space-between; padding: 16px 20px;
    background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--border);
    text-decoration: none; transition: var(--transition);
}
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.client-info strong { display: block; color: var(--dark); font-size: 16px; margin-bottom: 4px; }
.client-info span { color: var(--text-light); font-size: 13px; }
.client-card .dashicons { color: var(--primary); opacity: 0.5; transition: var(--transition); }
.client-card:hover .dashicons { opacity: 1; transform: translateX(5px); }

/* Floating Action Buttons */
.floating-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}
.fab-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.fab-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 20px rgba(79, 70, 229, 0.3);
    background: var(--primary-light);
}
.report-btn {
    background: var(--dark);
}
.report-btn:hover {
    background: #334155;
    box-shadow: 0 15px 20px rgba(30, 41, 59, 0.3);
}

/* Modals */
.diyet-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.diyet-modal-content {
    background: #fff;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.3s ease-out;
}
@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.diyet-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}
.diyet-modal-header h2 { margin: 0; font-size: 20px; color: var(--dark); }
.close-modal { font-size: 28px; cursor: pointer; color: var(--text-light); transition: var(--transition); }
.close-modal:hover { color: var(--danger); }
.diyet-modal-body { padding: 20px; }

/* Supplements Modal UI */
.supp-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.supp-card {
    display: flex;
    align-items: center;
    background: #F8FAFC;
    border-radius: var(--radius-sm);
    padding: 10px;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.supp-card.done {
    background: #ECFDF5;
    border-color: #A7F3D0;
}
.supp-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}
.supp-img.no-img { background: #F1F5F9; }
.supp-info {
    flex: 1;
    padding: 0 15px;
}
.supp-info h4 { margin: 0 0 5px 0; font-size: 15px; color: var(--dark); }
.supp-info p { margin: 0; font-size: 13px; color: var(--text-light); }
.supp-card.done .supp-info h4 { text-decoration: line-through; opacity: 0.7; }

/* Report UI */
.report-stats { display: flex; flex-direction: column; gap: 20px; }
.report-stat-item h3 { margin: 0 0 10px 0; font-size: 14px; color: var(--text-main); }
.report-stat-item p { margin: 8px 0 0 0; font-size: 12px; color: var(--text-light); font-weight: 600; text-align: right; }
.report-progress-bar {
    height: 12px;
    background: #E2E8F0;
    border-radius: 6px;
    overflow: hidden;
}
.report-progress-bar .fill {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    transition: width 1s ease-out;
}

/* Meal Header Updates */
.meal-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.meal-time {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}
.meal-summary-badge {
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
}

/* Responsive */
@media (max-width: 640px) {
    .dashboard-stats { grid-template-columns: 1fr; }
    .inline-extra-inputs { flex-direction: column; }
    .extra-cal { width: 100%; }
    .item-substitute-input { width: 110px; }
}
