/*
Theme Name: AllinBrand
Theme URI: http://allinbrand.com
Description: AllinBrand
Author: nttam
Author URI: http://allinbrand.com
Template: Divi
Version: 1.0
*/


/* =================== */

/* Loyalty Page Navigation */
.loyalty-page-nav {
    display: flex;
    gap: 4px;
    width: fit-content;
    margin: 0 auto 2rem;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px;
}

.loyalty-nav-tab {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #6b6a66;
    text-decoration: none;
    border-radius: 6px;
    border: 0.5px solid transparent;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.loyalty-nav-tab:hover {
    color: #2c2c2a;
}

.loyalty-nav-tab.active {
    background: #ffffff;
    color: #2c2c2a;
    border-color: #e2e0da;
}

a.loyalty-nav-tab svg {
    width: 20px;
    height: 20px;
    stroke: #6b6a66;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

a.loyalty-nav-tab.active svg {
    stroke: #2c2c2a;
}


.loyalty-page-content {
    min-height: 400px;
    padding-top: 25px;
}


/* Login */
.user-registration-register.register {
	display: none !important;
}


/* Toast */

body .swipetoast-container {
    z-index: 99999999999 !important;
}

@keyframes toastPop {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(.8);
    }
    70% {
        transform: translateY(-2px) scale(1.03);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.swipetoast.custom-toast {
    backdrop-filter: blur(3px);
    font-weight: 500;
    text-align: center;
    border-radius: 8px;
    animation: toastSlideUp .3s ease-out;
}

.swipetoast.success.custom-toast {
    background: #ffffffb0;
    border: 1px solid #00ae5c;
    color: #00a356;
}

.swipetoast.error.custom-toast {
    background: #fef2f2;
    border: 1px solid #FF4F4F;
    color: #FF4F4F;
}

.swipetoast.warning.custom-toast {
    background: #fffbebd9;
    border: 1px solid #c3a013;
    color: #92400e;
}

.swipetoast.info.custom-toast {
    background: #e8f8ffdb;
    border: 1px solid #4FC3F7;
    color: #1a80ae;
}


/* Program Grid */
.program-grid {
    --columns: auto-fill;
    display:grid;
    grid-template-columns:repeat(var(--columns), minmax(320px, 1fr));
    gap:24px;
}

.program-card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    overflow:hidden;
    transition:.2s;
	animation:fadeIn .3s ease;
}

@keyframes fadeIn{

    from{
        opacity:0;
        transform:translateY(8px);
    }

    to{
        opacity:1;
        transform:none;
    }

}

.program-card:hover{
    transform:translateY(-3px);
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.program-banner{
    height:180px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f8fafc;
	background: linear-gradient(135deg, #032911 0%, #084f22 50%, #032911 100%);
	position: relative;
}

.program-banner .background-image {
    height: 100%;
    width: 100%;
}

.program-banner img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.program-content{
    padding:20px;
}

.program-content h3{
    margin:0 0 10px;
    font-size:18px;
	color: #2d4d24;
}

.program-content p{
    margin:0 0 16px;
    color:#64748b;
    font-size:14px;
}

.program-stats{
    display:flex;
    gap:24px;
    margin-bottom:18px;
}

.program-stats span{
    display:block;
    font-size:12px;
    color:#64748b;
}

.program-stats strong{
    display:block;
    font-size:22px;
    margin-top:4px;
}

.program-btn {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    background: #b9d986;
    color: #2d4d24;
}

.program-btn:hover{
	background: linear-gradient(135deg, rgb(3, 41, 17) 0%, rgb(8, 79, 34) 50%, rgb(3, 41, 17) 100%);
    color: #b9d986;
    transition: all .2s ease;
}

.program-pagination{
    margin-top:32px;
    display:flex;
    justify-content:center;
}

.program-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0 4px;
    padding: 0 12px;
    border: 1px solid #2f4f1f;
    border-radius: 8px;
    text-decoration: none;
    background: #fff;
    color: #2f4f1f;
}

.program-pagination .current {
    background: #b7dc7b !important;
    color: #2f4f1f;
    border-color: #b7dc7b;
}

.program-pagination .page-numbers:hover{
    background: #b7dc7b40;
}

/* Program Loading */
.program-loading-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(320px,1fr));
    gap:24px;
}

.program-skeleton{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:16px;
    overflow:hidden;
}

.program-skeleton-banner{
    height:120px;
    background:#f1f5f9;
}

.program-skeleton-content{
    padding:20px;
}

.program-skeleton-line{
    height:14px;
    border-radius:8px;
    background:#e5e7eb;
    margin-bottom:12px;
    animation:pulse 1.5s ease-in-out infinite;
}

.program-skeleton-line.title{
    width:70%;
    height:20px;
}

.program-skeleton-line.text{
    width:100%;
}

.program-skeleton-line.text.short{
    width:60%;
}

.program-skeleton-stats{
    display:flex;
    gap:16px;
    margin:20px 0;
}

.program-skeleton-stat{
    flex:1;
    height:40px;
    border-radius:8px;
    background:#e5e7eb;
    animation:pulse 1.5s ease-in-out infinite;
}

.program-skeleton-btn{
    height:42px;
    border-radius:8px;
    background:#e5e7eb;
    animation:pulse 1.5s ease-in-out infinite;
}

@keyframes pulse{

    0%{
        opacity:.5;
    }

    50%{
        opacity:1;
    }

    100%{
        opacity:.5;
    }

}

@media (max-width: 1024px){
    .program-grid {
        --columns: 2;
    }
}

@media (max-width: 767px){
    .program-grid {
        --columns: 1;
    }
}


/*  */


.swal2-container div:where(.swal2-icon) {
	width: 2em;
    height: 2em;
}

.swal2-container div:where(.swal2-icon) .swal2-icon-content {
    font-size: 1.5em;
}

.swal2-container div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line] {
    top: .8em;
    width: 1.9375em;
    height: 0.3125em;
}

.swal2-container div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left] {
    left: 0.06em;
}

.swal2-container div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right] {
    right: 0.06em;
}

.swal2-container div:where(.swal2-icon).swal2-info {
    border-color: var(--primary);
    color: var(--primary);
}

button.swal2-confirm.swal2-styled {
    background: var(--primary);
    color: var(--primary-fg);
}

button.swal2-confirm.swal2-styled:hover {
    background: var(--primary-hover);
}

button.swal2-deny.swal2-styled {
    background: var(--muted);
    color: var(--muted-fg);
}

button.swal2-deny.swal2-styled:hover {
    background: var(--muted-fg);
    color: var(--muted);
}

.remember-scan-wrap {
    margin-top: 15px;
}

.method-selection-wrapper p {
    color: var(--muted-fg);
    margin-bottom: 8px;
}

.remember-scan-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: var(--foreground);
    user-select: none;
}

.remember-scan-label input {
    display: none;
}

.remember-scan-label .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
}

.remember-scan-label input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.remember-scan-label input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 0px;
    width: 5px;
    height: 12px;
    border: solid var(--primary-fg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-scan-label:hover .checkmark {
    border-color: #3085d6;
}

input#scanner-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    border-radius: 8px;
    padding: 10px;
    width: auto;
    color: #2d4d24;
    border-color: #2d4d24;
}

/* bottom Nav bar */


@media (min-width: 769px) {
	.bottom-nav-bar, .mobile-action-bar {
		display: none !important;
	}
}

@media (max-width: 768px) {
	
	.single-post footer {
		height: 65px;
	}
	
	.footer-section-0 {
		margin-bottom: 65px;
	}
	
	.dt-buttons button#scan-member-btn, .dt-buttons button.btn-refresh, .dt-buttons button#add-member-btn{
		display: none !important;
	}
	
	.bottom-nav-bar {
		position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
		background: #2d4d24 !important;
		border-top: 1px solid rgba(255,255,255,.1);
		z-index: 999;
		backdrop-filter: blur(6px);
	}

    .mobile-action-bar {
        display: flex;
        height: 65px;
    }

    .mobile-action-bar button {
        flex: 1;
        border: 0;
        background: transparent;
        color: #b9d986;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 12px;
		gap: 3px;
		transition: all 0.25s ease;
		cursor: pointer;
    }
	
	.mobile-action-bar button:hover {
		background: #203b18;
		transition: all 0.25s ease;
	}
	
	.mobile-action-bar button span {
		display: flex;
		transition: all 0.25s ease;
	}

	.mobile-action-bar button span img {
		width: 23px;
	}

	.mobile-action-bar button:hover span {
		transform: translateY(-2px);
		transition: all 0.25s ease;
	}
	
	.mobile-action-bar button#mobile-refresh span img, .mobile-action-bar button#mobile-print span img, .mobile-action-bar button#mobile-filter span img {
		padding: 2px;
	}
}

/*  */

div.dataTables_processing>div:last-child>div {
    background: var(--primary);
}

.members-table-wrapper {
    background: var(--card);
    border-color: var(--border);
    border-radius:16px;
    padding:20px;
    box-shadow:0 1px 3px rgba(0,0,0,.08);
	font-size: 14px;
}

#members-table_wrapper .top {
    display: inline-block;
    margin-bottom: 10px;
    width: 100%;
}

#members-table {
    border: none !important;
    border-collapse: separate !important;
    border-spacing: 0;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
    border-radius: 12px;
    overflow: hidden;
	margin-bottom: 15px;
    color: var(--muted-fg);
}

