/* =============================================
   Payindia - Design System & Global Styles
   ============================================= */

:root {
    /* Primary Colors */
    --pi-primary: #1a73e8;
    --pi-primary-dark: #1557b0;
    --pi-primary-light: #4a90e8;
    --pi-primary-50: #e8f0fe;
    --pi-primary-100: #d2e3fc;

    /* Secondary Colors */
    --pi-secondary: #34a853;
    --pi-secondary-dark: #1e8e3e;
    --pi-secondary-light: #5bb974;

    /* Accent Colors */
    --pi-accent: #fbbc04;
    --pi-accent-dark: #f29900;

    /* Neutral Colors */
    --pi-dark: #1a1a2e;
    --pi-dark-secondary: #16213e;
    --pi-gray-900: #202124;
    --pi-gray-800: #3c4043;
    --pi-gray-700: #5f6368;
    --pi-gray-500: #9aa0a6;
    --pi-gray-300: #dadce0;
    --pi-gray-100: #f1f3f4;
    --pi-gray-50: #f8f9fa;
    --pi-white: #ffffff;

    /* Status Colors */
    --pi-success: #34a853;
    --pi-warning: #fbbc04;
    --pi-danger: #ea4335;
    --pi-info: #4285f4;

    /* Gradients */
    --pi-gradient-primary: linear-gradient(135deg, #1a73e8 0%, #34a853 100%);
    --pi-gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --pi-gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --pi-gradient-card: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);

    /* Shadows */
    --pi-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --pi-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --pi-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --pi-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --pi-shadow-glow: 0 0 30px rgba(26, 115, 232, 0.3);

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

    /* Transitions */
    --pi-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --pi-transition-fast: all 0.15s ease;
    --pi-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --pi-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* =============================================
   Base Styles
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--pi-font);
    font-size: 15px;
    color: var(--pi-gray-800);
    background-color: var(--pi-gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

a {
    color: var(--pi-primary);
    text-decoration: none;
    transition: var(--pi-transition-fast);
}

a:hover {
    color: var(--pi-primary-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--pi-gray-900);
    line-height: 1.3;
}

/* =============================================
   Button Styles
   ============================================= */

.btn-pi-primary {
    background: var(--pi-gradient-primary);
    color: var(--pi-white);
    border: none;
    padding: 12px 32px;
    border-radius: var(--pi-radius-md);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    transition: var(--pi-transition);
    position: relative;
    overflow: hidden;
}

.btn-pi-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--pi-shadow-lg);
    color: var(--pi-white);
}

.btn-pi-primary:active {
    transform: translateY(0);
}

.btn-pi-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-pi-primary:active::after {
    width: 300px;
    height: 300px;
}

.btn-pi-outline {
    background: transparent;
    color: var(--pi-primary);
    border: 2px solid var(--pi-primary);
    padding: 10px 30px;
    border-radius: var(--pi-radius-md);
    font-weight: 600;
    transition: var(--pi-transition);
}

.btn-pi-outline:hover {
    background: var(--pi-primary);
    color: var(--pi-white);
    transform: translateY(-2px);
    box-shadow: var(--pi-shadow-md);
}

/* =============================================
   Card Styles
   ============================================= */

.pi-card {
    background: var(--pi-white);
    border: none;
    border-radius: var(--pi-radius-lg);
    box-shadow: var(--pi-shadow-sm);
    transition: var(--pi-transition);
    overflow: hidden;
}

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

.pi-card-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--pi-radius-lg);
}

/* =============================================
   Stats Card (Dashboard)
   ============================================= */

.pi-stat-card {
    background: var(--pi-white);
    border-radius: var(--pi-radius-lg);
    padding: 24px;
    box-shadow: var(--pi-shadow-sm);
    border-left: 4px solid var(--pi-primary);
    transition: var(--pi-transition);
}

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

.pi-stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--pi-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--pi-white);
}

.pi-stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--pi-gray-900);
}

.pi-stat-card .stat-label {
    font-size: 13px;
    color: var(--pi-gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon.bg-primary-gradient {
    background: var(--pi-gradient-primary);
}

.stat-icon.bg-success {
    background: var(--pi-success);
}

.stat-icon.bg-warning {
    background: var(--pi-warning);
}

.stat-icon.bg-danger {
    background: var(--pi-danger);
}

.stat-icon.bg-info {
    background: var(--pi-info);
}

/* =============================================
   Navbar
   ============================================= */

.pi-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--pi-shadow-sm);
    padding: 12px 0;
    transition: var(--pi-transition);
}

