@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://unpkg.com/leaflet@1.9.4/dist/leaflet.css');

#svc-app { font-family: 'Vazirmatn', sans-serif; direction: rtl; background: #f8fafc; color: #334155; position: fixed; inset: 0; z-index: 99999; display: flex; overflow: hidden; }
#svc-app * { box-sizing: border-box; outline: none; }
#svc-app button { cursor: pointer; }

/* Sidebar */
.svc-sidebar { width: 260px; background: #1e293b; color: white; display: flex; flex-direction: column; padding: 20px; }
.svc-profile { text-align: center; margin-bottom: 30px; }
.svc-avt { width: 80px; height: 80px; background-size: cover; border-radius: 50%; margin: 0 auto 10px; border: 4px solid #6366f1; }
.svc-nav a { display: flex; align-items: center; gap: 10px; padding: 12px; color: #94a3b8; text-decoration: none; border-radius: 8px; margin-bottom: 5px; transition: 0.2s; }
.svc-nav a:hover, .svc-nav a.active { background: #334155; color: white; }
.svc-logout { margin-top: auto; color: #ef4444 !important; }

/* Main */
.svc-main { flex: 1; padding: 20px; overflow-y: auto; position: relative; padding-bottom: 80px; }
.svc-page { display: none; max-width: 1100px; margin: 0 auto; }
.svc-page.active { display: block; animation: svc-fade 0.3s; }
.svc-page.full-height { height: 100%; max-width: none; padding: 0; margin: 0; position: absolute; inset: 0; }
@keyframes svc-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- TASK MANAGER STYLES (Requested Design) --- */
.container {
    width: 100%; max-width: 600px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; height: 80vh; margin: 0 auto;
}
.header { padding: 20px 24px; background: #2564cf; color: white; }
.header h1 { margin: 0; font-size: 1.5rem; font-weight: 600; }
.header p { margin: 4px 0 0; opacity: 0.9; font-size: 0.9rem; }

.add-form { padding: 15px 20px; background: #f5f8fc; border-bottom: 1px solid #edebe9; }
.input-group { display: flex; background: #fff; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); padding: 4px; border: 1px solid transparent; transition: border-color 0.2s; }
.input-group:focus-within { border-color: #2564cf; }
.input-group input { flex-grow: 1; border: none; padding: 10px; font-family: inherit; outline: none; font-size: 1rem; }
.input-group button { background: transparent; color: #2564cf; border: none; font-size: 1.5rem; cursor: pointer; padding: 0 15px; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.input-group button:hover { background: #eff6fc; border-radius: 4px; }

.task-list { list-style: none; padding: 0; margin: 0; overflow-y: auto; flex-grow: 1; }
.task-list::-webkit-scrollbar { width: 8px; }
.task-list::-webkit-scrollbar-track { background: #f1f1f1; }
.task-list::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
.task-list::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

.task-item { display: flex; align-items: center; padding: 12px 20px; border-bottom: 1px solid #f3f2f1; transition: background 0.2s; cursor: pointer; background: #fff; position: relative; }
.task-item:hover { background-color: #f3f2f1; }
.task-item:last-child { border-bottom: none; }

.check-circle { width: 20px; height: 20px; border: 2px solid #2564cf; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-left: 12px; flex-shrink: 0; transition: all 0.2s ease; position: relative; }
.task-item:hover .check-circle { border-color: #106ebe; }
.task-item.completed .check-circle { background: #2564cf; border-color: #2564cf; }
.check-circle::after { content: '✓'; color: white; font-size: 14px; display: none; font-weight: bold; }
.task-item.completed .check-circle::after { display: block; }

.task-title { flex-grow: 1; font-size: 1rem; transition: color 0.2s; word-break: break-word; }
.task-item.completed .task-title { text-decoration: line-through; color: #a19f9d; }

.delete-btn { background: none; border: none; color: #d13438; opacity: 0; cursor: pointer; padding: 8px; font-size: 1.1rem; transition: all 0.2s; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.task-item:hover .delete-btn { opacity: 1; }
.delete-btn:hover { background: #fde7e9; }

.empty-state { text-align: center; padding-top: 60px; color: #605e5c; display: flex; flex-direction: column; align-items: center; }
.empty-state svg { width: 120px; height: 120px; opacity: 0.4; margin-bottom: 20px; color: #2564cf; }
.empty-state p { font-size: 1.1rem; margin: 0; }

/* General Plugin Styles (for other tabs) */
.svc-card { background: white; border-radius: 16px; padding: 20px; margin-bottom: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid #e2e8f0; }
.svc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.svc-filters { display: flex; gap: 10px; margin-bottom: 20px; }
.svc-filters select, .svc-filters input { padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; flex: 1; background: #fff; }
.svc-btn { padding: 8px 15px; border-radius: 6px; border: none; font-weight: bold; font-size: 12px; transition: 0.2s; cursor: pointer; }
.svc-btn.small { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.svc-btn.danger { background: #fee2e2; color: #dc2626; }
.svc-btn.primary { background: #4f46e5; color: white; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.user-item { text-align: center; }
.u-img { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 10px; }
.u-info { margin-bottom: 10px; display: block; }
.u-acts { display: flex; gap: 10px; justify-content: center; }
.route-item .ri-head { background: #f8fafc; padding: 12px; font-weight: bold; border-bottom: 1px solid #eee; margin: -20px -20px 15px -20px; text-align: center; color: #334155; }
.route-item label { display: block; font-size: 12px; color: #64748b; margin-bottom: 5px; }
.route-item select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 10px; background: white; }
.svc-fab { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: #10b981; color: white; padding: 12px 30px; border-radius: 50px; border: none; box-shadow: 0 5px 20px rgba(16,185,129,0.4); font-weight: bold; font-size: 16px; cursor: pointer; z-index: 999; }
#svc-map { width: 100%; height: 100%; }
.map-controls { position: absolute; bottom: 20px; left: 20px; right: 20px; background: white; padding: 10px; border-radius: 12px; z-index: 1000; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.map-controls select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; }
.svc-login-box { background: white; padding: 50px 30px; border-radius: 24px; width: 340px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.1); margin: auto; }
.svc-login-box input { width: 100%; padding: 15px; margin: 10px 0; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.svc-login-box button { width: 100%; padding: 15px; background: #4f46e5; color: white; border: none; border-radius: 12px; font-weight: bold; cursor: pointer; margin-top: 15px; box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3); }

/* Mobile Nav */
.svc-bot-nav { display: none; }
@media (max-width: 768px) {
    .svc-sidebar { display: none; }
    .svc-bot-nav { display: flex; justify-content: space-around; position: fixed; bottom: 0; left: 0; right: 0; background: white; padding: 12px 0; border-top: 1px solid #e2e8f0; z-index: 999999; box-shadow: 0 -4px 20px rgba(0,0,0,0.05); }
    .svc-bot-nav a { color: #94a3b8; font-size: 22px; transition: 0.2s; }
    .svc-bot-nav a.active { color: #4f46e5; transform: translateY(-3px); }
    .svc-filters { flex-direction: column; }
    .svc-grid { grid-template-columns: 1fr; }
}