#members-table thead th {
    background: var(--primary);
    color: var(--primary-fg);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--border) !important;
    padding: 14px 16px;
}

table.dataTable thead>tr>th.sorting:before, table.dataTable thead>tr>th.sorting:after {
    opacity: 0.4;
}

table.dataTable thead>tr>th.sorting_asc:before, table.dataTable thead>tr>th.sorting_desc:after, table.dataTable thead>tr>td.sorting_asc:before, table.dataTable thead>tr>td.sorting_desc:after {
    opacity: .9;
}

#members-table tbody td {
    padding: 16px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
    box-shadow: none !important;
}

#members-table tbody tr {
    transition: all .2s ease;
	cursor:pointer;
}

#members-table tbody tr:hover {
    background: var(--muted);
}

table.dataTable > tbody > tr > .sorting_1,
table.dataTable > tbody > tr > .sorting_2,
table.dataTable > tbody > tr > .sorting_3 {
    background: transparent !important;
	box-shadow: none !important;
}

table.dataTable.stripe>tbody>tr.odd>*, table.dataTable.display>tbody>tr.odd>* {
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.023) !important;
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-stripe), 0.023) !important;
}

#members-table tbody tr:hover td {
    box-shadow: none !important;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    line-height: normal;
    text-transform: capitalize;
}

.status-badge.new {
    background: #dfecf7;
    color: #3d90f1;
}

.status-badge.active {
    background: #E5F3DB;
    color:#489644;
}

.points-pill {
    background:#f1f5f9;
    padding:6px 12px;
    border-radius: 6px;
    font-weight:600;
}

/* Search box */
.dataTables_filter input {
    border:1px solid #b7dc7b  !important;
    border-radius:8px !important;
    padding:10px 14px !important;
    min-width:250px;
    background:#fff;
	color: #2f4f1f !important;
	font-weight: 600;
	height: 45px
}

.dataTables_filter input:focus {
    outline: none;
    border-color: #b7dc7b !important;
    box-shadow: 0 0 0 3px #b7dc7b4a;
}

.dataTables_filter label {
    font-size: 0;
}

.dataTables_filter input {
    font-size: 14px;
	float: right;
}

/* Paging */

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

.dataTables_paginate .paginate_button {
    min-width: 40px;
    height: 40px;
    padding: 0 14px !important;
    border: 1px solid var(--border) !important;
    border-radius: 5px !important;
    background: var(--card) !important;
    color: var(--foreground)ss !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all .2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--muted) !important;
    border-color: var(--border) !important;
    color: var(--foreground) !important;
}

#members-table_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--primary-fg) !important;
}

.dataTables_paginate .paginate_button.disabled {
    opacity: .4;
    cursor: not-allowed !important;
}

.dataTables_paginate .paginate_button.previous,
.dataTables_paginate .paginate_button.next {
    font-weight: 600;
}

/* Button Refresh */
.top .dt-buttons .btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid #b7dc7b;
    border-radius: 8px;
    background: #ffffff;
    color: #2f4f1f;
    font-size: 14px;
    font-weight: 600;
	line-height: normal;
    cursor: pointer;
    transition: all .2s ease;
}

.top .dt-buttons .btn-refresh:hover, .top .dt-buttons .btn-refresh:focus {
	background: #b7dc7b !important;
    border-color: #cbd5e1 !important;
    color: #0f172a;
    transform: translateY(-1px);
}

.top .dt-buttons .btn-refresh:active {
    transform: translateY(0);
}

.top .dt-buttons .btn-refresh i {
    font-size: 14px;
}

/* popup */

div:where(.swal2-container) {
    z-index: 999999;
}

body div:where(.swal2-container) div:where(.swal2-popup) {
    background: var(--sidebar);
    color: var(--foreground);
    border-radius: 15px !important;
}

body div:where(.swal2-container) div:where(.swal2-loader) {
    border-color: var(--primary) rgba(0, 0, 0, 0) var(--primary) rgba(0, 0, 0, 0);
}

.swal2-container {
    backdrop-filter: blur(6px);
}

h2#swal2-title {
    font-size: 24px;
}

/* Member Popup */
.member-popup {
    padding: 0 !important;
    overflow: hidden;
    z-index: 999999;
}

.member-popup .swal2-popup {
    border-radius: 15px !important;
    padding-bottom: 0px;
    overflow: hidden;
}

.member-popup .swal2-popup div#swal2-html-container {
    padding: 0px;
}

.member-popup a {
    color: var(--highlight);
}

/* New Layout: Sidebar + Content */
.member-popup-layout {
    display: flex;
    gap: 0;
    min-height: 500px;
    transition: all 0.3s ease;
}

/* Sidebar Menu */
.member-sidebar-menu {
    width: 150px;
    padding: 60px 10px 20px;
    display: flex;
    flex-direction: column;
    color: var(--foreground);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    white-space: nowrap;
    background: var(--background);
    border-color: var(--border);
}

.sidebar-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
    display: none;
}

.sidebar-avatar {
    width: 70px;
    height: 70px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #b9d986;
    color: #2d4d24;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    border: 3px solid rgba(255,255,255,0.2);
}

.sidebar-member-info {
    text-align: center;
}

.sidebar-member-name {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.sidebar-member-status {
    font-size: 12px;
    color: #b9d986;
    background: rgba(185,217,134,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* Sidebar Stats */
.sidebar-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
    display: none;
}

.sidebar-stat {
    text-align: center;
    padding: 10px 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.sidebar-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #b9d986;
    margin-bottom: 2px;
}

.sidebar-stat-value.sidebar-tier {
    font-size: 12px;
}

.sidebar-stat-label {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
}


/* sidebar-collapsed */

.member-popup-layout.sidebar-collapsed .member-sidebar-menu {
    width: 70px;
}

.member-popup-layout.sidebar-collapsed .sidebar-label {
    opacity: 0;
    display: none;
    transition: opacity 0.2s ease;
}

.toggle-sidebar-btn {
    background: none;
    border: none;
    padding: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: var(--sidebar-fg);
    border-top: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    gap: 5px;
    border-radius: 10px;
}

.toggle-sidebar-btn:hover {
    background-color: var(--muted);
}

.toggle-sidebar-btn .icon-toggle {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}

.member-popup-layout.sidebar-collapsed .toggle-sidebar-btn .icon-toggle {
    transform: rotate(0deg);
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--sidebar-fg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
}

.sidebar-menu-item:hover {
    background: var(--muted);
}

.sidebar-menu-item.active {
    background: linear-gradient(135deg, #004142 0%, #79a852 100%);
    color: #fff;
}

.sidebar-menu-item.active .sidebar-icon svg {
    stroke: #fff;
}

.sidebar-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.sidebar-label {
    flex: 1;
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

/* Popup Content Area */
.member-popup-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    align-items: start;
    padding: 20px;
}

.member-header-card {
    /* padding: 20px 25px; */
    /* border-bottom: 1px solid #e5e7eb; */
}

.member-card {
    text-align: left;
}

.member-card-header {
    background: #d9f6ab;
    padding: 20px 35px;
    text-align: center;
	border-radius: 12px;
    display: flex;
    gap: 20px;
}

.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #ffffff;
    color: #2f4f1f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.member-card-header-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 11px;
}

.member-card-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    padding-bottom: 0px;
}

.member-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    border: 1px solid #5fbc79;
}

.member-card-body {
    padding: 30px 20px;
}

.member-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--background);
    border-radius: 12px;
    padding: 10px 5px;
    text-align: center;
}

.stat-card .label {
    font-size: 12px;
    color: var(--muted-fg);
    text-transform: uppercase;
    font-weight: 600;
}

.member-card-body .stat-card .label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.member-card-body .stat-card .icon {
    padding: 6px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
}

.member-card-body .stat-card .icon.icon-point {
    background: #EBF8E4;
    color: #3EA751;
}

.member-card-body .stat-card .icon.icon-tier-point {
    color: #433ADF;
    background: #F2F2FE;
}

.member-card-body .stat-card .icon.icon-tier {
    color: #F7AB05;
    background: #FEF9EC;
}

.stat-card .value {
    margin-top: 8px;
    font-size: 28px;
    font-weight: 700;
    color: var(--foreground);;
}

.member-grid-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 13px 0px;
    border-bottom: 1px dashed var(--border);
    align-items: center;
}

.member-grid .label {
    color: var(--muted-fg);
    font-weight: 600;
    display: flex;
    gap: 15px;
    align-items: center;
}

.member-grid-item .icon {
    display: flex;
}

.member-grid .value {
    color: var(--foreground);;
    word-break: break-word;
}

.tier-badge {
    display: inline-block;
    padding: 6px 14px;

    background: #fef3c7;
    color: #92400e;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
}

.swal2-close {
    font-size: 32px !important;
    color: #64748b !important;
}

.swal2-close:hover {
    color: #111827 !important;
}

/* Member detail - Right column */
.panel{
    display:none;
    animation:fadeIn .2s ease;
}

.panel.panel-edit {
    background: var(--background);
    border-radius: 16px;
    padding: 15px;
    border: 1px solid var(--border);
}

@keyframes fadeIn{
    from{
        opacity:0;
        transform:translateY(10px);
    }
    to{
        opacity:1;
        transform:none;
    }
}