.pi-navbar.scrolled {
    box-shadow: var(--pi-shadow-md);
}

.pi-navbar .navbar-brand {
    font-weight: 800;
    font-size: 24px;
    background: var(--pi-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pi-navbar .nav-link {
    color: var(--pi-gray-700);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--pi-radius-sm);
    transition: var(--pi-transition-fast);
}

.pi-navbar .nav-link:hover,
.pi-navbar .nav-link.active {
    color: var(--pi-primary);
    background: var(--pi-primary-50);
}

/* =============================================
   Hero Section
   ============================================= */

.pi-hero {
    background: var(--pi-gradient-dark);
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.pi-hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.15), transparent 60%);
    top: -200px;
    right: -100px;
    border-radius: 50%;
}

.pi-hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(52, 168, 83, 0.1), transparent 60%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
}

.pi-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--pi-white);
    line-height: 1.2;
}

.pi-hero .hero-highlight {
    background: var(--pi-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pi-hero p {
    font-size: 18px;
    color: var(--pi-gray-500);
    line-height: 1.7;
}

/* =============================================
   Sidebar (Admin & Merchant Panel)
   ============================================= */

.pi-sidebar {
    width: 280px;
    background: var(--pi-gradient-dark);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--pi-transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pi-sidebar .sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.pi-sidebar .sidebar-brand h4 {
    color: var(--pi-white);
    font-weight: 800;
    margin: 0;
    background: var(--pi-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pi-sidebar .sidebar-menu {
    padding: 16px 12px;
    list-style: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.pi-sidebar .sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.pi-sidebar .sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.pi-sidebar .sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.pi-sidebar .sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.pi-sidebar .menu-label {
    color: var(--pi-gray-500);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 16px 8px;
}

.pi-sidebar .menu-item a {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    color: rgba(255, 255, 255, 0.65);
    border-radius: var(--pi-radius-md);
    transition: var(--pi-transition-fast);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
}

.pi-sidebar .menu-item a i {
    font-size: 18px;
    width: 24px;
    margin-right: 12px;
    text-align: center;
}

.pi-sidebar .menu-item a:hover {
    color: var(--pi-white);
    background: rgba(255, 255, 255, 0.08);
}

.pi-sidebar .menu-item a.active {
    color: var(--pi-white);
    background: var(--pi-primary);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
}

/* =============================================
   Main Content (Dashboard)
   ============================================= */

.pi-main {
    margin-left: 280px;
    min-height: 100vh;
    background: var(--pi-gray-50);
}

.pi-topbar {
    background: var(--pi-white);
    padding: 16px 30px;
    box-shadow: var(--pi-shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.pi-topbar .page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--pi-gray-900);
}

.pi-content {
    padding: 30px;
}

/* =============================================
   Auth Pages
   ============================================= */

.pi-auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pi-gradient-dark);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px 16px;
}

.pi-auth-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.12), transparent 60%);
    top: -150px;
    right: -100px;
    border-radius: 50%;
    animation: pulse-slow 4s ease-in-out infinite;
}

.pi-auth-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(52, 168, 83, 0.08), transparent 60%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
    animation: pulse-slow 5s ease-in-out infinite reverse;
}

