/* ============================================================
   KisanMitra — Global Theme
   Color Palette: Orange (#E65100 / #FF8F00) + Green (#2E7D32 / #43A047)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Primary - Orange */
    --orange-50: #FFF3E0;
    --orange-100: #FFE0B2;
    --orange-200: #FFCC80;
    --orange-400: #FFA726;
    --orange-500: #FF9800;
    --orange-600: #FF8F00;
    --orange-700: #E65100;
    --orange-800: #BF360C;

    /* Secondary - Green */
    --green-50: #E8F5E9;
    --green-100: #C8E6C9;
    --green-200: #A5D6A7;
    --green-400: #66BB6A;
    --green-500: #43A047;
    --green-600: #2E7D32;
    --green-700: #1B5E20;
    --green-800: #0D3B0F;

    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;

    /* Semantic */
    --danger: #D32F2F;
    --danger-light: #FDECEA;
    --success: #2E7D32;
    --success-light: #E8F5E9;
    --warning: #FF8F00;
    --warning-light: #FFF3E0;

    /* Shadows */
    --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 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Transitions */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--orange-700);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--orange-800);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
}

h1:focus { outline: none; }

img { max-width: 100%; height: auto; }

/* ---- Layout ---- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-wrapper {
    min-height: calc(100vh - 64px);
    padding: 32px 20px;
}

.page-wrapper-center {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

/* ---- Navbar ---- */
.navbar {
    background: linear-gradient(135deg, var(--green-700) 0%, var(--green-600) 100%);
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    color: var(--white) !important;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand .brand-accent {
    color: var(--orange-400);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white) !important;
}

.nav-link-active {
    background: rgba(255, 255, 255, 0.18) !important;
    color: var(--white) !important;
}

.nav-btn {
    background: var(--orange-600);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.nav-btn:hover {
    background: var(--orange-700);
    color: var(--white) !important;
    transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }

    .navbar-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--green-700);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        box-shadow: var(--shadow-lg);
    }

    .navbar-links.open { display: flex; }

    .nav-link, .nav-btn {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
    }
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--orange-600), var(--orange-700));
    color: var(--white);
    box-shadow: 0 4px 14px rgba(230, 81, 0, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(230, 81, 0, 0.45); color: var(--white); }

.btn-secondary {
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: var(--white);
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.3);
}
.btn-secondary:hover { box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4); color: var(--white); }

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.7);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); color: var(--white); }

.btn-outline-orange {
    background: transparent;
    color: var(--orange-700);
    border: 2px solid var(--orange-700);
}
.btn-outline-orange:hover { background: var(--orange-700); color: var(--white); }

.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover { background: #B71C1C; color: var(--white); }

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1.05rem;
}

.btn-block { width: 100%; }

/* ---- Cards ---- */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-elevated {
    box-shadow: var(--shadow-md);
    border: none;
}

.card-elevated:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* ---- Form Elements ---- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
}

.form-input:disabled {
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: not-allowed;
}

.form-select {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
    outline: none;
    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='%23757575' d='M6 8.825L.35 3.175l.7-.7L6 7.425l4.95-4.95.7.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-select:focus {
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--green-600);
    cursor: pointer;
}

/* ---- Grid ---- */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ---- Alerts ---- */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--orange-800);
    border-left: 4px solid var(--warning);
}

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
}

.badge-green { background: var(--green-50); color: var(--green-600); }
.badge-orange { background: var(--orange-50); color: var(--orange-700); }
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: var(--gray-200); color: var(--gray-700); }

/* ---- Stat Card ---- */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    border-left: 5px solid var(--green-500);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--green-600);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-top: 4px;
}

.stat-card-orange { border-left-color: var(--orange-600); }
.stat-card-orange .stat-value { color: var(--orange-700); }

/* ---- Table ---- */
.table-wrapper {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    .table-wrapper { overflow-x: auto; }
    .table { min-width: 600px; }
}

/* ---- Section Headers ---- */
.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--gray-500);
    font-size: 1.05rem;
    margin-bottom: 40px;
}

.section-title .highlight {
    color: var(--orange-700);
}

.section-title .highlight-green {
    color: var(--green-600);
}

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--green-700) 0%, var(--green-600) 40%, var(--orange-700) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-full);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-full);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero h1 .accent {
    color: var(--orange-400);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.92;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .hero { padding: 50px 20px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 280px; }
}

/* ---- Auth Card ---- */
.auth-wrapper {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, var(--green-50) 0%, var(--orange-50) 100%);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--orange-600);
}

.auth-card-wide {
    max-width: 520px;
}

@media (max-width: 480px) {
    .auth-card { padding: 32px 24px; }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 1.8rem;
    color: var(--green-600);
    margin-bottom: 4px;
}

.auth-header h1 .accent {
    color: var(--orange-600);
}

.auth-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--orange-700);
    font-weight: 600;
}

/* ---- Toggle Switch ---- */
.toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.toggle-track {
    width: 48px;
    height: 26px;
    background: var(--gray-300);
    border-radius: 13px;
    position: relative;
    transition: var(--transition);
}

.toggle-track.active {
    background: var(--green-500);
}

.toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: var(--radius-full);
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-track.active::after {
    left: 25px;
}

/* ---- Page Header ---- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.8rem;
    color: var(--gray-900);
}

.page-header h1 .highlight {
    color: var(--orange-700);
}

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-500);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab:hover {
    color: var(--gray-700);
}

.tab.active {
    color: var(--orange-700);
    border-bottom-color: var(--orange-600);
}

.tab.active-green {
    color: var(--green-600);
    border-bottom-color: var(--green-600);
}

/* ---- Footer ---- */
.footer {
    background: var(--gray-900);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 20px;
    text-align: center;
}

.footer .footer-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.footer .footer-brand .accent {
    color: var(--orange-400);
}

.footer p {
    font-size: 0.9rem;
    margin-top: 8px;
}

/* ---- Loading ---- */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.loading-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--orange-600);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-orange { color: var(--orange-700); }
.text-green { color: var(--green-600); }
.text-muted { color: var(--gray-500); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.78rem; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ---- Blazor defaults ---- */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--green-500); }
.invalid { outline: 1px solid var(--danger); }
.validation-message { color: var(--danger); font-size: 0.85rem; }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

#blazor-error-ui {
    display: none;
    background: var(--danger);
    color: var(--white);
    padding: 12px 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    text-align: center;
    font-size: 0.9rem;
}

/* =======================================================
   Admin Console
   ======================================================= */
.admin-shell {
    display: flex;
    min-height: 100vh;
    background: #f5f7fb;
}

.admin-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #0f2a1c 0%, #0a1f14 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: width 0.22s ease;
}

.admin-sidebar.is-collapsed { width: 72px; }

.admin-sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

.admin-sidebar.is-collapsed .admin-sidebar-brand {
    padding: 24px 10px 20px;
    text-align: center;
}

.admin-collapse-btn {
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--orange-600);
    color: white;
    border: 2px solid #0a1f14;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: background 0.15s, transform 0.15s;
    z-index: 2;
}

.admin-collapse-btn:hover {
    background: var(--orange-700);
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 900px) {
    .admin-collapse-btn { display: none; }
}

.admin-brand-link {
    color: var(--white) !important;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.admin-brand-link .brand-accent {
    color: var(--orange-400);
}

/* Sidebar logo — can be uploaded via the sidebar brand editor (admin only),
   falls back to /wwwroot/logo.svg and /wwwroot/logo-mark.svg. */
.admin-brand-logo {
    height: 36px;
    width: auto;
    max-width: 100%;
    display: block;
    user-select: none;
}
.admin-brand-logo.mark {
    height: 34px;
    width: 34px;
    margin: 0 auto;
}

/* Edit-logo affordance on the sidebar brand (admin only) */
.brand-logo-edit-btn {
    position: absolute;
    top: 10px;
    right: 36px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.82);
    border: 1px solid rgba(255,255,255,0.18);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; line-height: 1;
    transition: background .15s, color .15s, transform .15s;
    z-index: 3;
}
.brand-logo-edit-btn:hover {
    background: rgba(255,255,255,0.24);
    color: #fff;
    transform: scale(1.08);
}
.admin-sidebar.is-collapsed .brand-logo-edit-btn {
    top: 4px; right: 4px;
}

/* Modal */
.brand-logo-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(17, 24, 39, 0.55);
    z-index: 1000;
}
.brand-logo-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff; color: #1f2937;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    z-index: 1001;
    display: flex; flex-direction: column;
}
.brand-logo-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #e5e7eb;
}
.brand-logo-modal-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.brand-logo-modal-close {
    border: none; background: transparent; font-size: 1.5rem; line-height: 1;
    cursor: pointer; color: #6b7280; padding: 0 4px;
}
.brand-logo-modal-close:hover { color: #111827; }
.brand-logo-modal-err {
    margin: 12px 20px 0; padding: 10px 12px;
    background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
    border-radius: 8px; font-size: .85rem;
}
.brand-logo-modal-body {
    display: flex; flex-direction: column; gap: 20px;
    padding: 16px 20px;
}
.brand-logo-label {
    display: block; font-size: .78rem; font-weight: 700;
    color: #374151; text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: 8px;
}
.brand-logo-preview {
    position: relative;
    background: linear-gradient(180deg, #065f46, #064e3b);
    border-radius: 10px; padding: 16px;
    display: flex; align-items: center; justify-content: center;
    min-height: 72px;
}
.brand-logo-preview img { max-height: 48px; width: auto; display: block; }
.brand-logo-preview.mark { width: 88px; height: 88px; margin: 0 auto; }
.brand-logo-preview.mark img { max-height: 56px; }
.brand-logo-badge {
    position: absolute; top: 6px; right: 8px;
    font-size: .65rem; font-weight: 700;
    background: rgba(255,255,255,0.2); color: #fff;
    padding: 2px 6px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: .4px;
}
.brand-logo-row {
    display: flex; gap: 8px; align-items: center; margin-top: 10px;
}
.brand-logo-file {
    flex: 1; font-size: .85rem;
    border: 1px dashed #d1d5db; border-radius: 8px;
    padding: 8px 10px; background: #f9fafb;
}
.brand-logo-modal-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 12px 20px; border-top: 1px solid #e5e7eb;
    background: #f9fafb; border-bottom-left-radius: 14px; border-bottom-right-radius: 14px;
}
.brand-logo-hint { font-size: .78rem; color: #6b7280; }

.admin-brand-sub {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.admin-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.admin-nav-group {
    padding: 14px 14px 6px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.78) !important;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white) !important;
}

.admin-nav-link.active {
    background: linear-gradient(90deg, var(--orange-700), var(--orange-600));
    color: var(--white) !important;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.35);
}

.admin-nav-link .admin-icon { flex-shrink: 0; opacity: 0.9; }
.admin-nav-link.active .admin-icon { opacity: 1; }

.admin-nav-badge {
    margin-left: auto;
    background: var(--orange-600);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.admin-nav-link.active .admin-nav-badge {
    background: rgba(0, 0, 0, 0.25);
}

/* Collapsed sidebar: hide labels, center icons, tooltip on hover */
.admin-sidebar.is-collapsed .admin-nav-group { display: none; }
.admin-sidebar.is-collapsed .admin-nav { padding: 12px 8px; }
.admin-sidebar.is-collapsed .admin-nav-link {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
    position: relative;
}
.admin-sidebar.is-collapsed .admin-nav-link span:not(.admin-nav-badge),
.admin-sidebar.is-collapsed .admin-sidebar-footer .admin-nav-link span { display: none; }
.admin-sidebar.is-collapsed .admin-nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    margin: 0;
    padding: 1px 5px;
    font-size: 0.6rem;
    min-width: 14px;
}

/* Tooltip for collapsed nav items */
.admin-sidebar.is-collapsed .admin-nav-link::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #0f172a;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 1100;
}
.admin-sidebar.is-collapsed .admin-nav-link:hover::after { opacity: 1; }

.admin-sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    height: 64px;
    padding: 0 24px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 900;
}

.admin-toggle {
    background: transparent;
    border: none;
    color: var(--green-700);
    cursor: pointer;
    padding: 6px;
    display: none;
    border-radius: 6px;
}