/* Member detail action */
.member-card-actions{
    display:flex;
    gap:12px;
    justify-content:center;
    margin-top:20px;
    margin-bottom:25px;
}

.member-action-btn{
    border:none;
    cursor:pointer;
    padding:12px 18px;
    border-radius:8px;
    font-size:14px;
    font-weight:600;
    transition:.2s;
	border: 1px solid #b7dc7b;
    background: #b7dc7b57;
    color: #2d4d24;
}

.member-action-btn:hover{
    transform:translateY(-2px);
}

.member-action-btn.active{
    background:linear-gradient(135deg, #004142 0%, #79a852 100%);
    color:#fff;
}

/*
.wallet-btn{
    background:#ffffff;
    color:#1f2937;
}

.points-btn{
    background:#1f2937;
    color:#fff;
}

.edit-btn{
    background:#e9f3d3;
    color:#4f6b2b;
}*/

/* Wallet */

.member-content,
.member-right {
    flex: 1;
    overflow-y: auto;
}

@media(max-width:768px){
    .member-popup-layout {
        flex-direction: column;
    }

    .member-sidebar-menu {
        width: 100%;
        min-width: unset;
        padding: 15px;
    }

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

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sidebar-menu-item {
        flex: 1;
        min-width: calc(33% - 8px);
        justify-content: center;
        padding: 10px;
    }

    .sidebar-menu-item .sidebar-label {
        display: none;
    }

    .sidebar-icon {
        margin: 0;
    }

    .member-right {
        padding: 15px;
    }
}

/* Hide old elements in new layout */
.member-popup-layout .member-card-actions {
    display: none !important;
}

/* Panel adjustments for new layout */
.member-popup-layout .panel.active {
    display: block;
}

.wallet-card{
    max-width:300px;
    margin:30px auto 0;
    padding:20px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius:20px;
    text-align:center;
    box-shadow:
        0 10px 25px rgba(0,0,0,.05);
}

.wallet-card-header h4{
    margin:0;
    font-size:18px;
    font-weight:700;
    color: var(--foreground);
}

.wallet-card-header span{
    display:block;
    margin-top:5px;
    font-size:13px;
    color:var(--muted-fg);
}

.member-qr{
    margin:20px auto;
    padding:15px;
    width:max-content;
    background:#fff;
    border-radius:16px;
    border:1px solid #f1f5f9;
}

.member-qr img,
.member-qr canvas{
    display:block;
    border-radius:8px;
}

.wallet-link {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wallet-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: #b7dc7b;
    color: #1f2937;
    border-radius: 999px;
    text-decoration: none;
    transition: .2s;
    border: 1px solid #b7dc7b;
    font-size: 14px;
}

.wallet-link a:hover{
    transform:translateY(-2px);
    background:#a6d365;
}

.wallet-link a.send_wallet_pass {
    background: transparent;
    color: var(--foreground);
}

/* Update point */
.points-adjustment, #redeem-section {
    padding:20px;
    background:var(--background);
    border-radius:18px;
}

.points-adjustment h4 {
    margin:0 0 15px;
	padding-bottom: 0px;
}

.current-balance {
    margin-bottom: 15px;
    color: var(--foreground);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-balance strong{
    float:right;
    font-size:22px;
}

.balance-display{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap: wrap;
}

.current-points{
    font-weight:700;
}

.points-preview{
    font-size:20px;
    font-weight:600;
    text-align: right;
    color: var(--foreground);
}

.points-preview .arrow{
    opacity:.5;
    margin:0 6px;
}

.points-preview .change.plus{
    color:#16d68a;
	font-size: 14px;
}

.points-preview .change.minus{
    color:#ff5b5b;
	font-size: 14px;
}

.adjust-box{
    display:flex;
    gap:15px;
    align-items:center;
	flex-direction: row;
}

.adjust-box input{
    flex:1;
    text-align:center;
    border:none;
    background:#fff;
    border-radius:12px;
    padding:10px 15px;
    font-size:24px;
    font-weight:700;
	width: 100%;
}

.btn-adjust{
    width:50px;
    height:50px;
    border:none;
    border-radius:12px;
    font-size:28px;
    cursor:pointer;
}

.btn-adjust.minus{
    background:#ff5b5b;
    color:#fff;
}

.btn-adjust.plus{
    background:#16d68a;
    color:#fff;
}

.btn-update-points{
    width:100%;
    margin-top:20px;
    border:none;
    padding:14px;
    border-radius:12px;
    background: var(--primary);
    color: var(--primary-fg);
    font-weight:700;
    cursor:pointer;
	font-size: 16px;
}

button.btn-update-points[disabled] {
    cursor: not-allowed;
    opacity: 0.7;
}

/* toggle point */
.points-mode {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--card);
    padding: 4px 4px;
    border-radius: 10px;
}

.mode-option{
    flex:1;
    cursor:pointer;
}

.mode-option input{
    display:none;
}

.mode-option span {
    display: block;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    background: var(--card);
    font-weight: 600;
    transition: .2s;
    font-size: 16px;
}

.mode-option input:checked + span {
    background: #b9d986;
    color: #2d4d24;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1)
}

/* Point Error */
/* .message-alert {
    display:none;
    margin-top:15px;
    padding:8px;
    border-radius:10px;
    font-size:14px;
    font-weight:500;
} */

.message-item{
    padding:12px 16px;
    margin-bottom:10px;
    border-radius:8px;
    font-size:14px;
    line-height:1.4;
}

.message-alert .message-item:first-child {
	margin-top:10px;
}

.message-alert .message-item:last-child {
	margin-bottom: 0px;
}

.message-item.success{
    background:#ecfdf5;
    border:1px solid #bbf7d0;
    color:#166534;
}

.message-item.warning{
    background:#fffbeb;
    border:1px solid #fde68a;
    color:#92400e;
}

.message-item.error{
    background:#fef2f2;
    border:1px solid #fecaca;
    color:#991b1b;
}

/* Scanner */
.top .dt-buttons .btn-scan-member, .top .dt-buttons .btn-add-member, .top .dt-buttons .btn-scan-code {
    background:#b9d986;
    border: 1px solid #b9d986;
    padding:12px 20px;
    border-radius:10px;
    font-weight:600;
    cursor:pointer;
	transition: all .2s ease;
	font-size: 14px;
	line-height: normal;
}

.top .dt-buttons .btn-scan-member:hover, .top .dt-buttons .btn-add-member:hover, .top .dt-buttons .btn-scan-code:hover {
    background: #2d4d24 !important;
    color: #b9d986;
	transform: translateY(-1px);
	transition: all .2s ease;
}

#reader{
    width:100%;
    min-height:300px;
}

.scan-help{
    margin-top:10px;
    font-size:13px;
    color:#6b7280;
    text-align:center;
}


/* Program select */
#program_id{
    height:45px;
    padding:0 45px 0 16px;
    border:1px solid var(--border);
    border-radius:8px;
    background:#fff;
    color:var(--foreground);
    font-size:14px;
    font-weight:500;
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
    cursor:pointer;
    transition:all .2s ease;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5 7l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:right 16px center;
    background-color: var(--card);
}

#program_id:hover{
    border-color:var(--border);
}

#program_id:focus{
    outline:none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* Member history panel */

.member-history {
    padding: 20px;
    background: var(--background);
    border-radius: 18px;
}

.history-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:20px;
}

.history-header h4{
    margin:0;
	padding-bottom: 0px;
}

.history-refresh-btn{
    border:none;
    background:#f3f4f6;
    color:#374151;
    font-size:13px;
    font-weight:600;
    padding:8px 12px;
    border-radius:8px;
    cursor:pointer;
    transition:.2s;
}

.history-refresh-btn:hover{
    background:#e5e7eb;
}

.member-history .member-history-wrap {
    max-height: 550px;
    overflow-y: auto;
}

div#member-history-list {
    position: relative;
}

div#member-history-list:before {
    content: '';
    position: absolute;
    width: 1px;
    height: 100%;
    left: 14px;
    background: var(--border);
}

.history-item {
    display: flex;
    gap: 15px;
    padding: 15px 10px 15px 0px;
    position: relative;
}

.history-item:after {
    border-bottom: 1px solid var(--border);
    content: '';
    position: absolute;
    width: calc(100% - 40px);
    bottom: 0;
    right: 0;
    opacity: .6;
}
.history-icon{
    width:30px;
    height:30px;
    border-radius:50%;
    background:var(--card);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
	position: relative;
}

.history-icon .icon {
    width: 100%;
    height: 100%;
    background-size: 45%;
    position: absolute;
    background-repeat: no-repeat;
    background-position: center;
}

.history-icon .icon.checked-in {
    background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/check-in.png);
}

.history-icon .icon.checked-out {
    background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/logout.png);
}

.history-icon .icon.points-set {
    background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/equal.png);
}

.history-icon .icon.points-burned {
    background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/minus.png);
}

.history-icon .icon.points-earned {
    background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/plus.png);
}

.history-icon .icon.gift {
    background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/gift-box-1.png);
}

.history-content {
    text-align: left;
}

.history-title{
    font-weight:600;
    color:var(--foreground);
	font-size: 14px;
	margin-bottom: 4px;
}

.history-description{
    font-size: 12px;
    color: var(--muted-fg);
    line-height: 1.4;
    margin-bottom: 4px;
}

.history-date{
    font-size:12px;
    color:var(--muted-fg);
    margin-top:4px;
}

