/* ═══════════════════════════════════════════════
   DAILY REPORT VISITS - Salesman PWA
   Modern Card Design System
   ═══════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --primary-gradient: linear-gradient(135deg, #1a73e8, #0d47a1);
    --danger: #ea4335;
    --danger-light: #fce8e6;
    --success: #34a853;
    --success-light: #e6f4ea;
    --warning: #fbbc04;
    --warning-light: #fef7e0;
    --orange: #fa7b17;
    --bg: #f1f3f4;
    --card: #ffffff;
    --text: #202124;
    --text-secondary: #5f6368;
    --text-light: #9aa0a6;
    --border: #e8eaed;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50px;
    --nav-h: 64px;
    --header-h: 56px;
}

html { height: 100%; }
body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ═══ SCREEN SYSTEM ═══ */
.screen { display: none; min-height: 100vh; min-height: 100dvh; flex-direction: column; position: relative; }
.screen.active { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ═══ HEADER ═══ */
.header {
    position: sticky; top: 0; z-index: 100;
    background: var(--primary-gradient);
    color: #fff; padding: 0 16px;
    height: var(--header-h);
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}
.header h1 { font-size: 18px; font-weight: 600; flex: 1; }
.header-back {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.header-back:active { background: rgba(255,255,255,0.25); }

/* ═══ CONTENT ═══ */
.content { flex: 1; padding: 16px; padding-bottom: calc(var(--nav-h) + 24px); overflow-y: auto; }

/* ═══ BOTTOM NAV ═══ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    background: var(--card);
    border-top: 1px solid var(--border);
    display: none;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.bottom-nav.show {
    display: flex;
}
.nav-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 6px 0; border-radius: 12px; cursor: pointer;
    transition: all 0.2s; border: none; background: none;
    color: var(--text-light); font-size: 10px; font-weight: 500;
}
.nav-item .nav-icon { font-size: 22px; transition: transform 0.2s; }
.nav-item.active { color: var(--primary); }
.nav-item.active .nav-icon { transform: scale(1.1); }

/* ═══ CARDS ═══ */
.card {
    background: var(--card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}
.card-body { padding: 16px; }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }

/* ═══ STAT GRID ═══ */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat-box {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    animation: scaleIn 0.3s ease;
}
.stat-box .stat-value { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-box .stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; font-weight: 500; }
.stat-box.blue { background: var(--primary-light); }
.stat-box.blue .stat-value { color: var(--primary); }
.stat-box.green { background: var(--success-light); }
.stat-box.green .stat-value { color: var(--success); }
.stat-box.orange { background: var(--warning-light); }
.stat-box.orange .stat-value { color: var(--orange); }
.stat-box.red { background: var(--danger-light); }
.stat-box.red .stat-value { color: var(--danger); }

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 12px 24px; border-radius: var(--radius-full);
    font-size: 14px; font-weight: 600; cursor: pointer;
    border: none; transition: all 0.2s; text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary-gradient); color: #fff; box-shadow: 0 4px 12px rgba(26,115,232,0.3); }
.btn-primary:active { box-shadow: 0 2px 6px rgba(26,115,232,0.3); }
.btn-success { background: linear-gradient(135deg, #34a853, #1e8e3e); color: #fff; box-shadow: 0 4px 12px rgba(52,168,83,0.3); }
.btn-danger { background: linear-gradient(135deg, #ea4335, #c5221f); color: #fff; box-shadow: 0 4px 12px rgba(234,67,53,0.3); }
.btn-warning { background: linear-gradient(135deg, #fbbc04, #f9a825); color: #333; }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:active { background: var(--bg); }
.btn-full { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-icon {
    width: 48px; height: 48px; padding: 0; border-radius: var(--radius-md);
    font-size: 20px;
}
.btn-group { display: flex; gap: 8px; }
.btn-group-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ═══ WELCOME CARD ═══ */
.welcome-card {
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    padding: 20px;
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(26,115,232,0.3);
}
.welcome-card .wc-greeting { font-size: 14px; opacity: 0.9; }
.welcome-card .wc-name { font-size: 22px; font-weight: 700; margin-top: 2px; }

/* ═══ ACTIVE VISIT CARD ═══ */
.active-visit-card {
    background: var(--warning-light);
    border: 2px solid var(--warning);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    animation: scaleIn 0.3s ease;
}
.active-visit-card .avc-label { font-size: 11px; font-weight: 600; color: var(--orange); text-transform: uppercase; letter-spacing: 0.5px; }
.active-visit-card .avc-store { font-size: 18px; font-weight: 700; color: var(--text); margin: 4px 0; }
.active-visit-card .avc-timer { font-size: 28px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.active-visit-card .avc-detail { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ═══ PROGRESS BAR ═══ */
.progress-container { margin-bottom: 12px; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; font-weight: 500; }
.progress-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-fill {
    height: 100%; border-radius: 4px;
    background: var(--primary-gradient);
    transition: width 0.5s ease;
}

/* ═══ FORMS ═══ */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
.form-input {
    width: 100%; padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px; color: var(--text);
    background: var(--card);
    transition: border-color 0.2s;
    outline: none;
}
.form-input:focus { border-color: var(--primary); background: #fff; }
.form-input::placeholder { color: var(--text-light); }
textarea.form-input { resize: vertical; min-height: 80px; line-height: 1.5; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235f6368'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ═══ BUTTON GROUP (Kategori/Status) ═══ */
.btn-option-group { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-option {
    flex: 1; min-width: calc(50% - 4px);
    padding: 10px 8px; border-radius: var(--radius-sm);
    border: 2px solid var(--border); background: var(--card);
    font-size: 12px; font-weight: 600; cursor: pointer;
    text-align: center; transition: all 0.2s;
    color: var(--text-secondary);
}
.btn-option:active { transform: scale(0.97); }
.btn-option.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.btn-option .opt-icon { font-size: 18px; display: block; margin-bottom: 2px; }
.btn-option .opt-label { font-size: 11px; }

/* ═══ GPS INFO ═══ */
.gps-info-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    background: var(--success-light);
    font-size: 12px; font-weight: 500;
    margin-bottom: 12px;
}
.gps-info-bar.warning { background: var(--warning-light); color: var(--orange); }
.gps-info-bar.error { background: var(--danger-light); color: var(--danger); }
.gps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.gps-dot.warning { background: var(--warning); }
.gps-dot.error { background: var(--danger); }

/* ═══ PHOTO CAPTURE ═══ */
.photo-capture {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.photo-capture:active { border-color: var(--primary); background: var(--primary-light); }
.photo-capture .pc-icon { font-size: 36px; margin-bottom: 4px; }
.photo-capture .pc-text { font-size: 12px; color: var(--text-secondary); }
.photo-capture input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-capture.has-photo { border-style: solid; border-color: var(--success); padding: 4px; }
.photo-capture.has-photo img { width: 100%; border-radius: var(--radius-sm); max-height: 200px; object-fit: cover; }
.photo-capture.has-photo .pc-overlay {
    position: absolute; bottom: 8px; left: 8px; right: 8px;
    background: rgba(0,0,0,0.6); color: #fff;
    padding: 6px 10px; border-radius: 8px;
    font-size: 11px; display: flex; align-items: center; gap: 4px;
}

/* ═══ STEP INDICATOR ═══ */
.steps { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 0; margin-bottom: 12px; }
.step-dot {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    background: var(--border); color: var(--text-light);
    transition: all 0.3s;
}
.step-dot.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(26,115,232,0.3); }
.step-dot.done { background: var(--success); color: #fff; }
.step-line { width: 24px; height: 3px; border-radius: 2px; background: var(--border); }
.step-line.done { background: var(--success); }

/* ═══ VISIT LIST ═══ */
.visit-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.visit-item:active { background: var(--bg); }
.visit-item:last-child { border-bottom: none; }
.visit-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.visit-num.active { background: var(--warning); color: #fff; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.visit-info { flex: 1; min-width: 0; }
.visit-store { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.visit-badge {
    padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.visit-badge.active { background: var(--warning-light); color: var(--orange); }
.visit-badge.done { background: var(--success-light); color: var(--success); }
.visit-badge.offline { background: var(--danger-light); color: var(--danger); }

/* ═══ CALENDAR ═══ */
.calendar-header { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; margin-bottom: 12px; }
.calendar-header h3 { font-size: 16px; font-weight: 600; }
.cal-nav { width: 36px; height: 36px; border-radius: 10px; border: none; background: var(--bg); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cal-nav:active { background: var(--border); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-day-name { font-size: 11px; font-weight: 600; color: var(--text-light); padding: 4px 0; }
.cal-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    border-radius: 12px; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
}
.cal-day:active { background: var(--bg); }
.cal-day.today { background: var(--primary); color: #fff; font-weight: 700; }
.cal-day.has-data { background: var(--success-light); color: var(--success); font-weight: 600; }
.cal-day.has-data::after { content: ''; display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--success); position: relative; top: 4px; }
.cal-day.empty { visibility: hidden; }

/* ═══ ATTENDANCE DETAIL ═══ */
.att-detail { padding: 16px; }
.att-detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.att-detail-row:last-child { border: none; }
.att-detail-row .adr-label { color: var(--text-secondary); }
.att-detail-row .adr-value { font-weight: 600; }

/* ═══ PREMIUM LOGIN ═══ */
.premium-login {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 100vh; min-height: 100dvh;
    background: linear-gradient(145deg, #2E2018, #3A281F 40%, #4A3428 70%, #2E2018);
    overflow: hidden;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
}

/* Brushed metal texture overlay */
.premium-login::before {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(184,115,51,0.03) 2px,
        rgba(184,115,51,0.03) 4px
    );
    pointer-events: none;
}

/* Radial light from top-left */
.premium-login::after {
    content: ''; position: absolute; top: -30%; left: -20%;
    width: 80%; height: 80%;
    background: radial-gradient(ellipse, rgba(184,115,51,0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Particles Canvas */
.particles-canvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1;
}

/* Floating Light Orbs */
.light-orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); pointer-events: none; z-index: 0;
}
.light-orb-1 {
    width: 200px; height: 200px; top: 10%; left: 5%;
    background: rgba(184,115,51,0.12);
    animation: orbFloat1 8s ease-in-out infinite;
}
.light-orb-2 {
    width: 150px; height: 150px; bottom: 20%; right: 10%;
    background: rgba(212,175,55,0.08);
    animation: orbFloat2 10s ease-in-out infinite;
}
.light-orb-3 {
    width: 120px; height: 120px; top: 50%; left: 60%;
    background: rgba(13,110,253,0.06);
    animation: orbFloat3 12s ease-in-out infinite;
}
@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 40px) scale(1.2); }
}
@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, -30px) scale(1.15); }
}
@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.1); }
}

/* ═══ SPLASH INTRO ═══ */
.splash-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: linear-gradient(145deg, #2E2018, #3A281F 40%, #4A3428);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.splash-overlay.fade-out { opacity: 0; visibility: hidden; }
.splash-content { text-align: center; animation: splashIn 0.8s ease; }
.splash-logo {
    width: 100px; height: 100px; margin: 0 auto 20px;
    animation: splashLogoFloat 2s ease-in-out infinite;
}
.splash-logo-img {
    width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(184,115,51,0.4)) drop-shadow(0 0 40px rgba(212,175,55,0.2));
    animation: splashGlow 2s ease-in-out infinite alternate;
}
@keyframes splashLogoFloat {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-8px) rotateY(5deg); }
}
@keyframes splashGlow {
    from { filter: drop-shadow(0 0 20px rgba(184,115,51,0.4)) drop-shadow(0 0 40px rgba(212,175,55,0.2)); }
    to { filter: drop-shadow(0 0 30px rgba(184,115,51,0.6)) drop-shadow(0 0 60px rgba(212,175,55,0.3)); }
}
@keyframes splashIn { from { opacity: 0; transform: scale(0.8) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.splash-company {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 28px; font-weight: 700; color: #fff;
    letter-spacing: 3px; text-transform: uppercase;
    margin-bottom: 6px;
    text-shadow: 0 0 20px rgba(184,115,51,0.3);
}
.splash-subtitle {
    font-size: 12px; color: rgba(255,255,255,0.5);
    letter-spacing: 4px; text-transform: uppercase;
    margin-bottom: 40px;
}
.splash-loader {
    width: 200px; height: 2px; margin: 0 auto 16px;
    background: rgba(255,255,255,0.1); border-radius: 2px;
    overflow: hidden;
}
.splash-loader-bar {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #B87333, #D4AF37, #B87333);
    border-radius: 2px;
    animation: splashLoad 2.2s ease forwards;
}
@keyframes splashLoad { 0% { width: 0%; } 100% { width: 100%; } }
.splash-dots { display: flex; justify-content: center; gap: 6px; }
.splash-dots span {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(184,115,51,0.4);
    animation: dotPulse 1.4s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* ═══ LOGIN CARD ═══ */
.premium-login-card {
    position: relative; z-index: 10;
    width: 100%; max-width: 380px;
    background: rgba(15,15,18,0.85);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 30px;
    padding: 40px 30px 30px;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.6),
        0 2px 8px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -1px 0 rgba(0,0,0,0.3);
    animation: cardEnter 0.8s ease 2.5s both;
    perspective: 1000px;
}
@keyframes cardEnter {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo */
.plc-logo {
    width: 130px; height: 130px; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    animation: logoFloat 3s ease-in-out infinite;
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.plc-logo-img {
    width: 130px; height: 130px; object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4)) drop-shadow(0 0 40px rgba(13,110,253,0.2));
}

/* Title */
.plc-title {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 26px; font-weight: 700; color: #fff;
    text-align: center; margin-bottom: 4px;
    letter-spacing: 0.5px;
}
.plc-subtitle {
    font-size: 12px; color: rgba(255,255,255,0.45);
    text-align: center; margin-bottom: 32px;
    letter-spacing: 1px;
}

/* Input Groups */
.plc-input-group {
    position: relative; margin-bottom: 20px;
}
.plc-input-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,0.25); z-index: 2;
    transition: color 0.3s;
}
.plc-input {
    width: 100%; height: 56px;
    padding: 20px 48px 8px 50px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    color: #fff; font-size: 15px; font-weight: 500;
    outline: none; transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.plc-input:focus {
    border-color: #0D6EFD;
    background: rgba(13,110,253,0.06);
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15), inset 0 2px 4px rgba(0,0,0,0.1);
}
.plc-input:focus ~ .plc-input-icon { color: #0D6EFD; }
.plc-input::placeholder { color: transparent; }
.plc-label {
    position: absolute; left: 50px; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,0.4); font-size: 15px; font-weight: 500;
    pointer-events: none; transition: all 0.2s ease;
    transform-origin: left center;
}
.plc-input:focus + .plc-label,
.plc-input:not(:placeholder-shown) + .plc-label {
    transform: translateY(-50%) scale(0.75);
    color: rgba(255,255,255,0.5); top: 12px; left: 48px;
}
.plc-input:focus + .plc-label { color: #3EA6FF; }
.plc-input-border {
    position: absolute; bottom: 0; left: 50%; width: 0; height: 2px;
    background: linear-gradient(90deg, #0D6EFD, #3EA6FF);
    border-radius: 1px; transition: all 0.3s ease;
    transform: translateX(-50%);
}
.plc-input:focus ~ .plc-input-border { width: 100%; }

/* Password toggle */
.plc-toggle-pass {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: rgba(255,255,255,0.3);
    cursor: pointer; padding: 4px; z-index: 2;
    transition: color 0.2s;
}
.plc-toggle-pass:hover { color: rgba(255,255,255,0.6); }

/* Submit Button */
.plc-submit {
    width: 100%; height: 56px;
    background: linear-gradient(135deg, #0D6EFD, #0a58ca);
    border: none; border-radius: 18px;
    color: #fff; font-size: 16px; font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer; position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(13,110,253,0.35), 0 2px 4px rgba(0,0,0,0.2);
    margin-top: 4px;
}
.plc-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(13,110,253,0.45), 0 4px 8px rgba(0,0,0,0.3);
}
.plc-submit:active { transform: translateY(0) scale(0.98); }

/* Ripple */
.plc-submit::after {
    content: ''; position: absolute;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    transform: scale(0); opacity: 0;
    transition: transform 0.5s, opacity 0.3s;
}
.plc-submit:active::after { transform: scale(2.5); opacity: 1; transition: 0s; }

.plc-submit-text { transition: opacity 0.3s; }
.plc-submit-arrow { transition: opacity 0.3s, transform 0.3s; }
.plc-submit.loading .plc-submit-text,
.plc-submit.loading .plc-submit-arrow { opacity: 0; }
.plc-submit.loading .plc-submit-spinner { opacity: 1; }

.plc-submit-spinner {
    position: absolute; width: 24px; height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%; opacity: 0;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.login-error {
    color: #ea4335; font-size: 12px; text-align: center;
    margin-top: 12px; min-height: 18px;
    font-weight: 500;
}

/* GPS Indicator */
.plc-gps {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 20px; padding: 10px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px; border: 1px solid rgba(255,255,255,0.06);
    font-size: 12px; font-weight: 500;
    color: rgba(255,255,255,0.4);
}
.plc-gps-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #fbbc04; flex-shrink: 0;
    animation: gpsPulse 2s ease-in-out infinite;
}
.plc-gps-dot.ready { background: #34a853; animation: gpsPulseGood 1.5s ease-in-out infinite; }
.plc-gps-dot.error { background: #ea4335; animation: none; }
@keyframes gpsPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251,188,4,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(251,188,4,0); }
}
@keyframes gpsPulseGood {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52,168,83,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(52,168,83,0); }
}

/* Footer */
.plc-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.plc-version { font-size: 11px; color: rgba(255,255,255,0.2); }
.plc-badge {
    font-size: 10px; color: rgba(255,255,255,0.2);
    letter-spacing: 0.5px; font-weight: 500;
}

/* ═══ TOAST ═══ */
.toast {
    position: fixed; bottom: calc(var(--nav-h) + 20px); left: 50%; transform: translateX(-50%);
    background: #323232; color: #fff;
    padding: 10px 20px; border-radius: var(--radius-full);
    font-size: 13px; font-weight: 500;
    z-index: 999; opacity: 0; transition: opacity 0.3s;
    pointer-events: none; white-space: nowrap;
    box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; }

/* ═══ MODAL ═══ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 998; display: none; align-items: center; justify-content: center;
    padding: 24px;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: var(--card); border-radius: var(--radius-lg);
    width: 100%; max-width: 320px; text-align: center;
    padding: 24px; box-shadow: var(--shadow-lg);
    animation: scaleIn 0.2s ease;
}
.modal-box .mb-icon { font-size: 40px; margin-bottom: 12px; }
.modal-box .mb-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.modal-box .mb-text { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }
.modal-box .btn { width: 100%; }

/* ═══ SYNC BAR ═══ */
.sync-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 999;
    padding: 4px 12px; font-size: 11px; font-weight: 600;
    text-align: center; display: none;
    transition: all 0.3s;
}
.sync-bar.show { display: block; }
.sync-bar.online { background: var(--success); color: #fff; }
.sync-bar.offline { background: var(--danger); color: #fff; }
.sync-bar.syncing { background: var(--warning); color: #333; }
.sync-bar.pending { background: var(--orange); color: #fff; }

/* ═══ GPS STATUS ═══ */
.gps-bar {
    position: fixed; bottom: calc(var(--nav-h) + 4px); left: 16px; right: 16px;
    z-index: 150; padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px; font-weight: 500;
    display: none; align-items: center; gap: 6px;
    box-shadow: var(--shadow-md);
}
.gps-bar.show { display: flex; }
.gps-bar.good { background: var(--success-light); color: var(--success); border: 1px solid var(--success); }
.gps-bar.bad { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger); }

/* ═══ DETAIL PAGE ═══ */
.detail-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border: none; }
.detail-label { font-size: 11px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.detail-value { font-size: 14px; color: var(--text); line-height: 1.5; }
.detail-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-photos img { width: 100%; border-radius: var(--radius-sm); max-height: 160px; object-fit: cover; }
.detail-map { height: 200px; border-radius: var(--radius-sm); overflow: hidden; margin-top: 8px; }
.detail-link { color: var(--primary); text-decoration: none; font-weight: 500; }

/* ═══ ROUTE MAP ═══ */
.route-map { flex: 1; min-height: 300px; border-radius: 0; overflow: hidden; }
.route-legend { display: flex; gap: 12px; padding: 12px 16px; font-size: 12px; font-weight: 500; }
.route-legend span { display: flex; align-items: center; gap: 4px; }
.rl-dot { width: 10px; height: 10px; border-radius: 50%; }
.rl-dot.start { background: var(--success); }
.rl-dot.visit { background: var(--primary); }
.rl-dot.end { background: var(--danger); }

/* ═══ EMPTY STATE ═══ */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty-state .es-icon { font-size: 48px; margin-bottom: 8px; }
.empty-state .es-text { font-size: 14px; }

/* ═══ SETTINGS ═══ */
.setting-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.setting-item:last-child { border: none; }
.setting-item .si-label { font-size: 13px; color: var(--text-secondary); }
.setting-item .si-value { font-size: 14px; font-weight: 600; text-align: right; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══ RESPONSIVE ═══ */
@media (min-width: 768px) {
    .content { max-width: 480px; margin: 0 auto; }
    .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); border-radius: 16px 16px 0 0; }
    .gps-bar { max-width: 448px; left: 50%; transform: translateX(-50%); }
    .toast { max-width: 400px; }
}

/* ═══ PRINT ═══ */
@media print {
    .bottom-nav, .sync-bar, .gps-bar, .toast, .modal-overlay, .header { display: none !important; }
    .content { padding: 0; padding-bottom: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}
