/* ═══════════════════════════════════════════════════════
   Bengal Soap Co. — Franchise Partner Portal v2
   Premium Light Theme Stylesheet
   ═══════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────── */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --gold: #d97706;
    --gold-light: #fef3c7;
    --green: #059669;
    --green-light: #d1fae5;
    --red: #dc2626;
    --red-light: #fee2e2;
    --orange: #ea580c;
    --orange-light: #fff7ed;
    --purple: #7c3aed;
    --purple-light: #ede9fe;
    --cyan: #0891b2;
    --cyan-light: #cffafe;
    --blue: #2563eb;
    --blue-light: #dbeafe;

    --bg: #f1f5f9;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;
    --bg-sidebar-active: rgba(37, 99, 235, 0.15);

    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-sidebar: #cbd5e1;
    --text-sidebar-active: #ffffff;

    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --sidebar-width: 260px;
    --topbar-height: 64px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset ──────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input,
select,
textarea {
    font-family: inherit;
}

/* ── Google Fonts ───────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── App Layout ─────────────────────────────────────── */
.fp-app {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────── */
.fp-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.fp-sidebar-header {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fp-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.fp-brand {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    display: block;
    line-height: 1.2;
}

.fp-brand-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── Navigation ─────────────────────────────────────── */
.fp-nav {
    flex: 1;
    padding: 12px 10px;
}

.fp-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 16px 12px 6px;
}

.fp-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-sidebar);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.fp-nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
}

.fp-nav-link.active {
    background: var(--bg-sidebar-active);
    color: #fff;
    font-weight: 600;
}

.fp-nav-link.active .fp-nav-icon {
    filter: none;
}

.fp-nav-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Sidebar Footer ─────────────────────────────────── */
.fp-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.fp-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fp-user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.fp-user-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: #fff;
}

.fp-user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.fp-logout-btn {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.2s;
}

.fp-logout-btn:hover {
    background: rgba(220, 38, 38, 0.15);
    color: var(--red);
    border-color: rgba(220, 38, 38, 0.3);
}

/* ── Main Content ───────────────────────────────────── */
.fp-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Top Bar ────────────────────────────────────────── */
.fp-topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.fp-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fp-page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.fp-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 1.3rem;
    color: var(--text);
}

.fp-topbar-right {
    text-align: right;
}

.fp-franchise-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
}