.history-amount{
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
}

.history-amount.positive{
    color: #16d68a;
}

.history-amount.negative{
    color: #ff5b5b;
}

.history-amount.neutral{
    color: #4f8cff;
}

.history-empty{
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,.5);
}

.history-loading{
    text-align: center;
    padding: 30px;
    color: #6b7280;
}

.history-skeleton{
    padding:14px;
    border-bottom:1px solid #eee;
}

.history-skeleton-line{
    height:12px;
    border-radius:6px;
    background:#eee;
    margin-bottom:8px;
    animation:pulse 1.5s infinite;
}

.history-skeleton-line:last-child{
    width:60%;
}

@keyframes pulse{
    0%{opacity:.2;}
    50%{opacity:1;}
    100%{opacity:.2;}
}

/* Form update infor */
.form-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
	text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--foreground);
}

.form-group input:not(#countryCode-ts-control) {
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all .2s ease;
    background: var(--card);
    width: 100%;
}

.ts-wrapper.single.input-active .ts-control {
    background: var(--muted);
}

.ts-dropdown {
    background: var(--sidebar);
    color: var(--foreground);
}

.ts-dropdown .active {
    background-color: var(--background);
    color: var(--foreground);
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
    color: var(--foreground);
}

.daterangepicker.show-calendar {
    z-index: 999999;
    background: var(--card);
}

.daterangepicker:after {
    border-bottom: 6px solid var(--card);
}

.daterangepicker .calendar-table {
    background-color: var(--card);
}

.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {
    background-color: var(--card);
}

.daterangepicker td.available:hover, .daterangepicker th.available:hover {
    background-color: var(--muted);
}

.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span {
    color: var(--foreground);
    border: solid var(--foreground);
}

.daterangepicker td.active, .daterangepicker td.active:hover {
    background-color: var(--primary);
}

.form-actions {
    margin-top: 10px;
    text-align: right;
}

.form-actions button {
    border: none;
    cursor: pointer;
    height: 48px;
    padding: 0 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: .2s;
    background: #b7dc7b;
    color: #2d4d24;
}

.form-actions button:hover {
    background: #2d4d24;
    color: #b7dc7b;
}

.form-actions button:active {
    transform: scale(.98);
}

.phone-field{
    display:flex;
    gap:12px;
    align-items:stretch;
}

.phone-field .ts-wrapper{
    flex:0 0 180px;
}

.phone-field .ts-wrapper .ts-control {
    border-radius: 8px;
    height: 40px;
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--foreground);
}

.phone-field input{
    flex:1;
    min-width:0;
}

.dateOfBirth-picker select.yearselect {
    display: none;
}

.birthday-row{
    display:flex;
    gap:12px;
}

.birthday-row select{
    flex:1;
    padding:0 14px;
    border:1px solid #ddd;
    border-radius: 8px;
    background:#fff;
    font-size:16px;
    outline:none;
	height: 40px;
}

.form-group.error input:not(#countryCode-ts-control), .form-group.error select {
    border-color: #fecaca;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 14px;
    margin-top: 5px;
    padding: 5px;
    border-radius: 8px;
    width: auto;
}

@media (max-width: 768px) {

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-actions {
        text-align: stretch;
    }

    .form-actions button {
        width: 100%;
    }
}

/* Redeem rewards */
#redeem-section {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#redeem-section .redeem-header .panel-header {
    margin-bottom: 0px;
}

#redeem-section h4 {
	padding-bottom: 0px;
}

.panel-points .no-rewards {
    padding: 24px;
}

.no-rewards-icon{
    font-size:30px;
}

.no-rewards h3{
    color:var(--foreground);
	font-size: 20px;
    padding-bottom: 0px;
}

.next-reward-box{
    max-width:320px;
    margin:0 auto;
    padding:16px;
    border-radius:12px;
    background: linear-gradient(145deg, var(--card), var(--card));
    border: 1px solid var(--border);
    width: 100%;
}

.next-reward-label{
    font-size:12px;
    text-transform:uppercase;
    color:var(--muted-fg);
    margin-bottom:6px;
}

.next-reward-name{
    font-weight:600;
    font-size:20px;
    color:var(--foreground);
}

.next-reward-remaining{
    margin-top:6px;
    color:var(--highlight);
    font-weight:500;
	font-size: 16px
}

.reward-list{
    /*max-height: 300px;
    overflow-y: auto;
    padding-right: 6px;
	display:grid;
	gap: 10px;
    grid-template-columns: repeat(2, 1fr);
	padding-top: 5px;*/
    display: flex;
    flex-direction: column;
    gap: 12px; /* Khoảng cách giữa các hàng quà */
    max-height: 300px; /* Chiều cao tối đa trước khi xuất hiện scrollbar */
    overflow-y: auto;
    padding-right: 8px;
    padding-top: 6px;
}

.reward-list::-webkit-scrollbar {
    width: 6px;
}
.reward-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.reward-card {
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 12px;
    padding: 10px;
    transition: all .2s ease;
    gap: 15px;
}

.reward-card:hover{
	border-color:var(--highlight-border);
    box-shadow:0 4px 12px rgba(0,0,0,.08);
	transform: translateY(-2px);
}

.reward-card-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.reward-card .reward-icon-box {
    width: 60px;
    height: 60px;
    color: #72B480;
    background: #EAF4EC;
    padding: 15px;
    border-radius: 50%;
}

.reward-card .reward-icon-box svg {
    width: 100%;
    height: 100%;
    fill: #399540;
}

.reward-info {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.reward-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
    text-transform: capitalize;
}

.reward-desc{
    font-size:12px;
    color:#6b7280;
}

.reward-points {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fef3c7;
    border-radius: 999px;
    font-size: 12px;
    color: #92400e;
    font-weight: bold;
}

.reward-points .points-icon {
    width: 15px;
    height: 20px;
    color: #D4E6F1;
}

.points-icon circle.st0 {
    /* fill: #2C3E50; */
    stroke: currentColor;
    stroke-width: 20;
    stroke-miterlimit: 10;
}

.points-icon polygon.st1 {
    fill: currentColor;
}

.reward-action {
    width: 100%;
}

.reward-action span.limit {
    font-size: 12px;
    color: #ff5b5b;
	font-weight: 500;
}

.redeem-btn {
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: .2s;
    background: var(--primary);
    color: var(--primary-fg);
    border: 1px solid var(--primary);
}

.redeem-btn:hover{
    background:var(--primary-fg);
	color: var(--primary)
}

.redeem-btn:active{
    transform:scale(.97);
}

.redeem-confirm{
    display:flex;
    align-items:center;
    gap:8px;
}

.confirm-redeem-btn,
.cancel-redeem-btn{
    border:none;
    border-radius:8px;
    padding:8px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    transition:all .2s ease;
}

.confirm-redeem-btn {
    background: var(--primary);
    color: var(--primary-fg);
}

.confirm-redeem-btn:hover{
    background:var(--primary-fg);
	color: var(--primary)
}

.confirm-redeem-btn:active{
    transform:scale(.97);
}

.cancel-redeem-btn{
    background:#f3f4f6;
    color:#374151;
}

.cancel-redeem-btn:hover{
    background:#e5e7eb;
}

.cancel-redeem-btn:active{
    transform:scale(.97);
}

.redeem-btn:disabled,
.confirm-redeem-btn:disabled,
.cancel-redeem-btn:disabled{
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width:768px){

    .reward-card{
        flex-direction:column;
        gap:12px;
    }

    .redeem-btn{
        width:100%;
    }
	
	.redeem-confirm{
        width:100%;
    }

    .confirm-redeem-btn,
    .cancel-redeem-btn{
        flex:1;
    }

}

@media (max-width: 480px){ 
    .reward-list {
        grid-template-columns: 1fr;
    }
}

/* Referral Panel Container */
/*
.panel-referral {
    background-color: #f8f9fa;
    padding: 24px;
    border-radius: 16px;
}

.panel-referral .redeem-header h4 {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 20px;
    width: 100%;
}

.ref-reward-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.ref-reward-card {
    background: #ffffff;
    border: 1px solid #e0e4e8;
    border-radius: 12px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.ref-reward-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    line-height: 1.3;
}

.ref-reward-points {
    margin-bottom: 16px;
}

.ref-reward-points span {
    background-color: #fdf3d8; 
    color: #9c6218;            
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
}


.ref-reward-action {
    width: 100%;
}

.ref-redeem-btn {
    width: 100%;
    background: transparent;
    border: 1px solid #aed581; 
    color: #388e3c;            
    padding: 8px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.ref-redeem-btn:hover {
    background: #f1f8e9; 
    border-color: #8bc34a;
}


.ref-reward-action .limit {
    display: block;
    font-size: 13px;
    color: #9e9e9e;
    margin-top: 8px;
}


@media (max-width: 600px) {
    .ref-reward-grid {
        grid-template-columns: 1fr; 
    }
}
*/

/* Referral Reward Panel*/

