/* IntentFX — Premium Native Android UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Premium Soft Light Mobile Theme */
    --m-bg: #f8fafc;
    --m-bg2: #f1f5f9;
    --m-card: #ffffff;
    --m-card2: #f8fafc;
    --m-card3: #e2e8f0;
    --m-border: rgba(15, 23, 42, 0.06);
    --m-border2: rgba(15, 23, 42, 0.1);
    --m-text: #0f172a;
    --m-muted: #64748b;
    --m-primary: #6366f1;
    --m-primary2: #818cf8;
    --m-accent: #a855f7;
    --m-green: #10b981;
    --m-green2: #34d399;
    --m-red: #ef4444;
    --m-amber: #f59e0b;
    --m-cyan: #06b6d4;
    --m-blue: #3b82f6;
    --m-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    --m-shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.04);
    --m-radius: 18px;
    --m-radius-sm: 12px;
    --m-radius-xs: 8px;
}

/* Zone-specific accent for officer (green/teal) */
.zone-officer {
    --m-primary: #059669;
    --m-primary2: #10b981;
    --m-accent: #0891b2;
}

/* Zone-specific accent for vendor (indigo/purple) */
.zone-vendor {
    --m-primary: #4f46e5;
    --m-primary2: #6366f1;
    --m-accent: #8b5cf6;
    --m-bg: #f4f7fb;
    --m-bg2: #eef2f6;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--m-bg);
    color: var(--m-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* App shell */
.m-app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--m-bg);
    position: relative;
}

/* ────────── TOP BAR ────────── */
.m-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--m-border);
}
.m-topbar-left { display: flex; align-items: center; gap: 12px; }
.m-logo {
    width: 40px; height: 40px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--m-primary), var(--m-accent));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.zone-officer .m-logo { box-shadow: 0 4px 14px rgba(5,150,105,0.35); }
.m-brand { font-weight: 800; color: var(--m-text); font-size: 18px; line-height: 1; }
.m-brand span { color: var(--m-primary2); }
.m-sub { font-size: 11px; color: var(--m-muted); margin-top: 2px; letter-spacing: 0.2px; }
.m-logout {
    color: var(--m-muted);
    font-size: 18px;
    text-decoration: none;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--m-card2);
    border: 1px solid var(--m-border);
    transition: all 0.2s;
}
.m-logout:active { background: var(--m-card3); transform: scale(0.93); }

/* ────────── CONTENT ────────── */
.m-content { flex: 1; padding: 16px 16px 90px; overflow-x: hidden; }

/* ────────── CARDS ────────── */
.m-card {
    background: var(--m-card);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--m-shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s;
}
.m-card:active { transform: scale(0.99); }
.m-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

/* ────────── HERO CARD ────────── */
.m-hero {
    background: linear-gradient(135deg, var(--m-primary), var(--m-accent));
    border-radius: 22px;
    padding: 22px 20px;
    color: #fff;
    margin-bottom: 18px;
    box-shadow: 0 12px 40px rgba(99,102,241,0.35);
    position: relative;
    overflow: hidden;
}
.zone-officer .m-hero {
    background: linear-gradient(135deg, #059669, #0891b2);
    box-shadow: 0 12px 40px rgba(5,150,105,0.35);
}
.m-hero::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 140px; height: 140px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}
.m-hero::after {
    content: '';
    position: absolute;
    bottom: -50px; left: 40px;
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.m-hero .label { font-size: 12px; opacity: 0.85; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.m-hero .value { font-size: 34px; font-weight: 800; margin: 6px 0 12px; position: relative; z-index: 1; }
.m-hero .row { display: flex; justify-content: space-between; font-size: 12px; position: relative; z-index: 1; }
.m-hero .muted { opacity: 0.75; }
.m-hero-progress {
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    margin: 10px 0 8px;
    overflow: hidden;
}
.m-hero-progress-fill {
    height: 100%;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    transition: width 1s ease;
}

/* ────────── STAT GRID ────────── */
.m-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.m-stat {
    background: var(--m-card);
    border: 1px solid var(--m-border);
    border-radius: 16px;
    padding: 16px 14px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.m-stat:active { transform: scale(0.96); opacity: 0.85; }
.m-stat .ico {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    margin-bottom: 10px;
}
.m-stat .num { font-size: 22px; font-weight: 800; line-height: 1; }
.m-stat .cap { font-size: 11px; color: var(--m-muted); margin-top: 4px; }

/* ────────── QUICK ACTIONS ────────── */
.m-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.m-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--m-text);
    transition: transform 0.2s;
}
.m-action-item:active { transform: scale(0.9); }
.m-action-icon {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 1px solid rgba(255,255,255,0.06);
}
.m-action-label { font-size: 10px; font-weight: 500; color: var(--m-muted); text-align: center; }

/* ────────── LISTS ────────── */
.m-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--m-border);
    transition: opacity 0.15s;
}
.m-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.m-list-item:first-child { padding-top: 0; }
.m-list-item:active { opacity: 0.7; }
.m-avatar {
    width: 44px; height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--m-primary), var(--m-accent));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}