.admin-toggle:hover { background: #f1f5f9; }

.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.admin-breadcrumb-root { color: #6b7280; }
.admin-breadcrumb-sep { color: #cbd5e1; }
.admin-breadcrumb-current { color: #0f172a; font-weight: 600; }

.admin-topbar-spacer { flex: 1; }

.admin-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fafafa;
}

.admin-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.admin-user-avatar-sm { width: 32px; height: 32px; font-size: 0.78rem; }

.admin-user-meta { line-height: 1.15; }
.admin-user-name { font-weight: 600; font-size: 0.88rem; color: #0f172a; }
.admin-user-role { font-size: 0.72rem; color: #6b7280; }

.admin-user-logout {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: inline-flex;
}
.admin-user-logout:hover { background: #fee2e2; color: #dc2626; }

.admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}

.admin-content {
    flex: 1;
    padding: 0;
}

.admin-content .page-wrapper {
    min-height: auto;
}

/* -- Admin page shell -- */
.admin-page {
    padding: 28px 32px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-page-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
}

.admin-page-sub {
    color: #64748b;
    margin: 0;
}

/* -- Hero block -- */
.admin-hero {
    background: linear-gradient(135deg, #0f2a1c 0%, #1b5e20 60%, #2e7d32 100%);
    color: white;
    border-radius: 16px;
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(14, 45, 29, 0.18);
}

.admin-hero-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.7);
    font-weight: 700;
}

.admin-hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 6px 0 4px;
}

.admin-hero-sub {
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.admin-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-hero-actions .btn { background: rgba(255,255,255,0.15); color: white; border-color: rgba(255,255,255,0.25); }
.admin-hero-actions .btn:hover { background: rgba(255,255,255,0.25); }
.admin-hero-actions .btn-primary { background: var(--orange-600); border-color: var(--orange-600); }

/* -- KPI cards -- */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.admin-kpi {
    background: white;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    border: 1px solid #eef2f7;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    overflow: hidden;
}

.admin-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,0.08); }

.admin-kpi::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--kpi-accent, var(--green-500));
}

