/* =====================================================================
   assets/style.css - SHARED APP STYLESHEET
   Location: public_html/note.biswascompany.com/assets/style.css
   Used by: dashboard.php, history.php, admin_dashboard.php (via includes/header.php)
   ===================================================================== */

* { margin:0; padding:0; box-sizing:border-box; font-family:'Segoe UI',Roboto,sans-serif; }
body { background:#f3f4f6; padding-bottom:90px; }

/* ---------------- TOP BAR ---------------- */
.topbar {
    background: linear-gradient(135deg, #4F46E5, #7C3AED);
    color:#fff; padding:20px; border-radius:0 0 24px 24px;
    box-shadow:0 8px 24px rgba(79,70,229,0.25);
}
.topbar-row { display:flex; justify-content:space-between; align-items:center; }
.topbar-left { display:flex; align-items:center; gap:10px; }
.topbar-left img { width:38px; height:38px; border-radius:10px; }
.topbar h2 { font-size:16px; font-weight:600; }
.topbar .date-sub { font-size:12px; opacity:0.85; margin-top:2px; }
.topbar a.back { color:#fff; text-decoration:none; font-size:20px; }
.nav-icons { display:flex; gap:14px; }
.nav-icons a { color:#fff; text-decoration:none; font-size:20px; opacity:0.9; }

/* Progress card (dashboard only) */
.progress-card { background:rgba(255,255,255,0.15); border-radius:16px; padding:14px 16px; margin-top:16px; }
.progress-bar-bg { background:rgba(255,255,255,0.3); border-radius:10px; height:8px; overflow:hidden; margin-top:8px; }
.progress-bar-fill { background:#fff; height:100%; border-radius:10px; transition:width 0.4s ease; }
.progress-text { font-size:13px; display:flex; justify-content:space-between; }

/* ---------------- LAYOUT ---------------- */
.container { max-width:480px; margin:0 auto; padding:20px 16px; }

/* ---------------- ADD TASK BOX ---------------- */
.add-task-box { background:#fff; border-radius:16px; padding:16px; box-shadow:0 4px 16px rgba(0,0,0,0.05); margin-bottom:20px; }
.add-task-box textarea, .add-task-box input[type=text] {
    width:100%; border:1.5px solid #e5e7eb; border-radius:12px; padding:12px 14px; font-size:14px; margin-bottom:10px; outline:none; resize:none;
}
.add-task-box textarea:focus, .add-task-box input:focus { border-color:#4F46E5; }
.add-row { display:flex; gap:8px; }
select.priority-select { border:1.5px solid #e5e7eb; border-radius:10px; padding:10px; font-size:13px; background:#fff; }
.btn-add { flex:1; background:linear-gradient(135deg,#4F46E5,#7C3AED); color:#fff; border:none; border-radius:10px; font-weight:600; font-size:14px; cursor:pointer; }

/* ---------------- SECTION TITLES ---------------- */
.section-title { font-size:14px; font-weight:700; color:#374151; margin:18px 0 10px; display:flex; align-items:center; gap:6px; }
.badge-count { background:#e0e7ff; color:#4F46E5; font-size:11px; padding:2px 8px; border-radius:10px; }

/* ---------------- TASK CARD (dashboard) ---------------- */
.task-card {
    background:#fff; border-radius:14px; padding:14px; margin-bottom:10px; box-shadow:0 2px 10px rgba(0,0,0,0.04);
    display:flex; align-items:flex-start; gap:12px; border-left:4px solid #e5e7eb; transition:0.2s;
}
.task-card.priority-high { border-left-color:#ef4444; }
.task-card.priority-normal { border-left-color:#4F46E5; }
.task-card.priority-low { border-left-color:#9ca3af; }
.task-card.completed { opacity:0.6; }
.task-card.overdue { background:#fff7ed; border-left-color:#f97316; }
.task-card.carried { background:#fef9f2; }

.check-circle {
    width:24px; height:24px; border-radius:50%; border:2px solid #d1d5db; flex-shrink:0; cursor:pointer;
    display:flex; align-items:center; justify-content:center; margin-top:2px; transition:0.2s;
}
.check-circle.done { background:#10b981; border-color:#10b981; color:#fff; }

.task-body { flex:1; min-width:0; }
.task-title { font-size:14.5px; font-weight:600; color:#1f2937; word-break:break-word; }
.task-title.strike { text-decoration:line-through; color:#9ca3af; }
.task-note { font-size:12.5px; color:#6b7280; margin-top:3px; word-break:break-word; }
.task-meta { display:flex; gap:8px; margin-top:6px; flex-wrap:wrap; }
.flag { font-size:10.5px; padding:2px 8px; border-radius:8px; font-weight:600; }
.flag-overdue { background:#ffedd5; color:#c2410c; }
.flag-carried { background:#fef3c7; color:#92400e; }
.flag-completed { background:#d1fae5; color:#065f46; }
.flag-admin { background:#e0e7ff; color:#4338ca; }

.task-actions { display:flex; gap:8px; }
.task-actions button { background:none; border:none; font-size:15px; cursor:pointer; color:#9ca3af; }
.task-actions button:hover { color:#4F46E5; }

.empty-state { text-align:center; padding:30px; color:#9ca3af; font-size:13px; }

/* ---------------- HISTORY PAGE ---------------- */
.stats-row { display:flex; gap:10px; margin-bottom:16px; }
.stat-box { flex:1; background:#fff; border-radius:14px; padding:14px; text-align:center; box-shadow:0 2px 10px rgba(0,0,0,0.04); }
.stat-box .num { font-size:20px; font-weight:700; color:#4F46E5; }
.stat-box .lbl { font-size:11px; color:#6b7280; margin-top:2px; }

.calendar-card { background:#fff; border-radius:16px; padding:16px; margin-bottom:18px; box-shadow:0 2px 10px rgba(0,0,0,0.04); }
.cal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.cal-header a { text-decoration:none; color:#4F46E5; font-size:18px; font-weight:700; padding:4px 10px; }
.cal-header h3 { font-size:15px; color:#1f2937; }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; text-align:center; }
.cal-dow { font-size:10px; color:#9ca3af; font-weight:600; padding-bottom:4px; }
.cal-day {
    aspect-ratio:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
    border-radius:10px; font-size:12px; position:relative; cursor:default; color:#374151;
}
.cal-day.empty { visibility:hidden; }
.cal-day.has-full { background:#d1fae5; color:#065f46; font-weight:700; }
.cal-day.has-partial { background:#fef3c7; color:#92400e; font-weight:700; }
.cal-day.today-mark { border:2px solid #4F46E5; }
.cal-dot { width:4px; height:4px; border-radius:50%; background:currentColor; margin-top:2px; }

.filter-card { background:#fff; border-radius:16px; padding:16px; margin-bottom:18px; box-shadow:0 2px 10px rgba(0,0,0,0.04); }
.filter-card h4 { font-size:13px; color:#374151; margin-bottom:10px; }
.filter-row { display:flex; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.filter-row input, .filter-row select { flex:1; min-width:120px; border:1.5px solid #e5e7eb; border-radius:10px; padding:9px 10px; font-size:13px; }
.btn-filter { background:linear-gradient(135deg,#4F46E5,#7C3AED); color:#fff; border:none; border-radius:10px; padding:10px 16px; font-size:13px; font-weight:600; cursor:pointer; width:100%; }

.date-group { margin-bottom:16px; }
.date-group-header { font-size:13px; font-weight:700; color:#374151; margin-bottom:8px; display:flex; justify-content:space-between; }
.date-group-header .day-rate { font-size:11px; color:#10b981; font-weight:600; }

.task-item {
    background:#fff; border-radius:12px; padding:12px 14px; margin-bottom:8px; box-shadow:0 2px 8px rgba(0,0,0,0.03);
    display:flex; align-items:flex-start; gap:10px; border-left:4px solid #e5e7eb;
}
.task-item.completed { border-left-color:#10b981; }
.task-item.pending, .task-item.overdue { border-left-color:#f97316; }
.task-icon { font-size:16px; margin-top:1px; }
.task-item .t-title { font-size:13.5px; font-weight:600; color:#1f2937; }
.task-item .t-title.strike { text-decoration:line-through; color:#9ca3af; }
.task-item .t-note { font-size:12px; color:#6b7280; margin-top:2px; }
.task-item .t-time { font-size:11px; color:#9ca3af; margin-top:4px; }

/* ---------------- ADMIN DASHBOARD ---------------- */
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:18px; }
.stats-grid .stat-box { padding:12px 6px; }
.stats-grid .stat-box .num { font-size:18px; }
.stats-grid .stat-box .lbl { font-size:10px; }
.stat-box.c-total .num { color:#4F46E5; }
.stat-box.c-done .num { color:#10b981; }
.stat-box.c-pending .num { color:#f59e0b; }
.stat-box.c-overdue .num { color:#ef4444; }

.card { background:#fff; border-radius:16px; padding:16px; margin-bottom:18px; box-shadow:0 2px 10px rgba(0,0,0,0.04); }
.card h3 { font-size:14px; margin-bottom:12px; color:#1f2937; }

.form-row { display:flex; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.form-row select, .form-row input, .form-row textarea { flex:1; min-width:130px; border:1.5px solid #e5e7eb; border-radius:10px; padding:9px 11px; font-size:13px; }
.btn-primary { background:linear-gradient(135deg,#4F46E5,#7C3AED); color:#fff; border:none; border-radius:10px; padding:11px 18px; font-size:13px; font-weight:600; cursor:pointer; width:100%; }

.tabs { display:flex; gap:8px; margin-bottom:16px; overflow-x:auto; }
.tab-btn { background:#fff; border:1.5px solid #e5e7eb; border-radius:20px; padding:8px 16px; font-size:12px; font-weight:600; color:#6b7280; cursor:pointer; white-space:nowrap; }
.tab-btn.active { background:#4F46E5; color:#fff; border-color:#4F46E5; }

.team-section { margin-bottom:20px; }
.team-title { font-size:14px; font-weight:700; color:#4F46E5; margin-bottom:10px; padding-bottom:6px; border-bottom:2px solid #e0e7ff; }
.user-block { margin-bottom:14px; }
.user-header { display:flex; justify-content:space-between; align-items:center; background:#f9fafb; padding:8px 12px; border-radius:10px; margin-bottom:6px; }
.user-header .uname { font-size:13px; font-weight:600; color:#1f2937; }
.user-header .urate { font-size:11px; font-weight:600; }
.user-header .urate.good { color:#10b981; }
.user-header .urate.bad { color:#ef4444; }

.task-row { display:flex; align-items:flex-start; gap:8px; padding:8px 12px; border-left:3px solid #e5e7eb; margin-bottom:5px; background:#fff; border-radius:0 8px 8px 0; }
.task-row.completed { border-left-color:#10b981; }
.task-row.overdue { border-left-color:#ef4444; }
.task-row.pending { border-left-color:#f59e0b; }
.task-row .t-title { font-size:12.5px; font-weight:600; color:#1f2937; }
.task-row .t-title.strike { text-decoration:line-through; color:#9ca3af; }
.task-row .t-meta { font-size:10.5px; color:#9ca3af; margin-top:2px; }
.remark-btn { background:none; border:none; font-size:13px; cursor:pointer; color:#9ca3af; }

.user-mgmt-row { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid #f3f4f6; }
.user-mgmt-row .info { font-size:13px; }
.user-mgmt-row .info .role-tag { font-size:10px; background:#e0e7ff; color:#4338ca; padding:2px 8px; border-radius:8px; margin-left:6px; }
.status-toggle { padding:5px 12px; border-radius:16px; font-size:11px; font-weight:600; border:none; cursor:pointer; }
.status-toggle.active { background:#d1fae5; color:#065f46; }
.status-toggle.inactive { background:#fee2e2; color:#991b1b; }

.crown { font-size:13px; background:rgba(255,255,255,0.15); padding:3px 10px; border-radius:10px; }
.section-hide { display:none; }
.divider { text-align:center; font-size:11px; color:#9ca3af; margin:16px 0; }

/* ---------------- BOTTOM NAV ---------------- */
.bottom-nav {
    position:fixed; bottom:0; left:0; right:0; background:#fff; box-shadow:0 -4px 20px rgba(0,0,0,0.08);
    display:flex; justify-content:space-around; padding:10px 0; border-radius:20px 20px 0 0; z-index:500;
}
.bottom-nav a { text-decoration:none; color:#9ca3af; font-size:11px; display:flex; flex-direction:column; align-items:center; gap:3px; }
.bottom-nav a.active { color:#4F46E5; font-weight:600; }
.bottom-nav .icon { font-size:20px; }

/* ---------------- TOAST ---------------- */
.toast {
    position:fixed; bottom:100px; left:50%; transform:translateX(-50%);
    background:#1f2937; color:#fff; padding:10px 20px; border-radius:30px; font-size:13px;
    opacity:0; pointer-events:none; transition:0.3s; z-index:999;
}
.toast.show { opacity:1; bottom:110px; }

/* ---------------- MODAL ---------------- */
.modal-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:1000; align-items:center; justify-content:center; padding:20px; }
.modal-overlay.show { display:flex; }
.modal-box { background:#fff; border-radius:18px; padding:20px; width:100%; max-width:400px; }
.modal-box h3 { font-size:16px; margin-bottom:14px; }
.modal-box input, .modal-box textarea { width:100%; border:1.5px solid #e5e7eb; border-radius:10px; padding:10px 12px; font-size:14px; margin-bottom:10px; }
.modal-actions { display:flex; gap:10px; margin-top:6px; }
.modal-actions button { flex:1; padding:11px; border-radius:10px; border:none; font-weight:600; cursor:pointer; }
.btn-cancel { background:#f3f4f6; color:#374151; }
.btn-save { background:linear-gradient(135deg,#4F46E5,#7C3AED); color:#fff; }
.btn-delete-confirm { background:#ef4444; color:#fff; }