@keyframes pulse-slow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.pi-auth-card {
    background: var(--pi-white);
    border-radius: var(--pi-radius-xl);
    box-shadow: var(--pi-shadow-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    max-height: none;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
}

.pi-auth-card.auth-register-card {
    max-width: 480px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pi-auth-card .auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.pi-auth-card .auth-brand h2 {
    font-weight: 800;
    font-size: 28px;
    background: var(--pi-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pi-auth-card .auth-brand p {
    color: var(--pi-gray-500);
    margin-top: 4px;
}

.pi-auth-card .form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--pi-gray-700);
    margin-bottom: 6px;
}

.pi-auth-card .form-control {
    border: 2px solid var(--pi-gray-300);
    border-radius: var(--pi-radius-md);
    padding: 12px 16px;
    font-size: 16px;
    transition: var(--pi-transition-fast);
    background: var(--pi-gray-50);
    min-width: 0;
}

.pi-auth-card .input-group {
    flex-wrap: nowrap;
    min-width: 0;
}

.pi-auth-card .input-group-text,
.pi-auth-card .btn {
    flex-shrink: 0;
}

.pi-auth-card .form-control:focus {
    border-color: var(--pi-primary);
    box-shadow: 0 0 0 4px var(--pi-primary-50);
    background: var(--pi-white);
}

/* =============================================
   OTP Input
   ============================================= */

.pi-otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    max-width: 100%;
}

.pi-otp-inputs input {
    width: 52px;
    height: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border: 2px solid var(--pi-gray-300);
    border-radius: var(--pi-radius-md);
    transition: var(--pi-transition-fast);
    background: var(--pi-gray-50);
}

.pi-otp-inputs input:focus {
    border-color: var(--pi-primary);
    box-shadow: 0 0 0 4px var(--pi-primary-50);
    outline: none;
    background: var(--pi-white);
}

/* =============================================
   Table Styles
   ============================================= */

.pi-table {
    background: var(--pi-white);
    border-radius: var(--pi-radius-lg);
    overflow: hidden;
    box-shadow: var(--pi-shadow-sm);
}

.pi-table table {
    margin: 0;
}

.pi-table thead th {
    background: var(--pi-gray-50);
    color: var(--pi-gray-700);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    border-bottom: 2px solid var(--pi-gray-300);
}

.pi-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--pi-gray-100);
}

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

/* =============================================
   Status Badges
   ============================================= */

.pi-badge {
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pi-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.pi-badge-success {
    background: rgba(52, 168, 83, 0.12);
    color: var(--pi-success);
}

.pi-badge-success::before {
    background: var(--pi-success);
}

.pi-badge-danger {
    background: rgba(234, 67, 53, 0.12);
    color: var(--pi-danger);
}

.pi-badge-danger::before {
    background: var(--pi-danger);
}

.pi-badge-warning {
    background: rgba(251, 188, 4, 0.15);
    color: #b06d00;
}

.pi-badge-warning::before {
    background: var(--pi-accent);
}

.pi-badge-info {
    background: rgba(66, 133, 244, 0.12);
    color: var(--pi-info);
}

.pi-badge-info::before {
    background: var(--pi-info);
}

/* =============================================
   Section Styles (Public Pages)
   ============================================= */

.pi-section {
    padding: 80px 0;
}

.pi-section-title {
    text-align: center;
    margin-bottom: 50px;
}

.pi-section-title h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.pi-section-title .title-line {
    width: 60px;
    height: 4px;
    background: var(--pi-gradient-primary);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.pi-section-title p {
    color: var(--pi-gray-500);
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto;
}

/* =============================================
   Feature Cards (Landing Page)
   ============================================= */

.pi-feature-card {
    background: var(--pi-white);
    border-radius: var(--pi-radius-lg);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--pi-shadow-sm);
    transition: var(--pi-transition);
    height: 100%;
}

.pi-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--pi-shadow-lg);
}

.pi-feature-card .feature-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--pi-radius-lg);
    background: var(--pi-primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--pi-primary);
    transition: var(--pi-transition);
}

.pi-feature-card:hover .feature-icon {
    background: var(--pi-gradient-primary);
    color: var(--pi-white);
    transform: scale(1.1) rotate(5deg);
}

.pi-feature-card h5 {
    font-weight: 700;
    margin-bottom: 10px;
}

.pi-feature-card p {
    color: var(--pi-gray-500);
    font-size: 14px;
    line-height: 1.6;
}

/* =============================================
   Footer
   ============================================= */

.pi-footer {
    background: var(--pi-gradient-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px;
}

.pi-footer h5 {
    color: var(--pi-white);
    font-weight: 700;
    margin-bottom: 20px;
}

.pi-footer a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--pi-transition-fast);
}

.pi-footer a:hover {
    color: var(--pi-primary-light);
    padding-left: 4px;
}

.pi-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    margin-top: 40px;
}

/* =============================================
   Loading Overlay
   ============================================= */