.admin-kpi-primary { --kpi-accent: var(--green-600); }
.admin-kpi-warn { --kpi-accent: var(--orange-600); }
.admin-kpi-success { --kpi-accent: #059669; }
.admin-kpi-info { --kpi-accent: #1e88e5; }

.admin-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--kpi-accent) 12%, transparent);
    color: var(--kpi-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-kpi-body { flex: 1; min-width: 0; }
.admin-kpi-label { color: #64748b; font-size: 0.82rem; font-weight: 600; }
.admin-kpi-value { font-size: 2rem; font-weight: 800; color: #0f172a; line-height: 1.1; margin: 4px 0; }
.admin-kpi-foot { font-size: 0.78rem; color: #64748b; }
.admin-kpi-foot a { color: var(--orange-700); font-weight: 600; text-decoration: none; }

.admin-kpi.skeleton { height: 108px; background: linear-gradient(90deg, #f1f5f9 25%, #e5e9f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0;} 100% { background-position: -200% 0;} }

.admin-kpi.pulse::after {
    content: "";
    position: absolute;
    top: 12px; right: 12px;
    width: 8px; height: 8px;
    background: var(--orange-600);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(230, 81, 0, 0.5);
    animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(230,81,0,.5);} 70%{box-shadow:0 0 0 10px rgba(230,81,0,0);} 100%{box-shadow:0 0 0 0 rgba(230,81,0,0);} }

/* -- Sections -- */
.admin-section { margin-bottom: 28px; }
.admin-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin-bottom: 12px;
}
.admin-section-head h2 { font-size: 1.1rem; font-weight: 700; margin: 0; color: #0f172a; }

.admin-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.admin-role-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #eef2f7;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.15s;
}
.admin-role-card:hover { border-color: var(--role-accent); }
.admin-role-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--role-accent); }
.admin-role-label { color: #64748b; font-size: 0.8rem; }
.admin-role-value { font-size: 1.5rem; font-weight: 800; color: #0f172a; }

/* -- Two-column callout + quick actions -- */
.admin-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

@media (max-width: 900px) { .admin-columns { grid-template-columns: 1fr; } }

.admin-callout {
    background: white;
    border-radius: 14px;
    padding: 22px;
    display: flex;
    gap: 16px;
    border: 1px solid #eef2f7;
}
.admin-callout-warn { background: linear-gradient(135deg, #fff7ed 0%, #ffffff 70%); border-color: #fed7aa; }
.admin-callout-ok { background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 70%); border-color: #bbf7d0; }

.admin-callout-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(230, 81, 0, 0.1);
    color: var(--orange-700);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.admin-callout-ok .admin-callout-icon { background: rgba(5, 150, 105, 0.12); color: #059669; }
.admin-callout-body h3 { margin: 0 0 4px; font-size: 1.05rem; color: #0f172a; }
.admin-callout-body p { margin: 0 0 12px; color: #64748b; font-size: 0.9rem; }

.admin-quickcard {
    background: white;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #eef2f7;
}
.admin-quickcard h3 { margin: 0 0 12px; font-size: 1rem; color: #0f172a; }

.admin-quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.admin-quick-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}
.admin-quick-item:hover { background: var(--orange-50); color: var(--orange-700) !important; }

/* -- Tabs -- */
.admin-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.admin-tab {
    background: transparent;
    border: none;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.admin-tab:hover { color: #0f172a; }
.admin-tab.active { color: var(--orange-700); border-bottom-color: var(--orange-700); }

.admin-tab-count {
    background: #e5e7eb;
    color: #374151;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}
.admin-tab.active .admin-tab-count { background: var(--orange-100); color: var(--orange-800); }
.admin-tab-count-warn { background: #fef3c7; color: #92400e; }

/* -- Filters -- */
.admin-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-search {
    position: relative;
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 12px;
    color: #64748b;
}
.admin-search input {
    border: none; outline: none; background: transparent;
    padding: 10px 8px; flex: 1;
    font: inherit; color: #0f172a;
}
.admin-search:focus-within { border-color: var(--orange-600); box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1); }

.admin-select {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    color: #0f172a;
    cursor: pointer;
    min-width: 160px;
}
.admin-select:focus { outline: none; border-color: var(--orange-600); box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1); }

/* -- Table -- */
.admin-table-card {
    background: white;
    border-radius: 14px;
    border: 1px solid #eef2f7;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #f8fafc; }

.admin-user-cell { display: flex; align-items: center; gap: 10px; }
.admin-col-actions { text-align: right; }

.btn-icon {
    background: white;
    border: 1px solid #e5e7eb;
    width: 28px; height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.btn-icon-ok { color: #059669; }
.btn-icon-ok:hover { background: #ecfdf5; border-color: #059669; }
.btn-icon-danger { color: #dc2626; }
.btn-icon-danger:hover { background: #fee2e2; border-color: #dc2626; }

/* -- Approve / Reject cell (admin Users page) -- */
.admin-approve-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 260px;
}
.admin-approve-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.admin-approve-row .badge { margin-right: 4px; }
.admin-approve-row .btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* -- Empty state -- */
.admin-empty {
    background: white;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
    padding: 56px 24px;
    text-align: center;
}
.admin-empty-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    display: flex; align-items: center; justify-content: center;
}
.admin-empty h3 { margin: 0 0 6px; color: #0f172a; }
.admin-empty p { margin: 0; color: #64748b; }

/* -- Toast -- */
.admin-toast {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.2s ease;
}
.admin-toast-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.admin-toast-err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.admin-toast-close {
    background: transparent; border: none; cursor: pointer;
    color: inherit; opacity: 0.6; padding: 2px; margin-left: auto;
}
.admin-toast-close:hover { opacity: 1; }
@keyframes slideDown { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* -- Modal (used by Farmer Pesticides Buy modal etc.) -- */
.admin-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.admin-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    width: 100%; max-width: 480px;
    max-height: calc(100vh - 32px);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.admin-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
}
.admin-modal-head h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.admin-modal-close {
    background: transparent; border: none; font-size: 1.4rem; line-height: 1;
    cursor: pointer; opacity: 0.6; padding: 2px 6px;
}
.admin-modal-close:hover { opacity: 1; }
.admin-modal-body { padding: 16px 18px; overflow-y: auto; }
.admin-modal-foot {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}
.form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form-row label { font-size: 0.85rem; font-weight: 500; color: #374151; }
.form-row input, .form-row textarea, .form-row select {
    padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.95rem;
    font-family: inherit;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
    outline: none; border-color: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* -- Settings -- */
.admin-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.admin-settings-card {
    background: white;
    border-radius: 14px;
    border: 1px solid #eef2f7;
    overflow: hidden;
}

.admin-settings-head {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: 12px;
    align-items: center;
    background: #f8fafc;
}
.admin-settings-head > div h3 { margin: 0; font-size: 1rem; color: #0f172a; }
.admin-settings-head > div p { margin: 2px 0 0; color: #64748b; font-size: 0.82rem; }

.admin-settings-body { padding: 20px; }

/* =======================================================
   Marketplace & Proposals (admin-style shell for users)
   ======================================================= */
.admin-hero-market { background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #43a047 100%); }
.admin-hero-proposal { background: linear-gradient(135deg, #bf360c 0%, #e65100 60%, #ff8f00 100%); }

.admin-icon.flip { transform: scaleX(-1); }

/* -- Category pills (marketplace) -- */
.market-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.market-pill {
    background: white;
    border: 1px solid #e5e7eb;
    color: #475569;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.15s;
}
.market-pill:hover { border-color: var(--orange-400); color: var(--orange-700); }
.market-pill.active { background: var(--orange-600); border-color: var(--orange-600); color: white; }
.market-pill-count {
    background: rgba(0,0,0,0.08);
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: 10px;
}
.market-pill.active .market-pill-count { background: rgba(255,255,255,0.25); }

/* -- Market card grid -- */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.market-card {
    background: white;
    border-radius: 14px;
    border: 1px solid #eef2f7;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    outline: none;
}
.market-card:hover, .market-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    border-color: var(--orange-400);
}

.market-card-media {
    position: relative;
    height: 140px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.market-card-media-placeholder {
    color: #94a3b8;
    opacity: 0.6;
}

.market-card-type {
    position: absolute;
    top: 10px; left: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 999px;
    color: white;
    backdrop-filter: blur(4px);
}
.market-card-type.sale { background: rgba(46, 125, 50, 0.92); }
.market-card-type.rent { background: rgba(230, 81, 0, 0.92); }

.market-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }

.market-card-cat {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 4px;
}

.market-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #0f172a;
    line-height: 1.3;
}

.market-card-desc {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0 0 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.market-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.market-card-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--orange-700);
}
.market-card-unit {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.market-card-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--orange-600);
}

.market-card-loc {
    margin-top: 8px;
    font-size: 0.76rem;
    color: #94a3b8;
}

.market-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    gap: 12px;
}

.skeleton-card {
    height: 300px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e5e9f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 14px;
}

/* -- Proposal cards -- */
.proposal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.proposal-card {
    background: white;
    border-radius: 14px;
    border: 1px solid #eef2f7;
    padding: 18px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    outline: none;
    position: relative;
    overflow: hidden;
}
.proposal-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--orange-600);
}
.proposal-card:hover, .proposal-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15,23,42,0.08);
    border-color: var(--orange-400);
}

.proposal-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.proposal-card-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.chip-green { background: #dcfce7; color: #166534; }
.chip-orange { background: #ffedd5; color: #9a3412; }
.chip-blue { background: #dbeafe; color: #1e40af; }
.chip-muted { background: #f1f5f9; color: #475569; }

.proposal-card-deadline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 600;
}

.proposal-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}

.proposal-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 14px;
}

.proposal-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.proposal-card-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--orange-700);
}
.proposal-card-unit { font-size: 0.78rem; color: #94a3b8; font-weight: 500; }

.proposal-card-bids {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: #64748b;
}

/* -- Modal -- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.modal-card {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    animation: slideUp 0.2s ease;
}
@keyframes slideUp { from{ transform: translateY(10px); opacity:0;} to{transform:translateY(0); opacity:1;} }

.modal-head {
    padding: 20px 24px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.modal-head h3 { margin: 6px 0 0; font-size: 1.2rem; color: #0f172a; }

.modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}
.modal-close:hover { background: #e2e8f0; }

.modal-body { padding: 20px 24px 24px; }

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-bottom: 18px;
}
.modal-grid > div { display: flex; flex-direction: column; }
.modal-grid span { font-size: 0.72rem; text-transform: uppercase; color: #94a3b8; letter-spacing: 0.5px; font-weight: 700; }
.modal-grid strong { color: #0f172a; font-size: 0.95rem; margin-top: 2px; }
.modal-grid strong.price { color: var(--orange-700); }

.modal-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.modal-note span { font-size: 0.72rem; text-transform: uppercase; color: #92400e; letter-spacing: 0.5px; font-weight: 700; }
.modal-note p { margin: 4px 0 0; color: #78350f; font-size: 0.88rem; }

.modal-desc { color: #475569; font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }

.modal-section-title {
    font-size: 0.95rem;
    color: var(--orange-700);
    margin: 14px 0 10px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 10px;
}

.modal-auth {
    text-align: center;
    padding: 20px 0;
}
.modal-auth p { color: #64748b; margin: 0 0 12px; }

@media (max-width: 600px) {
    .modal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .admin-toggle { display: inline-flex; }
    .admin-page { padding: 20px 16px; }
    .admin-hero { padding: 20px; }
    .admin-user-meta { display: none; }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-shell {
        display: block;
    }

    .admin-main {
        width: 100%;
    }

    .admin-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
    .admin-table tr { padding: 12px; border-bottom: 1px solid #f1f5f9; }
    .admin-table td { border: none; padding: 4px 0; }
}

/* Language switcher in navbar */
.lang-switcher {
    margin-left: 8px;
    padding: 6px 10px;
    border: 1px solid var(--gray-300, #d4d4d4);
    border-radius: 6px;
    background: var(--white, #fff);
    font: inherit;
    cursor: pointer;
}

.lang-switcher:focus {
    outline: 2px solid var(--orange-500, #FF9800);
    outline-offset: 1px;
}

/* =======================================================
   Company Panel
   ======================================================= */
.admin-hero-company {
    background: linear-gradient(135deg, #4a148c 0%, #6a1b9a 45%, #8e24aa 100%);
}

.company-sidebar {
    background: linear-gradient(180deg, #4a148c 0%, #311b92 100%);
}

/* =======================================================
   Shop Panel (PesticideShop)
   ======================================================= */
.shop-sidebar {
    background: linear-gradient(180deg, #065f46 0%, #064e3b 100%);
}

.admin-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}

.admin-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.admin-panel-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.admin-two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 900px) {
    .admin-two-col { grid-template-columns: 1fr; }
}

.admin-actions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-action-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fafafa;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.15s ease;
}
.admin-action-link:hover {
    background: #fff7ed;
    border-color: #fdba74;
    transform: translateX(2px);
}
.admin-action-link strong {
    display: block;
    font-size: 0.92rem;
    color: #1f2937;
}

/* -- Contract Farming chip + farmer panel tag -- */
.chip-purple { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.fp-tag-purple { background: #ede9fe; color: #5b21b6; }

/* -- My Bids workflow progress -- */
.bid-progress {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}
.bid-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}
.bid-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}
.bid-step.done:not(:last-child)::after { background: #10b981; }
.bid-step-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 2px solid #fff;
    z-index: 1;
    box-shadow: 0 0 0 1px #e2e8f0;
}
.bid-step.done .bid-step-dot {
    background: #10b981;
    box-shadow: 0 0 0 1px #10b981;
}
.bid-step-label {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}
.bid-step.done .bid-step-label { color: #047857; }



/* =======================================================
   Broker / Adti Directory
   ======================================================= */
.admin-hero-broker {
    background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 50%, #0891b2 100%);
}

.broker-avatar {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .95rem; letter-spacing: .5px;
    box-shadow: 0 2px 6px rgba(3, 105, 161, 0.25);
}

.broker-avatar-lg {
    width: 72px; height: 72px; border-radius: 18px; font-size: 1.3rem;
    background: linear-gradient(135deg, #fff, #e0f2fe); color: #0c4a6e;
}

.admin-check {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .85rem; color: #475569; cursor: pointer;
    user-select: none;
}
.admin-check input[type="checkbox"] { accent-color: #0891b2; }


/* =======================================================
   Phase 5 — Pesticide Shop
   ======================================================= */
.admin-hero-shop {
    background: linear-gradient(135deg, #064e3b 0%, #047857 45%, #10b981 100%);
}

.market-card-type.shop {
    background: linear-gradient(135deg, #10b981, #047857);
    color: #fff;
}

.admin-order-list { display: flex; flex-direction: column; gap: 10px; }
.admin-order-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 12px; padding: 14px; border: 1px solid #e5e7eb; border-radius: 12px;
    background: #fff;
}
.admin-order-main { flex: 1; min-width: 0; }
.admin-order-title { font-weight: 600; color: #1f2937; margin-bottom: 4px; }
.admin-order-meta {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    font-size: .82rem; color: #6b7280;
}
.admin-order-addr {
    margin-top: 6px; font-size: .8rem; color: #6b7280;
    display: inline-flex; align-items: center; gap: 6px;
}
.admin-order-actions { display: flex; flex-direction: column; gap: 6px; min-width: 140px; align-items: stretch; }

.admin-kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px; margin: 16px 0 20px;
}
.admin-kpi {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 16px;
}
.admin-kpi-label { font-size: .78rem; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; }
.admin-kpi-value { font-size: 1.7rem; font-weight: 700; color: #065f46; margin-top: 4px; }
.admin-kpi-sub { font-size: .78rem; color: #9ca3af; margin-top: 2px; }

.detail-rows { display: flex; flex-direction: column; }
.detail-row {
    display: flex; justify-content: space-between; padding: 10px 0;
    border-bottom: 1px dashed #e5e7eb;
}
.detail-row:last-child { border-bottom: none; }
.detail-row span { color: #6b7280; font-size: .88rem; }
.detail-row strong { color: #111827; font-weight: 600; font-size: .92rem; }

.form-grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width: 640px) { .form-grid-2 { grid-template-columns: 1fr; } }
/* Phase 5 — Shop Dashboard (redesigned) */
.shop-page { padding-bottom: 60px; }

.shop-hero {
    position: relative; overflow: hidden; border-radius: 20px;
    padding: 28px; margin-bottom: 22px; color: #fff;
    background: linear-gradient(135deg, #064e3b 0%, #047857 35%, #10b981 100%);
    box-shadow: 0 10px 30px -10px rgba(4, 120, 87, 0.45);
}
.shop-hero-bg {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at 90% 10%, rgba(255,255,255,.18) 0, transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(16,185,129,.35) 0, transparent 50%);
}
.shop-hero-inner { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.shop-hero-left { flex: 1; min-width: 260px; }
.shop-hero-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px); border-radius: 999px;
    font-size: .8rem; font-weight: 600; letter-spacing: .3px;
    border: 1px solid rgba(255,255,255,.2);
}
.shop-hero-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.shop-hero-dot.on { background: #a7f3d0; box-shadow: 0 0 8px #a7f3d0; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.shop-hero-title {
    font-size: 2.1rem; font-weight: 700; margin: 10px 0 4px;
    letter-spacing: -0.5px;
}
.shop-hero-sub { opacity: .9; font-size: .92rem; margin: 0 0 18px; }

.shop-hero-toggle {
    display: inline-flex; gap: 14px; align-items: center;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
    padding: 10px 16px; border-radius: 14px; backdrop-filter: blur(6px);
}
.shop-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.shop-switch input { opacity: 0; width: 0; height: 0; }
.shop-switch-track {
    position: absolute; inset: 0; cursor: pointer;
    background: rgba(255,255,255,.25); border-radius: 20px; transition: .2s;
}
.shop-switch-track::before {
    content: ''; position: absolute; left: 3px; top: 3px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; transition: .2s;
}
.shop-switch input:checked + .shop-switch-track { background: #a7f3d0; }
.shop-switch input:checked + .shop-switch-track::before { left: 23px; }
.shop-switch-title { font-weight: 600; font-size: .92rem; }
.shop-switch-sub { opacity: .75; font-size: .78rem; }

.shop-hero-right { display: flex; flex-direction: column; gap: 8px; min-width: 170px; }
.shop-hero-cta {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 11px 16px; border-radius: 12px;
    background: rgba(255,255,255,.14); color: #fff;
    border: 1px solid rgba(255,255,255,.2);
    font-weight: 600; font-size: .9rem; cursor: pointer;
    transition: transform .15s, background .15s;
    text-decoration: none;
}
.shop-hero-cta:hover { transform: translateY(-1px); background: rgba(255,255,255,.22); }
.shop-hero-cta.primary { background: #fff; color: #047857; }
.shop-hero-cta.primary:hover { background: #ecfdf5; }

.shop-toast {
    padding: 12px 16px; border-radius: 12px; margin: 10px 0 18px;
    font-size: .9rem; font-weight: 500;
}
.shop-toast.ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.shop-toast.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.shop-kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px; margin-bottom: 22px;
}
.shop-kpi {
    display: flex; align-items: center; gap: 14px;
    padding: 18px; border-radius: 16px;
    background: #fff; border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: transform .15s, box-shadow .15s;
}
.shop-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(0,0,0,.1); }
.shop-kpi-icon {
    width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
    background: linear-gradient(135deg, var(--kc1), var(--kc2));
    box-shadow: 0 4px 10px -2px var(--kc2);
}
.shop-kpi-label { font-size: .72rem; color: #6b7280; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.shop-kpi-value { font-size: 1.7rem; font-weight: 700; color: #111827; line-height: 1.1; margin-top: 2px; }
.shop-kpi-sub { font-size: .75rem; color: #9ca3af; margin-top: 2px; }

.shop-quick-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.shop-quick {
    display: flex; align-items: center; gap: 14px; text-align: left;
    padding: 16px; border-radius: 14px;
    background: #fff; border: 1px solid #e5e7eb; cursor: pointer;
    transition: transform .15s, border-color .15s;
}
.shop-quick:hover { transform: translateY(-2px); border-color: #10b981; }
.shop-quick-icon {
    width: 44px; height: 44px; border-radius: 12px; color: #fff;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.shop-quick-title { font-weight: 600; color: #111827; font-size: .95rem; }
.shop-quick-sub { font-size: .78rem; color: #6b7280; margin-top: 2px; }

.shop-section {
    background: #fff; border-radius: 18px; padding: 22px;
    border: 1px solid #e5e7eb; margin-bottom: 20px;
}
.shop-section-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.shop-section-title {
    font-size: 1.25rem; font-weight: 700; color: #111827;
    margin: 0 0 2px; letter-spacing: -0.3px;
}
.shop-section-sub { font-size: .82rem; color: #6b7280; margin: 0; }

/* ===== Demand near you ===== */
.shop-demand {
    background: #fff; border-radius: 18px; padding: 22px;
    border: 1px solid #e5e7eb; margin-bottom: 20px;
}
.shop-demand-head { margin-bottom: 16px; }
.shop-demand-empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 28px 16px; color: #6b7280; text-align: center;
}
.shop-demand-empty p { margin: 0; font-size: .9rem; }
.shop-demand-list { display: flex; flex-direction: column; gap: 10px; }
.shop-demand-row {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 14px 16px; border: 1px solid #eef0f2; border-radius: 14px;
    background: #fafbfc;
}
.shop-demand-main { flex: 1 1 240px; min-width: 0; }
.shop-demand-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.shop-demand-disease { font-weight: 700; color: #111827; font-size: .98rem; }
.shop-demand-hi { font-size: .82rem; color: #9ca3af; }
.shop-demand-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.shop-demand-crop {
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
    background: #ecfdf5; color: #047857;
}
.shop-demand-ing { font-size: 12px; color: #6b7280; }
.shop-demand-stat { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.shop-demand-count {
    font-size: 1.3rem; font-weight: 800; color: #111827; line-height: 1;
    display: flex; flex-direction: column; align-items: center;
}
.shop-demand-count span { font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
.shop-demand-trend { font-size: .82rem; font-weight: 700; white-space: nowrap; }
.shop-demand-trend.trend-up   { color: #b91c1c; }
.shop-demand-trend.trend-new  { color: #b45309; }
.shop-demand-trend.trend-down { color: #15803d; }
.shop-demand-trend.trend-flat { color: #9ca3af; }
.shop-demand-cover { flex-shrink: 0; }
.shop-cover-chip {
    display: inline-flex; align-items: center; font-size: 12px; font-weight: 700;
    padding: 6px 12px; border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.shop-cover-chip.cover-ok   { background: #ecfdf5; color: #047857; }
.shop-cover-chip.cover-low  { background: #fffbeb; color: #92400e; }
.shop-cover-chip.cover-out  { background: #fef2f2; color: #b91c1c; }
.shop-cover-chip.cover-none { background: #eff6ff; color: #1d4ed8; }
a.shop-cover-chip:hover { filter: brightness(0.96); }

.shop-chip-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.shop-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 999px;
    background: #f3f4f6; color: #4b5563; border: 1px solid transparent;
    font-size: .82rem; font-weight: 500; cursor: pointer;
    transition: background .15s;
}
.shop-chip span {
    background: #fff; color: #6b7280; padding: 0 7px;
    border-radius: 999px; font-size: .72rem; font-weight: 600;
}
.shop-chip:hover { background: #e5e7eb; }
.shop-chip.active { background: #065f46; color: #fff; }
.shop-chip.active span { background: rgba(255,255,255,.25); color: #fff; }

.shop-empty { text-align: center; padding: 48px 20px; color: #6b7280; }
.shop-empty-icon {
    width: 64px; height: 64px; margin: 0 auto 12px;
    background: #ecfdf5; color: #047857;
    border-radius: 20px; display: flex; align-items: center; justify-content: center;
}
.shop-empty h3 { color: #111827; margin: 0 0 4px; font-size: 1.1rem; }
.shop-empty p { margin: 0 0 14px; font-size: .88rem; }

.shop-order-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.shop-order {
    padding: 14px; border-radius: 14px; background: #fff;
    border: 1px solid #e5e7eb; border-left: 4px solid #9ca3af;
    transition: box-shadow .15s;
}
.shop-order:hover { box-shadow: 0 4px 14px -4px rgba(0,0,0,.08); }
.shop-order.st-0 { border-left-color: #f59e0b; }
.shop-order.st-1 { border-left-color: #0ea5e9; }
.shop-order.st-2 { border-left-color: #8b5cf6; }
.shop-order.st-3 { border-left-color: #6366f1; }
.shop-order.st-4 { border-left-color: #10b981; }
.shop-order.st-5 { border-left-color: #ef4444; }
.shop-order-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.shop-order-badge {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; padding: 3px 8px; border-radius: 6px;
    background: #f3f4f6; color: #4b5563;
}
.shop-order.st-0 .shop-order-badge { background: #fef3c7; color: #b45309; }
.shop-order.st-1 .shop-order-badge,
.shop-order.st-2 .shop-order-badge,
.shop-order.st-3 .shop-order-badge { background: #dbeafe; color: #1e40af; }
.shop-order.st-4 .shop-order-badge { background: #d1fae5; color: #047857; }
.shop-order.st-5 .shop-order-badge { background: #fee2e2; color: #b91c1c; }
.shop-order-mode {
    font-size: .72rem; color: #6b7280; padding: 3px 8px;
    background: #f9fafb; border-radius: 6px;
}
.shop-order-title { font-weight: 600; color: #111827; margin-bottom: 6px; font-size: .95rem; }
.shop-order-meta {
    display: flex; gap: 10px; font-size: .78rem; color: #6b7280;
    margin-bottom: 8px; flex-wrap: wrap;
}
.shop-order-meta span { display: inline-flex; align-items: center; gap: 4px; }
.shop-order-amount {
    font-size: 1.25rem; font-weight: 700; color: #047857; margin: 4px 0 8px;
}
.shop-order-addr {
    font-size: .76rem; color: #6b7280; margin-bottom: 3px;
    display: inline-flex; gap: 5px; align-items: center;
}
.shop-order-actions {
    display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap;
}
.shop-order-track {
    margin-top: 6px; padding: 6px 10px;
    font-size: .76rem; color: #0c4a6e;
    background: #e0f2fe; border: 1px solid #bae6fd;
    border-radius: 8px;
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.shop-order-track strong { color: #0369a1; }
.shop-order-track a {
    margin-left: auto; color: #0369a1; font-weight: 600; text-decoration: underline;
}
.shop-prod-return {
    margin-top: 6px; font-size: .72rem; font-weight: 600;
    display: inline-flex; gap: 4px; align-items: center;
}
.shop-prod-return.ok  { color: #15803d; }
.shop-prod-return.off { color: #b45309; }

.shop-prod-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.shop-prod {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    overflow: hidden; transition: transform .15s, box-shadow .15s;
    display: flex; flex-direction: column;
}
.shop-prod:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -6px rgba(0,0,0,.1); }
.shop-prod.disabled { opacity: .6; }
.shop-prod-media {
    position: relative; height: 120px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    display: flex; align-items: center; justify-content: center; color: #047857;
}
.shop-prod-cat {
    position: absolute; top: 10px; left: 10px;
    background: #fff; color: #047857; padding: 3px 9px;
    border-radius: 999px; font-size: .7rem; font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.shop-prod-cat.cat-pest { color: #b45309; }
.shop-prod-cat.cat-fert { color: #047857; }
.shop-prod-cat.cat-seed { color: #a16207; }
.shop-prod-body { padding: 12px 14px; flex: 1; }
.shop-prod-title { font-size: .95rem; font-weight: 600; color: #111827; margin: 0 0 6px; line-height: 1.3; }
.shop-prod-price { font-size: 1.15rem; font-weight: 700; color: #047857; }
.shop-prod-unit { font-size: .78rem; color: #9ca3af; font-weight: 500; margin-left: 2px; }
.shop-prod-stock {
    margin-top: 6px; font-size: .78rem; color: #6b7280;
    display: inline-flex; align-items: center; gap: 6px;
}
.shop-prod-stock-dot { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
.shop-prod-stock-dot.on { background: #10b981; }

/* Stock / expiry flags */
.shop-prod-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.shop-flag {
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
    line-height: 1.6;
}
.shop-flag.flag-low      { background: #fef3c7; color: #92400e; }
.shop-flag.flag-out      { background: #fee2e2; color: #b91c1c; }
.shop-flag.flag-expiring { background: #fef3c7; color: #92400e; }
.shop-flag.flag-expired  { background: #fee2e2; color: #b91c1c; }

/* Inline stock stepper */
.shop-prod-stepper { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.shop-stepper-label { font-size: .72rem; font-weight: 600; color: #6b7280; }
.shop-step-btn {
    width: 26px; height: 26px; border: 1px solid #d1d5db; background: #fff;
    border-radius: 8px; font-size: 16px; line-height: 1; color: #374151;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.shop-step-btn:hover:not(:disabled) { background: #f3f4f6; }
.shop-step-btn:disabled { opacity: .4; cursor: default; }
.shop-step-val { min-width: 26px; text-align: center; font-weight: 700; font-size: .85rem; }
.shop-step-save { margin-left: 4px; }
.shop-prod-pack {
    display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 6px;
}
.shop-prod-pack-size {
    display: inline-flex; align-items: center; font-size: 11px; font-weight: 700;
    padding: 3px 8px; border-radius: 999px; background: #eef2ff; color: #4338ca;
}
.shop-prod-pack-comp {
    font-size: 11px; font-weight: 500; color: #6b7280;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shop-prod-meta {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.shop-prod-scope {
    display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px;
    font-weight: 700; letter-spacing: 0.02em; padding: 3px 8px; border-radius: 999px;
    border: 1px solid transparent;
}
.shop-prod-scope.scope-all   { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.shop-prod-scope.scope-state { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.shop-prod-scope.scope-dist  { background: #ffe4e6; color: #9f1239; border-color: #fecdd3; }
.shop-prod-dose {
    display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 600;
    padding: 3px 8px; border-radius: 999px; background: #f3f4f6; color: #374151;
    max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shop-prod-actions {
    display: flex; gap: 6px; padding: 10px 14px; border-top: 1px solid #f3f4f6;
}
.shop-prod-actions .btn { flex: 1; }

/* Shop — Add Product page */
.shop-addp-topbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.shop-addp-progress { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shop-addp-step {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px;
    background: #f3f4f6; color: #9ca3af; font-size: .8rem; font-weight: 600;
    transition: all .2s;
}
.shop-addp-step span {
    width: 20px; height: 20px; border-radius: 50%;
    background: #e5e7eb; color: #6b7280;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem;
}
.shop-addp-step.active { background: #d1fae5; color: #065f46; }
.shop-addp-step.active span { background: #10b981; color: #fff; }
.shop-addp-step.done { background: #065f46; color: #fff; }
.shop-addp-step.done span { background: rgba(255,255,255,.25); color: #fff; }
.shop-addp-line { width: 20px; height: 2px; background: #e5e7eb; }
.shop-addp-line.done { background: #10b981; }

.shop-addp-grid {
    display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px;
}
@media (max-width: 980px) { .shop-addp-grid { grid-template-columns: 1fr; } }

.shop-addp-form { display: flex; flex-direction: column; gap: 16px; }
.shop-addp-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 18px;
    padding: 22px;
}
.shop-addp-card-head {
    display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px;
    padding-bottom: 14px; border-bottom: 1px dashed #e5e7eb;
}
.shop-addp-badge {
    width: 34px; height: 34px; flex-shrink: 0;
    background: linear-gradient(135deg, #10b981, #047857); color: #fff;
    border-radius: 10px; display: inline-flex; align-items: center;
    justify-content: center; font-size: .78rem; font-weight: 700;
    letter-spacing: .5px;
    box-shadow: 0 4px 10px -2px rgba(4,120,87,.4);
}
.shop-addp-card-head h3 { margin: 0 0 2px; font-size: 1.05rem; color: #111827; font-weight: 700; }
.shop-addp-card-head p { margin: 0; font-size: .82rem; color: #6b7280; }

.shop-cat-picker {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
.shop-cat-tile {
    position: relative; text-align: left; padding: 18px;
    background: #fff; border: 2px solid #e5e7eb; border-radius: 14px;
    cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.shop-cat-tile:hover { transform: translateY(-2px); border-color: #10b981; }
.shop-cat-tile.active {
    border-color: #10b981; background: #ecfdf5;
    box-shadow: 0 6px 18px -6px rgba(16,185,129,.4);
}
.shop-cat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; margin-bottom: 10px;
    background: linear-gradient(135deg, #10b981, #047857);
}
.shop-cat-tile.cat-pest .shop-cat-icon { background: linear-gradient(135deg, #f59e0b, #b45309); }
.shop-cat-tile.cat-seed .shop-cat-icon { background: linear-gradient(135deg, #eab308, #a16207); }
.shop-cat-name { font-weight: 700; color: #111827; font-size: .98rem; }
.shop-cat-desc { font-size: .78rem; color: #6b7280; margin-top: 2px; }
.shop-cat-check {
    position: absolute; top: 12px; right: 12px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #10b981; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}

.shop-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.shop-field label {
    font-size: .82rem; font-weight: 600; color: #374151;
    display: inline-flex; gap: 3px; align-items: center;
}
.shop-field .req { color: #ef4444; }
.shop-input {
    padding: 11px 14px; border: 1.5px solid #e5e7eb;
    border-radius: 10px; font-size: .92rem; font-family: inherit;
    color: #111827; background: #fff;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}
.shop-input:focus {
    outline: none; border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,.15);
}
.shop-help {
    display: flex; justify-content: space-between;
    font-size: .74rem; color: #9ca3af;
}
.shop-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shop-row-3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
@media (max-width: 680px) {
    .shop-row-2, .shop-row-3 { grid-template-columns: 1fr; }
}
.shop-input-prefix {
    display: flex; align-items: center;
    border: 1.5px solid #e5e7eb; border-radius: 10px; overflow: hidden;
    background: #fff; transition: border-color .15s, box-shadow .15s;
}
.shop-input-prefix:focus-within {
    border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.15);
}
.shop-input-prefix span {
    padding: 0 12px; font-weight: 600; color: #6b7280;
    background: #f9fafb; align-self: stretch;
    display: flex; align-items: center;
}
.shop-input-prefix .shop-input {
    border: none; border-radius: 0; box-shadow: none !important;
}

.shop-stepper {
    display: flex; align-items: center;
    border: 1.5px solid #e5e7eb; border-radius: 10px; overflow: hidden;
    background: #fff;
}
.shop-stepper input {
    flex: 1; border: none; text-align: center; padding: 10px 4px;
    font-size: .95rem; font-weight: 600; width: 100%;
}
.shop-stepper input:focus { outline: none; }
.shop-stepper button {
    padding: 10px 14px; background: #f3f4f6; border: none;
    font-size: 1.1rem; font-weight: 700; color: #374151; cursor: pointer;
    transition: background .15s;
}
.shop-stepper button:hover { background: #e5e7eb; color: #047857; }

/* Multi-select chip list (used for States / Districts) */
.shop-chips {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.shop-chips .shop-chip {
    cursor: default; background: #ecfdf5; color: #065f46;
    border: 1px solid #a7f3d0; padding: 5px 6px 5px 12px;
    font-size: .82rem; font-weight: 500;
}
.shop-chips .shop-chip:hover { background: #ecfdf5; }
.shop-chip-x {
    border: none; background: transparent; color: #065f46;
    font-size: 1.05rem; line-height: 1; padding: 0 6px;
    cursor: pointer; font-weight: 700;
}
.shop-chip-x:hover { color: #b91c1c; }
.shop-chip-input {
    display: flex; gap: 8px; align-items: stretch;
}
.shop-chip-input .shop-input { flex: 1; }
.shop-chip-input .btn { white-space: nowrap; }

.shop-addp-actions {
    display: flex; justify-content: space-between; gap: 10px;
    margin-top: 8px;
}

.shop-addp-preview {
    position: sticky; top: 16px; align-self: start;
    display: flex; flex-direction: column; gap: 14px;
}
.shop-addp-preview-label {
    font-size: .72rem; font-weight: 700; color: #047857;
    text-transform: uppercase; letter-spacing: .8px;
}
.shop-addp-preview-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px -8px rgba(0,0,0,.08);
}
.shop-addp-preview-media {
    position: relative; height: 160px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    display: flex; align-items: center; justify-content: center; color: #047857;
}
.shop-addp-preview-media.cat-pest { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #b45309; }
.shop-addp-preview-media.cat-seed { background: linear-gradient(135deg, #fef9c3, #fde047); color: #a16207; }
.shop-addp-preview-cat {
    position: absolute; top: 12px; left: 12px;
    background: #fff; padding: 4px 10px; border-radius: 999px;
    font-size: .72rem; font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.shop-addp-preview-body { padding: 16px; }
.shop-addp-preview-body h3 {
    font-size: 1.05rem; color: #111827; margin: 0 0 6px; line-height: 1.35;
}
.shop-addp-preview-body p {
    font-size: .82rem; color: #6b7280; margin: 0 0 12px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.shop-addp-preview-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 10px; border-top: 1px dashed #e5e7eb;
}
.shop-addp-preview-price { font-size: 1.15rem; font-weight: 700; color: #047857; }
.shop-addp-preview-price span { font-size: .78rem; color: #9ca3af; font-weight: 500; }
.shop-addp-preview-price .muted { color: #d1d5db; }
.shop-addp-preview-stock {
    font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.shop-addp-preview-stock.on { background: #d1fae5; color: #047857; }
.shop-addp-preview-stock.off { background: #fee2e2; color: #b91c1c; }
.shop-addp-preview-loc {
    margin-top: 10px; font-size: .78rem; color: #6b7280;
    display: inline-flex; gap: 5px; align-items: center;
}

.shop-addp-tips {
    display: flex; flex-direction: column; gap: 8px;
    padding: 14px; background: #f0fdf4; border-radius: 12px;
    border: 1px solid #bbf7d0;
}
.shop-addp-tip {
    display: flex; gap: 8px; align-items: flex-start;
    font-size: .8rem; color: #065f46;
}

/* Shop — additional category themes (PGRs, Other Products) */
.shop-prod-cat.cat-pgr { color: #6d28d9; }
.shop-prod-cat.cat-other { color: #0369a1; }
.shop-cat-tile.cat-pgr .shop-cat-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.shop-cat-tile.cat-other .shop-cat-icon { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.shop-addp-preview-media.cat-pgr { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #6d28d9; }
.shop-addp-preview-media.cat-other { background: linear-gradient(135deg, #e0f2fe, #bae6fd); color: #0369a1; }

/* Shop — product image on inventory card */
.shop-prod-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.shop-prod-placeholder {
    display: flex; align-items: center; justify-content: center;
}

/* Shop — Add Product image uploader */
.shop-img-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px; margin-top: 10px;
}
.shop-img-tile {
    position: relative; aspect-ratio: 1;
    border-radius: 10px; overflow: hidden;
    border: 1.5px solid #e5e7eb; background: #f9fafb;
}
.shop-img-tile img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.shop-img-remove {
    position: absolute; top: 4px; right: 4px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #ef4444; color: #fff; border: none;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1rem; line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.shop-img-remove:hover { background: #dc2626; }

/* Shop — Add Product, toxicity classification picker */
.shop-tox-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px; margin-top: 6px;
}
.shop-tox-tile {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 12px;
    border: 1.5px solid #e5e7eb; background: #fff;
    cursor: pointer; text-align: left; transition: all .15s ease;
}
.shop-tox-tile:hover { border-color: #94a3b8; background: #f8fafc; }
.shop-tox-tile.active {
    border-color: #16a34a; background: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.shop-tox-symbol {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
}
.shop-tox-meta { display: flex; flex-direction: column; line-height: 1.25; }
.shop-tox-meta strong { font-size: .9rem; color: #111827; }
.shop-tox-meta span { font-size: .78rem; color: #6b7280; }

/* Shop — Add Product, leaflet PDF tile */
.shop-leaflet-tile {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 10px;
    border: 1.5px solid #e5e7eb; background: #f9fafb;
    margin-top: 8px; position: relative;
}
.shop-leaflet-tile a { color: #0369a1; font-weight: 500; text-decoration: none; }
.shop-leaflet-tile a:hover { text-decoration: underline; }
.shop-leaflet-tile .shop-img-remove { position: static; margin-left: 4px; }

/* ============================================
   Phase 6 — Equipment Rental theme (teal/orange)
   ============================================ */

.eq-hero {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 50%, #f97316 100%);
    border-radius: 18px;
    padding: 28px 32px;
    color: #fff;
    box-shadow: 0 12px 30px rgba(15, 118, 110, 0.25);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.eq-hero::after {
    content: "";
    position: absolute; right: -60px; top: -60px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
}
.eq-hero-inner {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    position: relative; z-index: 1;
}
.eq-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
    background: rgba(255,255,255,0.18); padding: 4px 10px; border-radius: 999px;
    margin-bottom: 10px;
}
.eq-hero-title { font-size: 1.8rem; font-weight: 700; margin: 4px 0; }
.eq-hero-sub { opacity: 0.92; margin: 0; }
.eq-hero-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.eq-hero-cta .btn { background: rgba(255,255,255,0.95); color: #0f766e; border: none; }
.eq-hero-cta .btn.btn-primary { background: #f97316; color: #fff; }
.eq-hero-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    margin-top: 20px; position: relative; z-index: 1;
}
.eq-hero-stat {
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(6px);
    border-radius: 12px; padding: 12px 14px;
}
.eq-hero-stat strong { display: block; font-size: 1.4rem; font-weight: 700; }
.eq-hero-stat span { opacity: 0.85; font-size: 0.8rem; }

/* filters */
.eq-filters {
    display: flex; flex-wrap: wrap; gap: 12px;
    align-items: center; margin-bottom: 18px;
}
.eq-cat-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.eq-cat-pill {
    border: 1px solid var(--gray-200, #e5e7eb);
    background: #fff; color: var(--gray-700, #374151);
    padding: 8px 14px; border-radius: 999px; font-size: 0.85rem;
    display: inline-flex; align-items: center; gap: 6px;
    cursor: pointer; transition: all 0.15s;
}
.eq-cat-pill:hover { border-color: #14b8a6; color: #0f766e; }
.eq-cat-pill.active { background: #0f766e; color: #fff; border-color: #0f766e; }
.eq-cat-pill.mach.active { background: #2563eb; border-color: #2563eb; }
.eq-cat-pill.anim.active { background: #d97706; border-color: #d97706; }
.eq-cat-pill.land.active { background: #16a34a; border-color: #16a34a; }

/* listing grid */
.eq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.eq-card {
    background: #fff; border-radius: 14px; overflow: hidden;
    border: 1px solid var(--gray-100, #f3f4f6);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    cursor: pointer; transition: all 0.18s;
    display: flex; flex-direction: column;
}
.eq-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.eq-card-media {
    height: 130px; display: flex; align-items: center; justify-content: center;
    color: #fff; position: relative;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}
.eq-card.cat-mach .eq-card-media { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.eq-card.cat-anim .eq-card-media { background: linear-gradient(135deg, #b45309, #f59e0b); }
.eq-card.cat-land .eq-card-media { background: linear-gradient(135deg, #166534, #22c55e); }
.eq-card-cat {
    position: absolute; bottom: 8px; left: 10px;
    background: rgba(0,0,0,0.25); padding: 3px 9px; border-radius: 999px;
    font-size: 0.72rem; letter-spacing: 0.03em;
}
.eq-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.eq-card-body h3 { font-size: 1rem; font-weight: 600; margin: 0; color: var(--gray-900, #111); }
.eq-card-body p { font-size: 0.85rem; color: var(--gray-600, #4b5563); margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eq-card-foot {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: auto; padding-top: 8px;
}
.eq-card-rate span { font-size: 1.15rem; font-weight: 700; color: #0f766e; }
.eq-card-rate small { color: var(--gray-500, #6b7280); margin-left: 2px; }
.eq-card-loc {
    display: inline-flex; gap: 4px; align-items: center;
    color: var(--gray-500, #6b7280); font-size: 0.78rem;
}

/* detail page */
.eq-detail-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.eq-cat-badge {
    background: #0f766e; color: #fff; padding: 5px 12px;
    border-radius: 999px; font-size: 0.78rem; font-weight: 600;
}
.eq-cat-badge.cat-mach { background: #2563eb; }
.eq-cat-badge.cat-anim { background: #d97706; }
.eq-cat-badge.cat-land { background: #16a34a; }
.eq-detail-grid {
    display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px;
}
@media (max-width: 900px) { .eq-detail-grid { grid-template-columns: 1fr; } }
.eq-panel {
    background: #fff; border-radius: 14px;
    border: 1px solid var(--gray-100, #f3f4f6);
    margin-bottom: 16px; overflow: hidden;
}
.eq-panel-hero {
    height: 200px; display: flex; align-items: center; justify-content: center;
    color: #fff; background: linear-gradient(135deg, #0f766e, #14b8a6);
}
.eq-panel-hero.cat-mach { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.eq-panel-hero.cat-anim { background: linear-gradient(135deg, #b45309, #f59e0b); }
.eq-panel-hero.cat-land { background: linear-gradient(135deg, #166534, #22c55e); }
.eq-panel-body { padding: 18px 22px; }
.eq-panel-body h1 { font-size: 1.5rem; margin: 0 0 6px; color: var(--gray-900, #111); }
.eq-panel-body .muted { color: var(--gray-500, #6b7280); margin: 0 0 10px; font-size: 0.88rem; }
.eq-desc { color: var(--gray-700, #374151); line-height: 1.55; }
.eq-panel-title {
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--gray-600, #4b5563); padding: 14px 22px 8px; margin: 0;
    border-bottom: 1px solid var(--gray-100, #f3f4f6);
}
.eq-spec-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px; padding: 16px 22px;
}
.eq-spec-grid > div {
    display: flex; flex-direction: column; gap: 2px;
    background: var(--gray-50, #f9fafb); padding: 10px 12px;
    border-radius: 10px;
}
.eq-spec-grid > div span { font-size: 0.72rem; text-transform: uppercase; color: var(--gray-500, #6b7280); }
.eq-spec-grid > div strong { color: var(--gray-900, #111); font-size: 0.92rem; }
.eq-busy-list { padding: 12px 22px 16px; display: flex; flex-direction: column; gap: 6px; }
.eq-busy-row {
    display: flex; justify-content: space-between;
    padding: 8px 12px; border-radius: 8px;
    background: #fff7ed; border: 1px solid #fed7aa; font-size: 0.85rem;
}
.eq-busy-row.approved { background: #ecfeff; border-color: #a5f3fc; }
.eq-busy-row.active { background: #f0fdf4; border-color: #bbf7d0; }
.eq-busy-row em { font-style: normal; font-weight: 600; }

/* booking card (sticky right) */
.eq-book-card {
    position: sticky; top: 80px;
    background: #fff; border-radius: 14px; padding: 20px;
    border: 1px solid var(--gray-100, #f3f4f6);
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    height: fit-content;
}
.eq-book-rate { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-100); }
.eq-book-rate span { font-size: 1.7rem; font-weight: 700; color: #0f766e; }
.eq-book-rate small { color: var(--gray-500); margin-left: 4px; }
.eq-book-form { display: flex; flex-direction: column; gap: 12px; }
.eq-book-field { display: flex; flex-direction: column; gap: 4px; }
.eq-book-field label { font-size: 0.78rem; color: var(--gray-700, #374151); font-weight: 600; }
.eq-book-field input, .eq-book-field textarea, .eq-book-field select {
    width: 100%; padding: 9px 12px; border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 8px; font-size: 0.92rem; background: #fff;
}
.eq-book-field input:focus, .eq-book-field textarea:focus {
    outline: none; border-color: #14b8a6; box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
}
.eq-book-summary {
    background: var(--gray-50, #f9fafb); border-radius: 10px;
    padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.eq-book-summary > div { display: flex; justify-content: space-between; font-size: 0.88rem; }
.eq-book-summary > div span { color: var(--gray-600); }
.eq-book-summary > div.total {
    border-top: 1px dashed var(--gray-200); padding-top: 6px; margin-top: 4px;
}
.eq-book-summary > div.total strong { color: #0f766e; font-size: 1.05rem; }
.eq-book-card .small { font-size: 0.78rem; }
.eq-book-card .muted { color: var(--gray-500, #6b7280); }

/* page head */
.eq-page-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.eq-page-head h1 { font-size: 1.5rem; margin: 0 0 4px; color: var(--gray-900); }
.eq-page-head .muted { color: var(--gray-500); margin: 0; }

/* tabs */
.eq-tabs {
    display: flex; gap: 6px; flex-wrap: wrap;
    border-bottom: 1px solid var(--gray-200, #e5e7eb);
    margin-bottom: 16px;
}
.eq-tab {
    background: none; border: none;
    padding: 10px 16px; cursor: pointer; font-size: 0.9rem;
    color: var(--gray-600, #4b5563); display: inline-flex; gap: 6px; align-items: center;
    border-bottom: 2px solid transparent;
}
.eq-tab span {
    background: var(--gray-100, #f3f4f6); padding: 1px 8px;
    border-radius: 999px; font-size: 0.74rem;
}
.eq-tab:hover { color: #0f766e; }
.eq-tab.active {
    color: #0f766e; border-bottom-color: #0f766e; font-weight: 600;
}
.eq-tab.active span { background: #ccfbf1; color: #0f766e; }

/* booking row (rentals + inbox) */
.eq-book-list { display: flex; flex-direction: column; gap: 10px; }
.eq-book-row {
    background: #fff; border-radius: 12px;
    border: 1px solid var(--gray-100, #f3f4f6);
    padding: 14px 16px;
    display: grid; grid-template-columns: 1.7fr auto auto; gap: 14px;
    align-items: center;
    border-left: 4px solid #94a3b8;
}
.eq-book-row.st-0 { border-left-color: #f59e0b; }
.eq-book-row.st-1 { border-left-color: #14b8a6; }
.eq-book-row.st-2 { border-left-color: #ef4444; opacity: 0.85; }
.eq-book-row.st-3 { border-left-color: #2563eb; }
.eq-book-row.st-4 { border-left-color: #16a34a; }
.eq-book-row.st-5 { border-left-color: #6b7280; opacity: 0.7; }
@media (max-width: 800px) {
    .eq-book-row { grid-template-columns: 1fr; }
}
.eq-book-row-main { display: flex; gap: 12px; align-items: flex-start; }
.eq-book-row-cat {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; flex-shrink: 0;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}
.eq-book-row-cat.cat-mach { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.eq-book-row-cat.cat-anim { background: linear-gradient(135deg, #b45309, #f59e0b); }
.eq-book-row-cat.cat-land { background: linear-gradient(135deg, #166534, #22c55e); }
.eq-book-row-info h4 { margin: 0 0 4px; font-size: 0.98rem; color: var(--gray-900); }
.eq-book-row-info .muted { color: var(--gray-500, #6b7280); }
.eq-book-row-info .small { font-size: 0.82rem; }
.eq-book-note {
    margin-top: 6px; padding: 6px 10px; border-radius: 8px;
    background: var(--gray-50, #f9fafb); font-size: 0.82rem;
    color: var(--gray-700, #374151);
}
.eq-book-note.rejected { background: #fef2f2; color: #b91c1c; }
.eq-book-note.approved { background: #ecfdf5; color: #047857; }
.eq-book-note.loc { background: #eff6ff; color: #1d4ed8; }
.eq-book-row-pay {
    text-align: right; display: flex; flex-direction: column; gap: 3px;
    min-width: 140px;
}
.eq-book-row-pay .amount { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); }
.eq-book-row-pay .paid { font-size: 0.78rem; color: var(--gray-500); }
.pay-pill {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 600;
    background: var(--gray-100); color: var(--gray-700);
    align-self: flex-end;
}
.pay-pill.ps-0 { background: #fee2e2; color: #b91c1c; }
.pay-pill.ps-1 { background: #fef3c7; color: #92400e; }
.pay-pill.ps-2 { background: #d1fae5; color: #047857; }
.pay-pill.ps-3 { background: #e0e7ff; color: #4338ca; }
.eq-book-row-actions {
    display: flex; flex-direction: column; gap: 6px; align-items: stretch;
    min-width: 150px;
}
.status-pill {
    padding: 3px 10px; border-radius: 999px;
    font-size: 0.74rem; font-weight: 600;
    text-align: center;
    background: var(--gray-100); color: var(--gray-700);
}
.status-pill.st-0 { background: #fef3c7; color: #92400e; }
.status-pill.st-1 { background: #ccfbf1; color: #0f766e; }
.status-pill.st-2 { background: #fee2e2; color: #b91c1c; }
.status-pill.st-3 { background: #dbeafe; color: #1e40af; }
.status-pill.st-4 { background: #d1fae5; color: #047857; }
.status-pill.st-5 { background: #e5e7eb; color: #4b5563; }
.btn-outline {
    background: #fff; border: 1px solid var(--gray-300, #d1d5db);
    color: var(--gray-700, #374151);
}
.btn-outline:hover { background: var(--gray-50, #f9fafb); border-color: var(--gray-400, #9ca3af); }

/* ============================================================
   FIELD MARKETING PANEL — Phase 8
   ============================================================ */

/* ── Shell & Layout ── */
.fl-shell { display: flex; min-height: 100vh; background: #f8fafc; }

.fl-sidebar {
    width: 260px; background: linear-gradient(195deg, #1a2332 0%, #0f1724 100%);
    color: #fff; display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; height: 100vh; z-index: 900;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), width 0.25s ease;
    border-right: 1px solid rgba(255,255,255,.06);
}
.fl-sidebar.is-collapsed { width: 68px; }
.fl-sidebar.is-collapsed .fl-brand-text,
.fl-sidebar.is-collapsed .fl-label,
.fl-sidebar.is-collapsed .fl-nav-section span,
.fl-sidebar.is-collapsed .fl-user-meta { display: none; }
.fl-sidebar.is-collapsed .fl-nav-item { justify-content: center; padding: 10px 0; }
.fl-sidebar.is-collapsed .fl-ico { margin: 0; }
.fl-sidebar.is-collapsed .fl-user-card { justify-content: center; padding: 12px 8px; }

.fl-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.fl-brand-logo { color: var(--orange-400); flex-shrink: 0; }
.fl-brand-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.5px; }
.fl-brand-name span { color: var(--orange-400); }
.fl-brand-sub { font-size: 0.7rem; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: 1px; }
.fl-brand-text { display: flex; flex-direction: column; gap: 2px; }

.fl-nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.fl-nav-section { padding: 16px 20px 6px; }
.fl-nav-section span { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.35); font-weight: 600; }

.fl-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 20px; color: rgba(255,255,255,.65);
    text-decoration: none; font-size: 0.88rem; font-weight: 500;
    transition: all 0.2s ease; border-left: 3px solid transparent;
    margin: 1px 0;
}
.fl-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.fl-nav-item.active {
    background: rgba(255,143,0,.12); color: var(--orange-400);
    border-left-color: var(--orange-400);
}
.fl-ico { flex-shrink: 0; display: flex; align-items: center; }

.fl-user-card {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08);
    margin-top: auto;
}
.fl-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--orange-500), var(--orange-700));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: #fff; flex-shrink: 0;
}
.fl-avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; text-decoration: none; }
.fl-user-name { font-size: 0.85rem; font-weight: 600; }
.fl-user-role { font-size: 0.7rem; color: rgba(255,255,255,.4); }
.fl-user-meta { min-width: 0; }
.fl-logout {
    margin-left: auto; background: none; border: none; color: rgba(255,255,255,.4);
    cursor: pointer; padding: 6px; border-radius: 6px; transition: all 0.2s;
}
.fl-logout:hover { color: #fff; background: rgba(255,255,255,.1); }

.fl-sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 899; opacity: 0; transition: opacity 0.3s;
}
.fl-sidebar-backdrop.is-open { display: block; opacity: 1; }

.fl-main {
    margin-left: 260px; flex: 1; display: flex; flex-direction: column; min-height: 100vh;
    transition: margin-left 0.25s ease;
}
.fl-main.is-collapsed { margin-left: 68px; }

/* ── Top Bar ── */
.fl-topbar {
    height: 60px; background: #fff; border-bottom: 1px solid #e8ecf1;
    display: flex; align-items: center; gap: 12px; padding: 0 24px;
    position: sticky; top: 0; z-index: 800;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.fl-menu-btn {
    display: none; background: none; border: none; cursor: pointer;
    padding: 6px; border-radius: 8px; color: var(--gray-600);
}
.fl-menu-btn:hover { background: var(--gray-100); }
.fl-collapse-desktop {
    background: none; border: none; cursor: pointer; padding: 6px;
    border-radius: 8px; color: var(--gray-500); transition: all 0.2s;
}
.fl-collapse-desktop:hover { background: var(--gray-100); color: var(--gray-700); }

.fl-topbar-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.fl-breadcrumb-root { color: var(--gray-500); }
.fl-breadcrumb-sep { color: var(--gray-300); }
.fl-breadcrumb-page { color: var(--gray-800); font-weight: 600; }
.fl-topbar-spacer { flex: 1; }

.fl-topbar-actions { display: flex; align-items: center; gap: 8px; }
.fl-quick-action {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 14px; background: var(--orange-600); color: #fff;
    border-radius: 8px; font-size: 0.8rem; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
}
.fl-quick-action:hover { background: var(--orange-700); transform: translateY(-1px); }
.fl-icon-btn {
    padding: 8px; border-radius: 8px; color: var(--gray-500);
    text-decoration: none; transition: all 0.2s;
}
.fl-icon-btn:hover { background: var(--gray-100); color: var(--gray-700); }

/* ── Content & Footer ── */
.fl-content { flex: 1; padding: 24px; }
.fl-footer {
    padding: 16px 24px; text-align: center;
    font-size: 0.75rem; color: var(--gray-400);
    border-top: 1px solid #e8ecf1;
}

/* ── Page Styles ── */
.fl-page { max-width: 1200px; margin: 0 auto; }

.fl-page-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.fl-page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin: 0; }
.fl-page-header p { font-size: 0.88rem; color: var(--gray-500); margin: 4px 0 0; }

/* ── Hero Section ── */
.fl-hero {
    background: linear-gradient(135deg, #1a2332 0%, #0f1724 60%, var(--orange-800) 100%);
    border-radius: 16px; padding: 32px; color: #fff;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; overflow: hidden; position: relative;
}
.fl-hero::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,143,0,.15) 0%, transparent 70%);
}
.fl-hero-content { position: relative; z-index: 1; }
.fl-hero-badge {
    display: inline-block; padding: 4px 12px; background: rgba(255,143,0,.2);
    border: 1px solid rgba(255,143,0,.3); border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; color: var(--orange-400);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.fl-hero-title { font-size: 1.75rem; font-weight: 700; margin: 0 0 6px; }
.fl-hero-title span { color: var(--orange-400); }
.fl-hero-sub { font-size: 0.9rem; color: rgba(255,255,255,.6); margin: 0 0 20px; }
.fl-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fl-hero-visual { position: relative; z-index: 1; }
.fl-hero-circle {
    width: 140px; height: 140px; border-radius: 50%;
    background: rgba(255,255,255,.08); border: 2px solid rgba(255,143,0,.3);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.fl-hero-stat-big { font-size: 2.2rem; font-weight: 800; color: var(--orange-400); line-height: 1; }
.fl-hero-stat-label { font-size: 0.7rem; color: rgba(255,255,255,.5); margin-top: 4px; text-align: center; }

/* ── Buttons ── */
.fl-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 18px; border: none; border-radius: 8px;
    font-size: 0.88rem; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: all 0.2s; font-family: inherit;
}
.fl-btn-primary { background: var(--orange-600); color: #fff; }
.fl-btn-primary:hover { background: var(--orange-700); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(230,81,0,.3); }
.fl-btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); }
.fl-btn-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }
.fl-btn-ghost { background: transparent; color: var(--gray-600); border: 1px solid var(--gray-300); }
.fl-btn-ghost:hover { background: var(--gray-50); }
.fl-btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.fl-btn-lg { padding: 12px 24px; font-size: 0.95rem; }

/* ── KPI Strip ── */
.fl-kpi-strip {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.fl-kpi {
    background: #fff; border-radius: 12px; padding: 20px;
    display: flex; align-items: flex-start; gap: 14px;
    border: 1px solid #e8ecf1; transition: all 0.2s;
    position: relative; overflow: hidden;
}
.fl-kpi::before {
    content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
    background: var(--kpi-accent, var(--orange-600));
}
.fl-kpi:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); transform: translateY(-2px); }
.fl-kpi-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: color-mix(in srgb, var(--kpi-accent) 10%, transparent);
    color: var(--kpi-accent); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.fl-kpi-data { flex: 1; min-width: 0; }
.fl-kpi-value { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); line-height: 1.1; }
.fl-kpi-label { font-size: 0.78rem; color: var(--gray-500); margin-top: 2px; }
.fl-kpi-trend { font-size: 0.72rem; color: var(--gray-400); margin-top: 8px; }
.fl-kpi-trend.up { color: var(--green-600); }

/* ── Panels ── */
.fl-panel {
    background: #fff; border-radius: 12px; border: 1px solid #e8ecf1;
    padding: 20px; transition: box-shadow 0.2s;
}
.fl-panel:hover { box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.fl-panel-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f1f3f5;
}
.fl-panel-head h3 { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin: 0; }
.fl-panel-sub { font-size: 0.78rem; color: var(--gray-400); }
.fl-panel-link { font-size: 0.82rem; color: var(--orange-600); text-decoration: none; font-weight: 600; }
.fl-panel-link:hover { color: var(--orange-700); }

.fl-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }

/* ── Bar Chart ── */
.fl-chart-bars {
    display: flex; align-items: flex-end; gap: 16px; height: 160px;
    padding: 0 8px; margin-bottom: 12px;
}
.fl-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.fl-bar-stack { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; max-width: 36px; margin: 0 auto; }
.fl-bar {
    border-radius: 4px 4px 0 0; min-height: 4px; transition: height 0.4s ease;
}
.fl-bar-visits { background: var(--green-500); }
.fl-bar-onboard { background: var(--orange-500); }
.fl-bar-label { font-size: 0.7rem; color: var(--gray-500); text-align: center; white-space: nowrap; }
.fl-chart-legend { display: flex; gap: 16px; justify-content: center; }
.fl-legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--gray-500); }
.fl-legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── Breakdown List ── */
.fl-breakdown-list { display: flex; flex-direction: column; gap: 14px; }
.fl-breakdown-row { display: flex; flex-direction: column; gap: 6px; }
.fl-breakdown-info { display: flex; justify-content: space-between; }
.fl-breakdown-type { font-size: 0.85rem; color: var(--gray-700); font-weight: 500; }
.fl-breakdown-count { font-size: 0.85rem; font-weight: 700; color: var(--gray-800); }
.fl-progress-track { height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.fl-progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* ── Quick Actions Grid ── */
.fl-quick-actions-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.fl-action-card {
    background: #fff; border: 1px solid #e8ecf1; border-radius: 12px;
    padding: 24px; text-decoration: none; color: inherit;
    transition: all 0.25s; position: relative; overflow: hidden;
}
.fl-action-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: var(--ac-color, var(--orange-600));
}
.fl-action-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.fl-action-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: color-mix(in srgb, var(--ac-color) 8%, transparent);
    color: var(--ac-color); display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.fl-action-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--gray-800); margin: 0 0 4px; }
.fl-action-card p { font-size: 0.82rem; color: var(--gray-500); margin: 0; }

/* ── Loading / Empty States ── */
.fl-loading { display: flex; flex-direction: column; align-items: center; padding: 60px 20px; gap: 12px; }
.fl-loading-sm { display: flex; justify-content: center; padding: 40px 20px; }
.fl-spinner {
    width: 36px; height: 36px; border: 3px solid var(--gray-200);
    border-top-color: var(--orange-600); border-radius: 50%;
    animation: fl-spin 0.8s linear infinite;
}
.fl-spinner-sm {
    width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%;
    animation: fl-spin 0.7s linear infinite; display: inline-block;
}
@keyframes fl-spin { to { transform: rotate(360deg); } }

.fl-empty { text-align: center; padding: 60px 20px; }
.fl-empty-icon { margin-bottom: 16px; }
.fl-empty h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-700); margin: 0 0 6px; }
.fl-empty p { font-size: 0.88rem; color: var(--gray-500); margin: 0 0 16px; }
.fl-empty-sm { text-align: center; padding: 30px 16px; }
.fl-empty-sm p { font-size: 0.85rem; color: var(--gray-400); }

/* ── Alerts ── */
.fl-alert {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: 10px; margin-bottom: 20px;
    font-size: 0.88rem; font-weight: 500;
}
.fl-alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.fl-alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ── Filters ── */
.fl-filters {
    display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
    padding: 16px; background: #fff; border-radius: 12px; border: 1px solid #e8ecf1;
}
.fl-filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.fl-filter-group label { font-size: 0.72rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; }
.fl-filter-group select,
.fl-filter-group input {
    padding: 8px 10px; border: 1px solid var(--gray-300); border-radius: 8px;
    font-size: 0.85rem; font-family: inherit; background: #fff;
    transition: border-color 0.2s;
}
.fl-filter-group select:focus,
.fl-filter-group input:focus { outline: none; border-color: var(--orange-500); box-shadow: 0 0 0 3px rgba(255,143,0,.1); }

/* ── Visit Cards ── */
.fl-visit-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}
.fl-visit-card {
    background: #fff; border: 1px solid #e8ecf1; border-radius: 12px;
    overflow: hidden; transition: all 0.2s;
}
.fl-visit-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); transform: translateY(-2px); }
.fl-visit-card-top {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-bottom: 1px solid #f1f3f5;
}
.fl-visit-card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.fl-visit-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; background: #f9fafb; border-top: 1px solid #f1f3f5;
}

.fl-visit-type-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
}
.badge-green { background: #ecfdf5; color: #047857; }
.badge-orange { background: #fff7ed; color: #c2410c; }
.badge-purple { background: #f5f3ff; color: #7c3aed; }
.badge-teal { background: #f0fdfa; color: #0f766e; }
.badge-blue { background: #eff6ff; color: #1d4ed8; }
.badge-red { background: #fef2f2; color: #b91c1c; }

.fl-visit-date { font-size: 0.78rem; color: var(--gray-500); }
.fl-visit-person { display: flex; align-items: center; gap: 10px; }
.fl-visit-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--green-400), var(--green-600));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.fl-visit-name { font-weight: 600; font-size: 0.9rem; color: var(--gray-800); }
.fl-visit-phone { font-size: 0.78rem; color: var(--gray-500); }

.fl-visit-location, .fl-visit-gps {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.82rem; color: var(--gray-500);
}
.fl-visit-notes { font-size: 0.82rem; color: var(--gray-600); line-height: 1.5; }

.fl-outcome-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
}
.outcome-success { background: #ecfdf5; color: #047857; }
.outcome-info { background: #eff6ff; color: #1d4ed8; }
.outcome-muted { background: #f3f4f6; color: #6b7280; }
.outcome-warn { background: #fffbeb; color: #b45309; }
.fl-visit-duration { font-size: 0.78rem; color: var(--gray-400); }

/* ── Pagination ── */
.fl-pagination {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    margin-top: 24px; padding: 16px;
}
.fl-page-info { font-size: 0.85rem; color: var(--gray-500); }

/* ── Form Card ── */
.fl-form-card {
    background: #fff; border: 1px solid #e8ecf1; border-radius: 12px;
    padding: 0; overflow: hidden;
}
.fl-form-section { padding: 24px; border-bottom: 1px solid #f1f3f5; }
.fl-form-section:last-of-type { border-bottom: none; }
.fl-form-section-head {
    display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.fl-form-section-head h3 { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin: 0; }

.fl-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fl-field { display: flex; flex-direction: column; gap: 6px; }
.fl-field-full { grid-column: 1 / -1; }
.fl-field label { font-size: 0.82rem; font-weight: 600; color: var(--gray-600); }
.fl-field .required { color: var(--danger); }
.fl-field input, .fl-field select, .fl-field textarea {
    padding: 10px 12px; border: 1px solid var(--gray-300); border-radius: 8px;
    font-size: 0.9rem; font-family: inherit; transition: all 0.2s;
    background: #fff;
}
.fl-field input:focus, .fl-field select:focus, .fl-field textarea:focus {
    outline: none; border-color: var(--orange-500);
    box-shadow: 0 0 0 3px rgba(255,143,0,.1);
}
.fl-field textarea { resize: vertical; min-height: 80px; }

.fl-gps-row { display: flex; gap: 8px; }
.fl-gps-row input { flex: 1; }
.fl-field-gps { grid-column: 1 / -1; }

.fl-form-actions {
    display: flex; gap: 12px; padding: 20px 24px;
    background: #f9fafb; border-top: 1px solid #f1f3f5;
}

/* ── Role Selection Cards ── */
.fl-role-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.fl-role-card {
    background: #fff; border: 2px solid #e8ecf1; border-radius: 14px;
    padding: 24px; text-align: center; cursor: pointer;
    transition: all 0.25s; position: relative;
}
.fl-role-card:hover { border-color: var(--orange-300); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.fl-role-card.selected { border-color: var(--orange-500); background: #fffbf5; box-shadow: 0 0 0 3px rgba(255,143,0,.15); }
.fl-role-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}
.fl-role-card h4 { font-size: 1rem; font-weight: 700; color: var(--gray-800); margin: 0 0 4px; }
.fl-role-card p { font-size: 0.82rem; color: var(--gray-500); margin: 0 0 10px; }
.fl-role-reward {
    display: inline-block; padding: 3px 10px; background: #fef3c7;
    color: #92400e; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
}

/* ── Onboard List ── */
.fl-onboard-list { display: flex; flex-direction: column; gap: 10px; }
.fl-onboard-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; background: #f9fafb; border-radius: 10px;
}
.fl-onboard-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--green-400), var(--green-600));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.fl-onboard-info { flex: 1; min-width: 0; }
.fl-onboard-name { font-weight: 600; font-size: 0.88rem; color: var(--gray-800); }
.fl-onboard-phone { font-size: 0.78rem; color: var(--gray-500); }

/* ── Rewards Table ── */
.fl-reward-summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.fl-reward-card {
    background: #fff; border-radius: 12px; padding: 20px;
    display: flex; align-items: center; gap: 14px; border: 1px solid #e8ecf1;
    position: relative; overflow: hidden;
}
.fl-reward-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
}
.fl-reward-total::before { background: linear-gradient(90deg, var(--orange-500), var(--orange-700)); }
.fl-reward-pending::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.fl-reward-paid::before { background: linear-gradient(90deg, var(--green-500), var(--green-700)); }

.fl-reward-card-icon {
    width: 48px; height: 48px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
}
.fl-reward-total .fl-reward-card-icon { background: #fff7ed; color: var(--orange-600); }
.fl-reward-pending .fl-reward-card-icon { background: #fffbeb; color: #d97706; }
.fl-reward-paid .fl-reward-card-icon { background: #ecfdf5; color: var(--green-600); }
.fl-reward-card-label { font-size: 0.78rem; color: var(--gray-500); }
.fl-reward-card-value { font-size: 1.4rem; font-weight: 800; color: var(--gray-900); }

.fl-rewards-table-wrap { overflow-x: auto; }
.fl-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: #fff; border-radius: 12px; border: 1px solid #e8ecf1;
    overflow: hidden;
}
.fl-table thead { background: #f8fafc; }
.fl-table th {
    padding: 12px 16px; font-size: 0.75rem; font-weight: 700;
    color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px;
    text-align: left; border-bottom: 1px solid #e8ecf1;
}
.fl-table td { padding: 14px 16px; border-bottom: 1px solid #f1f3f5; font-size: 0.88rem; }
.fl-table tbody tr { transition: background 0.15s; }
.fl-table tbody tr:hover { background: #f9fafb; }
.fl-table tbody tr:last-child td { border-bottom: none; }

.fl-td-date { color: var(--gray-500); white-space: nowrap; }
.fl-td-desc { max-width: 300px; color: var(--gray-700); }
.fl-td-amount { font-weight: 700; color: var(--gray-800); white-space: nowrap; }

.fl-reward-type-badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
}
.rtype-referral { background: #eff6ff; color: #1d4ed8; }
.rtype-commission { background: #ecfdf5; color: #047857; }
.rtype-bonus { background: #fef3c7; color: #92400e; }
.rtype-incentive { background: #f5f3ff; color: #7c3aed; }

.fl-status-pill {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #dbeafe; color: #1e40af; }
.status-paid { background: #ecfdf5; color: #047857; }
.status-rejected { background: #fef2f2; color: #b91c1c; }

/* ── Chat ── */
.fl-chat-page .fl-page-header { margin-bottom: 0; }

.fl-chat-container {
    background: #fff; border: 1px solid #e8ecf1; border-radius: 12px;
    display: flex; flex-direction: column; height: calc(100vh - 220px);
    min-height: 400px; overflow: hidden;
}
.fl-chat-messages {
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 16px;
    background: #f8fafc;
}
.fl-chat-empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 100%; gap: 8px; text-align: center;
}
.fl-chat-empty h3 { font-size: 1rem; color: var(--gray-600); margin: 0; }
.fl-chat-empty p { font-size: 0.85rem; color: var(--gray-400); margin: 0; }

.fl-chat-msg { display: flex; gap: 10px; max-width: 75%; }
.fl-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.fl-msg-support { align-self: flex-start; }

.fl-msg-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}
.fl-msg-user .fl-msg-avatar { background: var(--orange-100); color: var(--orange-700); }
.fl-msg-support .fl-msg-avatar { background: var(--green-100); color: var(--green-700); }

.fl-msg-content { display: flex; flex-direction: column; gap: 4px; }
.fl-msg-bubble {
    padding: 10px 14px; border-radius: 14px;
    font-size: 0.88rem; line-height: 1.5;
}
.fl-msg-user .fl-msg-bubble { background: var(--orange-600); color: #fff; border-bottom-right-radius: 4px; }
.fl-msg-support .fl-msg-bubble { background: #fff; color: var(--gray-800); border: 1px solid #e8ecf1; border-bottom-left-radius: 4px; }
.fl-msg-bubble p { margin: 0; }
.fl-msg-time { font-size: 0.7rem; color: var(--gray-400); }
.fl-msg-user .fl-msg-time { text-align: right; }
.fl-msg-attachment {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.8rem; margin-top: 4px; color: inherit; opacity: 0.8;
}

.fl-chat-input-bar {
    display: flex; gap: 10px; padding: 14px 16px;
    border-top: 1px solid #e8ecf1; background: #fff;
}
.fl-chat-input-wrap { flex: 1; }
.fl-chat-input-wrap textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--gray-300);
    border-radius: 10px; font-size: 0.88rem; font-family: inherit;
    resize: none; transition: border-color 0.2s;
}
.fl-chat-input-wrap textarea:focus { outline: none; border-color: var(--orange-500); box-shadow: 0 0 0 3px rgba(255,143,0,.1); }
.fl-chat-send-btn {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--orange-600); color: #fff; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.fl-chat-send-btn:hover:not(:disabled) { background: var(--orange-700); transform: scale(1.05); }
.fl-chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .fl-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .fl-sidebar { transform: translateX(-100%); width: 280px; }
    .fl-sidebar.is-open { transform: translateX(0); }
    .fl-main { margin-left: 0 !important; }
    .fl-menu-btn { display: flex; }
    .fl-collapse-desktop { display: none; }
    .fl-content { padding: 16px; }
    .fl-topbar { padding: 0 16px; }
    .fl-hero { flex-direction: column; text-align: center; padding: 24px 20px; }
    .fl-hero-actions { justify-content: center; }
    .fl-hero-circle { width: 110px; height: 110px; margin-top: 16px; }
    .fl-hero-stat-big { font-size: 1.6rem; }
    .fl-kpi-strip { grid-template-columns: 1fr 1fr; }
    .fl-form-grid { grid-template-columns: 1fr; }
    .fl-gps-row { flex-direction: column; }
    .fl-visit-grid { grid-template-columns: 1fr; }
    .fl-role-cards { grid-template-columns: 1fr; }
    .fl-quick-actions-grid { grid-template-columns: 1fr 1fr; }
    .fl-quick-action span { display: none; }
    .fl-reward-summary { grid-template-columns: 1fr; }
    .fl-chat-msg { max-width: 90%; }
}

@media (max-width: 480px) {
    .fl-kpi-strip { grid-template-columns: 1fr; }
    .fl-quick-actions-grid { grid-template-columns: 1fr; }
    .fl-hero-title { font-size: 1.3rem; }
}

/* ============================================
   Shop product offers / discounts
   ============================================ */

.shop-offer-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.1;
    box-shadow: 0 4px 10px rgba(220, 38, 38, .35);
    letter-spacing: .2px;
    pointer-events: none;
}

.shop-offer-badge-sub {
    font-weight: 500;
    font-size: 11px;
    background: rgba(255, 255, 255, .18);
    padding: 1px 6px;
    border-radius: 999px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-offer-strike {
    margin-left: 8px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
    font-size: 0.85em;
}

.shop-offer-save {
    margin-left: 8px;
    color: #047857;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.shop-offer-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 8px;
    padding: 12px 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

.shop-offer-preview-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding: 10px 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    font-size: 14px;
}

.shop-offer-preview-line strong {
    color: #b91c1c;
    font-size: 16px;
}

.shop-offer-preview-line .muted { color: #64748b; }

.shop-prod-media { position: relative; }

/* ============================================
   Admin — Feature Flags page
   ============================================ */
.ff-panel-status {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: 10px; margin-bottom: 14px;
    font-size: .9rem;
    border: 1px solid;
}
.ff-panel-status-on  { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.ff-panel-status-off { background: #FEF2F2; border-color: #FCA5A5; color: #991B1B; }
.ff-panel-status a   { color: inherit; text-decoration: underline; }

/* ---- Hierarchical Master Panels view ---- */
.ff-panel-block {
    background: #fff; border: 1px solid #E5E7EB; border-radius: 14px;
    margin-bottom: 14px; overflow: hidden; transition: opacity 0.15s;
}
.ff-panel-block.off { background: #FAFAFA; }
.ff-panel-block-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; gap: 14px;
    border-left: 4px solid transparent;
}
.ff-panel-block.on  .ff-panel-block-head { border-left-color: #16a34a; }
.ff-panel-block.off .ff-panel-block-head { border-left-color: #b91c1c; }
.ff-panel-block-title {
    display: flex; align-items: center; gap: 14px;
}
.ff-panel-emoji {
    font-size: 32px; line-height: 1;
    width: 48px; height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; background: #F3F4F6;
}
.ff-panel-block-title strong { display: block; font-size: 1.05rem; color: #111827; }
.ff-panel-block-title .muted { margin: 2px 0 0; font-size: .82rem; }
.ff-panel-block-actions {
    display: flex; align-items: center; gap: 12px;
}
.ff-panel-status-pill {
    font-size: .72rem; font-weight: 700; letter-spacing: .04em;
    padding: 3px 10px; border-radius: 999px;
}
.ff-panel-status-pill-on  { background: #DCFCE7; color: #166534; }
.ff-panel-status-pill-off { background: #FEE2E2; color: #991B1B; }

.ff-panel-children {
    border-top: 1px solid #F1F5F9;
    background: #FAFBFC;
    padding: 8px 0;
}
.ff-panel-children.is-master-off { opacity: 0.55; }
.ff-panel-children-note {
    margin: 8px 20px 12px;
    padding: 8px 12px;
    background: #FEF3C7;
    border-left: 3px solid #F59E0B;
    color: #92400E;
    font-size: .82rem;
    border-radius: 6px;
}
.ff-child-row {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
    padding: 12px 20px;
    border-bottom: 1px solid #F1F5F9;
}
.ff-child-row:last-child { border-bottom: none; }
.ff-child-row.off { background: #FFFFFF; }
.ff-child-info { flex: 1; min-width: 0; }
.ff-child-title {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: .95rem;
}
.ff-child-desc { margin: 4px 0 6px; color: #6B7280; font-size: .82rem; }
.ff-section-pill {
    font-size: .68rem; padding: 1px 7px; border-radius: 4px;
    background: #E5E7EB; color: #4B5563; font-weight: 600;
}

.ff-summary {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 14px 18px; margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.ff-summary-stat {
    display: flex; flex-direction: column; gap: 2px;
    padding: 6px 14px; border-right: 1px solid #f1f5f9;
}
.ff-summary-stat:last-of-type { border-right: none; }
.ff-summary-num { font-size: 1.5rem; font-weight: 700; color: #16a34a; line-height: 1; }
.ff-summary-stat-off .ff-summary-num { color: #b91c1c; }
.ff-summary-stat-core .ff-summary-num { color: #6366f1; }
.ff-summary-lbl { font-size: .75rem; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }
.ff-summary-actions { margin-left: auto; display: flex; gap: 8px; }

.ff-section {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 18px 20px; margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.ff-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px dashed #e5e7eb;
}
.ff-section-head h2 { margin: 0; font-size: 1rem; color: #0f172a; }
.ff-section-head span { font-size: .8rem; color: #94a3b8; }

.ff-grid {
    display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.ff-card {
    border: 1.5px solid #e5e7eb; border-radius: 12px;
    padding: 14px 16px; background: #fff;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
    display: flex; flex-direction: column; gap: 8px;
}
.ff-card.on    { border-color: #bbf7d0; background: #f0fdf4; }
.ff-card.off   { border-color: #fecaca; background: #fef2f2; }
.ff-card.is-core { border-color: #c7d2fe; background: #eef2ff; }
.ff-card-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.ff-card-title { display: flex; align-items: center; gap: 8px; }
.ff-card-title strong { font-size: .95rem; color: #0f172a; }
.ff-pill {
    font-size: .65rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: .05em;
}
.ff-pill-core { background: #c7d2fe; color: #3730a3; }
.ff-card-desc { margin: 0; font-size: .85rem; color: #475569; line-height: 1.4; }
.ff-card-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding-top: 8px; border-top: 1px dashed #e5e7eb;
    font-size: .72rem; color: #94a3b8;
}
.ff-key {
    background: #f1f5f9; color: #475569; padding: 2px 6px;
    border-radius: 5px; font-size: .7rem; font-family: monospace;
}

/* Toggle switch */
.ff-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.ff-switch input { opacity: 0; width: 0; height: 0; }
.ff-switch-track {
    position: absolute; inset: 0;
    background: #cbd5e1; border-radius: 24px;
    transition: background .15s ease;
}
.ff-switch-track::before {
    content: ""; position: absolute; left: 3px; top: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; transition: transform .15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.ff-switch input:checked + .ff-switch-track { background: #16a34a; }
.ff-switch input:checked + .ff-switch-track::before { transform: translateX(20px); }
.ff-switch input:disabled + .ff-switch-track { opacity: .55; cursor: not-allowed; }

@media (max-width: 640px) {
    .ff-summary { flex-direction: column; align-items: stretch; }
    .ff-summary-stat { border-right: none; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; }
    .ff-summary-actions { margin-left: 0; justify-content: flex-end; }
}

/* Feature unavailable banner (used by <FeatureGuard>) */
.ff-unavailable {
    display: flex; justify-content: center; align-items: center;
    min-height: 60vh; padding: 24px;
}
.ff-unavailable-card {
    text-align: center; max-width: 460px; width: 100%;
    background: #fff; border: 1px dashed #cbd5e1;
    border-radius: 16px; padding: 36px 28px;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.ff-unavailable-icon { font-size: 2.5rem; margin-bottom: 8px; }
.ff-unavailable-card h2 { margin: 8px 0 6px; color: #0f172a; font-size: 1.1rem; }
.ff-unavailable-card p { margin: 0 0 16px; color: #64748b; line-height: 1.5; font-size: .9rem; }