/*
button.referral-tab {
    cursor: pointer;
    border: none;
    padding: 8px;
    background: #f3f4f6;
    border-radius: 8px;
    font-weight: 500;
    transition: .2s;
    font-size: 14px;
}

button.referral-tab.active {
    background: #b9d986;
    color: #2d4d24;
}

.ref-reward-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
}

.ref-reward-code {
    background: #B7DC7B1a;
    padding: 5px;
    font-size: 10px;
    font-weight: bold;
    border: 1px dashed #000;
    border-radius: 7px;
    color: #000;
}

.ref-confirm-redeem-btn, .ref-cancel-redeem-btn {
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.ref-confirm-redeem-btn {
    background: #b9d986;
    color: #2d4d24;
}

.ref-confirm-redeem-btn:hover {
    background: #344c29;
    color: #fff;
}

.ref-cancel-redeem-btn {
    background: #f3f4f6;
    color: #374151;
}

.ref-cancel-redeem-btn:hover {
    background: #e5e7eb;
} */

/**
 * Referral Rewards Panel - Redesigned Styles
 * Modern, clean design with glassmorphism touches and smooth animations
 */

/* ============================================
   Panel Container
   ============================================ */
.panel-referral {
    background: var(--background);
    border-radius: 16px;
    padding: 15px;
    border: 1px solid var(--border);
}

/* ============================================
   Referral Header
   ============================================ */
.referral-header, .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.referral-header h4, .panel-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 0px;
}

.referral-header h4::before, .panel-header h4::before {
    content: '';
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #004142, #79a852);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

/* ============================================
   List View (Received & Expired tabs)
   ============================================ */
.ref-reward-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
}

.ref-reward-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.ref-reward-list-item:hover {
    border-color: #79a852;
    background: #fafbff;
}

.ref-list-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 8px;
}

.ref-list-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ref-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.ref-list-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.ref-list-code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.ref-list-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
}

.ref-list-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-icon {
    font-size: 11px;
}

.ref-list-status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.list-status-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.list-status-icon.redeemed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.list-status-icon.expired {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.list-status-icon.cancelled {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* ============================================
   Tab Navigation
   ============================================ */
.referral-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 12px;
}

.referral-tab {
    flex: 1;
    padding: 12px 5px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.referral-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #004142 0%, #79a852 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.referral-tab span {
    position: relative;
    z-index: 1;
}

.referral-tab:hover {
    color: #475569;
}

.referral-tab.active {
    color: white;
    box-shadow: 0 4px 12px rgb(17 79 68 / 32%);
}

.referral-tab.active::before {
    opacity: 1;
}

/* Tab count badges */
.referral-tab[data-count]::after {
    content: attr(data-count);
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    position: relative;
}

.referral-tab:not(.active)[data-count]::after {
    background: #e2e8f0;
    color: #64748b;
}

/* ============================================
   Reward Grid Container
   ============================================ */
.referral-wrap {
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
    position: relative;
}

/* Fade mask at top when scrolled */
.referral-wrap::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, rgba(248, 250, 252, 1) 0%, rgba(248, 250, 252, 0) 100%);
    display: block;
    margin-bottom: -30px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.referral-wrap.scrolled::before {
    opacity: 1;
}

/* Custom scrollbar styling */
.referral-wrap::-webkit-scrollbar {
    width: 6px;
}

.referral-wrap::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.referral-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.referral-wrap::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.ref-reward-grid {
    display: grid;
    gap: 0px;
}

/* ============================================
   Reward Cards
   ============================================ */
.ref-reward-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin: 5px 10px;
}

.ref-reward-card:hover {
    transform: translateY(-2px);
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.ref-reward-card.reward-type-voucher {
    padding: 0px;
}

/* Card with different reward types */
.ref-reward-card.reward-type-points::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* .ref-reward-card.reward-type-voucher::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
} */

/* .ref-reward-card.reward-type-gift::before {
    background: linear-gradient(90deg, #ec4899, #f472b6);
} */

.ref-reward-card.reward-type-tier::before {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.ref-reward-card.reward-type-custom::before {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}

/* ============================================
   Card Layout
   ============================================ */
.ref-reward-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 12px;
    align-items: start;
}

/* Header */
.ref-reward-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    grid-column: 1 / -1;
    padding: 12px 20px;
    background: linear-gradient(90deg, #00643B, #00643B);
}

/* Badge - spans full width */
.ref-reward-badge {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;

}