.m-li-body { flex: 1; min-width: 0; }
.m-li-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-li-sub { font-size: 12px; color: var(--m-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-li-right { text-align: right; font-size: 13px; flex-shrink: 0; }

/* ────────── BADGES ────────── */
.m-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}
.b-green { background: rgba(16,185,129,0.15); color: var(--m-green2); border: 1px solid rgba(16,185,129,0.25); }
.b-red   { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.b-amber { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.b-cyan  { background: rgba(6,182,212,0.15);  color: #22d3ee; border: 1px solid rgba(6,182,212,0.25); }
.b-purple{ background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.25); }
.b-blue  { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }

/* ────────── BUTTONS ────────── */
.m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    border: none;
    border-radius: var(--m-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: 0.2px;
    width: 100%;
}
.m-btn:active { transform: scale(0.97); filter: brightness(0.9); }
.m-btn-primary {
    background: linear-gradient(135deg, var(--m-primary), var(--m-accent));
    color: #fff;
    box-shadow: 0 6px 20px rgba(99,102,241,0.35);
}
.zone-officer .m-btn-primary {
    background: linear-gradient(135deg, #059669, #0891b2);
    box-shadow: 0 6px 20px rgba(5,150,105,0.35);
}
.m-btn-green { background: var(--m-green); color: #fff; box-shadow: 0 4px 14px rgba(16,185,129,0.3); }
.m-btn-red   { background: var(--m-red);   color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,0.3); }
.m-btn-outline {
    background: var(--m-card2);
    border: 1px solid var(--m-border2);
    color: var(--m-text);
}
.m-btn-sm { padding: 10px 16px; font-size: 13px; width: auto; border-radius: 10px; }
.m-btn-block { margin-bottom: 10px; }

/* ────────── FORMS ────────── */
.m-field { margin-bottom: 14px; }
.m-field label { display: block; font-size: 12px; color: var(--m-muted); margin-bottom: 7px; font-weight: 500; }
.m-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--m-card2);
    border: 1.5px solid var(--m-border);
    border-radius: var(--m-radius-sm);
    color: var(--m-text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.m-input:focus { border-color: var(--m-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.zone-officer .m-input:focus { border-color: #059669; box-shadow: 0 0 0 3px rgba(5,150,105,0.15); }
select.m-input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%237c8aab' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 40px; }

/* ────────── BOTTOM NAV ────────── */
.m-bottomnav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(13,18,41,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--m-border);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
}
.m-navitem {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--m-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    padding: 6px 2px;
    border-radius: 12px;
    transition: all 0.2s;
    position: relative;
}
.m-navitem i { font-size: 19px; transition: transform 0.2s; }
.m-navitem.active { color: var(--m-primary2); }
.zone-officer .m-navitem.active { color: var(--m-green2); }
.m-navitem.active i { transform: translateY(-1px); }
.m-navitem.active::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 28px; height: 3px;
    background: var(--m-primary2);
    border-radius: 0 0 6px 6px;
}
.zone-officer .m-navitem.active::before { background: var(--m-green2); }

/* ────────── LOGIN SCREEN ────────── */
.m-login-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(ellipse at 20% 20%, rgba(99,102,241,0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(168,85,247,0.1) 0%, transparent 60%),
                var(--m-bg);
}
.m-login-card {
    width: 100%;
    max-width: 390px;
    background: var(--m-card);
    border: 1px solid var(--m-border2);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.m-login-logo {
    width: 72px; height: 72px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--m-primary), var(--m-accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: #fff;
    margin: 0 auto 20px;
    box-shadow: 0 12px 32px rgba(99,102,241,0.4);
}
.m-login-title { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.m-login-sub { text-align: center; font-size: 13px; color: var(--m-muted); margin-bottom: 28px; }

/* ────────── SECTION TITLE ────────── */
.section-title {
    font-size: 12px;
    color: var(--m-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin: 6px 2px 12px;
}

/* ────────── HELPERS ────────── */
.m-row { display: flex; gap: 10px; }
.m-row > * { flex: 1; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.text-green  { color: var(--m-green2); }
.text-red    { color: #f87171; }
.text-amber  { color: #fbbf24; }
.text-cyan   { color: #22d3ee; }
.text-muted  { color: var(--m-muted); }
.text-center { text-align: center; }
.text-success { color: var(--m-green2); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mb-2 { margin-bottom: 10px; }
.mt-2 { margin-top: 10px; }
.mb-3 { margin-bottom: 16px; }

/* Empty state */
.empty { text-align: center; color: var(--m-muted); padding: 32px 10px; }
.empty i { font-size: 36px; opacity: 0.3; margin-bottom: 12px; display: block; }
.empty p { font-size: 13px; }

/* Divider */
.m-divider { border: none; border-top: 1px solid var(--m-border); margin: 14px 0; }

/* Info row */
.m-info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--m-border); font-size: 13px; }
.m-info-row:last-child { border-bottom: none; }
.m-info-row .label { color: var(--m-muted); }
.m-info-row .value { font-weight: 600; }

/* Pill tabs */
.m-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.m-tab { padding: 8px 16px; border-radius: 100px; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; border: 1.5px solid var(--m-border2); color: var(--m-muted); background: transparent; transition: all 0.2s; }
.m-tab.active, .m-tab:active { background: var(--m-primary); border-color: var(--m-primary); color: #fff; }
.zone-officer .m-tab.active { background: #059669; border-color: #059669; }

/* Progress bar */
.m-progress { height: 6px; background: var(--m-card2); border-radius: 10px; overflow: hidden; }
.m-progress-fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--m-primary), var(--m-accent)); }

/* Floating Action Button */
.m-fab {
    position: fixed;
    bottom: 85px; right: 20px;
    width: 54px; height: 54px;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--m-primary), var(--m-accent));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    box-shadow: 0 8px 28px rgba(99,102,241,0.45);
    cursor: pointer;
    border: none;
    z-index: 90;
    transition: transform 0.2s;
}
.m-fab:active { transform: scale(0.92); }

/* Alert/Info box */
.m-alert { border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 12px; border: 1px solid; }
.m-alert-info    { background: rgba(59,130,246,0.1);  border-color: rgba(59,130,246,0.2);  color: #93c5fd; }
.m-alert-success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); color: #6ee7b7; }
.m-alert-danger  { background: rgba(239,68,68,0.1);   border-color: rgba(239,68,68,0.2);   color: #fca5a5; }
.m-alert-warning { background: rgba(245,158,11,0.1);  border-color: rgba(245,158,11,0.2);  color: #fcd34d; }

/* Shimmer loader */
@keyframes shimmer { 0%{background-position:-400px 0} 100%{background-position:400px 0} }
.m-shimmer { background: linear-gradient(90deg, var(--m-card2) 25%, var(--m-card3) 50%, var(--m-card2) 75%); background-size: 400px; animation: shimmer 1.4s infinite; border-radius: 10px; }

/* Page-in animation */
@keyframes pageIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
.m-content { animation: pageIn 0.25s ease; }

/* Toast animations */
@keyframes slideDown { from{opacity:0;transform:translateX(-50%) translateY(-18px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }
@keyframes slideUp   { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

/* Modal bottom-sheet style */
.m-modal-overlay { position:fixed;inset:0;background:rgba(0,0,0,0.75);z-index:200;backdrop-filter:blur(6px);display:flex;align-items:flex-end;justify-content:center; }
.m-modal-sheet { background:var(--m-card);border-radius:24px 24px 0 0;padding:24px 20px;width:100%;max-width:480px;max-height:90vh;overflow-y:auto;animation:slideUp 0.3s ease; }
.m-modal-handle { width:40px;height:4px;background:var(--m-border2);border-radius:10px;margin:0 auto 18px; }
.m-modal-title { font-size:17px;font-weight:700;margin-bottom:16px; }

/* Collection/EMI amount display */
.m-amount-big { font-size: 28px; font-weight: 800; }
.m-amount-sm  { font-size: 13px; color: var(--m-muted); }

/* Touch ripple on buttons */
.m-btn, .m-stat, .m-navitem { -webkit-tap-highlight-color: transparent; }

/* Scrollbar */
::-webkit-scrollbar { width: 0px; }
