/* ============================================================
   PANGGILAC — Main CSS
   Design system berbasis design tokens panggilac
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
    /* Primary brand */
    --primary:       #1479d6;
    --primary-dark:  #0e5fb2;
    --primary-soft:  #edf6ff;
    --primary-900:   #0a315f;

    /* Accent (green) */
    --accent:        #18a56f;
    --accent-soft:   #e8f8f1;

    /* Status colors */
    --warning:       #f59e0b;
    --warning-soft:  #fff7ed;
    --danger:        #dc2626;
    --danger-soft:   #fef2f2;
    --success:       #16a34a;
    --success-soft:  #dcfce7;
    --info:          #0284c7;
    --info-soft:     #e0f2fe;

    /* Neutral */
    --bg:            #f6f8fb;
    --card:          #ffffff;
    --text:          #172033;
    --muted:         #68758a;
    --line:          #dfe6ef;
    --soft:          #f1f6fc;

    /* Layout */
    --shadow:        0 4px 24px rgba(15,42,78,.07);
    --shadow-lg:     0 14px 38px rgba(15,42,78,.10);
    --radius:        14px;
    --radius-sm:     8px;
    --radius-lg:     20px;
    --radius-full:   999px;

    /* Typography */
    --font:          'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    --font-mono:     Consolas, Monaco, monospace;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
.pac-wrap { max-width: 480px; margin: 0 auto; padding: 0 0 80px; min-height: 100vh; }
.pac-wrap-lg { max-width: 1200px; margin: 0 auto; padding: 24px 16px 80px; }
.pac-container { padding: 0 16px; }

/* ---- Card ---- */
.pac-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.pac-card-flat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

/* ---- Buttons ---- */
.pac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    text-decoration: none;
    white-space: nowrap;
    min-height: 46px;
}
.pac-btn:hover { opacity: .88; text-decoration: none; }
.pac-btn:active { transform: scale(.97); }
.pac-btn-primary  { background: var(--primary); color: #fff; }
.pac-btn-accent   { background: var(--accent); color: #fff; }
.pac-btn-secondary{ background: var(--soft); color: var(--text); border: 1px solid var(--line); }
.pac-btn-danger   { background: var(--danger); color: #fff; }
.pac-btn-outline  { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.pac-btn-ghost    { background: transparent; color: var(--primary); padding: 8px 12px; }
.pac-btn-sm       { padding: 8px 14px; font-size: 13px; min-height: 34px; }
.pac-btn-full     { width: 100%; }
.pac-btn-icon     { padding: 10px; border-radius: var(--radius-full); min-height: 40px; }

/* Google button */
.pac-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s;
    min-height: 46px;
    margin-bottom: 8px;
}
.pac-btn-google:hover { background: var(--soft); border-color: var(--primary); text-decoration: none; }

/* ---- Form ---- */
.pac-form { display: flex; flex-direction: column; gap: 14px; }
.pac-form-group { display: flex; flex-direction: column; gap: 5px; }
.pac-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.pac-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--soft);
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font);
    color: var(--text);
    transition: border-color .15s;
    outline: none;
}
.pac-input:focus { border-color: var(--primary); background: #fff; }
.pac-input::placeholder { color: var(--muted); }
.pac-textarea { resize: vertical; min-height: 80px; }
.pac-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2368758a' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.pac-input-eye { position: relative; }
.pac-input-eye .pac-input { padding-right: 44px; }
.pac-eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px; }
.pac-hint { font-size: 12px; color: var(--muted); }
.pac-error-text { font-size: 12px; color: var(--danger); }