.fp-franchise-code {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Content Area ───────────────────────────────────── */
.fp-content {
    flex: 1;
    padding: 28px;
}

/* ── Cards ──────────────────────────────────────────── */
.fp-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.fp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.fp-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

/* ── Stat Cards ─────────────────────────────────────── */
.fp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.fp-stat {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fp-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.fp-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.fp-stat.gold::before {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}

.fp-stat.green::before {
    background: linear-gradient(90deg, #059669, #10b981);
}

.fp-stat.blue::before {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.fp-stat.red::before {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.fp-stat.purple::before {
    background: linear-gradient(90deg, #7c3aed, #8b5cf6);
}

.fp-stat.cyan::before {
    background: linear-gradient(90deg, #0891b2, #06b6d4);
}

.fp-stat.orange::before {
    background: linear-gradient(90deg, #ea580c, #f97316);
}

.fp-stat-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 8px;
}

.fp-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.fp-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── Welcome Banner ─────────────────────────────────── */
.fp-welcome-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.fp-welcome-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.fp-welcome-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.fp-welcome-sub {
    font-size: 0.9rem;
    color: #94a3b8;
}

.fp-wallet-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 16px 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.fp-wallet-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.fp-wallet-amount {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Tables ─────────────────────────────────────────── */
.fp-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
}

.fp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.fp-table thead th {
    background: var(--bg);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.fp-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    vertical-align: middle;
}

.fp-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.02);
}

.fp-table tbody tr:last-child td {
    border-bottom: none;
}

/* ── Badges ─────────────────────────────────────────── */
.fp-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.fp-badge.green {
    background: var(--green-light);
    color: var(--green);
}

.fp-badge.red {
    background: var(--red-light);
    color: var(--red);
}

.fp-badge.orange {
    background: var(--orange-light);
    color: var(--orange);
}

.fp-badge.blue {
    background: var(--blue-light);
    color: var(--blue);
}

.fp-badge.purple {
    background: var(--purple-light);
    color: var(--purple);
}

.fp-badge.cyan {
    background: var(--cyan-light);
    color: var(--cyan);
}

.fp-badge.gray {
    background: #f1f5f9;
    color: #64748b;
}

.fp-badge.gold-badge {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fbbf24;
}

.fp-badge.silver-badge {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #475569;
    border: 1px solid #94a3b8;
}

.fp-badge.bronze-badge {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    color: #9a3412;
    border: 1px solid #fb923c;
}

/* ── Buttons ────────────────────────────────────────── */
.fp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.fp-btn-primary {
    background: var(--primary);
    color: #fff;
}

.fp-btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.fp-btn-success {
    background: var(--green);
    color: #fff;
}

.fp-btn-success:hover {
    background: #047857;
}

.fp-btn-danger {
    background: var(--red);
    color: #fff;
}

.fp-btn-danger:hover {
    background: #b91c1c;
}

.fp-btn-secondary {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.fp-btn-secondary:hover {
    background: var(--border);
    color: var(--text);
}

.fp-btn-gold {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #fff;
}

.fp-btn-gold:hover {
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.fp-btn-sm {
    padding: 6px 12px;
    font-size: 0.76rem;
}

.fp-btn-lg {
    padding: 12px 24px;
    font-size: 0.9rem;
}

.fp-btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fp-w-full {
    width: 100%;
    justify-content: center;
}

/* ── Forms ──────────────────────────────────────────── */
.fp-form-group {
    margin-bottom: 16px;
}

.fp-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.fp-input,
.fp-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text);
    background: var(--bg-card);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.fp-input:focus,
.fp-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.fp-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 24px;
    padding-right: 36px;
}

/* ── Alerts ─────────────────────────────────────────── */
.fp-alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fp-alert-success {
    background: var(--green-light);
    color: var(--green);
    border: 1px solid #a7f3d0;
}

.fp-alert-danger {
    background: var(--red-light);
    color: var(--red);
    border: 1px solid #fecaca;
}

.fp-alert-info {
    background: var(--blue-light);
    color: var(--blue);
    border: 1px solid #93c5fd;
}

.fp-alert-warning {
    background: var(--orange-light);
    color: var(--orange);
    border: 1px solid #fed7aa;
}

/* ── Grid ───────────────────────────────────────────── */
.fp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.fp-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* ── Utilities ──────────────────────────────────────── */
.fp-mb-1 {
    margin-bottom: 8px;
}

.fp-mb-2 {
    margin-bottom: 16px;
}

.fp-mb-3 {
    margin-bottom: 24px;
}

.fp-mt-1 {
    margin-top: 8px;
}

.fp-mt-2 {
    margin-top: 16px;
}

.fp-text-muted {
    color: var(--text-muted);
}

.fp-text-sm {
    font-size: 0.8rem;
}

.fp-text-center {
    text-align: center;
}

.fp-text-right {
    text-align: right;
}

.fp-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fp-flex-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Modal ──────────────────────────────────────────── */
.fp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.fp-modal-overlay.active {
    display: flex;
}

.fp-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.fp-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.fp-modal-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.fp-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ── Wallet Card ────────────────────────────────────── */
.fp-wallet-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e1b4b 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.fp-wallet-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.fp-wallet-card::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.fp-wallet-card-inner {
    position: relative;
    z-index: 1;
}

.fp-wallet-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.fp-wallet-card-balance {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.fp-wallet-card-name {
    font-size: 0.85rem;
    color: #94a3b8;
}

.fp-wallet-stats {
    display: flex;
    gap: 32px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fp-wallet-stat-item {
    text-align: center;
}

.fp-wallet-stat-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.fp-wallet-stat-lbl {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Transaction List ───────────────────────────────── */
.fp-txn-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.fp-txn-item:last-child {
    border-bottom: none;
}

.fp-txn-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fp-txn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.fp-txn-icon.credit {
    background: var(--green-light);
}

.fp-txn-icon.debit {
    background: var(--red-light);
}

.fp-txn-desc {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.fp-txn-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.fp-txn-amount {
    font-size: 0.95rem;
    font-weight: 700;
}

.fp-txn-amount.credit {
    color: var(--green);
}

.fp-txn-amount.debit {
    color: var(--red);
}

/* ── Pincode Cards ──────────────────────────────────── */
.fp-pincode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.fp-pincode-chip {
    background: var(--primary-light);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    transition: transform 0.2s;
}

.fp-pincode-chip:hover {
    transform: scale(1.05);
}

.fp-pincode-chip .area-name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Prospective Pincodes ───────────────────────────── */
.fp-prospect-row {
    transition: all 0.2s;
}

.fp-prospect-row.tier-gold {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.08), transparent) !important;
}

.fp-prospect-row.tier-silver {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.08), transparent) !important;
}

.fp-prospect-row.tier-bronze {
    background: linear-gradient(90deg, rgba(251, 146, 60, 0.08), transparent) !important;
}

.fp-pincode-color {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.88rem;
}

.fp-pincode-color.golden {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 2px solid #fbbf24;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.fp-pincode-color.silver {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #475569;
    border: 2px solid #94a3b8;
}

.fp-pincode-color.bronze {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    color: #9a3412;
    border: 2px solid #fb923c;
}

/* ── Label Preview ──────────────────────────────────── */
.fp-label-preview {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 16px 0;
    background: #fafafa;
}

.fp-label-inner {
    border: 1px solid #333;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
}

/* ── Login Page ─────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 20px;
}

.login-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
}

.login-logo h1 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
}

.login-logo p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ── Dropdown in Table ──────────────────────────────── */
.fp-table-select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.78rem;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    min-width: 140px;
}

.fp-table-select:focus {
    border-color: var(--primary);
    outline: none;
}

/* ── Empty State ────────────────────────────────────── */
.fp-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.fp-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.fp-empty-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ── Upgrade Plan Cards ─────────────────────────────── */
.fp-plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.fp-plan-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.fp-plan-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.fp-plan-card.current {
    border-color: var(--green);
    background: var(--green-light);
}

.fp-plan-card.current::after {
    content: 'Current';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--green);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
}

.fp-plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.fp-plan-price {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Inventory Cards ────────────────────────────────── */
.fp-inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.fp-inv-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.fp-inv-card:hover {
    transform: translateY(-2px);
}

.fp-inv-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.fp-inv-card-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
}

.fp-inv-card-sku {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.fp-inv-card-stock {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.fp-inv-card-stock.low {
    color: var(--red);
}

.fp-inv-card-stock.ok {
    color: var(--green);
}

.fp-inv-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

/* ── Sidebar Overlay ────────────────────────────────── */
.fp-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99;
}

.fp-sidebar-overlay.active {
    display: block;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .fp-sidebar {
        transform: translateX(-100%);
    }

    .fp-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    }

    .fp-main {
        margin-left: 0;
    }

    .fp-menu-btn {
        display: block;
    }

    .fp-topbar {
        padding: 0 16px;
    }

    .fp-page-title {
        font-size: 1rem;
    }

    .fp-topbar-right {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fp-franchise-name {
        font-size: 0.78rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fp-content {
        padding: 16px;
    }

    .fp-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .fp-stat {
        padding: 14px;
    }

    .fp-stat-value {
        font-size: 1.2rem;
    }

    .fp-stat-label {
        font-size: 0.68rem;
    }

    .fp-grid-2,
    .fp-grid-3 {
        grid-template-columns: 1fr;
    }

    .fp-welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 24px 18px;
    }

    .fp-welcome-title {
        font-size: 1.2rem;
    }

    .fp-welcome-sub {
        font-size: 0.82rem;
    }

    .fp-wallet-badge {
        padding: 12px 18px;
    }

    .fp-wallet-amount {
        font-size: 1.4rem;
    }

    .fp-wallet-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .fp-wallet-card {
        padding: 24px 18px;
    }

    .fp-wallet-card-balance {
        font-size: 1.8rem;
    }

    /* ── Mobile Table → Card Layout ───────────────── */
    .fp-table-wrap {
        overflow-x: visible;
    }

    .fp-table,
    .fp-table thead,
    .fp-table tbody,
    .fp-table th,
    .fp-table td,
    .fp-table tr {
        display: block;
    }

    .fp-table thead {
        display: none;
    }

    .fp-table tbody tr {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 16px;
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
    }

    .fp-table tbody td {
        padding: 6px 0;
        border-bottom: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.82rem;
    }

    .fp-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.72rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        flex-shrink: 0;
        margin-right: 12px;
    }

    /* ── Mobile Cards ─────────────────────────────── */
    .fp-card {
        padding: 16px;
        border-radius: var(--radius-sm);
    }

    .fp-card-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    /* ── Mobile Buttons ───────────────────────────── */
    .fp-btn {
        padding: 8px 14px;
        font-size: 0.78rem;
    }

    .fp-btn-sm {
        padding: 6px 10px;
        font-size: 0.72rem;
    }

    /* ── Mobile Forms ─────────────────────────────── */
    .fp-input,
    .fp-select {
        padding: 9px 12px;
        font-size: 0.85rem;
    }

    .fp-form-group label {
        font-size: 0.76rem;
    }

    /* ── Modal on Mobile ─────────────────────────── */
    .fp-modal {
        width: 95%;
        padding: 24px 18px;
        margin: 16px;
    }

    /* ── Inventory Grid ──────────────────────────── */
    .fp-inv-grid {
        grid-template-columns: 1fr;
    }

    /* ── Plan Cards ──────────────────────────────── */
    .fp-plan-cards {
        grid-template-columns: 1fr;
    }

    /* ── Pincode Grid ────────────────────────────── */
    .fp-pincode-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .fp-pincode-chip {
        padding: 10px;
        font-size: 0.88rem;
    }

    /* ── Transaction List ────────────────────────── */
    .fp-txn-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 0;
    }

    .fp-txn-amount {
        align-self: flex-end;
    }

    /* ── Login Page ──────────────────────────────── */
    .login-box {
        padding: 28px 20px;
        margin: 0 8px;
    }

    .login-logo .icon {
        font-size: 2.4rem;
    }

    .login-logo h1 {
        font-size: 1.15rem;
    }

    /* ── Table select on mobile ──────────────────── */
    .fp-table-select {
        min-width: auto;
        width: 100%;
        padding: 8px 10px;
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .fp-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .fp-stat {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
    }

    .fp-stat-icon {
        margin-bottom: 0;
        font-size: 1.3rem;
    }

    .fp-stat-value {
        font-size: 1.1rem;
    }

    .fp-content {
        padding: 12px;
    }

    .fp-topbar-left {
        gap: 10px;
    }

    .fp-page-title {
        font-size: 0.9rem;
    }

    .fp-welcome-banner {
        padding: 18px 14px;
    }

    .fp-welcome-title {
        font-size: 1.05rem;
    }
}

/* ── Admin Specific ─────────────────────────────────── */
.admin-sidebar {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
}

.admin-sidebar .fp-logo {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ── Print Label ────────────────────────────────────── */
@media print {

    .fp-sidebar,
    .fp-topbar,
    .no-print {
        display: none !important;
    }

    .fp-main {
        margin-left: 0 !important;
    }

    .fp-content {
        padding: 0 !important;
    }

    .fp-label-preview {
        border: none;
    }
}