/* ═══════════════════════════════════════════════════
   JOY PLUS DASHBOARD — Exact colors from design
   ═══════════════════════════════════════════════════ */

/* Color tokens from the image */
:root {
    --jp-red: #C41E1E;
    --jp-red-light: #FDEAEA;
    --jp-green: #2E7D32;
    --jp-green-badge-bg: #E8F5E9;
    --jp-green-badge-text: #1B5E20;
    --jp-orange: #E65100;
    --jp-gold: #FFB300;
    --jp-custom-meal-bg: #FDECEC;
    --jp-custom-meal-text: #C41E1E;
    --jp-shared-meal-bg: #FFF3E0;
    --jp-shared-meal-text: #E65100;
    --jp-bg: #F5F5F5;
    --jp-sidebar-bg: #FAFAFA;
    --jp-white: #FFFFFF;
    --jp-border: #EEEEEE;
    --jp-border-light: #F5F5F5;
    --jp-text: #333333;
    --jp-text-light: #888888;
    --jp-text-mid: #666666;
    --jp-vitals-bg: #FDEAEA;
    --jp-vitals-text: #C41E1E;
    --jp-radius: 12px;
    --jp-radius-sm: 8px;
}

.jp-dashboard *, .jp-pw-page * { box-sizing: border-box; margin: 0; padding: 0; }
.jp-dashboard a { text-decoration: none; color: inherit; }
.jp-dashboard h1, .jp-dashboard h2, .jp-dashboard h3 { margin: 0; padding: 0; }
.jp-dashboard ul { list-style: none; margin: 0; padding: 0; }
.jp-dashboard table { border: none; border-collapse: collapse; }
.jp-dashboard img { max-width: 100%; height: auto; }

