:root {
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.layout-wrapper {
    display: flex;
}

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;

    background: #0f172a;

    backdrop-filter: blur(20px);

    overflow-y: auto;
    overflow-x: hidden;

    z-index: 1050;

    transition: .3s;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar {
    scrollbar-width: none;
}

.main-content {
    flex: 1;
    margin-left: 260px;
}

/* HEADER */

.main-header {
    height: 70px;
    background: #fff;
    padding: 0 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 1px solid #e5e7eb;

    position: sticky;
    top: 0;
    z-index: 900;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title {
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    width: 42px;
    height: 42px;

    border: none;
    border-radius: 12px;

    background: #f8fafc;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: .3s;
}

.header-btn:hover {
    background: #e2e8f0;
}

.header-btn i {
    font-size: 18px;
}

.notification-badge {
    position: absolute;
    top: 3px;
    right: 2px;
    font-size: 10px;
}

/* Profile */

.profile-btn {
    border: none;
    background: none;

    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: #3b82f6;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 600;
}

.user-name {
    font-weight: 500;
    color: #374151;
}

/* Dropdown */

.notification-menu {
    width: 280px;
}

.profile-menu {
    min-width: 220px;
}

.dropdown-item {
    padding: 10px 15px;
}

.dropdown-item i {
    margin-right: 10px;
}

/* Hamburger */

.sidebar-toggle {
    display: none;

    border: none;
    background: none;

    font-size: 28px;
}

/* Mobile */

@media(max-width:991px) {

    .sidebar-toggle {
        display: block !important;
    }

    .main-header {
        padding: 0 15px;
    }

    .user-name {
        display: none !important;
    }

    .header-right {
        gap: 8px;
    }

    .header-btn {
        width: 38px;
        height: 38px;
    }

    .avatar {
        width: 38px;
        height: 38px;
    }

    .page-title {
        font-size: 16px;
    }
}

.sidebar-toggle {
    display: none;
    border: none;
    background: none;
    font-size: 28px;
}

.sidebar-close-btn {
    display: none;
    border: none;
    background: none;
    color: #fff;
    font-size: 24px;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, .5);

    opacity: 0;
    visibility: hidden;

    transition: .3s;

    z-index: 1040;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

@media(max-width:991px) {

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-close-btn {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

}

/* paymentoperation */
/* alltransaction */

.stats-card {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.stats-card h2 {
    margin-top: 20px;
    font-weight: 700;
    font-size: 42px;
}

.stats-card p {
    color: #64748b;
    letter-spacing: 1px;
    margin: 0;
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
}

.txn-icon {
    width: 42px;
    height: 42px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.customer-avatar {
    width: 40px;
    height: 40px;
    background: #dbeafe;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table th {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 1px;
}

.table td {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* alltesttransaction */

.page-title {

    font-size: 24px;
    font-weight: 600;
    color: #071c3f;
}

.page-subtitle {
    font-size: 18px;
    color: #55627a;
}

.btn-filter {
    border: 1px solid #dbe2ea;
    background: #fff;
    padding: 12px 22px;
    border-radius: 12px;
}

.stats-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #10b981;
    transform: translateX(-50%);
    transition: .35s ease;
}

.stats-card:hover::after {
    width: 100%;
    /* center line */
}

.card-primary::after {
    background: #4f6ef7;
}

.card-success::after {
    background: #10b981;
}

.card-danger::after {
    background: #ef4444;
}

.card-warning::after {
    background: #f59e0b;
}

.corner-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-bottom-left-radius: 40px;
}

.primary-bg {
    background: #eef2ff;
}

.success-bg {
    background: #e7f8f1;
}

.danger-bg {
    background: #fdecec;
}

.warning-bg {
    background: #fff5e5;
}

.stats-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.primary {
    background: #4f6ef7;
}

.success {
    background: #14b86a;
}

.danger {
    background: #ef4444;
}

.warning {
    background: #f59e0b;
}

.stats-card h2 {
    margin-top: 16px;
    font-size: 42px;
    font-weight: 700;
}

.stats-card p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    letter-spacing: .8px;
}

.transaction-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid #edf2f7;
}

.transaction-header h4 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

.transaction-header span {
    color: #64748b;
}

.table th {
    font-size: 13px;
    color: #64748b;
    padding: 18px 30px;
    font-weight: 600;
}

.table td {
    padding: 18px 30px;
}

.txn-link {
    color: #2563eb;
    text-decoration: none;
}

.merchant-id {
    color: #64748b;
    font-size: 14px;
}

.customer-name {
    font-weight: 600;
}

.customer-email {
    color: #64748b;
}

.badge-success {
    background: #dff7e6;
    color: #15803d;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 14px;
}

@media(max-width:768px) {

    .page-title {
        font-size: 32px;
    }

    .transaction-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

}

/* darkmode */

/* Light Mode */
/* body {
    background: #f5f7fb;
    color: #0f172a;
    transition: all .3s ease;
} */

/* Dark Mode */
body.dark-mode {
    background: #0f172a;
    color: dimgray;
}

/* Cards */
body.dark-mode .card,
body.dark-mode .refund-card,
body.dark-mode .transaction-card,
body.dark-mode .sidebar {
    background: #1e293b;
    color: #fff;
}

/* Inputs */
body.dark-mode .form-control,
body.dark-mode .form-select {
    background: #334155;
    border-color: #475569;
    color: #fff;
}

/* Dropdown */
body.dark-mode .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .dropdown-item {
    color: #fff;
}



/* transaction analytics */

.analytics-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
}

.analytics-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.analytics-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.analytics-body {
    padding: 20px;
}

.header-icon {
    width: 20px;
    height: 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.header-icon.success {
    background: #10b981;
}

.header-icon.warning {
    background: #f59e0b;
}

.header-icon.purple {
    background: #7c3aed;
}


.metric-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: 18px;
    height: 100%;
}

.metric-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.metric-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.metric-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
}

.metric-icon.success {
    background: #10b981;
}

.metric-icon.danger {
    background: #ef4444;
}

.metric-icon.warning {
    background: #f59e0b;
}

.metric-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: .5px;
}

.metric-value {
    margin: 0;
    font-size: 42px;
    font-weight: 700;
}

.transaction-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    padding: 14px 20px;
    border: none;
}

.transaction-table tbody td {
    padding: 18px 20px;
    border-top: 1px solid #f1f5f9;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge.failed {
    background: #fee2e2;
    color: #b91c1c;
}

.transaction-table tbody tr:hover {
    background: #f8fafc;
}

/* chargeback analysis */

.analytics-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
}

.analytics-header {
    padding: 18px 28px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.header-icon.primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.header-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.tip-item {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
}

.tip-item:last-child {
    margin-bottom: 0;
}

.tip-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.tip-icon.blue {
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
}

.tip-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.tip-icon.green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.tip-icon.purple {
    background: linear-gradient(135deg, #d946ef, #9333ea);
}

.tip-item h5 {
    margin-bottom: 6px;
    font-size: 1.1rem;
    font-weight: 600;
}

.tip-item p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}

.stat-box {
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.stat-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.stat-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 22px;
}

.stat-icon.success {
    background: linear-gradient(135deg, #22c55e, #10b981);
}

.stat-icon.danger {
    background: linear-gradient(135deg, #ef4444, #ec4899);
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.stat-box h5 {
    color: #374151;
    margin-bottom: 4px;
}

.stat-box h2 {
    margin: 0;
    font-size: 42px;
    font-weight: 700;
}


.submenu .nav-link.active {
    background: var(--accent-purple);
    color: #f14949;
}