.pi-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pi-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--pi-primary-100);
    border-top-color: var(--pi-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =============================================
   Payment Page
   ============================================= */

.pi-payment-page {
    min-height: 100vh;
    background: var(--pi-gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pi-payment-card {
    background: var(--pi-white);
    border-radius: var(--pi-radius-xl);
    box-shadow: var(--pi-shadow-xl);
    max-width: 420px;
    width: 100%;
    overflow: hidden;
}

.pi-payment-header {
    background: var(--pi-gradient-primary);
    padding: 24px;
    text-align: center;
    color: var(--pi-white);
}

.pi-payment-amount {
    font-size: 36px;
    font-weight: 800;
}

.pi-qr-container {
    padding: 30px;
    text-align: center;
}

.pi-qr-container img {
    border-radius: var(--pi-radius-md);
    box-shadow: var(--pi-shadow-md);
    max-width: 200px;
}

.pi-upi-apps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 24px 24px;
}

.pi-upi-app {
    text-align: center;
    padding: 12px 8px;
    border: 1px solid var(--pi-gray-300);
    border-radius: var(--pi-radius-md);
    cursor: pointer;
    transition: var(--pi-transition);
}

.pi-upi-app:hover {
    border-color: var(--pi-primary);
    background: var(--pi-primary-50);
    transform: translateY(-2px);
}

.pi-upi-app img {
    width: 36px;
    height: 36px;
    margin-bottom: 6px;
}

.pi-upi-app span {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--pi-gray-700);
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 991px) {
    .pi-sidebar {
        transform: translateX(-100%);
    }

    .pi-sidebar.show {
        transform: translateX(0);
    }

    .pi-main {
        margin-left: 0;
    }

    .pi-hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 575px) {
    .pi-auth-page {
        align-items: flex-start;
        padding: 16px 12px;
    }

    .pi-auth-card {
        width: 100%;
        max-width: 100%;
        padding: 28px 18px;
        margin: 0;
        border-radius: 18px;
    }

    .pi-auth-card .auth-brand {
        margin-bottom: 24px;
    }

    .pi-auth-card .auth-brand h2 {
        font-size: 24px;
    }

    .pi-hero h1 {
        font-size: 2rem;
    }

    .pi-content {
        padding: 16px;
    }

    .pi-otp-inputs input {
        width: clamp(38px, 12vw, 44px);
        height: 48px;
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .pi-auth-page {
        padding: 12px 10px;
    }

    .pi-auth-card {
        padding: 24px 14px;
    }

    .pi-otp-inputs {
        gap: 6px;
    }
}

/* =============================================
   Utility Classes
   ============================================= */

.text-gradient {
    background: var(--pi-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--pi-gradient-primary) !important;
}

.bg-gradient-dark {
    background: var(--pi-gradient-dark) !important;
}

.hover-lift {
    transition: var(--pi-transition);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* =============================================
   Premium Fintech Dashboard Redesign
   ============================================= */

:root {
    --fin-bg: #f5f7fb;
    --fin-surface: #ffffff;
    --fin-border: #e2e8f0;
    --fin-text: #0f172a;
    --fin-muted: #64748b;
    --fin-primary: #2563eb;
    --fin-cyan: #06b6d4;
    --fin-success: #16a34a;
    --fin-warning: #f59e0b;
    --fin-danger: #dc2626;
    --fin-purple: #7c3aed;
    --fin-shadow: 0 14px 34px rgba(23, 37, 84, 0.10);
    --fin-shadow-sm: 0 8px 24px rgba(23, 37, 84, 0.07);
}

body {
    background: var(--fin-bg);
}

.pi-nav-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    z-index: 10050;
    pointer-events: none;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    box-shadow: 0 0 14px rgba(37, 99, 235, 0.35);
    opacity: 0;
    transition: width 0.25s ease, opacity 0.16s ease;
}

.pi-nav-progress.is-visible {
    width: 72%;
    opacity: 1;
}

.pi-nav-progress.is-slow {
    width: 92%;
}

.pi-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #172554 100%);
}

.pi-sidebar .menu-item a.active {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.pi-main {
    background: var(--fin-bg);
}

.pi-content:focus {
    outline: none;
}

.pi-topbar {
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1680px;
    margin: 0 auto;
}

.dashboard-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f1f7ff 48%, #f4edff 100%);
    border: 1px solid rgba(191, 219, 254, .72);
    border-radius: 18px;
    box-shadow: var(--fin-shadow-sm);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(6, 182, 212, .12));
    position: absolute;
    right: 18px;
    top: 14px;
    pointer-events: none;
}

.dashboard-eyebrow {
    color: var(--fin-muted);
    font-size: 13px;
    font-weight: 600;
}

.dashboard-title {
    color: var(--fin-text);
    font-size: 24px;
    font-weight: 800;
    margin: 4px 0;
}

.dashboard-subtitle {
    color: var(--fin-muted);
    margin: 0;
}