/* ── Password Page ── */
.jp-pw-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--jp-bg); font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
.jp-pw-card { background: var(--jp-white); border-radius: 16px; padding: 48px 40px; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.07); max-width: 400px; width: 100%; }
.jp-pw-logo span:first-child { font-size: 36px; vertical-align: middle; }
.jp-pw-logo-img { max-width: 220px; max-height: 90px; object-fit: contain; }
.jp-pw-brand { font-size: 28px; font-weight: 800; color: var(--jp-red); letter-spacing: 1px; vertical-align: middle; }
.jp-pw-sub { color: var(--jp-text-light); font-size: 13px; margin: 4px 0 28px; }
.jp-pw-err { background: var(--jp-red-light); color: var(--jp-red); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.jp-pw-page form label { display: block; text-align: left; font-weight: 600; margin-bottom: 8px; font-size: 14px; color: var(--jp-text); }
.jp-pw-page form input { width: 100%; padding: 12px 16px; border: 1.5px solid #ddd; border-radius: 10px; font-size: 15px; margin-bottom: 16px; outline: none; }
.jp-pw-page form input:focus { border-color: var(--jp-red); }
.jp-pw-page form button { width: 100%; padding: 12px; background: var(--jp-red); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
.jp-pw-page form button:hover { background: #A31818; }

/* ── Dashboard Grid ── */
.jp-dashboard {
    display: grid;
    grid-template-columns: 250px 1fr 320px;
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: var(--jp-text);
    background: var(--jp-bg);
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
}

/* ── Left Sidebar ── */
.jp-sidebar-left { background: var(--jp-sidebar-bg); border-right: 1px solid var(--jp-border); display: flex; flex-direction: column; padding: 20px 16px; }
.jp-sidebar-header { text-align: center; padding-bottom: 16px; border-bottom: 1px solid var(--jp-border); margin-bottom: 16px; }
.jp-logo { display: flex; align-items: center; justify-content: center; gap: 6px; }
.jp-logo-icon { font-size: 24px; }
.jp-logo-img { max-width: 180px; max-height: 60px; object-fit: contain; }
.jp-logo-text { font-size: 22px; font-weight: 800; color: var(--jp-red); letter-spacing: 1px; }
.jp-tagline { display: block; font-size: 10px; color: #aaa; margin-top: 2px; }
.jp-parent-count { font-size: 13px; font-weight: 600; color: var(--jp-text-mid); margin-bottom: 12px; }
.jp-parent-list { flex: 1; overflow-y: auto; }

.jp-parent-card { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--jp-radius); margin-bottom: 8px; border: 1.5px solid transparent; transition: all 0.15s; }
.jp-parent-card:hover { background: #f0f0f0; }
.jp-parent-card.active { background: var(--jp-white); border-color: #e0e0e0; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.jp-parent-photo { width: 58px; height: 58px; flex-shrink: 0; }
.jp-parent-photo img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; }
.jp-avatar-ph { width: 58px; height: 58px; border-radius: 50%; background: #e8e8e8; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #999; }
.jp-parent-info { flex: 1; min-width: 0; }
.jp-parent-info strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jp-star { font-size: 13px; color: var(--jp-text-light); font-weight: normal; }
.jp-parent-meta { font-size: 13px; color: var(--jp-text-light); }
.jp-arrow { color: #ccc; font-size: 20px; }

/* Badges */
.jp-badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.jp-badge-active { background: var(--jp-green-badge-bg); color: var(--jp-green-badge-text); }
.jp-badge-inactive { background: #FCE4EC; color: #B71C1C; }

.jp-sidebar-foot { padding-top: 12px; border-top: 1px solid var(--jp-border); text-align: center; }
.jp-logout { font-size: 12px; color: var(--jp-text-light); }

/* ── Main Content ── */
.jp-main { padding: 24px 28px; overflow-y: auto; background: var(--jp-white); }

.jp-profile-header { display: flex; align-items: center; gap: 24px; padding: 24px; background: #F9F0EA; border-radius: 14px; margin-bottom: 4px; }
.jp-profile-photo img, .jp-avatar-big { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,0.7); }
.jp-avatar-big { display: flex; align-items: center; justify-content: center; background: #e8e8e8; font-size: 36px; font-weight: 700; color: #999; }
.jp-profile-name { font-size: 30px; font-weight: 700; color: #222; margin-bottom: 8px; }
.jp-rating { font-size: 20px; font-weight: 500; color: var(--jp-text-light); }
.jp-profile-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 15px; color: var(--jp-text-mid); align-items: center; }

.jp-tabs { border-bottom: 2px solid var(--jp-border-light); margin: 16px 0 0; }
.jp-tab { display: inline-block; padding: 10px 20px; font-weight: 600; font-size: 16px; color: var(--jp-red); border-bottom: 2px solid var(--jp-red); margin-bottom: -2px; cursor: default; }

.jp-section { padding: 24px 0; border-bottom: 1px solid var(--jp-border-light); }
.jp-section:last-child { border-bottom: none; }
.jp-stitle { font-size: 20px; font-weight: 700; color: #222; margin-bottom: 16px; }

/* Interests */
.jp-interests { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.jp-itag { display: flex; align-items: center; gap: 10px; background: var(--jp-sidebar-bg); border: 1px solid var(--jp-border); border-radius: 12px; padding: 12px 18px; }
.jp-itag-icon { font-size: 26px; }
.jp-itag small { display: block; font-size: 12px; color: var(--jp-text-light); line-height: 1.3; }
.jp-itag strong { display: block; font-size: 15px; color: var(--jp-text); line-height: 1.3; }

.jp-notes { background: var(--jp-sidebar-bg); border: 1px solid var(--jp-border); border-radius: 10px; padding: 14px 18px; }
.jp-notes h3 { font-size: 15px; font-weight: 700; color: #444; margin-bottom: 8px; }
.jp-notes p { font-size: 15px; color: var(--jp-text-mid); line-height: 1.6; }

/* Food */
.jp-ftable { width: 100%; }
.jp-ftable tr { border-bottom: 1px solid var(--jp-border-light); }
.jp-ftable td { padding: 12px 14px; font-size: 15px; vertical-align: middle; }
.jp-fday { font-weight: 600; color: #555; width: 110px; }
.jp-fmeal { color: var(--jp-text); }
.jp-fstatus { text-align: right; width: 130px; }
.jp-mbadge { display: inline-block; padding: 4px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.jp-mb-custom { background: var(--jp-custom-meal-bg); color: var(--jp-custom-meal-text); }
.jp-mb-shared { background: var(--jp-shared-meal-bg); color: var(--jp-shared-meal-text); }
.jp-dnote { font-size: 12px; color: var(--jp-text-light); margin-top: 10px; }

/* Activities */
.jp-agrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 14px; }
.jp-aday { text-align: center; background: var(--jp-sidebar-bg); border-radius: 10px; padding: 10px 6px; border: 1px solid var(--jp-border-light); }
.jp-aday-name { font-weight: 700; font-size: 14px; color: #555; margin-bottom: 8px; }
.jp-aday-icons { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.jp-aday-icons span { font-size: 24px; }
.jp-alist { text-align: left; }
.jp-alist li { font-size: 12px; color: var(--jp-text-mid); padding: 2px 0; line-height: 1.5; }
.jp-alist li::before { content: '• '; color: #bbb; }
.jp-na { color: #ccc !important; }
.jp-na::before { display: none !important; }
.jp-alegend { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 8px; border-top: 1px solid var(--jp-border-light); }
.jp-litem { font-size: 13px; color: var(--jp-text-light); display: flex; align-items: center; gap: 6px; }

/* ── Right Sidebar ── */
.jp-sidebar-right { background: var(--jp-sidebar-bg); border-left: 1px solid var(--jp-border); padding: 20px 16px; overflow-y: auto; }
.jp-today-header { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--jp-border); margin-bottom: 16px; }
.jp-today-icon { font-size: 26px; }
.jp-today-header strong { display: block; font-size: 16px; color: #222; }
.jp-today-date { font-size: 14px; color: var(--jp-text-light); }

.jp-date-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.jp-dbtn { width: 32px; height: 32px; border: 1px solid #ddd; background: var(--jp-white); border-radius: var(--jp-radius-sm); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #555; }
.jp-dbtn:hover { background: #f0f0f0; }
#jp-date-picker { flex: 1; padding: 6px 10px; border: 1px solid #ddd; border-radius: var(--jp-radius-sm); font-size: 13px; text-align: center; outline: none; }

/* Happiness */
.jp-happiness { text-align: center; padding: 16px 0; border-bottom: 1px solid var(--jp-border); margin-bottom: 14px; }
.jp-hlabel { font-weight: 700; font-size: 16px; color: #444; margin-bottom: 10px; }
.jp-hscore { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 4px; }
.jp-hemoji { font-size: 44px; }
.jp-hnum { font-size: 48px; font-weight: 800; }
.jp-hmax { font-size: 18px; color: var(--jp-text-light); font-weight: 500; }
.jp-htext { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.jp-vitals { font-size: 14px; font-weight: 700; color: var(--jp-vitals-text); background: var(--jp-vitals-bg); display: inline-block; padding: 5px 14px; border-radius: 20px; }

/* Checklist */
.jp-checklist { margin-bottom: 14px; }
.jp-chk { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--jp-border-light); }
.jp-chk:last-child { border-bottom: none; }
.jp-chk-i { font-size: 22px; flex-shrink: 0; }
.jp-chk-t { flex: 1; font-size: 15px; color: #444; }
.jp-chk-e { font-size: 20px; flex-shrink: 0; }

.jp-dphotos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.jp-sidebar-photo { width: 100%; border-radius: 10px; object-fit: cover; aspect-ratio: 4/3; }
.jp-no-data { text-align: center; padding: 40px 0; color: var(--jp-text-light); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1100px) {
    .jp-dashboard { grid-template-columns: 200px 1fr 260px; }
    .jp-agrid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
    .jp-dashboard { grid-template-columns: 1fr; }
    .jp-sidebar-left { border-right: none; border-bottom: 1px solid var(--jp-border); padding: 16px; }
    .jp-sidebar-header { display: flex; align-items: center; gap: 12px; text-align: left; padding-bottom: 12px; flex-wrap: wrap; }
    .jp-logo { justify-content: flex-start; }
    .jp-parent-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
    .jp-parent-card { flex-shrink: 0; min-width: 180px; margin-bottom: 0; }
    .jp-sidebar-foot { display: none; }
    .jp-main { padding: 16px; }
    .jp-sidebar-right { border-left: none; border-top: 1px solid var(--jp-border); padding: 16px; }
    .jp-agrid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
    .jp-profile-header { flex-direction: column; text-align: center; }
    .jp-profile-meta { justify-content: center; }
    .jp-profile-name { font-size: 20px; }
    .jp-interests { flex-direction: column; }
    .jp-agrid { grid-template-columns: repeat(2, 1fr); }
    .jp-ftable td { padding: 8px 6px; font-size: 12px; }
    .jp-fday { width: 70px; }
    .jp-parent-card { min-width: 160px; }
    .jp-hnum { font-size: 32px; }
    .jp-hemoji { font-size: 28px; }
}
@media (max-width: 400px) {
    .jp-agrid { grid-template-columns: 1fr 1fr; }
    .jp-dphotos { grid-template-columns: 1fr; }
}