.ref-reward-icon {
    width: 20px;
    height: 20px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.reward-type-voucher .ref-reward-icon {
    background-image: url(https://cenloyalty.com/wp-content/uploads/2026/07/coupon.png);
}

.reward-type-gift .ref-reward-icon {
    background-image: url(https://cenloyalty.com/wp-content/uploads/2026/07/gift-box-with-a-bow.png);
}

.reward-type-points .ref-reward-icon {
    /* background-image: url(https://cenloyalty.com/wp-content/uploads/2026/07/points-icon.png); */
}

.reward-type-points .ref-reward-icon .points-icon circle.st0 {
    fill: currentColor;
    stroke: currentColor;
}

.reward-type-points .ref-reward-icon .points-icon polygon.st1 {
    fill: #f7ab05;
}

.reward-type-custom .ref-reward-icon {
    background-image: url(https://cenloyalty.com/wp-content/uploads/2026/07/special-rewards.png);
}

.reward-type-tier .ref-reward-icon {
    background-image: url(https://cenloyalty.com/wp-content/uploads/2026/07/tier-icon.png );
}

/* Body */
.ref-reward-body {
    grid-column: 1 / -1;
    padding: 0px 20px 0px;
    gap: 10px;
    display: flex;
    flex-direction: column;
}

/* Title */
.ref-reward-title {
    grid-column: 1 / -1;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

/* Code */
.ref-reward-code-container {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.ref-reward-code {
    grid-column: 1 / 3;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 10px 14px;
    border-radius: 8px;
    letter-spacing: 1px;
    border: 1px dashed #cbd5e1;
}

.ref-reward-code::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

button.copy-code-btn {
    padding: 8px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
    white-space: nowrap;
}

/* @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
} */

/* Date info */
.ref-reward-date {
    grid-column: 1 / -1;
    font-size: 13px;
    color: #64748b;
    gap: 6px;
}

/* Status badge */
.ref-reward-status {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
}

.ref-reward-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* Status colors */
/* .ref-reward-status.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
} */
.ref-reward-status.status-pending::before {
    background: #f59e0b;
}

/* .ref-reward-status.status-issued {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
} */
.ref-reward-status.status-issued::before {
    background: #10b981;
    animation: pulse 2s infinite;
}

.ref-reward-status.status-redeemed {
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
}
.ref-reward-status.status-redeemed::before {
    background: #6366f1;
}

.ref-reward-status.status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}
.ref-reward-status.status-expired::before {
    background: #ef4444;
}

.ref-reward-status.status-cancelled {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
}
.ref-reward-status.status-cancelled::before {
    background: #64748b;
}

/* reward Peding */
.ref-pending-info {
    padding: 15px 0 10px;
    border-top: 1px dashed #ced7d2;
}

.ref-pending-info > div {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #4b5563;
}

.ref-pending-info > div:last-child {
    margin-bottom: 0;
}

.ref-pending-info .ref-icon {
    color: #00643B;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ref-pending-info .ref-icon {
    width: 18px;
    height: 18px;
}

.ref-pending-note {
    background: #EBF3EE;
    padding: 10px 20px;
    font-size: 12px;
    color: #00643b;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-bottom: -13px;
    text-align: left;
}

.ref-note-icon svg {
    width: 15px;
    height: 15px;
}

/* Action button */
.ref-reward-action {
    grid-column: 1 / -1;
    margin-top: 8px;
}

/* ============================================
   Action Buttons
   ============================================ */
.ref-redeem-btn, .ref-approve-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgb(0, 65, 66) 0%, rgb(121, 168, 82) 100%);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ref-redeem-btn:hover, .ref-approve-btn:hover {
    transform: translateY(-1px);
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.ref-redeem-btn:active, .ref-approve-btn:active {
    transform: translateY(0);
}

.ref-status-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: default;
}

.ref-status-btn.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

/* Confirm/Cancel buttons */
.ref-redeem-confirm {
    display: flex;
    gap: 10px;
    width: 100%;
}

.ref-confirm-redeem-btn,
.ref-cancel-redeem-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-confirm-redeem-btn {
    background: linear-gradient(135deg, #00643b, #6b9c50);
    color: white;
}

.ref-confirm-redeem-btn:hover {
    box-shadow: 0 4px 12px rgb(17 79 68 / 32%);
    transform: translateY(-1px);
}

.ref-cancel-redeem-btn {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.ref-cancel-redeem-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

/* ============================================
   Approve referral reward
   ============================================ */

.ref-reward-action {
    display: flex;
    gap: 8px;
}

.ref-reward-action .ref-approve-btn,
.ref-reward-action .ref-reject-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 12px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.ref-reject-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #d72a2a 0%, #ee6d2e 100%);
}

.ref-reject-btn:hover {
    transform: translateY(-1px);
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

/* Reject Confirm */
.ref-reject-confirm {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.ref-reject-notes {
    width: 100%;
}

input.ref-reject-notes-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

input.ref-reject-notes-input:focus {
    border-color: #dc2626;
}

.ref-reject-buttons {
    display: flex;
    gap: 8px;
}

.ref-reject-buttons button {
    flex: 1;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 12px;
}

.ref-confirm-reject-btn {
    background: #dc2626;
    color: white;
}

.ref-cancel-reject-btn {
    background: #f3f4f6;
    color: #374151;
}

.ref-approve-confirm {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.ref-approve-notes {
    width: 100%;
}

/* Notes Input Wrapper */
.notes-input-wrapper {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
}

input.ref-approve-notes-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

input.ref-approve-notes-input:focus {
    border-color: #10b981;
}

input.ref-approve-notes-input::placeholder {
    color: #9ca3af;
}

/* Quick Notes Button */
.quick-notes-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}

.quick-notes-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Quick Notes Tooltip */
#quick-notes-floating-tooltip {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 999999;
    min-width: 220px;
    max-width: 280px;
}

#quick-notes-floating-tooltip.show {
    display: flex !important;
}

#quick-notes-floating-tooltip .quick-note {
    padding: 8px 12px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    text-align: left;
    white-space: nowrap;
}

#quick-notes-floating-tooltip .quick-note:hover {
    background: #f3f4f6;
    color: #10b981;
}

/* Quick Notes Tooltip */
.quick-notes-tooltip {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 999999;
    min-width: 220px;
}

.quick-notes-tooltip.show {
    display: flex;
}

.quick-note {
    padding: 10px 14px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
    text-align: left;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-note:hover {
    background: #f0fdf4;
    color: #10b981;
}

.quick-note::before {
    content: '📄';
    font-size: 14px;
}

/* Arrow for tooltip */
.quick-notes-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: white;
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    transform: rotate(45deg);
}

.ref-approve-buttons {
    display: flex;
    gap: 8px;
}

.ref-approve-buttons button {
    flex: 1;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.ref-approve-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ref-approve-confirm .ref-confirm-approve-btn,
.ref-approve-confirm .ref-cancel-approve-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.ref-confirm-approve-btn {
    background: linear-gradient(135deg, #00643b, #6b9c50);
    color: white;
}

.ref-confirm-approve-btn:hover {
    box-shadow: 0 4px 12px rgb(17 79 68 / 32%);
    transform: translateY(-1px);
}

.ref-cancel-approve-btn {
    background: #e5e7eb;
    color: #374151;
}

.ref-confirm-approve-btn:disabled,
.ref-cancel-approve-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   Empty State
   ============================================ */
.no-rewards {
    text-align: center;
    padding: 48px 24px;
    background: var(--background);
    border-radius: 16px;
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-rewards p {
    color: var(--muted-fg);
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   Loading State
   ============================================ */
.referral-wrap:empty::after,
.referral-wrap[data-loading="true"]::after {
    content: 'Loading Referral Rewards...';
    display: block;
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-size: 14px;
}

/* Skeleton loading */
.ref-reward-skeleton {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    animation: shimmer 1.5s infinite;
}

.ref-reward-skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ref-reward-skeleton-line:last-child {
    width: 60%;
    margin-bottom: 0;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Message Alerts
   ============================================ */
#referral-message .message-item {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-top: 12px;
}

#referral-message .message-item.success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

#referral-message .message-item.error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

#referral-message .message-item.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 480px) {
    .panel-referral {
        padding: 16px;
        border-radius: 12px;
    }

    .referral-tabs {
        flex-direction: column;
        gap: 4px;
        padding: 4px;
    }

    .referral-tab {
        text-align: center;
    }

    .ref-reward-card {
        padding: 16px;
    }

    .ref-reward-title {
        font-size: 16px;
    }
}

/* ============================================
   Animation Classes
   ============================================ */
.ref-reward-card {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.ref-reward-card:nth-child(1) { animation-delay: 0ms; }
.ref-reward-card:nth-child(2) { animation-delay: 50ms; }
.ref-reward-card:nth-child(3) { animation-delay: 100ms; }
.ref-reward-card:nth-child(4) { animation-delay: 150ms; }
.ref-reward-card:nth-child(5) { animation-delay: 200ms; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success animation for redeemed cards */
.ref-reward-card.just-redeemed {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* End Referral Reward Panel */


/* Scanner Code */
/**
 * Scan Code Popup - Enhanced Styles
 * Modern styling for SweetAlert modals used in referral code scanning
 */

/* ============================================
   Base Modal Overrides
   ============================================ */
.swal2-container.scan-popup .swal2-popup {
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
}

.swal2-container.scan-popup .swal2-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 24px 32px;
    border: none;
}

.swal2-container.scan-popup .swal2-title {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.swal2-container.scan-popup .swal2-icon.swal2-info {
    border-color: #6366f1;
    color: #6366f1;
}

/* ============================================
   Scan Input Modal
   ============================================ */
.scan-input-wrapper {
    padding: 10px 0px;
    text-align: center;
}

.scan-input-wrapper p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
}

.scan-input-wrapper input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    letter-spacing: 2px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    color: var(--foreground);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.scan-input-wrapper input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 6px 6px rgba(var(--primary-rgb), 20%);
}

.scan-input-wrapper input[type="text"]::placeholder {
    color: #94a3b8;
    letter-spacing: 1px;
    text-transform: none;
}

/* ============================================
   Scanner Hint Animation
   ============================================ */
.scan-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    color: #94a3b8;
    font-size: 13px;
}

.scan-hint .scanner-icon {
    animation: scanPulse 1.5s ease-in-out infinite;
}

@keyframes scanPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(5px);
    }
}

/* ============================================
   Camera Scanner Modal
   ============================================ */
.camera-scanner-wrapper {
    padding: 0;
    background: #1e293b;
    position: relative;
    overflow: hidden;
}

.camera-scanner-wrapper #generic-reader,
.camera-scanner-wrapper #reader {
    width: 100%;
    border-radius: 0;
}

.camera-scanner-wrapper video {
    width: 100%;
    border-radius: 0;
}

/* Scanner overlay frame */
.camera-scanner-wrapper #generic-reader {
    overflow: hidden;
}
.camera-scanner-wrapper #generic-reader:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 3px solid rgb(185 217 134 / 80%);
    border-radius: 16px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    animation: scanFrame 2s ease-in-out infinite;
}

@keyframes scanFrame {
    0%, 100% {
        border-color: rgb(185 217 134 / 80%);
    }
    50% {
        border-color: rgb(185 217 134 / 100%);
        box-shadow: 0 0 20px rgb(185 217 134 / 50%);
    }
}

.camera-scan-help {
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
    padding: 16px;
    text-align: center;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ============================================
   Result Modal (Scanned Reward Info)
   ============================================ */
.scanned-reward-info {
    padding: 8px 0;
}

.scanned-reward-info .reward-display {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.scanned-reward-info .reward-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.scanned-reward-info .reward-name {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.scanned-reward-info .reward-code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    color: #475569;
    background: white;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    border: 1px dashed #cbd5e1;
    letter-spacing: 1px;
}

.scanned-reward-info p {
    font-size: 15px;
    color: #475569;
    margin: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.scanned-reward-info p:last-child {
    border-bottom: none;
}

.scanned-reward-info p strong {
    color: #1e293b;
    font-weight: 600;
}

/* Status badge in result */
.scanned-reward-info .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.scanned-reward-info .status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.scanned-reward-info .status-badge.issued {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.scanned-reward-info .status-badge.redeemed {
    background: rgba(99, 102, 241, 0.15);
    color: #4338ca;
}

.scanned-reward-info .status-badge.expired {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

/* ============================================
   Success/Error States
   ============================================ */
.scan-success {
    text-align: center;
    padding: 24px;
}

.scan-success .success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 40px;
    color: white;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.scan-error {
    text-align: center;
    padding: 24px;
}

.scan-error .error-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ef4444, #f87171);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 40px;
    color: white;
}

/* ============================================
   Loading States
   ============================================ */
.scan-loading {
    text-align: center;
    padding: 48px 24px;
}

.scan-loading .loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.scan-loading p {
    color: #64748b;
    font-size: 15px;
    margin: 0;
}

/* ============================================
   Footer Buttons
   ============================================ */
.swal2-container.scan-popup .swal2-actions {
    padding: 16px 24px 24px;
    gap: 12px;
}

.swal2-container.scan-popup .swal2-confirm {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 32px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.swal2-container.scan-popup .swal2-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.swal2-container.scan-popup .swal2-cancel {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 14px 32px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    transition: all 0.3s ease !important;
}

.swal2-container.scan-popup .swal2-cancel:hover {
    background: #e2e8f0 !important;
}

.swal2-container.scan-popup .swal2-deny {
    background: linear-gradient(135deg, #10b981, #34d399) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 14px 32px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.swal2-container.scan-popup .swal2-close {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    color: white !important;
    top: 16px !important;
    right: 16px !important;
}

.swal2-container.scan-popup .swal2-close:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Reward Popup Scan Details */

.reward-details-popup {
    --status-rgb: 107, 114, 128;
    --status-color: #6B7280;
    --status-bg: #F3F4F6;
    --status-border: #D1D5DB;

    --status-button-bg: var(--status-color);
    --status-button-text: #fff;

    --status-icon-bg: var(--status-bg);
    --status-icon-color: var(--status-color);
}

/* Pending */
.reward-details-popup.status-pending {
    --status-rgb: 180, 83, 9;
    --status-color: #B45309;
    --status-bg: #FEF3C7;
    --status-border: #FCD34D;
}

/* Issued */
.reward-details-popup.status-issued {
    --status-rgb: 29, 78, 216;
    --status-color: #1D4ED8;
    --status-bg: #DBEAFE;
    --status-border: #93C5FD;
}

/* Redeemed */
.reward-details-popup.status-redeemed {
    --status-rgb: 21, 128, 61;
    --status-color: #15803D;
    --status-bg: #DCFCE7;
    --status-border: #86EFAC;
}

/* Expired */
.reward-details-popup.status-expired {
    --status-rgb: 225, 92, 37;
    --status-color: #E15C25;
    --status-bg: #FDE6D4;
    --status-border: #F6B995;
}

/* Cancelled */
.reward-details-popup.status-cancelled {
    --status-rgb: 185, 28, 28;
    --status-color: #B91C1C;
    --status-bg: #FEE2E2;
    --status-border: #FCA5A5;
}

.reward-details-popup {
    padding: 0 !important;
    overflow: hidden;
    z-index: 999999;
}
.reward-details-popup div#swal2-html-container {
    text-align: left;
}
.swal2-container.reward-details-popup .swal2-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--foreground);
}
.swal2-container.reward-details-popup .swal2-close {
    background: #b0b0b03d !important;
    color: var(--foreground) !important;
    margin-right: 5px;
    margin-top: 5px;
}
.swal2-container.reward-details-popup .swal2-close:hover {
    background: #000000 !important;
    color: #fff !important;
}
.swal2-container.reward-details-popup .swal2-actions {
    margin-top: 0px;
    ;
    animation: slideUp 0.5s 0.4s both;
}
/* Reward banner */

.reward-banner {
    background: var(--background);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
    animation: slideUp 0.5s 0.1s both;
    justify-content: center;
}
.reward-banner .gift-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reward-banner .gift {
    font-size: 90px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
}
.sparkle {
    position: absolute;
    font-size: 18px;
    animation: sparkle 2s ease-in-out infinite;
}
.sparkle:nth-child(2) {
    top: 10%;
    left: 5%;
    color: #fbbf24;
    animation-delay: 0s;
}
.sparkle:nth-child(3) {
    top: 20%;
    right: 5%;
    color: #a78bfa;
    animation-delay: 0.4s;
    font-size: 14px;
}
.sparkle:nth-child(4) {
    bottom: 15%;
    left: 0;
    color: #34d399;
    animation-delay: 0.8s;
}
.sparkle:nth-child(5) {
    bottom: 20%;
    right: 8%;
    color: #f472b6;
    animation-delay: 1.2s;
    font-size: 12px;
}
.sparkle:nth-child(6) {
    top: 50%;
    right: -5%;
    color: #fbbf24;
    animation-delay: 1.6s;
    font-size: 10px;
}
/* .reward-details-info { flex: 1; } */

.reward-details-popup .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--status-bg);
    color: var(--status-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}
.status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--status-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--status-bg);
    font-size: 11px;
    font-weight: bold;
}
.reward-details-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 12px;
    padding-bottom: 0px;
}
.reward-desc {
    color: #6b7280;
    font-size: 15px;
}
.voucher-code {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    border: 2px dashed var(--status-border);
    border-radius: 10px;
    background: linear-gradient(90deg, transparent, rgba(var(--status-rgb), .07), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}
.voucher-code code {
    color: var(--status-color);
    font-weight: 700;
    font-family: "SF Mono", Monaco, monospace;
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 0px;
}
.reward-details-popup .copy-code-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--status-color);
    padding: 4px;
    display: flex;
    transition: transform 0.2s;
}
.reward-details-popup .copy-code-btn:hover {
    transform: scale(1.15);
}
/* Two-column grid */

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.detail-card {
    background: #f9fafb;
    border-radius: 14px;
    animation: slideUp 0.5s 0.2s both;
    overflow: hidden;
}
.detail-card:nth-child(2) {
    animation-delay: 0.3s;
}
div#member-card.detail-card {
    background: var(--accent-green-bg);
}