/* ---- Alerts ---- */
.pac-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 12px;
}
.pac-alert-success { background: var(--success-soft); color: #166534; border-left: 4px solid var(--success); }
.pac-alert-error   { background: var(--danger-soft);  color: #991b1b; border-left: 4px solid var(--danger); }
.pac-alert-warning { background: var(--warning-soft); color: #92400e; border-left: 4px solid var(--warning); }
.pac-alert-info    { background: var(--info-soft);    color: #075985; border-left: 4px solid var(--info); }

/* ---- Badge / Status ---- */
.pac-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}
.pac-badge-blue    { background: var(--primary-soft); color: var(--primary-dark); }
.pac-badge-green   { background: var(--accent-soft);  color: #065f46; }
.pac-badge-orange  { background: var(--warning-soft); color: #92400e; }
.pac-badge-red     { background: var(--danger-soft);  color: #991b1b; }
.pac-badge-gray    { background: var(--soft);          color: var(--muted); }
.pac-badge-teal    { background: #e0f2f1; color: #00695c; }
.pac-badge-amber   { background: #fff8e1; color: #e65100; }
.pac-badge-navy    { background: #e3eaf5; color: #1a2744; }
.pac-badge-success { background: var(--success-soft); color: #166534; }
.pac-badge-danger  { background: var(--danger-soft);  color: #991b1b; }
.pac-badge-warning { background: var(--warning-soft); color: #92400e; }

/* ---- Auth Pages ---- */
.pac-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--primary-900) 0%, #163460 40%, #1a3a6e 100%);
    padding: 20px;
}
.pac-auth-container {
    background: #fff;
    border-radius: 24px;
    padding: 32px 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.pac-auth-logo {
    text-align: center;
    margin-bottom: 20px;
}
.pac-auth-logo img { height: 48px; }
.pac-auth-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 4px;
    text-align: center;
}
.pac-auth-sub {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    margin: 0 0 20px;
}
.pac-auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pac-auth-links a { color: var(--primary); font-weight: 600; }
.pac-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    font-size: 13px;
    color: var(--muted);
}
.pac-divider::before, .pac-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---- Top Navbar ---- */
.pac-topbar {
    position: sticky;
    top: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
}
.pac-topbar-logo { font-weight: 900; font-size: 18px; color: var(--primary); }
.pac-topbar-title { font-weight: 700; font-size: 17px; flex: 1; }
.pac-back-btn { background: none; border: none; font-size: 22px; cursor: pointer; padding: 4px; color: var(--text); }

/* ---- Bottom Navigation ---- */
.pac-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--card);
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    z-index: 100;
    box-shadow: 0 -2px 16px rgba(0,0,0,.08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.pac-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 2px 6px;
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    gap: 3px;
    transition: color .15s;
    min-height: 56px;
    position: relative;
}
.pac-nav-item svg { width: 22px; height: 22px; }
.pac-nav-item.active { color: var(--primary, #1479d6); }
.pac-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--primary, #1479d6);
    border-radius: 0 0 2px 2px;
}
.pac-nav-item:hover { color: var(--primary, #1479d6); text-decoration: none; }
.pac-nav-fab {
    width: 50px; height: 50px;
    background: var(--primary, #1479d6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-top: -18px;
    box-shadow: 0 4px 14px rgba(20,121,214,.45);
    transition: transform .15s, box-shadow .15s;
}
.pac-nav-item:hover .pac-nav-fab {
    transform: scale(1.07);
    box-shadow: 0 6px 20px rgba(20,121,214,.55);
}
.pac-nav-fab svg { width: 24px; height: 24px; stroke: #fff; }

/* ---- Notification badge ---- */
.pac-notif-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--card);
}
.pac-rel { position: relative; display: inline-block; }

/* ---- List items ---- */
.pac-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.pac-list-item:last-child { border-bottom: none; }
.pac-list-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 20px; }
.pac-list-body { flex: 1; min-width: 0; }
.pac-list-title { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pac-list-sub { font-size: 13px; color: var(--muted); }
.pac-list-right { flex-shrink: 0; text-align: right; }

/* ---- Order card ---- */
.pac-order-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 16px; margin-bottom: 10px; }
.pac-order-no { font-size: 13px; color: var(--muted); }
.pac-order-service { font-size: 16px; font-weight: 700; margin: 4px 0; }
.pac-order-info { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.pac-order-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---- Stars ---- */
.pac-stars { color: #f59e0b; letter-spacing: 2px; }

/* ---- Grid ---- */
.pac-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pac-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pac-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

/* ---- Category rail ---- */
.pac-category-rail { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; }
.pac-category-rail::-webkit-scrollbar { display: none; }
.pac-category-item { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 70px; cursor: pointer; }
.pac-category-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pac-category-icon img { width: 38px; height: 38px; object-fit: contain; }
.pac-category-label { font-size: 11px; font-weight: 600; text-align: center; color: var(--text); white-space: nowrap; }
.pac-category-item.active .pac-category-icon { background: var(--primary); }
.pac-category-item.active .pac-category-icon img { filter: brightness(0) invert(1); }
.pac-category-item.active .pac-category-label { color: var(--primary); }

/* ---- Section headers ---- */
.pac-section { padding: 16px 16px 0; }
.pac-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pac-section-title { font-size: 17px; font-weight: 800; }
.pac-section-link { font-size: 13px; color: var(--primary); font-weight: 600; }

/* ---- Loading ---- */
.pac-spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: pac-spin .6s linear infinite; }
@keyframes pac-spin { to { transform: rotate(360deg); } }

/* ---- Empty state ---- */
.pac-empty { text-align: center; padding: 48px 20px; }
.pac-empty-icon { font-size: 48px; margin-bottom: 12px; }
.pac-empty-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.pac-empty-sub { font-size: 14px; color: var(--muted); margin-bottom: 20px; }

/* ---- Hero banner ---- */
.pac-hero { margin: 12px 16px; border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.pac-hero img { width: 100%; display: block; }
.pac-hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(20,121,214,.8), rgba(10,49,95,.6)); display: flex; flex-direction: column; justify-content: center; padding: 24px; color: #fff; }
.pac-hero-title { font-size: 22px; font-weight: 900; line-height: 1.2; }
.pac-hero-sub { font-size: 14px; opacity: .9; margin-top: 6px; }

/* ---- Installer profile card ---- */
.pac-installer-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.pac-installer-avatar { width: 56px; height: 56px; border-radius: 14px; background: var(--soft); object-fit: cover; flex-shrink: 0; }
.pac-installer-body { flex: 1; min-width: 0; }
.pac-installer-name { font-weight: 700; font-size: 16px; }
.pac-installer-meta { font-size: 13px; color: var(--muted); }
.pac-installer-badge { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ---- Timeline ---- */
.pac-timeline { padding: 0; list-style: none; }
.pac-timeline-item { display: flex; gap: 12px; padding-bottom: 20px; position: relative; }
.pac-timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.pac-timeline-dot { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; z-index: 1; }
.pac-timeline-dot.active { background: var(--primary); color: #fff; }
.pac-timeline-dot.done   { background: var(--accent);  color: #fff; }
.pac-timeline-body { flex: 1; padding-top: 6px; }
.pac-timeline-title { font-weight: 600; font-size: 15px; }
.pac-timeline-time { font-size: 12px; color: var(--muted); }

/* ---- AC unit card ---- */
.pac-ac-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px; }
.pac-ac-room { font-weight: 700; font-size: 15px; }
.pac-ac-brand { font-size: 13px; color: var(--muted); }
.pac-ac-history { font-size: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); }

/* ---- Toast notification ---- */
.pac-toast-container { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 360px; width: calc(100% - 32px); }
.pac-toast { background: var(--text); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: pac-toast-in .2s ease; pointer-events: auto; }
.pac-toast.success { background: var(--success); }
.pac-toast.error   { background: var(--danger); }
@keyframes pac-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Search bar ---- */
.pac-search-bar { display: flex; gap: 8px; align-items: center; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-full); padding: 10px 16px; }
.pac-search-bar input { flex: 1; border: none; outline: none; background: transparent; font-size: 15px; color: var(--text); font-family: var(--font); }
.pac-search-bar input::placeholder { color: var(--muted); }

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .pac-wrap { max-width: 100%; }
}
@media (min-width: 481px) {
    .pac-auth-page { padding: 40px 20px; }
}

/* ── WA Button Standard (F43+) ── */
.btn-wa{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 18px;border-radius:12px;font-size:14px;font-weight:800;text-decoration:none;cursor:pointer;border:none;font-family:inherit;background:#25D366;color:#fff;box-shadow:0 4px 14px rgba(37,211,102,.28);transition:opacity .15s,transform .15s}
.btn-wa:active{opacity:.88;transform:scale(.98)}
.btn-wa-full{width:100%;justify-content:center}
.btn-wa-sm{padding:9px 14px;font-size:12px;border-radius:10px}
.wa-logo{width:20px;height:20px;flex-shrink:0}
.btn-wa-sm .wa-logo{width:16px;height:16px}
