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

body {
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    background: #f2f5f9;
    color: #1c2733;
    line-height: 1.55;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

.topbar {
    background: linear-gradient(120deg, #1d6ff2, #38bdf8);
    color: #fff;
    padding: 26px 0 22px;
    margin-bottom: 20px;
}
.topbar h1 { font-size: 26px; }
.tagline { opacity: .92; font-size: 14px; margin-top: 2px; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.flash.ok  { background: #e2f7e7; color: #146c2e; border: 1px solid #a9dfba; }
.flash.err { background: #fdeaea; color: #9c1c1c; border: 1px solid #f2b8b8; }

.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(16, 42, 80, .05);
}
.card h2 { font-size: 18px; margin-bottom: 14px; }

/* Member colors */
.member-0 { --mc: #1d6ff2; }
.member-1 { --mc: #0e9f6e; }
.member-9 { --mc: #64748b; }

.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--mc, #64748b); color: #fff;
    font-weight: 700; font-size: 17px; flex: none;
}

/* Today's status */
.status-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.status-card {
    flex: 1 1 240px; display: flex; gap: 12px; align-items: center;
    background: #fff; border: 1px solid #e2e8f0; border-left: 5px solid var(--mc);
    border-radius: 12px; padding: 14px 16px;
}
.status-card .done { color: #146c2e; font-size: 13.5px; }
.status-card .pending { color: #b45309; font-size: 13.5px; }

/* Form */
.lbl { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14.5px; }
.member-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.pick { cursor: pointer; }
.pick input { display: none; }
.pick span {
    display: inline-block; padding: 9px 20px; border-radius: 999px;
    border: 2px solid var(--mc); color: var(--mc); font-weight: 600;
}
.pick input:checked + span { background: var(--mc); color: #fff; }

textarea, input[type="file"], select, input[type="date"] {
    width: 100%; padding: 11px 12px; font-size: 15px;
    border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff;
    font-family: inherit;
}
textarea:focus, select:focus, input[type="date"]:focus {
    outline: none; border-color: #1d6ff2;
}
input[type="file"] { padding: 8px; }
.preview { max-width: 100%; max-height: 260px; border-radius: 10px; margin-top: 10px; border: 1px solid #e2e8f0; }

.btn {
    display: inline-block; margin-top: 16px; padding: 12px 26px;
    background: linear-gradient(120deg, #1d6ff2, #38bdf8); color: #fff;
    border: none; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn:hover { filter: brightness(1.07); }
.btn.small { padding: 9px 20px; font-size: 14.5px; margin-top: 10px; }
.hint { font-size: 13px; color: #64748b; margin-top: 10px; }

/* Filters */
.filter-form .f-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.filter-form label { flex: 1 1 200px; font-weight: 600; font-size: 14px; }
.filter-form select, .filter-form input[type="date"] { margin-top: 5px; font-weight: 400; }
.reset { margin-left: 12px; color: #1d6ff2; font-size: 14.5px; }
.count { font-size: 13.5px; color: #64748b; margin-top: 12px; }

/* Timeline */
.day-head { font-size: 16.5px; margin: 22px 0 12px; color: #0a2540; }
.today-badge {
    background: #1d6ff2; color: #fff; font-size: 11.5px; font-weight: 700;
    padding: 2px 9px; border-radius: 999px; vertical-align: middle; margin-left: 6px;
}
.update { border-left: 5px solid var(--mc); }
.u-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.u-head time { margin-left: auto; color: #64748b; font-size: 13.5px; }
.u-text { white-space: normal; font-size: 15.5px; }
.u-img {
    max-width: 100%; border-radius: 10px; margin-top: 10px;
    border: 1px solid #e2e8f0; cursor: zoom-in;
}
.empty { text-align: center; color: #64748b; }
.foot { text-align: center; color: #94a3b8; font-size: 13px; padding: 18px 0 30px; }

/* Lightbox */
#lightbox {
    position: fixed; inset: 0; background: rgba(5, 15, 30, .88);
    display: flex; align-items: center; justify-content: center;
    z-index: 50; cursor: zoom-out; padding: 18px;
}
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* Topbar with user box */
.topbar-flex { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.userbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14.5px; }
.userbox a {
    color: #fff; text-decoration: none; font-weight: 600;
    border: 1.5px solid rgba(255,255,255,.75); padding: 6px 14px; border-radius: 999px;
}
.userbox a:hover { background: rgba(255,255,255,.18); }
.userbox .login-btn { background: #fff; color: #1d6ff2; border-color: #fff; }

/* Login + change-password pages */
.login-wrap { max-width: 430px; margin: 6vh auto 40px; padding: 0 16px; }
.login-card h1 { font-size: 23px; margin-bottom: 6px; }
.tagline-dark { color: #64748b; font-size: 14.5px; margin-bottom: 8px; }
.login-card .flash { margin-top: 12px; }
input[type="text"], input[type="password"] {
    width: 100%; padding: 11px 12px; font-size: 15px;
    border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff;
    font-family: inherit;
}
input[type="text"]:focus, input[type="password"]:focus {
    outline: none; border-color: #1d6ff2;
}
.btn.wide { width: 100%; text-align: center; }
.btn.center { display: block; text-align: center; text-decoration: none; }

/* Dashboard bits */
.status-card.plain { border-left-color: #cbd5e1; align-items: center; font-size: 15px; }
.mini-update { border-top: 1px solid #eef2f7; padding: 12px 0 4px; }
.mini-update:first-of-type { border-top: none; }

/* ==========================================================
   v3 — professional polish, animated background, header menu,
   admin panel and the print/PDF report.
   ========================================================== */

/* Animated page background */
body {
    background: linear-gradient(120deg, #eef4ff, #e4f5ff, #eef2ff, #e7faf1);
    background-size: 300% 300%;
    animation: bgShift 24s ease infinite;
}
@keyframes bgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob.b1 { width: 480px; height: 480px; background: #93c5fd; top: -140px; left: -110px; animation: drift1 26s ease-in-out infinite alternate; }
.blob.b2 { width: 420px; height: 420px; background: #67e8f9; bottom: -160px; right: -90px; animation: drift2 32s ease-in-out infinite alternate; }
.blob.b3 { width: 300px; height: 300px; background: #a5b4fc; top: 42%; left: 56%; animation: drift1 38s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(70px, 46px) scale(1.12); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1.08); } to { transform: translate(-64px, -40px) scale(.96); } }
@media (prefers-reduced-motion: reduce) {
    body, .blob { animation: none !important; }
}

/* Sticky professional header + menu */
.topbar {
    position: sticky; top: 0; z-index: 30;
    padding: 18px 0 14px; margin-bottom: 22px;
    box-shadow: 0 6px 24px rgba(10, 60, 140, .22);
}
.topbar h1 { font-size: 25px; letter-spacing: .2px; }
.who {
    font-weight: 700; font-size: 15px; align-self: center;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
    padding: 7px 15px; border-radius: 999px;
}
.menu { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.menu a {
    color: #fff; text-decoration: none; font-weight: 600; font-size: 14.5px;
    padding: 7px 16px; border-radius: 999px;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.menu a:hover { background: rgba(255,255,255,.32); transform: translateY(-1px); }
.menu a.active { background: #fff; color: #1d6ff2; border-color: #fff; }

/* Card & button polish */
.card { border-radius: 16px; box-shadow: 0 10px 30px rgba(16, 42, 80, .07); }
.update, .status-card { transition: transform .18s ease, box-shadow .18s ease; }
.update:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(16, 42, 80, .11); }
.status-card { box-shadow: 0 8px 22px rgba(16, 42, 80, .06); }
.btn { box-shadow: 0 8px 20px rgba(29, 111, 242, .28); transition: filter .18s ease, transform .15s ease; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.alt { background: #fff; color: #1d6ff2; border: 1.5px solid #1d6ff2; box-shadow: none; }
textarea:focus, select:focus, input:focus { box-shadow: 0 0 0 3px rgba(56, 189, 248, .25); }
.login-wrap { margin: 30px auto 44px; }

/* Admin panel */
.stat-grid { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-card {
    flex: 1 1 170px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 16px; text-align: center; box-shadow: 0 8px 22px rgba(16, 42, 80, .06);
}
.stat-num { display: block; font-size: 30px; font-weight: 800; color: #1d6ff2; line-height: 1.15; }
.stat-lbl { font-size: 13px; color: #64748b; font-weight: 600; }
.export-row { display: flex; gap: 12px; flex-wrap: wrap; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 9px 8px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: top; }
.tbl th { color: #0a2540; font-size: 13.5px; text-transform: uppercase; letter-spacing: .4px; }
.nowrap { white-space: nowrap; }
.muted { color: #64748b; font-size: 13px; }

/* Print / PDF report page */
.report-body { background: #fff; animation: none; }
.toolbar {
    position: sticky; top: 0; z-index: 20; background: #0a2540; color: #fff;
    padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.toolbar .btn { margin-top: 0; }
.toolbar-note { font-size: 13px; opacity: .85; }
.report { max-width: 800px; margin: 0 auto; padding: 26px 20px 44px; }
.report-head h1 { font-size: 24px; margin-bottom: 8px; }
.report-head p { font-size: 14.5px; margin-bottom: 4px; }
.report-day {
    font-size: 17px; color: #0a2540; margin: 26px 0 12px;
    padding-bottom: 6px; border-bottom: 2px solid #1d6ff2;
}
.report-entry { border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.report-meta { display: flex; justify-content: space-between; margin-bottom: 6px; }
.report-text { font-size: 15px; }
.report-img { max-width: 460px; width: 100%; border-radius: 8px; border: 1px solid #e2e8f0; margin-top: 8px; }
.report-empty { color: #64748b; margin-top: 18px; }
.report-foot { text-align: center; color: #94a3b8; font-size: 13px; margin-top: 26px; }

@media print {
    .no-print, .toolbar, .bg-fx, .topbar { display: none !important; }
    body { background: #fff !important; animation: none !important; }
    .report { max-width: 100%; padding: 0; }
    .report-entry { break-inside: avoid; }
}

/* v4 — admin delete controls */
.del-btn {
    background: #fff; color: #b91c1c; border: 1.5px solid #f2b8b8; border-radius: 8px;
    padding: 6px 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.del-btn:hover { background: #fdeaea; }
.danger-card { border: 1.5px solid #f2b8b8; background: #fff7f7; }
.btn.danger { background: linear-gradient(120deg, #dc2626, #f87171); box-shadow: 0 8px 20px rgba(220, 38, 38, .25); margin-top: 0; }
.del-all-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.del-all-form input[type="text"] { flex: 1 1 220px; width: auto; }

/* v4 — professional header menu: a glass navbar bar with pill items */
.menu {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 14px;
    padding: 6px;
    gap: 4px;
    margin-top: 16px;
    box-shadow: 0 10px 26px rgba(10, 60, 140, .18), inset 0 1px 0 rgba(255, 255, 255, .25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.menu a {
    padding: 9px 18px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-size: 15px;
    letter-spacing: .2px;
    text-align: center;
}
.menu a:hover { background: rgba(255, 255, 255, .26); transform: none; }
.menu a.active {
    background: #fff;
    color: #1d6ff2;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(10, 60, 140, .28);
}
@media (max-width: 560px) {
    .menu a { flex: 1 1 auto; padding: 9px 8px; font-size: 14px; }
}