div#reward-card.detail-card {
    background: var(--accent-purple-bg);
}

[data-theme="dark"] div#member-card.detail-card, [data-theme="dark"] div#reward-card.detail-card {
    background: var(--background);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 22px 10px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s;
}
.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.card-icon svg {
    width: 20px;
    height: 20px;
}
.card-icon.member {
    background: #d1fae5;
    color: #059669;
}
.card-icon.reward {
    background: #ede9fe;
    color: #7c3aed;
}
.card-title {
    font-weight: 600;
    font-size: 15px;
    flex: 1;
}
.card-title.member {
    color: #059669;
}
.card-title.reward {
    color: var(--accent-purple);
}
.toggle-icon {
    width: 22px;
    height: 22px;
    color: #9ca3af;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    display: none;
}
.detail-card.expanded .toggle-icon {
    transform: rotate(180deg);
}
.card-content {
    padding-top: 10px;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
}
.detail-card.expanded .card-content {
    max-height: 800px;
}
.card-content-inner {
    padding: 0 22px 22px;
}
.member-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.referred-badge {
    background: #d1fae5;
    color: #065f46;
    padding: 4px 13px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}
.referred-badge svg {
    width: 12px;
    height: 12px;
}
.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid #e2e8f069;
    font-size: 14px;
    gap: 12px;
}
.info-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted-fg);
    flex-shrink: 0;
}
.info-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    flex-shrink: 0;
    color: var(--accent-green);
}
.info-value {
    color: var(--foreground);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}
.info-value.points {
    color: #059669;
    font-weight: 700;
}
.reward-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    font-size: 14px;
}

.reward-row.hidden {
    display: none;
}

.reward-row .r-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.reward-row .r-icon svg {
    width: 16px;
    height: 16px;
}
.reward-row .r-label {
    color: var(--muted-fg);
}
.reward-row .r-sep {
    color: var(--muted-fg);
}
.reward-row .r-value {
    color: var(--foreground);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    word-break: break-word;
    text-transform: capitalize;
}
.instant-tag {
    background: #fed7aa;
    color: #9a3412;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.days-left {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--status-bg);
    color: var(--status-color);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}
.days-left svg {
    width: 11px;
    height: 11px;
}
.sub-note {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}
.swal2-container.reward-details-popup .swal2-confirm {
    background: #047857 !important;
    color: #fff;
    animation: btn-pulse 2.5s ease-in-out infinite;
}
.swal2-container.reward-details-popup .swal2-confirm:hover {
    background: #065f46 !important;
    transform: translateY(-2px);
}
.swal2-container.reward-details-popup .swal2-deny {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 14px 32px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    transition: all 0.3s ease !important;
}
.swal2-container.reward-details-popup .swal2-deny:hover {
    background: #e2e8f0 !important;
}
/* Actions */

.reward-details-popup .actions {
    gap: 12px;
    animation: slideUp 0.5s 0.4s both;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px 24px;
    margin-top: 15px;
}
.reward-details-popup .btn {
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
}
.reward-details-popup .btn svg {
    width: 18px;
    height: 18px;
}
.reward-details-popup .btn-primary {
    background: var(--primary);
    color: var(--primary-fg);
    animation: btn-pulse 2.5s ease-in-out infinite;
}
.reward-details-popup .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}
.reward-details-popup .btn-secondary {
    background: #fff;
    color: #111827;
    border: 1.5px solid #e5e7eb;
}
.reward-details-popup .btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}
/* Loading */

.redeem-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    padding: 12px;
}
.redeem-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
/* @keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } } */

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateY(-8px) rotate(3deg);
    }
}
@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* @keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  } */

@keyframes btn-pulse {
    0%, 100% {
        box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.25);
    }
    50% {
        box-shadow: 0 6px 24px rgba(var(--primary-rgb), 0.5);
    }
}
@media (max-width: 720px) {
    .details-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .reward-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .gift-wrap {
        width: 110px;
        height: 110px;
    }
    .gift {
        width: 75px;
        height: 75px;
    }
    .reward-title {
        font-size: 22px;
    }
    .card-header {
        padding: 16px 18px;
    }
    .card-content-inner {
        padding: 0 18px 18px;
    }
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .info-value {
        text-align: left;
    }
    .reward-row {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px 10px;
    }
    .reward-row .r-sep {
        display: none;
    }
    .reward-row .r-label {
        grid-column: 2;
    }
    .reward-row .r-value {
        grid-column: 2;
        flex-wrap: wrap;
    }
    .card-content {
        max-height: 0;
        overflow: hidden;
    }
    .card-header:hover {
        background: rgba(0, 0, 0, 0.02);
    }
    .toggle-icon {
        display: block;
    }
}
@media (min-width: 721px) {
    .detail-card {
        display: block !important;
    }
    .detail-card.expanded .card-content {
        max-height: 800px;
    }
}


/* End Reward Popup Scan Details */

