:root { --bg: #f8fafc; --text: #0f172a; --muted: #64748b; --primary: #0ea5e9; --primary-dark: #0284c7; --secondary: #22c55e; --secondary-dark: #16a34a; --accent: #f59e0b; --surface: #ffffff; --border: #e2e8f0; }
* { box-sizing: border-box; }
img, video { max-width: 100%; height: auto; display: block; }
body { font-family: Arial, sans-serif; max-width: none; margin: 0 auto; padding: 0 12px; background: var(--bg); color: var(--text); font-size: 17px; }
h1, h2, h3, body, nav, .card { transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
h1, h2, h3 { margin: 10px 0; color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
nav a { margin-right: 0; }
form input, form select { display: block; margin: 8px 0; padding: 10px 12px; width: 100%; max-width: 460px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
form input:focus, form select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,0.25); }
button { padding: 10px 14px; border: none; border-radius: 8px; background: var(--primary); color: #fff; cursor: pointer; }
button:hover { background: var(--primary-dark); }
#messages { display: flex; flex-direction: column; gap: 10px; background: #eef6ff; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
#messages .msg { max-width: 72%; padding: 12px 14px; border-radius: 16px; line-height: 1.5; color: #0b1320; box-shadow: 0 1px 2px rgba(0,0,0,0.06); overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
#messages .row.them .msg { margin-right: 12%; max-width: 68%; }
#messages .row.me .msg { margin-left: 12%; max-width: 68%; }
#messages .msg .text { white-space: normal; }
#messages .msg .sender { font-size: 12px; color: #1f2937; margin-bottom: 6px; }
#messages .msg.them { background: #f1f5f9; border: 1px solid #e2e8f0; align-self: flex-start; }
#messages .msg.me { background: #d1fae5; border: 1px solid #a7f3d0; align-self: flex-end; }
#messages .row { display: flex; gap: 8px; }
#messages .row.me { justify-content: flex-end; }
#messages .avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #fff; background: #9aa0a6; }
#messages .row.me .avatar { background: #34b7f1; }
#messages .msg .time { font-size: 11px; color: #4b5563; margin-top: 6px; text-align: right; }
.hero { margin-top: 16px; background: linear-gradient(135deg, #e0f2fe, #ecfeff); border: 1px solid var(--border); padding: 12px 14px; border-radius: 10px; }
.hero p { margin: 0; line-height: 1.6; color: var(--muted); }
.features { margin: 12px 0 0 20px; }
.features li { margin: 5px 0; color: var(--muted); }
.section { margin-top: 28px; }
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--surface); box-shadow: 0 8px 20px rgba(2,8,23,0.06); }
.name { font-weight: 700; margin-bottom: 6px; color: var(--text); }
.meta { color: var(--muted); font-size: 14px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cta a { margin-right: 0; flex: 1 1 0; display: inline-block; text-align: center; font-size: 16px; line-height: 1.2; padding: 8px 10px; border: none; border-radius: 8px; background: var(--secondary); color: #fff; }
.cta a:hover { background: var(--secondary-dark); }
nav { display: flex; justify-content: space-between; align-items: stretch; flex-direction: column; flex-wrap: wrap; gap: 6px 8px; background: var(--surface); border: 1px solid var(--border); padding: 6px 10px; border-radius: 10px; }
.brand { font-weight: 700; color: var(--text); font-size: 16px; }
#themeToggle { margin-left: 6px; }
.nav-links, .nav-actions { display: flex; align-items: center; gap: 8px; flex-direction: row; flex-wrap: wrap; }
.nav-actions .nav-cta { display: inline-block; padding: 8px 12px; border-radius: 8px; background: var(--secondary); color: #fff; width: 100%; text-align: center; }
.nav-actions .nav-cta:hover { background: var(--secondary-dark); }
#themeToggle { padding: 6px 8px; border: none; border-radius: 8px; background: var(--accent); color: #fff; width: auto; font-size: 14px; }
#themeToggle:hover { background: #d97706; }
.nav-user { font-size: 18px; font-weight: 800; color: #ec4899; align-self: flex-end; }
.card:hover { box-shadow: 0 12px 28px rgba(2,8,23,0.10); border-color: #cbd5e1; }
body { line-height: 1.6; }
#messages { max-height: 60vh; overflow-y: auto; }
.chat-input { display: flex; align-items: flex-end; gap: 12px; margin-top: 10px; }
.chat-input textarea { flex: 2 1 auto; resize: vertical; min-height: 48px; max-height: 200px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); line-height: 1.6; }
.chat-input button { flex: 1 1 0; max-width: 160px; }
.chat-input textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,0.25); }

#bookingForm { max-width: 420px; }
#bookingForm select, #bookingForm input { max-width: 420px; padding: 8px 10px; }
#bookingForm button { padding: 8px 10px; }
#bookingForm label.fieldLabel { font-size: 18px; font-weight: 700; margin: 10px 0 4px; color: var(--text); }
#bookingForm input::placeholder { font-weight: 600; }
#userInfo { margin: 8px 0; }
#userSection { margin-top: 12px; }
#userSection h3 { margin: 14px 0 8px; }
#technicianSelect { margin-bottom: 12px; }
#bookingForm { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

@media (min-width: 768px) {
  nav { flex-direction: row; align-items: center; }
  .nav-links, .nav-actions { flex-direction: row; align-items: center; }
  .nav-actions .nav-cta, #themeToggle { width: auto; }
  .nav-links a { display: inline-block; width: auto; padding: 6px 8px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .nav-user { margin-left: auto; text-align: right; }
}
@media (min-width: 1024px) {
  body { max-width: 900px; margin: 24px auto; padding: 0 20px; }
}
html.dark, body.dark { --bg: #0b1220; --text: #e5e7eb; --muted: #9ca3af; --primary: #38bdf8; --primary-dark: #0ea5e9; --secondary: #34d399; --secondary-dark: #10b981; --accent: #f59e0b; --surface: #111827; --border: #1f2937; }
html.dark .hero, body.dark .hero { background: linear-gradient(135deg, #0f172a, #0b1220); border-color: var(--border); }
:root.dark #messages, html.dark #messages, body.dark #messages { background: var(--surface); border-color: var(--border); }
:root.dark #messages .msg, html.dark #messages .msg, body.dark #messages .msg { color: var(--text); box-shadow: none; }
:root.dark #messages .msg.them, html.dark #messages .msg.them, body.dark #messages .msg.them { background: #1f2937; border: 1px solid #374151; }
:root.dark #messages .msg.me, html.dark #messages .msg.me, body.dark #messages .msg.me { background: rgba(16,185,129,0.18); border: 1px solid rgba(16,185,129,0.35); }
:root.dark #messages .msg .sender, html.dark #messages .msg .sender, body.dark #messages .msg .sender { color: #d1d5db; }
:root.dark #messages .msg .time, html.dark #messages .msg .time, body.dark #messages .msg .time { color: #9ca3af; }
.nav-links a { font-size: 16px; padding: 6px 8px; }
.role-badge { font-weight: 700; }
.role-konsumen { color: #16a34a; }
.role-teknisi { color: #dc2626; }
.role-admin { color: #0ea5e9; }
.status-tag { color: #dc2626; font-weight: 700; }
.verified-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; font-weight: 700; }
.unverified-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; background: #fff1f2; color: #dc2626; border: 1px solid #fecaca; font-weight: 700; }
.service-item .name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.service-item .badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.service-item .actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.status-pending { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.status-confirmed { background: #ecfeff; color: #0ea5e9; border: 1px solid #bae6fd; }
.status-in_progress { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.status-completed { background: #eef2ff; color: #4f46e5; border: 1px solid #c7d2fe; }
.status-cancelled { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
#myServices, #assignedServices { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { #myServices, #assignedServices { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
.
.profile-card { display: grid; gap: 12px; }
.profile-header { display: flex; align-items: center; gap: 12px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); background: #e5e7eb; }
.profile-title .name { margin-bottom: 4px; }
.rating { color: #f59e0b; font-weight: 700; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag { display: inline-block; padding: 4px 8px; border-radius: 12px; font-size: 12px; background: #eef2ff; color: #4f46e5; border: 1px solid #c7d2fe; }
.map { width: 100%; height: 280px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-top: 12px; }
.map iframe { width: 100%; height: 280px; border: 0; border-radius: 10px; }