.dashboard-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.kpi-card,
.mini-card,
.attention-card,
.quick-tile,
.analytics-card,
.chart-card,
.table-card,
.insight-card,
.balance-hero,
.health-card,
.payout-card {
    background: var(--fin-surface);
    border: 1px solid var(--fin-border);
    border-radius: 18px;
    box-shadow: var(--fin-shadow-sm);
}

.kpi-card {
    padding: 15px;
    position: relative;
    overflow: hidden;
    min-height: 116px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    background: linear-gradient(145deg, #ffffff, #f7fbff);
}

.kpi-card:hover,
.quick-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--fin-shadow);
}

.kpi-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    width: 100%;
    background: var(--kpi-color, var(--fin-primary));
}

.kpi-card[style*="#16a34a"] { background: linear-gradient(145deg, #f4fff7, #e9fbef); border-color: #bbf7d0; }
.kpi-card[style*="#f59e0b"] { background: linear-gradient(145deg, #fff8ed, #fff1e4); border-color: #fed7aa; }
.kpi-card[style*="#dc2626"] { background: linear-gradient(145deg, #fff7f8, #ffecef); border-color: #fecdd3; }
.kpi-card[style*="#2563eb"] { background: linear-gradient(145deg, #f5f9ff, #ebf4ff); border-color: #bfdbfe; }
.kpi-card[style*="#7c3aed"] { background: linear-gradient(145deg, #fbf7ff, #f2ebff); border-color: #e9d5ff; }
.kpi-card[style*="#06b6d4"] { background: linear-gradient(145deg, #f4fdff, #e8fbff); border-color: #bae6fd; }

.kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--kpi-color, var(--fin-primary));
    font-size: 17px;
    margin-bottom: 10px;
}

.kpi-label {
    color: var(--fin-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.kpi-value {
    color: var(--fin-text);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 4px;
    word-break: break-word;
}

.kpi-note {
    color: var(--fin-muted);
    font-size: 12px;
    margin-top: 6px;
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 12px;
}

.mini-card {
    padding: 12px 14px;
}

.summary-strip .mini-card:nth-child(6n+1),
.analytics-grid .analytics-card:nth-child(6n+1) {
    background: linear-gradient(145deg, #ffffff, #ebf4ff);
    border-color: #bfdbfe;
}

.summary-strip .mini-card:nth-child(6n+2),
.analytics-grid .analytics-card:nth-child(6n+2) {
    background: linear-gradient(145deg, #ffffff, #e9fbef);
    border-color: #bbf7d0;
}

.summary-strip .mini-card:nth-child(6n+3),
.analytics-grid .analytics-card:nth-child(6n+3) {
    background: linear-gradient(145deg, #ffffff, #fff1e4);
    border-color: #fed7aa;
}

.summary-strip .mini-card:nth-child(6n+4),
.analytics-grid .analytics-card:nth-child(6n+4) {
    background: linear-gradient(145deg, #ffffff, #f2ebff);
    border-color: #e9d5ff;
}

.summary-strip .mini-card:nth-child(6n+5),
.analytics-grid .analytics-card:nth-child(6n+5) {
    background: linear-gradient(145deg, #ffffff, #e8fbff);
    border-color: #bae6fd;
}

.summary-strip .mini-card:nth-child(6n+6),
.analytics-grid .analytics-card:nth-child(6n+6) {
    background: linear-gradient(145deg, #ffffff, #ffecef);
    border-color: #fecdd3;
}

.mini-label {
    color: var(--fin-muted);
    font-size: 12px;
    font-weight: 600;
}

.mini-value {
    color: var(--fin-text);
    font-size: 18px;
    font-weight: 800;
}

.dashboard-section {
    display: grid;
    gap: 16px;
}

.section-heading {
    color: var(--fin-text);
    font-size: 16px;
    font-weight: 800;
    margin: 0;
}

.section-subtitle {
    color: var(--fin-muted);
    font-size: 13px;
    margin: 2px 0 0;
}

.attention-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.attention-card {
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.attention-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex: 0 0 auto;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.quick-tile {
    min-height: 72px;
    padding: 12px;
    color: var(--fin-text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.quick-tile i {
    font-size: 22px;
    color: var(--fin-primary);
}

.quick-tile:nth-child(5n+1) { background: linear-gradient(145deg, #ffffff, #ebf4ff); border-color: #bfdbfe; }
.quick-tile:nth-child(5n+2) { background: linear-gradient(145deg, #ffffff, #e9fbef); border-color: #bbf7d0; }
.quick-tile:nth-child(5n+3) { background: linear-gradient(145deg, #ffffff, #fff1e4); border-color: #fed7aa; }
.quick-tile:nth-child(5n+4) { background: linear-gradient(145deg, #ffffff, #f2ebff); border-color: #e9d5ff; }
.quick-tile:nth-child(5n+5) { background: linear-gradient(145deg, #ffffff, #e8fbff); border-color: #bae6fd; }

.quick-tile strong {
    font-size: 13px;
}

.filter-toolbar {
    background: var(--fin-surface);
    border: 1px solid var(--fin-border);
    border-radius: 16px;
    box-shadow: var(--fin-shadow-sm);
    padding: 18px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 10px;
}

.analytics-card {
    padding: 14px;
}

.analytics-card .value {
    color: var(--fin-text);
    font-size: 18px;
    font-weight: 800;
}

.analytics-card .label {
    color: var(--fin-muted);
    font-size: 12px;
    font-weight: 600;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.75fr);
    gap: 16px;
}

.chart-card,
.table-card,
.insight-card,
.health-card,
.payout-card {
    padding: 14px;
}

.dashboard-priority-card {
    border-color: #bfdbfe;
    background: linear-gradient(145deg, #ffffff, #f8fbff);
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.09);
}

.dashboard-live-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.transaction-filter-chips {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 13px;
    scrollbar-width: none;
}

.transaction-filter-chips::-webkit-scrollbar {
    display: none;
}

.transaction-chip {
    appearance: none;
    border: 0;
    min-height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef2f7;
    color: #334155;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .22), 0 4px 12px rgba(15, 23, 42, .04);
    transition: transform .16s ease, box-shadow .16s ease, color .16s ease, background .16s ease;
}

.transaction-chip:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .24), 0 8px 18px rgba(15, 23, 42, .08);
}

.transaction-chip i {
    font-size: 13px;
    line-height: 1;
}

.transaction-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
    font-size: 10px;
}

.transaction-chip.pending { background: #fff3df; color: #9a5b00; }
.transaction-chip.success { background: #eafbf0; color: #166534; }
.transaction-chip.failed { background: #ffecef; color: #9f1239; }

.transaction-chip.pending.active {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #fb923c);
    box-shadow: 0 7px 18px rgba(245, 158, 11, .24);
}

.transaction-chip.success.active {
    color: #fff;
    background: linear-gradient(135deg, #16a34a, #4ade80);
    box-shadow: 0 7px 18px rgba(34, 197, 94, .22);
}

.transaction-chip.failed.active {
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #fb7185);
    box-shadow: 0 7px 18px rgba(244, 63, 94, .22);
}

.transaction-chip.active span {
    color: currentColor;
    background: rgba(255, 255, 255, .18);
}

.transaction-chip:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .24);
    outline-offset: 2px;
}

.priority-table-scroll {
    max-height: 322px;
    overflow: auto;
}

.merchant-recent-scroll {
    max-height: 286px;
}

.chart-wrap {
    height: 236px;
    max-height: 236px;
    position: relative;
}

.chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.status-chart-wrap {
    width: 100%;
    max-width: 260px;
    height: 205px;
    max-height: 205px;
    margin: 0 auto;
    position: relative;
}

.status-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    background: var(--fin-success);
}

.premium-table {
    --bs-table-bg: transparent;
}

.premium-table thead th {
    color: var(--fin-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #f8fafc;
    border-bottom: 1px solid var(--fin-border);
    white-space: nowrap;
    padding-top: 10px;
    padding-bottom: 10px;
}

.premium-table td {
    vertical-align: middle;
    border-color: #eef2f7;
    padding-top: 8px;
    padding-bottom: 8px;
}

.status-pill {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-success { background: #dcfce7; color: #166534; }
.status-warning { background: #fef3c7; color: #92400e; }
.status-danger { background: #fee2e2; color: #991b1b; }
.status-info { background: #dbeafe; color: #1e40af; }
.status-muted { background: #f1f5f9; color: #475569; }

.balance-hero {
    padding: 18px;
    color: #fff;
    border: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 58%, #22c7e5 100%);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.22);
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.balance-hero::after {
    content: '';
    position: absolute;
    right: -70px;
    bottom: -85px;
    width: 210px;
    height: 210px;
    border: 30px solid rgba(255,255,255,.08);
    border-radius: 50%;
    pointer-events: none;
}

.balance-hero .muted {
    color: rgba(255,255,255,.75);
}

.balance-value {
    font-size: 29px;
    font-weight: 800;
}

.merchant-grid {
    display: grid;
    grid-template-columns: minmax(300px, .4fr) minmax(0, .6fr);
    gap: 16px;
    align-items: stretch;
}

.health-row,
.payout-row,
.insight-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}

.health-row:last-child,
.payout-row:last-child,
.insight-row:last-child {
    border-bottom: 0;
}

.compact-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.compact-health-grid .health-row {
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 14px;
    background: #f8fafc;
}

.live-updated {
    animation: livePulse 2.2s ease;
}

.live-new-row {
    animation: liveRowHighlight 2.8s ease;
}

@keyframes livePulse {
    0% { color: #0f172a; }
    22% { color: #2563eb; }
    100% { color: inherit; }
}

@keyframes liveRowHighlight {
    0% { background: #ecfeff; }
    100% { background: transparent; }
}

.compact-attention-card {
    max-width: 720px;
}

.desktop-table {
    display: block;
}

.mobile-cards {
    display: none;
}

@media (max-width: 1399.98px) {
    .kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .analytics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .summary-strip,
    .attention-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-main-grid,
    .merchant-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    body.sidebar-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.48);
        z-index: 999;
    }

    .dashboard-title {
        font-size: 22px;
    }

    .dashboard-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .kpi-grid,
    .summary-strip,
    .attention-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .transaction-filter-chips {
        flex-wrap: nowrap;
        margin-left: -2px;
        margin-right: -2px;
    }

    .transaction-chip {
        min-height: 44px;
        padding: 9px 12px;
    }

    .dashboard-hero,
    .chart-card,
    .table-card,
    .insight-card,
    .health-card,
    .payout-card,
    .balance-hero {
        padding: 16px;
        border-radius: 14px;
    }

    .kpi-card {
        min-height: 112px;
    }

    .kpi-value {
        font-size: 21px;
    }

    .balance-value {
        font-size: 26px;
    }

    .chart-wrap {
        height: 220px;
        max-height: 220px;
    }

    .status-chart-wrap {
        display: none;
    }

    .desktop-table {
        display: none;
    }

    .mobile-cards {
        display: grid;
        gap: 12px;
    }
}

@media (min-width: 641px) {
    .desktop-table {
        display: block !important;
    }

    .mobile-cards {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .desktop-table {
        display: none !important;
    }

    .mobile-cards {
        display: grid !important;
        gap: 10px;
    }

    .priority-table-scroll {
        max-height: none;
        overflow: visible;
    }

    .compact-health-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .pi-content {
        padding: 16px 12px;
    }

    .quick-grid {
        gap: 10px;
    }

    .quick-tile {
        min-height: 76px;
        padding: 10px;
    }

    .dashboard-title {
        font-size: 22px;
    }
}



/* QO Pay — sidebar logo: transparent, no white plate, comfortable size */
.pi-sidebar .sidebar-brand .sidebar-brand-logo-wrap {
  text-align: center;
  padding: 8px 14px 4px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.pi-sidebar .sidebar-brand .sidebar-brand-logo {
  width: auto;
  height: 58px;
  max-width: 100%;
  object-fit: contain;
  display: inline-block;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s ease, filter 0.25s ease;
}
.pi-sidebar .sidebar-brand .sidebar-brand-logo:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 12px rgba(46, 207, 154, 0.15));
}
@media (max-width: 991.98px) {
  .pi-sidebar .sidebar-brand .sidebar-brand-logo {
    height: 50px;
  }
}
/* QO Pay — sidebar logo: transparent, no white plate, comfortable size */
.pi-sidebar .sidebar-brand .sidebar-brand-logo-wrap {
  text-align: center;
  padding: 8px 14px 4px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.pi-sidebar .sidebar-brand .sidebar-brand-logo {
  width: auto;
  height: 58px;
  max-width: 100%;
  object-fit: contain;
  display: inline-block;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s ease, filter 0.25s ease;
}
.pi-sidebar .sidebar-brand .sidebar-brand-logo:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 12px rgba(46, 207, 154, 0.15));
}
@media (max-width: 991.98px) {
  .pi-sidebar .sidebar-brand .sidebar-brand-logo {
    height: 50px;
  }
}