/* Recently Scanned */
/* Recently Scanned */
.lp-recently-scanned {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.lp-recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.lp-recent-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.lp-recent-card:hover {
    border-color: var(--highlight-border);
    background: var(--highlight-bg);
}

.lp-recent-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.lp-recent-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.lp-pal-rose { background: #fce7f3; color: #be185d; }
.lp-pal-amber { background: #fef3c7; color: #b45309; }
.lp-pal-sky { background: #dbeafe; color: #1d4ed8; }
.lp-pal-violet { background: #ede9fe; color: #7c3aed; }
.lp-pal-emerald { background: #d1fae5; color: #047857; }

[data-theme="dark"] .lp-pal-rose { background: rgba(244,114,182,0.15); color: #f472b6; }
[data-theme="dark"] .lp-pal-amber { background: rgba(251,191,36,0.15); color: #fbbf24; }
[data-theme="dark"] .lp-pal-sky { background: rgba(96,165,250,0.15); color: #60a5fa; }
[data-theme="dark"] .lp-pal-violet { background: rgba(167,139,250,0.15); color: #a78bfa; }
[data-theme="dark"] .lp-pal-emerald { background: rgba(52,211,153,0.15); color: #34d399; }

.lp-recent-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--foreground);
}

.lp-recent-phone {
    font-size: 12px;
    color: var(--muted-fg);
}

.lp-recent-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.lp-recent-points {
    background-color: var(--highlight-bg) !important;
    color: var(--highlight) !important;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.lp-recent-time {
    color: var(--muted-fg);
}

.lp-empty {
    text-align: center;
    padding: 20px;
    color: var(--muted-fg);
    font-size: 14px;
}

.lp-loading {
    text-align: center;
    padding: 20px;
    color: var(--muted-fg);
    grid-column: 1/-1;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 480px) {
    .swal2-popup {
        border-radius: 16px;
    }

    .scan-input-wrapper {
        padding: 24px;
    }

    .scan-input-wrapper input[type="text"] {
        padding: 14px 16px;
        font-size: 16px;
    }

    .method-buttons {
        flex-direction: column;
    }

    .camera-scanner-wrapper #generic-reader:after {
        width: 160px;
        height: 160px;
    }
}

/*  */

.wpcf7 .row {
    display: inline-block;
    width: 100%;
}

.wpcf7 form .wpcf7-response-output {
    display: flex;
}

.col-md-12 {
    width: 100%;
	float: left;
}

.col-md-6 {
    width: 50%;
	float: left;
}

.col-md-4 {
    width: 33.33%;
	float: left;
}

.col-md-4, .col-md-6, .col-md-12 {
	position: relative;
    min-height: 1px;
    padding-right: 10px;
    padding-left: 10px;
}

.form-group {
    margin-bottom: 5px;
}

.wpcf7-form-control-wrap {
    position: relative;
}

.wpcf7 input[type="submit"] {
    border-radius: 25px;
    padding: 7px 30px;
    background-color: #199ad6;
    cursor: pointer;
    transition: all 0.5s;
    text-transform: uppercase;
    border: 2px solid #199ad6;
    color: #fff;
}

.wpcf7 input[type="submit"]:hover {
    transition: all 0.5s;
	color: #199ad6;
	background: transparent;
}
.wpcf7-recaptcha {
    margin-bottom: 20px;
}

.wpcf7 input:not([type="submit"]):not([type="checkbox"]),
.wpcf7 textarea, .wpcf7 .et_pb_contact_field input, .wpcf7 .et_pb_contact_field textarea {
    width: 100%;
    padding: 10px;
    border-radius: 7px;
    color: #000;
    background-color: #fff;
    font-size: 14px;
    -webkit-appearance: none;
    border: 2px solid #E4E1DE;
}

.wpcf7 textarea {
    min-width: 100%;
    max-width: 100%;
    max-height: 100px;
    min-height: 100px;
	resize: none;
}

.wpcf7 input:not([type="submit"]):not([type="checkbox"]):focus,
.wpcf7 textarea:focus {
    border: 2px solid #199ad6;
}

span.wpcf7-form-control-wrap.recaptcha .wpcf7-recaptcha {
    transform-origin: top left;
    transform: scale(0.822368);
    display: inline-block;
    margin-bottom: 0 !important;
}

/* device */

@media only screen and (max-width: 1310px) {
	
}

@media only screen and (max-width: 1280px) {

}

@media only screen and  (max-width: 1270px) {
	
}

@media only screen and  (max-width: 1200px) {
	
}

@media only screen and (max-width: 1024px) {
	
}

@media only screen and (min-width: 981px) {
	
	.display-flex {
		display: flex;
	}
	
	.align-items-center {
	   align-items: center;
	}
	
	.align-items-end {
		align-items: end;
	}
	
}

@media only screen and (max-width: 980px) {
	
}

@media only screen and (min-width: 769px) {
	.member-action-btn.details-btn {
		display: none !important;
	}
}

@media only screen and (max-width: 768px) {

	/* 	 */
	h2#swal2-title {
		font-size: 20px;
	}

	.member-popup .swal2-popup {
		width: 95% !important;
		padding: 0 !important;
	}

	/* New sidebar layout - stack vertically */
	.member-popup-layout {
		flex-direction: column;
		min-height: unset;
	}

	.member-sidebar-menu {
		width: 100%;
		min-width: unset;
		padding: 15px;
		border-radius: 0;
	}

	.sidebar-header {
		display: flex;
		align-items: center;
		text-align: left;
		gap: 15px;
		padding-bottom: 15px;
		margin-bottom: 15px;
	}

	.sidebar-avatar {
		width: 50px;
		height: 50px;
		font-size: 18px;
		margin: 0;
	}

	.sidebar-member-info {
		text-align: left;
	}

	.sidebar-member-name {
		font-size: 14px;
	}

	.sidebar-stats {
		display: none; /* Hide sidebar stats on mobile - show in header instead */
	}

	.sidebar-nav {
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 8px;
		padding-bottom: 0;
	}

	.sidebar-menu-item {
		flex: 0 0 auto;
		min-width: unset;
		justify-content: center;
		padding: 10px 14px;
		font-size: 12px;
	}

	.sidebar-menu-item .sidebar-label {
		display: none;
	}

	.sidebar-icon {
		margin: 0;
	}

	.sidebar-icon svg {
		width: 20px;
		height: 20px;
	}

	/* Popup content */
	.member-popup-content {
		max-height: 60vh;
		overflow-y: auto;
	}

	.member-header-card {
		padding: 15px;
	}

	.member-card-header {
		padding: 15px;
	}

	.member-card-header-top {
		display: flex;
		align-items: center;
		gap: 10px;
	}

	.member-avatar {
		width: 50px;
		height: 50px;
		font-size: 18px;
		margin: 0;
	}

	.member-card-header h2 {
		font-size: 22px;
		padding-bottom: 0px;
	}

	/* Hide mobile details panel - not needed with sidebar */
	.member-content .member-card-body,
	.panel-details {
		display: none !important;
	}

	.member-stats {
		gap: 5px;
		margin-bottom: 20px;
	}

    .member-card-body {
		padding: 15px 0px;
	}

	/* Member right panel */
	.member-right {
		padding: 15px;
	}

	/* Sidebar member status in header */
	.member-popup-layout .member-card-header .member-status {
		display: none;
	}
}
	
	.member-grid {
		font-size: 16px;
		text-align: left;
	}
	
	.member-card-actions {
		position: sticky;
		bottom: 0;
		background: #fff;
		z-index: 20;
		display: grid;
		grid-template-columns: repeat(4,1fr);
		gap: 10px;
	}
	
	.member-card-actions .member-action-btn {
		font-size: 0px;
		padding: 3px;
		background: transparent;
		opacity: .8;
	}
	
	.member-card-actions .member-action-btn.active {
		background: #2d4d24;
		opacity: 1;
	}
	
	.member-card-actions .member-action-btn:before {
		content: '';
		background-size: contain;
		background-repeat: no-repeat;
		background-position: center;
		width: 100%;
		height: 30px;
		display: flex;
	}
	
	.member-card-actions .member-action-btn.active:before {
		filter: brightness(0) invert(1);
	}
	
	.member-card-actions .member-action-btn:after {
		position: relative;
		font-size: 12px;
	}
	
	.member-action-btn.details-btn:before {
		background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/business-card.png);
	}
	
	.member-action-btn.details-btn::after {
		content: 'Profile';
	}
	
	.member-action-btn.points-btn:before {
		background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/reward-points.png);
	}
	
	.member-action-btn.points-btn::after {
		content: 'Points';
	}
	
	.member-action-btn.edit-btn:before {
		background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/edit-1.png);
	}
	
	.member-action-btn.edit-btn::after {
		content: 'Edit';
	}
	
	.member-action-btn.wallet-btn:before {
		background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/vip-card.png);
	}
	
	.member-action-btn.wallet-btn::after {
		content: 'Wallet';
	}
	
	.member-action-btn.history-btn:before {
		background-image: url(https://cenloyalty.com/wp-content/uploads/2026/06/changelog.png);
	}
	
	.member-action-btn.history-btn::after {
		content: 'History';
	}
	
	.mode-option span {
		font-size: 16px;
	}

	#members-table tbody td {
		padding: 15px 5px;
	}

	#members-table_wrapper .top {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	
	.dataTables_wrapper .dataTables_filter {
		margin-top: 0px !important;
		text-align: left;
	}
	
	 div.dt-buttons {
		 text-align: left;
	}
	
	#program_id {
		min-width: auto;
	}
	
	.dataTables_paginate {
		justify-content: center;
	}
}

@media only screen and (max-width: 480px) {
	
	.members-table-wrapper {
		padding: 0px;
		box-shadow: none;
	}
	
/* 	#members-table_wrapper .top {
		grid-template-columns: repeat(1, 1fr);
	} */
	
	#program_id {
		height: 40px;
		padding: 0 35px 0 12px;
	}
	
	.dataTables_wrapper .dataTables_filter input {
		height: 40px;
		margin-left: 0px;
		min-width: unset;
		width: 100%;
	}
	
	.swal2-html-container {
		padding: 15px;
	}
}

@media only screen and (max-width: 360px) {
	
}

@media only screen and (max-width: 320px) {
	
}