/*
// Version: 20250823-advdash-mobile-03
// File: assets/css/posh-dashboard.css
*/

body{font-family:Poppins,sans-serif;margin:0;padding:0;box-sizing:border-box;}

body .posh-advocate-container{max-width:768px!important;margin-left:auto!important;margin-right:auto!important;padding:1.25rem;box-sizing:border-box;}

.posh-dashboard-container{max-width:768px;margin:1.5rem auto;padding:0 1rem;box-sizing:border-box;}

.posh-dashboard-container h9{font-size:1.5rem;font-weight:600;margin-bottom:1rem;color:#fff;}

.posh-dashboard-container a{text-decoration:none}

/* Nav buttons */
.posh-dashboard-container .nav-buttons{display:flex;gap:12px;margin:1rem 0;flex-wrap:wrap}
.posh-dashboard-container .nav-buttons > *{min-height:44px;align-items:center;display:inline-flex}

/* Greeting */
.posh-dashboard-container .greeting{font-size:1.5rem;font-weight:500;color:#000;margin-top:1.25rem;margin-bottom:.5rem}

.posh-timing-output {
    font-size: 10px;
    color: #767676;
    font-family: monospace;
    margin: 0;
}

/* Selects */
.posh-select,.styled-select{font-family:Poppins,sans-serif;font-size:15px;font-weight:500;color:#222;background-color:#fff;border:2px solid #E0457B;border-radius:8px;padding:10px 32px 10px 12px;line-height:1.2;appearance:none;cursor:pointer;transition:border-color .2s ease;margin-bottom:1rem;min-width:85px}
.posh-select:focus{outline:none;border-color:#c73869;box-shadow:0 0 0 2px #fcd2e0}
.styled-select{background-image:url("data:image/svg+xml,%3Csvg fill='%23E0457B' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:12px}

/* Lists */
.posh-dashboard-container ul{list-style:none;padding:0;margin:0}
.posh-dashboard-container li{margin-bottom:2rem}

.posh-section-title{font-weight:600;font-family:Poppins,sans-serif;color:#fff}

/* Sections */
.section-rank,.section-myteam,.section-orders,.section-incentive{padding:1.5rem;border-radius:12px;position:relative;font-family:Poppins,sans-serif}
.section-myteam{background:#F7C498;margin-bottom:1rem}
.section-orders{background:#0ABAB5;margin-bottom:1rem}
.section-incentive{background:#375275;color:#fff}

/* Team Center */
.team-center-container{max-width:764px;margin:0 auto;padding:1.25rem;box-sizing:border-box;font-family:Poppins,sans-serif}
.team-center-header{font-size:2.25rem;font-weight:600;color:#222;margin-bottom:.25rem}
.team-center-subtext{color:#555;font-size:1rem;margin-bottom:1.25rem}

/* Page Title Consistency */
.team-center h2,
.posh-wallet h2 {
  font-family: Poppins, sans-serif !important;
  font-weight: 600 !important;
  font-size: 1.5rem !important;
  color: #222 !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}
.team-drawer-wrapper{width:100%;margin-bottom:1rem}
.team-drawer-toggle{display:inline-flex;align-items:center;gap:6px;cursor:pointer;background:#E0457B;color:#fff;border:none;border-radius:999px;font-weight:600;font-size:15px;padding:10px 20px;margin-bottom:1rem;transition:all .2s ease}
.team-drawer-toggle.hide-state{background:#fff;color:#E0457B;border:2px solid #E0457B}
#filter-drawer{display:none;flex-wrap:wrap;gap:1rem;margin-bottom:1.25rem;transition:all .3s ease}
#filter-drawer.active{display:flex}
.drawer-group{display:flex;flex-direction:column;flex:1 1 140px;min-width:140px}
.drawer-group label{font-weight:500;margin-bottom:4px}
.drawer-input,.drawer-select{padding:10px;font-size:14px;border:1px solid #ccc;border-radius:8px}
.team-filter-button-wrapper{align-self:flex-end}

/* Navigation Buttons */
.posh-nav-container{display:flex;gap:12px;margin:1.5rem 0;flex-wrap:wrap;justify-content:center}

.posh-nav-btn{display:inline-flex;align-items:center;justify-content:center;padding:14px 24px;border-radius:12px;font-weight:600;font-size:15px;text-decoration:none;border:none;cursor:pointer;transition:all 0.2s ease;font-family:Poppins,sans-serif;min-height:44px}

.posh-nav-btn-primary{background:#E0457B;color:#fff;box-shadow:0 2px 8px rgba(224,69,123,0.2)}
.posh-nav-btn-primary:hover{background:#c73869;transform:translateY(-1px);box-shadow:0 4px 12px rgba(224,69,123,0.3)}

.posh-nav-btn-secondary{background:#fff;color:#E0457B;border:2px solid #E0457B}
.posh-nav-btn-secondary:hover{background:#fce5ef;transform:translateY(-1px);border-color:#c73869}

/* Legacy pill classes for backward compatibility */
.pink-pill{background:#E0457B;color:#fff;border:none;padding:12px 20px;border-radius:999px;font-weight:700;cursor:pointer;font-size:15px;transition:background-color .2s ease}
.pink-pill:hover{background:#c73869}
.white-pill{background:#fff;color:#E0457B;border:2px solid #E0457B;padding:12px 20px;border-radius:999px;font-weight:700;cursor:pointer;font-size:15px;transition:background-color .2s ease}
.white-pill:hover{background:#fce5ef}

/* Quick Search Menu */
.posh-quick-search-menu{position:relative;display:inline-block;margin-bottom:16px}
.posh-quick-search-toggle{background:#E0457B;border:2px solid #E0457B;cursor:pointer;padding:8px 12px;display:flex;align-items:center;justify-content:center;gap:8px;transition:all 0.3s ease;border-radius:8px}
.posh-quick-search-toggle:hover{background:#d03d6a;border-color:#d03d6a}
.posh-quick-search-toggle[aria-expanded="true"] .posh-quick-search-arrow{transform:rotate(180deg)}
.posh-quick-search-arrow{transition:transform 0.3s ease;color:#fff;flex-shrink:0}
.posh-quick-search-label{font-family:Poppins,sans-serif;font-size:15px;font-weight:600;color:#fff}
.posh-quick-search-dropdown{position:absolute;top:100%;left:0;margin-top:8px;background:#fff;border:2px solid #E0457B;border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,0.15);min-width:220px;z-index:1000;padding:8px}
.posh-quick-search-btn{display:block;width:100%;text-align:left;padding:12px 16px;background:none;border:none;color:#222;font-family:Poppins,sans-serif;font-size:14px;font-weight:500;cursor:pointer;border-radius:8px;transition:all 0.2s ease;margin-bottom:4px}
.posh-quick-search-btn:hover{background:#fce5ef;color:#E0457B}
.posh-quick-search-btn:last-child{margin-bottom:0}
.posh-export-container{vertical-align:top}

/* Mobile Card Layout - Hidden by default, shown on mobile */
.team-results-cards{display:none;padding:0;margin:0}

/* Base card styles - will be overridden by mobile-specific styles */
.team-card{background:#fff;border:1px solid #e8e8e8;border-radius:12px;padding:12px;margin-bottom:12px;display:flex;align-items:flex-start;gap:12px;transition:all .2s ease;font-family:Poppins,sans-serif}
.team-card:hover{box-shadow:0 2px 8px rgba(0,0,0,0.1);border-color:#E0457B}
.team-card-expand{flex-shrink:0;width:32px;display:flex;justify-content:center;align-items:flex-start;padding-top:2px}
.team-card-expand-empty{width:32px}
.team-card-main{flex:1;min-width:0}
.team-card-name{font-weight:600;font-size:15px;color:#222;margin-bottom:4px;cursor:pointer;transition:color .15s ease;line-height:1.4}
.team-card-name:hover{color:#E0457B}
.posh-id-display{color:#888;font-size:12px}

/* Desktop: Show table wrapper, hide cards */
.team-results-table-wrapper{display:block}
.team-results-cards{display:none}

/* Tables */
.customer-table,.team-results-table{width:100%;border-collapse:collapse;font-size:14px;font-family:Poppins,sans-serif;margin-bottom:1.5rem;table-layout:fixed}
.customer-table th,.customer-table td,.team-results-table th,.team-results-table td{padding:10px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* first two columns behavior */
.team-results-table td:nth-child(1),.team-results-table th:nth-child(1){border-right:none;text-align:center;white-space:normal;overflow:visible;text-overflow:unset}
.team-results-table td:nth-child(2),.team-results-table th:nth-child(2){border-left:none;text-align:left}

/* center numeric columns */
.team-results-table th:nth-child(3),.team-results-table td:nth-child(3),
.team-results-table th:nth-child(4),.team-results-table td:nth-child(4),
.team-results-table th:nth-child(5),.team-results-table td:nth-child(5){text-align:center}

/* desktop widths */
.team-results-table th:nth-child(1){width:30px;text-align:center}
.team-results-table th:nth-child(2){width:50%;text-align:center}
.team-results-table th:nth-child(3){width:75px;text-align:center}
.team-results-table th:nth-child(4){width:75px;text-align:center}
.team-results-table th:nth-child(5){width:120px;text-align:center}

.customer-table td:nth-child(1),.customer-table th:nth-child(1){width:40%;text-align:left}
.customer-table td:nth-child(2),.customer-table th:nth-child(2),
.customer-table td:nth-child(3),.customer-table th:nth-child(3){width:20%;text-align:center}
.customer-table td:nth-child(4),.customer-table th:nth-child(4){width:20%;text-align:right}

.customer-table tbody tr:hover,.team-results-table tbody tr:hover{background:#fafafa}

.team-results-table td .team-expand-button{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;font-size:16px;font-weight:600;color:#E0457B;cursor:pointer;background:none;border:2px solid #E0457B;border-radius:50%;padding:0;transition:all 0.3s ease;line-height:1;transform-origin:center;position:relative}
.team-results-table td .team-expand-button::before{content:'→';display:block;color:#E0457B}
.team-results-table td .team-expand-button:hover{background:#E0457B;color:#fff;transform:scale(1.1)}
.team-results-table td .team-expand-button:hover::before{color:#fff}
.team-results-table td .team-expand-button[data-expanded="true"]{background:#E0457B;color:#fff}
.team-results-table td .team-expand-button[data-expanded="true"]::before{content:'↓';color:#fff}
.team-results-table td .team-expand-button[data-expanded="false"]::before{content:'→';color:#E0457B}
.team-results-table td .team-expand-button.processing{opacity:0.6;cursor:not-allowed;pointer-events:none}
.team-name-link.contact-trigger{color:#E0457B;cursor:pointer;font-weight:500;text-decoration:none;background:none;border:none;font-size:inherit;padding:0}

.team-name-link.clickable{cursor:pointer;transition:color 0.15s ease}
.team-name-link.clickable:hover{color:#E0457B}

/* Member Info in Modal - Contact Card Style */
.member-info{padding:16px 0}
.contact-header{margin-bottom:20px;text-align:center}
.contact-header h4{font-size:20px;font-weight:600;color:#2c3e50;margin:0 0 8px 0}
.rank-info{color:#E0457B;font-weight:500;margin:0;font-size:14px}

.address-line,.phone-line,.email-line{margin:8px 0;padding:0;font-size:15px;color:#2c3e50;text-align:center}
.phone-line,.email-line{margin-top:16px}

.contact-link{color:#E0457B;text-decoration:none;font-weight:500}
.contact-link:hover{text-decoration:underline}

/* Contact Links */
.contact-link{color:#E0457B;text-decoration:none;font-weight:500}
.contact-link:hover{text-decoration:underline}

/* Flip Card - Like a Real Contact Card */
/* Flip Card Styles - TEMPORARILY DISABLED */
/* .flip-card{perspective:1200px}
.flip-card-inner{position:relative;width:100%;height:100%;text-align:left;transition:transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);transform-style:preserve-3d}
.flip-card.flipped .flip-card-inner{transform:rotateY(180deg)}

.flip-card-front,.flip-card-back{position:absolute;width:100%;height:100%;backface-visibility:hidden;background:white;border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,0.1)}

.flip-card-back{transform:rotateY(180deg)}

.flip-card-front{background:linear-gradient(135deg, #fff 0%, #f8f9fa 100%)}
.flip-card-back{background:linear-gradient(135deg, #fff 0%, #f0f8ff 100%)} */

/* Larger Action Buttons */
.action-btn.large-btn{min-width:80px;height:44px;font-size:14px;font-weight:600;padding:0 16px}

/* Form Styling */
.notes-form{padding:16px 0}
.form-group{margin-bottom:20px}
.form-group label{display:block;margin-bottom:8px;font-weight:600;color:#2c3e50;font-size:14px}
.form-input,.form-textarea{width:100%;padding:12px;border:2px solid #e9ecef;border-radius:8px;font-size:14px;transition:border-color 0.2s ease}
.form-input:focus,.form-textarea:focus{outline:none;border-color:#E0457B}
.form-textarea{resize:vertical;min-height:80px}

/* Product Search */
.product-search{position:relative}
.product-suggestions{position:absolute;top:100%;left:0;right:0;background:white;border:2px solid #e9ecef;border-top:none;border-radius:0 0 8px 8px;max-height:200px;overflow-y:auto;z-index:1000}
.product-suggestion{padding:12px;cursor:pointer;border-bottom:1px solid #f8f9fa;transition:background-color 0.15s ease}
.product-suggestion:hover{background-color:#f8f9fa}
.product-suggestion:last-child{border-bottom:none}
.no-suggestions{padding:12px;color:#6c757d;text-align:center;font-style:italic}
.posh-id-display{color:#999;font-size:12px;font-weight:400;margin-left:4px}

/* Team Action Buttons - Compact & Elegant */
.team-actions{display:flex;gap:3px;justify-content:center;align-items:center}

.action-btn{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:24px;border:none;border-radius:4px;cursor:pointer;transition:all 0.15s ease;font-size:10px;font-weight:500;text-decoration:none;padding:0 6px;line-height:1}

.action-btn-primary{background:#E0457B;color:#fff;box-shadow:0 1px 3px rgba(224,69,123,0.3)}
.action-btn-primary:hover{background:#c73869;box-shadow:0 2px 6px rgba(224,69,123,0.4)}

.action-btn-secondary{background:#f8f9fa;color:#6c757d;border:1px solid #e9ecef}
.action-btn-secondary:hover{background:#e9ecef;color:#495057;border-color:#dee2e6}

/* Mobile optimization for action buttons */
@media (max-width: 640px) {
  .team-actions{gap:2px}
  .action-btn{min-width:36px;height:22px;font-size:9px;padding:0 4px}
}

/* Modals */
.team-error-message{color:#B00020;background:#ffe6e6;padding:1rem;border-radius:6px;font-weight:500}

/* Enhanced Customer Center Styles */
.customer-summary-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.stat-card {
	background: #f8f9fa;
	padding: 1rem;
	border-radius: 8px;
	text-align: center;
	transition: transform 0.2s ease;
}

.stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.status-active {
	background: #28a745 !important;
	color: white !important;
}

.status-at-risk {
	background: #ffc107 !important;
	color: #333 !important;
}

.status-inactive {
	background: #6c757d !important;
	color: white !important;
}

.tier-vip {
	background: #ffc107 !important;
	color: #333 !important;
}

.tier-premium {
	background: #17a2b8 !important;
	color: white !important;
}

.tier-regular {
	background: #6c757d !important;
	color: white !important;
}

.customer-detail-wrapper {
	position: relative;
	max-width: 800px;
	width: 90vw;
	max-height: 90vh;
	overflow-y: auto;
	background: white;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.customer-detail-content {
	padding: 2rem;
}

.contact-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1rem;
}

.contact-item {
	padding: 1rem;
	background: #f8f9fa;
	border-radius: 8px;
	transition: background-color 0.2s ease;
}

.contact-item:hover {
	background: #e9ecef;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
}

.stat-item {
	text-align: center;
	padding: 1rem;
	background: #f8f9fa;
	border-radius: 8px;
	transition: transform 0.2s ease;
}

.stat-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem;
	background: #f8f9fa;
	border-radius: 6px;
	transition: background-color 0.2s ease;
}

.product-item:hover {
	background: #e9ecef;
}

.order-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem;
	background: #f8f9fa;
	border-radius: 6px;
	margin-bottom: 0.5rem;
	transition: background-color 0.2s ease;
}

.order-item:hover {
	background: #e9ecef;
}

.recommendation-item {
	padding: 1rem;
	border-radius: 6px;
	border-left: 4px solid;
	transition: transform 0.2s ease;
}

.recommendation-item:hover {
	transform: translateX(4px);
}

.action-buttons {
	display: flex;
	gap: 1rem;
	justify-content: center;
	margin-top: 2rem;
	flex-wrap: wrap;
}

.action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: Poppins, sans-serif;
}

.action-btn-primary {
	background: #E0457B;
	color: white;
	box-shadow: 0 2px 8px rgba(224,69,123,0.2);
}

.action-btn-primary:hover {
	background: #c73869;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(224,69,123,0.3);
}

.action-btn-secondary {
	background: #fff;
	color: #E0457B;
	border: 2px solid #E0457B;
}

.action-btn-secondary:hover {
	background: #fce5ef;
	transform: translateY(-1px);
	border-color: #c73869;
}

/* Mobile optimizations */
@media (max-width: 768px) {
	.customer-detail-wrapper {
		width: 95vw;
		max-height: 95vh;
	}
	
	.customer-detail-content {
		padding: 1rem;
	}
	
	.contact-grid,
	.stats-grid {
		grid-template-columns: 1fr;
	}
	
	.action-buttons {
		flex-direction: column;
		align-items: center;
	}
	
	.action-btn {
		width: 100%;
		max-width: 300px;
	}
}
#posh-contact-modal,#posh-genealogy-modal,#posh-order-modal,#customer-modal{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.6);z-index:9999;justify-content:center;align-items:center}
#posh-order-modal.active{display:flex}

/* Mobile-First Modal Content - Full Screen with Small Border */
.order-modal-content{
	width: calc(100vw - 16px);
	height: calc(100vh - 16px);
	max-width: none;
	background: #ffffff !important;
	background-color: #ffffff !important;
	border-radius: 20px;
	border: 1px solid #e9ecef;
	padding: 0;
	box-shadow: 0 8px 32px rgba(0,0,0,.15);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	max-height: calc(100vh - 16px);
	-webkit-background-clip: padding-box;
	-webkit-appearance: none;
	z-index: 10000;
}

/* Desktop Modal - More Traditional */
@media (min-width: 768px) {
	.order-modal-content{
		width: 90%;
		max-width: 800px;
		height: 90vh;
		border-radius: 24px;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}
}

/* Large Desktop Modal */
@media (min-width: 1200px) {
	.order-modal-content{
		width: 85%;
		max-width: 900px;
		height: 85vh;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}
}

/* Mobile-First Order Modal Components */
.order-modal-header {
	background: linear-gradient(135deg, #E0457B 0%, #0ABAB5 100%);
	color: white;
	padding: 20px;
	text-align: center;
	position: relative;
	flex-shrink: 0;
	padding-top: max(20px, env(safe-area-inset-top, 20px));
}

.order-modal-close {
	position: absolute;
	top: max(16px, env(safe-area-inset-top, 16px));
	right: 16px;
	background: rgba(255,255,255,0.2);
	border: none;
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.order-modal-close:hover {
	background: rgba(255,255,255,0.3);
	transform: scale(1.1);
}

.order-modal-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0;
	text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-modal-subtitle {
	font-size: 16px;
	opacity: 0.9;
	margin: 8px 0 0 0;
	font-weight: 400;
}

.order-modal-body {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 24px;
	background: #ffffff !important;
	background-color: #ffffff !important;
	min-height: 0;
	-webkit-overflow-scrolling: touch;
	-webkit-background-clip: padding-box;
	-webkit-appearance: none;
}

.order-status-badge {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 12px 0;
}

.order-status-processing {
	background: #fff3cd;
	color: #856404;
	border: 2px solid #ffeaa7;
}

.order-status-shipped {
	background: #d1ecf1;
	color: #0c5460;
	border: 2px solid #74b9ff;
}

.order-status-delivered {
	background: #d4edda;
	color: #155724;
	border: 2px solid #00b894;
}

.order-section {
	background: white !important;
	background-color: white !important;
	border-radius: 16px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	border: 1px solid #e9ecef;
	-webkit-background-clip: padding-box;
	-webkit-appearance: none;
}

.order-section h3 {
	color: #2d3436;
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 16px 0;
	padding-bottom: 12px;
	border-bottom: 2px solid #f1f2f6;
}

.order-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid #f1f2f6;
}

.order-item:last-child {
	border-bottom: none;
}

.order-item-name {
	flex: 1;
	font-weight: 500;
	color: #2d3436;
}

.order-item-qty {
	width: 60px;
	text-align: center;
	color: #636e72;
	font-weight: 500;
}

.order-item-price {
	width: 80px;
	text-align: right;
	font-weight: 600;
	color: #2d3436;
}

.order-totals {
	background: #f8f9fa;
	border-radius: 12px;
	padding: 16px;
	margin-top: 16px;
}

.order-total-row {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	font-size: 16px;
}

.order-total-row.final {
	border-top: 2px solid #e9ecef;
	margin-top: 12px;
	padding-top: 16px;
	font-size: 18px;
	font-weight: 700;
	color: #2d3436;
}

.advocate-details-section {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border: 2px solid #0ABAB5;
	border-radius: 16px;
	padding: 20px;
	margin-bottom: 20px;
}

.advocate-details-section h4 {
	color: #0ABAB5;
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 12px 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.advocate-info {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

@media (min-width: 480px) {
	.advocate-info {
		grid-template-columns: 1fr 1fr;
	}
}

.advocate-info p {
	margin: 0;
	color: #2d3436;
	font-size: 14px;
}

.tracking-section {
	background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
	color: white;
	border-radius: 16px;
	padding: 20px;
	margin-bottom: 20px;
}

.tracking-section h4 {
	color: white;
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 12px 0;
}

.tracking-number {
	font-family: 'Courier New', monospace;
	font-size: 16px;
	font-weight: 600;
	background: rgba(255,255,255,0.2);
	padding: 8px 12px;
	border-radius: 8px;
	margin: 8px 0;
}

.tracking-status {
	font-size: 14px;
	opacity: 0.9;
	margin: 8px 0;
}

.order-actions {
	display: flex;
	gap: 12px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.order-action-btn {
	flex: 1;
	min-width: 120px;
	padding: 12px 20px;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	text-align: center;
	display: inline-block;
}

.order-action-btn.primary {
	background: #E0457B;
	color: white;
}

.order-action-btn.primary:hover {
	background: #d63384;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(224, 69, 123, 0.3);
}

.order-action-btn.secondary {
	background: #6c757d;
	color: white;
}

.order-action-btn.secondary:hover {
	background: #5a6268;
	transform: translateY(-1px);
}

/* Mobile Optimizations */
@media (max-width: 480px) {
	.order-modal-header {
		padding: 16px;
		padding-top: max(16px, env(safe-area-inset-top, 16px));
	}
	
	.order-modal-title {
		font-size: 20px;
	}
	
	.order-modal-body {
		padding: 16px;
	}
	
	.order-section {
		padding: 16px;
		margin-bottom: 16px;
	}
	
	.order-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
	
	.order-item-qty,
	.order-item-price {
		width: auto;
		text-align: left;
	}
	
	.order-actions {
		flex-direction: column;
	}
	
	.order-action-btn {
		width: 100%;
	}
}

/* iPhone Safari Specific Fixes */
@supports (-webkit-touch-callout: none) {
	.order-modal-content {
		height: calc(100vh - 16px);
		max-height: calc(100vh - 16px);
		overflow: hidden;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		margin-top: env(safe-area-inset-top, 0px);
	}
	
	.order-modal-header {
		padding-top: max(40px, calc(env(safe-area-inset-top, 0px) + 20px));
		min-height: 140px;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
	
	.order-modal-close {
		top: max(40px, calc(env(safe-area-inset-top, 0px) + 20px));
	}
	
	.order-modal-title {
		margin-top: 8px;
	}
	
	.order-modal-subtitle {
		margin-top: 4px;
	}
}
.contact-card-host{display:flex;justify-content:center;align-items:center;width:100%;height:100%;padding:1rem;box-sizing:border-box}
.contact-card-wrapper{width:100%;max-width:420px;border-radius:24px;border:1px solid #e9ecef;background:#ffffff !important;padding:20px;box-shadow:0 4px 16px rgba(0,0,0,.25);position:relative;font-size:15px;line-height:1.6;color:#000;display:flex;gap:16px}
.contact-card-content{flex:1;min-width:0}
.contact-card-actions{display:flex;flex-direction:column;gap:12px;align-items:center;padding-right:0;flex-shrink:0}
.contact-action-btn{font-size:24px;font-weight:bold;color:#fff;background:#e0457b;border:none;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s ease;width:40px;height:40px;border-radius:8px;flex-shrink:0}
.contact-action-btn:hover{opacity:0.8}
.contact-action-btn:active{opacity:0.6}
.contact-genealogy-btn img{display:block;width:24px;height:24px}
.contact-close{position:static;line-height:1}
.contact-row{margin-bottom:8px}
.contact-row strong{display:inline-block;width:90px;font-weight:600}
.contact-row a{color:#E0457B;text-decoration:none}

/* Genealogy Modal Styles */
.genealogy-modal-wrapper{width:100%;max-width:500px;border-radius:24px;border:1px solid #e9ecef;background:#ffffff !important;box-shadow:0 4px 16px rgba(0,0,0,.25);overflow:hidden}
.genealogy-modal-header{display:flex;justify-content:space-between;align-items:center;padding:20px;border-bottom:1px solid #e9ecef;background:#f8f9fa}
.genealogy-modal-header h2{margin:0;font-size:20px;font-weight:600;color:#2c3e50}
.genealogy-modal-close{font-size:28px;font-weight:bold;color:#E0457B;background:none;border:none;cursor:pointer;padding:0;width:32px;height:32px;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s ease}
.genealogy-modal-close:hover{opacity:0.7}
.genealogy-modal-body{padding:20px;max-height:70vh;overflow-y:auto}
.genealogy-stack{display:flex;flex-direction:column;gap:12px}
.genealogy-stack-item{background:#f8f9fa;border:1px solid #e9ecef;border-radius:12px;padding:16px;transition:all 0.2s ease;cursor:pointer}
.genealogy-stack-item:hover{background:#e9ecef;transform:translateX(4px);box-shadow:0 2px 8px rgba(0,0,0,0.1)}
.genealogy-stack-item-current{background:#fff3f8;border-color:#E0457B;border-width:2px}
.genealogy-stack-item-content{display:flex;flex-direction:column;gap:8px}
.genealogy-stack-item-header{display:flex;align-items:center;gap:12px}
.genealogy-stack-item-up-label{font-size:13px;font-weight:600;color:#E0457B;background:#fff3f8;padding:4px 10px;border-radius:6px;white-space:nowrap;min-width:50px;text-align:center}
.genealogy-stack-item-name{font-size:16px;font-weight:600;color:#2c3e50}
.genealogy-stack-item-details{display:flex;gap:12px;font-size:14px;color:#6c757d}
.genealogy-stack-item-id{font-weight:500}
.genealogy-stack-item-rank{color:#E0457B;font-weight:600}
.genealogy-stack-item-email{font-size:14px}
.genealogy-stack-item-email a{color:#E0457B;text-decoration:none}
.genealogy-stack-item-email a:hover{text-decoration:underline}

/* Orders pagination */
.posh-orders-pagination.clean{display:flex;justify-content:space-evenly;align-items:center;gap:10px;margin:0 0 1.5rem;flex-wrap:nowrap}
.section-order-button{background:#fff;color:#222;border:1px solid #ccc;border-radius:10px;min-width:64px;height:48px;font-size:18px;font-weight:700;cursor:pointer;transition:all .15s ease-in-out}
.section-order-button.active{background:#E0457B;color:#fff;border-color:#E0457B;box-shadow:0 0 0 2px #E0457B55}
.section-order-button:hover{box-shadow:0 0 0 2px #E0457B33}

/* Downline multiselect */
.down-multiselect{position:relative;font-size:14px}
.down-multiselect-toggle{width:100%;padding:10px;font-size:14px;border:1px solid #ccc;border-radius:8px;background:#fff;cursor:pointer;text-align:left}
.down-multiselect-options{display:none;position:absolute;top:100%;left:0;right:0;background:#fff;border:1px solid #ccc;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.1);max-height:220px;overflow-y:auto;z-index:999;margin-top:4px}
.down-multiselect.open .down-multiselect-options{display:block}
.down-multiselect-options label{display:flex;align-items:center;padding:6px 10px;cursor:pointer}
.down-multiselect-options label:hover{background:#f3f3f3}
.down-multiselect-options input[type=checkbox]{margin-right:8px}
.down-multiselect-clear{font-size:12px;color:#E0457B;font-weight:600;cursor:pointer;padding:6px 10px;text-align:right}

/* Filter drawer */
.posh-filter-drawer{margin-bottom:16px}
#posh-filter-drawer{overflow:hidden;height:0;transition:height 220ms ease;will-change:height;border:1px solid #eee;border-radius:12px;background:#fff;padding:0;box-shadow:0 4px 20px rgba(0,0,0,0.1);position:relative;z-index:100}
#posh-filter-drawer.is-opening,#posh-filter-drawer.is-closing{z-index:100;position:relative}
#posh-filter-drawer.is-open{height:auto !important;padding:20px;min-height:200px;overflow:visible}
#posh-filter-toggle{display:inline-flex;align-items:center;gap:.5rem;background:#E0457B;color:#fff;border:none;padding:12px 20px;border-radius:999px;font-weight:600;font-size:15px;transition:all 0.2s ease}
#posh-filter-toggle:hover{background:#c73869;transform:translateY(-1px);box-shadow:0 4px 12px rgba(224,69,123,0.3)}
#posh-filter-toggle[aria-expanded="true"]{background:#E0457B;box-shadow:0 0 0 3px rgba(224,69,123,0.3)}
.posh-filter-wrap{position:relative}

/* Professional Filter Styling */
.posh-filter-form{display:flex;flex-direction:column;gap:24px;max-width:100%;min-height:fit-content}

.filter-section{background:#fff;border-radius:16px;padding:20px;border:1px solid #f0f0f0;box-shadow:0 2px 8px rgba(0,0,0,0.04)}

.filter-section-title{font-size:15px;font-weight:700;color:#2c3e50;margin:0 0 16px 0;text-transform:uppercase;letter-spacing:0.5px}

.filter-row{display:flex;flex-direction:column;gap:16px}

.filter-label{display:flex;flex-direction:column;gap:8px;flex:1}
.filter-label.full-width{width:100%}

.filter-label span{font-size:14px;font-weight:600;color:#34495e}

.filter-input,.filter-select{height:48px;border:2px solid #e8e8e8;border-radius:12px;padding:12px 16px;font-size:15px;font-family:Poppins,sans-serif;transition:all 0.3s ease;background:#fff;color:#2c3e50}
.filter-input:focus,.filter-select:focus{outline:none;border-color:#E0457B;box-shadow:0 0 0 4px rgba(224,69,123,0.15);transform:translateY(-1px)}

/* Remove spinner buttons from number inputs */
.filter-input[type="number"]::-webkit-outer-spin-button,
.filter-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.filter-input[type="number"] {
  -moz-appearance: textfield;
}

/* Team Search Bar Styling */
#team-search-input {
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: Poppins, sans-serif;
  transition: all 0.3s ease;
  background: #fff;
  color: #2c3e50;
}

#team-search-input:focus {
  outline: none;
  border-color: #E0457B;
  box-shadow: 0 0 0 4px rgba(224,69,123,0.15);
  transform: translateY(-1px);
}

/* Search Results Dropdown */
#team-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #E0457B;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: #fce5ef;
}

.search-result-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}

.search-result-meta {
  font-size: 12px;
  color: #7f8c8d;
}

.filter-select[size]{height:auto;min-height:48px}

.filter-actions{display:flex;flex-direction:column;gap:12px;margin-top:16px;margin-bottom:20px;position:relative;z-index:10}

.filter-btn{display:flex;align-items:center;justify-content:center;height:52px;border-radius:16px;font-weight:700;font-size:15px;text-decoration:none;border:none;cursor:pointer;transition:all 0.3s ease;font-family:Poppins,sans-serif;text-transform:uppercase;letter-spacing:0.5px}

.filter-btn-primary{background:linear-gradient(135deg, #E0457B 0%, #c73869 100%);color:#fff;box-shadow:0 4px 16px rgba(224,69,123,0.3)}
.filter-btn-primary:hover{background:linear-gradient(135deg, #c73869 0%, #a62d5a 100%);transform:translateY(-2px);box-shadow:0 8px 24px rgba(224,69,123,0.4)}

.filter-btn-secondary{background:#fff;color:#E0457B;border:2px solid #E0457B;box-shadow:0 2px 8px rgba(0,0,0,0.08)}
.filter-btn-secondary:hover{background:#fce5ef;transform:translateY(-2px);box-shadow:0 4px 16px rgba(224,69,123,0.2)}

.filter-btn-close{background:linear-gradient(135deg, #6c757d 0%, #5a6268 100%);color:#fff;box-shadow:0 2px 8px rgba(0,0,0,0.1)}
.filter-btn-close:hover{background:linear-gradient(135deg, #5a6268 0%, #495057 100%);transform:translateY(-2px);box-shadow:0 4px 16px rgba(0,0,0,0.2)}



/* Mobile-First Responsive Design */
@media (min-width: 640px) {
  .filter-row{flex-direction:row}
  .filter-label{flex:1}
  .filter-actions{flex-direction:row}
  .filter-btn{flex:1}
}

@media (min-width: 768px) {
  .posh-filter-form{max-width:800px}
  .filter-section{padding:20px}
  .filter-actions{gap:12px}
}

/* Mobile adjustments – widened trigger to tablets too */
@media (max-width: 820px){
  /* Force nav to stack full-width regardless of markup inside */
  .posh-dashboard-container .nav-buttons{
    flex-wrap:nowrap;
    flex-direction:column;
    gap:10px;
  }
  .posh-dashboard-container .nav-buttons > *,
  .posh-dashboard-container .nav-buttons a,
  .posh-dashboard-container .nav-buttons button{
    display:flex;
    width:100%;
    justify-content:center;
  }

  /* Mobile navigation buttons */
  .posh-nav-container{flex-direction:column;gap:12px;margin:1.5rem 0}
  .posh-nav-btn{width:100%;padding:16px 24px;min-height:48px;font-size:15px;border-radius:12px}

  /* tighten paddings */
  body .posh-advocate-container{padding:1rem}
  .team-center-container{padding:1rem!important}
  .team-center-header{font-size:1.8rem}
  .section-rank,.section-myteam,.section-orders,.section-incentive{padding:1rem;border-radius:12px}

  /* Lifetime Sales section mobile optimization - keep square rank */
  .section-rank > div:first-child{
    padding:20px 16px!important;
    min-width:0!important;
  }
  .section-rank > div:first-child h2{
    font-size:1.1rem!important;
    line-height:1.2!important;
  }
  .section-rank > div:first-child > div:first-of-type{
    font-size:1.8rem!important;
    line-height:1.1!important;
  }
  .section-rank > div:first-child > div:last-of-type{
    font-size:0.9rem!important;
    line-height:1.2!important;
  }
  .section-rank > div:last-child{
    width:100px!important;
    min-width:100px!important;
  }
  .section-rank > div:last-child > div:first-of-type{
    font-size:0.9rem!important;
  }
  .section-rank > div:last-child > div:last-of-type{
    font-size:3.5rem!important;
  }

  /* Mobile: Hide table, show cards */
  .team-results-table-wrapper{display:none}
  .team-results-cards{display:block;padding:0;margin:0}

  /* Enhanced Mobile Card Styling - Compact Redesign */
  .team-card{
    background:#fff;
    border:2px solid #e8e8e8;
    border-radius:12px;
    padding:12px;
    margin-bottom:12px;
    display:flex;
    align-items:stretch;
    gap:10px;
    transition:all .2s ease;
    box-shadow:0 2px 8px rgba(0,0,0,0.08);
    position:relative;
    overflow:hidden;
    min-height:100px;
    height:100px;
  }
  /* Expanded cards wrapper - Pink background edge-to-edge */
  .team-card-child-wrapper{
    background:#f5c2d6;
    margin-left:-1rem;
    margin-right:-1rem;
    padding:12px 1rem;
    margin-top:0;
    margin-bottom:12px;
  }
  /* Different pink shades by depth */
  .team-card-child-wrapper[data-depth="2"]{
    background:#e96a90;
  }
  .team-card-child-wrapper[data-depth="3"]{
    background:#f189a5;
  }
  .team-card-child-wrapper[data-depth="4"]{
    background:#f7a8bb;
  }
  .team-card-child-wrapper[data-depth="5"]{
    background:#fbc5d1;
  }
  .team-card-child-wrapper .team-card{
    margin-bottom:12px;
  }
  .team-card-child-wrapper .team-card:last-child{
    margin-bottom:0;
  }
  .team-card::before{
    content:'';
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:4px;
    background:linear-gradient(180deg, #E0457B 0%, #0ABAB5 100%);
    opacity:0;
    transition:opacity .2s ease;
  }
  .team-card:hover{
    box-shadow:0 4px 16px rgba(0,0,0,0.12);
    border-color:#E0457B;
    transform:translateY(-2px);
  }
  .team-card:hover::before{
    opacity:1;
  }
  
  /* Expand button area - Taller button */
  .team-card-expand{
    flex-shrink:0;
    width:36px;
    display:flex;
    justify-content:center;
    align-items:stretch;
    padding-top:0;
  }
  .team-card-expand-empty{
    width:36px;
  }
  .team-card .team-expand-button{
    width:32px;
    height:100%;
    font-size:20px;
    border-width:2px;
    border-style:solid;
    border-color:#E0457B;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff;
    color:#E0457B;
    transition:all .2s ease;
    padding:0;
    line-height:1;
    position:relative;
  }
  .team-card .team-expand-button::before{
    content:'→';
    display:block;
  }
  .team-card .team-expand-button:hover{
    background:#E0457B;
    color:#fff;
    transform:scale(1.05);
  }
  .team-card .team-expand-button:hover::before{
    color:#fff;
  }
  .team-card .team-expand-button[data-expanded="true"]{
    background:#E0457B;
    color:#fff;
    border-color:#E0457B;
  }
  .team-card .team-expand-button[data-expanded="true"]::before{
    content:'↓';
    color:#fff;
  }
  .team-card .team-expand-button[data-expanded="false"]{
    background:#fff;
    color:#E0457B;
    border-color:#E0457B;
  }
  .team-card .team-expand-button[data-expanded="false"]::before{
    content:'→';
    color:#E0457B;
  }
  /* Owner (Down 0) expand button - always expanded, non-clickable */
  .team-card .team-expand-button-owner{
    background:#E0457B !important;
    color:#fff !important;
    border-color:#E0457B !important;
    cursor:default !important;
    pointer-events:none !important;
  }
  .team-card .team-expand-button-owner::before{
    content:'↓' !important;
    color:#fff !important;
  }
  .team-card .team-expand-button-owner:hover{
    background:#E0457B !important;
    color:#fff !important;
    transform:none !important;
  }
  
  /* Main card content */
  .team-card-main{
    flex:1;
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:8px;
  }
  
  /* Card header: Name and Rank on same line */
  .team-card-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
  }
  .team-card-name-wrapper{
    flex:1;
    min-width:0;
  }
  .team-card-name{
    font-weight:700;
    font-size:16px;
    color:#222;
    cursor:pointer;
    transition:color .15s ease;
    line-height:1.3;
    margin-bottom:2px;
    display:block;
  }
  .team-card-name:hover{
    color:#E0457B;
  }
  .team-card .posh-id-display{
    color:#888;
    font-size:12px;
    font-weight:400;
    display:inline;
    margin-left:4px;
  }
  
  /* Rank badge - Using existing rank color codes from section-rank */
  .team-card-rank-badge{
    flex-shrink:0;
    padding:5px 10px;
    border-radius:8px;
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:0.5px;
    border:2px solid transparent;
    white-space:nowrap;
  }
  /* Rank 1-4: Black on white */
  .team-card-rank-badge[data-rank="0"],
  .team-card-rank-badge[data-rank="1"],
  .team-card-rank-badge[data-rank="2"],
  .team-card-rank-badge[data-rank="3"],
  .team-card-rank-badge[data-rank="4"]{
    background:#fff;
    color:#000;
    border-color:#000;
  }
  /* Rank 5: Pink background, white text */
  .team-card-rank-badge[data-rank="5"]{
    background:#E0457B;
    color:#fff;
    border-color:#E0457B;
  }
  /* Rank 6-8: Orange/tan background, black text */
  .team-card-rank-badge[data-rank="6"],
  .team-card-rank-badge[data-rank="7"],
  .team-card-rank-badge[data-rank="8"]{
    background:#EAA26D;
    color:#000;
    border-color:#EAA26D;
  }
  /* Rank 9: Teal background, white text */
  .team-card-rank-badge[data-rank="9"]{
    background:#0ABAB5;
    color:#fff;
    border-color:#0ABAB5;
  }
  /* Rank 10-23: Dark blue background, white text */
  .team-card-rank-badge[data-rank="10"],
  .team-card-rank-badge[data-rank="11"],
  .team-card-rank-badge[data-rank="12"],
  .team-card-rank-badge[data-rank="13"],
  .team-card-rank-badge[data-rank="14"],
  .team-card-rank-badge[data-rank="15"],
  .team-card-rank-badge[data-rank="16"],
  .team-card-rank-badge[data-rank="17"],
  .team-card-rank-badge[data-rank="18"],
  .team-card-rank-badge[data-rank="19"],
  .team-card-rank-badge[data-rank="20"],
  .team-card-rank-badge[data-rank="21"],
  .team-card-rank-badge[data-rank="22"],
  .team-card-rank-badge[data-rank="23"]{
    background:#375275;
    color:#fff;
    border-color:#375275;
  }
  
  /* Stats row - Single horizontal row */
  .team-card-stats{
    display:flex;
    flex-direction:row;
    gap:8px; /* Reduced from 12px to give more room to columns */
    align-items:center;
  }
  
  /* Stat items - All in one row */
  .team-card-stat-item{
    display:flex;
    flex-direction:column;
    gap:2px;
    flex:1;
    min-width:0;
  }
  .team-card-stat-item.team-card-stat-sales{
    flex:1.2; /* Reduced from 1.5 to move left and give more room to others */
  }
  .team-card-stat-item.team-card-stat-down{
    flex:0.6;
  }
  .team-card-stat-item.team-card-stat-joined{
    flex:1.3; /* Increased from 1.2 to give more room */
  }
  .team-card-stat-label{
    font-size:10px;
    font-weight:600;
    color:#999;
    text-transform:uppercase;
    letter-spacing:0.5px;
    line-height:1.2;
    text-align:center;
  }
  .team-card-stat-value{
    font-size:14px;
    font-weight:600;
    color:#444;
    line-height:1.2;
    text-align:center;
  }
  /* Sales - More prominent, but only pink if > 0.00 */
  .team-card-stat-sales .team-card-stat-value{
    font-size:16px;
    font-weight:400; /* Default weight for $0.00 */
    color:#444; /* Default to same color as other stats */
  }
  .team-card-stat-sales .team-card-stat-value.has-sales{
    font-weight:700; /* Bold when sales > 0.00 */
    color:#E0457B; /* Pink only when sales > 0.00 */
  }
  /* Highlight big sales ($500+) */
  .team-card[data-sales-high] .team-card-stat-sales .team-card-stat-value{
    color:#e65100;
    font-size:18px;
  }
  /* Advancement stat */
  .team-card-stat-item.team-card-stat-advancement{
    flex:1.3; /* Increased from 1.1 to give more room */
  }
  .team-card-stat-advancement .team-card-stat-value{
    font-weight:400;
  }
  /* Down and Joined - Regular weight, centered */
  .team-card-stat-down .team-card-stat-value,
  .team-card-stat-joined .team-card-stat-value{
    font-weight:400;
    text-align:center;
  }

  /* Mobile Search Input */
  .team-search-input-wrapper label{
    font-size:15px!important;
    margin-bottom:10px!important;
  }
  #team-search-input{
    font-size:16px;
    padding:14px 16px;
    min-height:48px;
    border-width:2px;
  }

  /* Mobile Filter Button */
  #posh-filter-toggle{
    width:100%;
    justify-content:center;
    padding:14px 20px;
    min-height:48px;
    font-size:16px;
  }

  /* Mobile Search Container */
  .team-search-container{
    flex-direction:column!important;
    gap:12px!important;
    align-items:stretch!important;
  }
  .team-search-input-wrapper{
    width:100%!important;
    min-width:0!important;
    flex:1 1 100%!important;
  }
  .team-filter-button-wrapper{
    width:100%!important;
  }

  /* Mobile Pagination */
  .team-pagination{
    flex-direction:column;
    gap:16px;
    padding:16px 0;
  }
  .team-pagination > div{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    justify-content:center;
  }
  .team-pagination a,
  .team-pagination span{
    min-width:44px;
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:15px;
  }

  /* Mobile Page Title */
  .team-center h2{
    font-size:1.5rem!important;
    margin-bottom:1rem!important;
  }
  .team-center h2 img{
    height:32px!important;
  }

  /* Tables: allow scroll, no clipping */
  .customer-table,.team-results-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;table-layout:auto;min-width:580px}
  .customer-table th,.customer-table td,.team-results-table th,.team-results-table td{font-size:12.5px;padding:8px;white-space:normal;text-overflow:unset}

  /* relax fixed widths */
  .team-results-table th:nth-child(1),
  .team-results-table th:nth-child(2),
  .team-results-table th:nth-child(3),
  .team-results-table th:nth-child(4),
  .team-results-table th:nth-child(5),
  .customer-table th:nth-child(1),
  .customer-table th:nth-child(2),
  .customer-table th:nth-child(3),
  .customer-table th:nth-child(4){width:auto}
}

/* Extra Small Mobile - Further Refinements */
@media (max-width: 480px){
  .team-card{
    padding:10px;
    margin-bottom:10px;
    border-radius:10px;
    gap:8px;
    min-height:92px;
    height:92px;
  }
  .team-card-expand,
  .team-card-expand-empty{
    width:32px;
  }
  .team-card .team-expand-button{
    width:28px;
    height:100%;
    font-size:18px;
  }
  .team-card-main{
    gap:6px;
  }
  .team-card-name{
    font-size:15px;
  }
  .team-card .posh-id-display{
    font-size:11px;
  }
  .team-card-rank-badge{
    padding:4px 8px;
    font-size:10px;
  }
  .team-card-header{
    gap:8px;
  }
  .team-card-stats{
    gap:8px;
  }
  .team-card-stat-label{
    font-size:9px;
  }
  .team-card-stat-value{
    font-size:13px;
  }
  .team-card-stat-sales .team-card-stat-value{
    font-size:15px;
  }
  .team-card[data-sales-high] .team-card-stat-sales .team-card-stat-value{
    font-size:17px;
  }
  .team-card-stat-down .team-card-stat-value,
  .team-card-stat-joined .team-card-stat-value{
    font-weight:400;
  }
  .team-center-container{
    padding:0.75rem!important;
  }
  .posh-nav-btn{
    padding:14px 20px;
    font-size:14px;
  }
  #team-search-input{
    font-size:16px;
    padding:12px 14px;
  }
  .team-pagination a,
  .team-pagination span{
    min-width:40px;
    min-height:40px;
    font-size:14px;
    padding:8px 10px;
  }
}

@media (max-width: 500px){
  .hide-mobile,.hide-mobile-extra{display:none!important}
}

/* Action Modal Styles */
.action-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  box-sizing: border-box !important;
}

.action-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.action-modal-content {
  position: relative !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 0 !important;
  max-width: 450px !important;
  width: 100% !important;
  max-height: 70vh !important;
  overflow: hidden !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
  z-index: 10001 !important;
}

.action-modal-header {
  background: #f8f9fa;
  padding: 16px 20px;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-modal-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 18px;
}

.action-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.action-modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.action-modal-body {
  padding: 16px 20px;
  max-height: 350px;
  overflow-y: auto;
}

.action-modal-footer {
  background: #f8f9fa;
  padding: 16px 20px;
  border-top: 1px solid #dee2e6;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

/* Mobile Modal Adjustments */
@media (max-width: 640px) {
  .action-modal {
    padding: 10px;
  }
  
  .action-modal-content {
    max-width: 100%;
    max-height: 80vh;
  }
  
  .action-modal-header {
    padding: 12px 16px;
  }
  
  .action-modal-body {
    padding: 12px 16px;
    max-height: 300px;
  }
  
  .action-modal-footer {
    padding: 12px 16px;
    /* Keep buttons side by side even on mobile */
  }
  
  .action-btn.large-btn {
    width: 100%;
    min-width: auto;
  }
}

/* Contact Modal Specific Styles */
.contact-name {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 16px 0;
  text-align: center;
}

.contact-spacer {
  height: 20px;
  margin: 16px 0;
}

.notes-btn {
  background-color: #0ABAB5 !important;
  color: white !important;
  border: none !important;
  flex: 1;
  margin-right: 8px;
  height: 80px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

.close-btn {
  background-color: #E0457B !important;
  color: white !important;
  border: none !important;
  flex: 1;
  margin-left: 8px;
  height: 80px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

.action-modal-footer {
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.back-btn {
  background-color: #6c757d !important;
  color: white !important;
  border: none !important;
  flex: 1;
  margin-right: 8px;
  height: 80px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

.save-btn {
  background-color: #0ABAB5 !important;
  color: white !important;
  border: none !important;
  flex: 1;
  margin-left: 8px;
  height: 80px !important;
  font-size: 18px !important;
  font-weight: 600 !important;
}

/* Notes Form Styles */
.notes-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.form-input, .form-textarea {
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: #E0457B;
  box-shadow: 0 0 0 3px rgba(224, 69, 123, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.product-suggestions {
  margin-top: 4px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  max-height: 120px;
  overflow-y: auto;
  background: white;
}

.product-suggestion {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f8f9fa;
  transition: background-color 0.2s ease;
}

.product-suggestion:hover {
  background-color: #f8f9fa;
}

.product-suggestion:last-child {
  border-bottom: none;
}

.no-suggestions {
  padding: 8px 12px;
  color: #6c757d;
  font-style: italic;
}

/* Enhanced Search Results Dropdown */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e8e8e8;
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 15px;
  margin-bottom: 4px;
}

.search-result-details {
  color: #6c757d;
  font-size: 13px;
  line-height: 1.4;
}

.search-result-match {
  color: #E0457B;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Punch Card Styles */
.punch-card-section {
  position: relative;
  overflow: hidden;
}

.punch-card-container {
  position: relative;
  z-index: 2;
}

.punch-hole {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.punch-hole:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(224, 69, 123, 0.3) !important;
}

.punch-hole.punched {
  animation: punchEffect 0.6s ease-out;
}

@keyframes punchEffect {
  0% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 8px 24px rgba(224, 69, 123, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: inset 0 0 0 2px #E0457B;
  }
}

.punch-hole.punched::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: #E0457B;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: punchDot 0.8s ease-out;
}

@keyframes punchDot {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(4);
  }
}

/* Floating punch dots animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-10px) rotate(180deg);
    opacity: 0.6;
  }
}

.punch-dot {
  animation-timing-function: ease-in-out;
}

/* Progress bar animation */
.progress-fill {
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Prize claimed animation */
.prize-claimed {
  animation: celebrate 0.8s ease-out;
}

@keyframes celebrate {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Card level badge animation */
.level-badge {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Mobile responsiveness for punch card */
@media (max-width: 640px) {
  .punch-holes {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }
  
  .punch-hole-container {
    flex: 0 0 calc(33.333% - 8px);
    max-width: 80px;
  }
  
  .punch-hole {
    width: 40px !important;
    height: 40px !important;
  }
  
  .hole-label {
    font-size: 0.6rem !important;
  }
  
  .punch-card-header h2 {
    font-size: 1.3rem !important;
  }
  
  .punch-card-header p {
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  .punch-hole-container {
    flex: 0 0 calc(50% - 6px);
    max-width: 70px;
  }
  
  .punch-hole {
    width: 35px !important;
    height: 35px !important;
  }
}

/* Additional punch card interaction styles */
.punch-hole.hover-effect {
  transform: scale(1.15) !important;
  box-shadow: 0 6px 20px rgba(224, 69, 123, 0.4) !important;
}

.punch-hole.punch-clicked {
  animation: punchClick 0.6s ease-out;
}

@keyframes punchClick {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.punch-dot-effect {
  animation: punchDotFall 1s ease-out forwards;
}

@keyframes punchDotFall {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
}

/* Prize celebration effects */
.prize-claimed::before {
  content: '🎉';
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 24px;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Punched logo falling animation */
@keyframes logoFall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: translateY(-50px) rotate(180deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(0) rotate(var(--final-rotation, 0deg));
    opacity: 1;
  }
}

.punched-logo {
  --final-rotation: 0deg;
}

/* Punch card specific styles */
.section-punch-card {
  position: relative;
  overflow: visible;
}

.punched-logos-floor {
  pointer-events: none;
}

/* Make punch holes look more like actual punch card holes */
.punch-hole:not(.punched) {
  background: radial-gradient(circle, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  box-shadow: 
    inset 0 1px 3px rgba(0,0,0,0.1),
    0 1px 3px rgba(0,0,0,0.1);
}

.punch-hole.punched {
  background: #fff;
  border: 2px solid var(--hole-color, #E0457B);
  box-shadow: 
    inset 0 0 0 1px var(--hole-color, #E0457B),
    0 2px 8px rgba(0,0,0,0.1);
}

/* Completed cards styling */
.completed-card {
  transition: all 0.3s ease;
}

.completed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Mobile responsiveness for punch card */
@media (max-width: 640px) {
  .punch-holes {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 0 5px;
  }
  
  .punch-hole-container {
    flex: 0 0 calc(33.333% - 6px);
    max-width: 70px;
  }
  
  .punch-hole {
    width: 40px !important;
    height: 40px !important;
  }
  
  .hole-label {
    font-size: 0.6rem !important;
  }
  
  .punched-logos-floor {
    height: 30px;
  }
  
  .punched-logo {
    width: 15px !important;
    height: 15px !important;
  }
}

@media (max-width: 480px) {
  .punch-hole-container {
    flex: 0 0 calc(50% - 4px);
    max-width: 60px;
  }
  
  .punch-hole {
    width: 35px !important;
    height: 35px !important;
  }
  
  .punched-logos-floor {
    height: 25px;
  }
  
  .punched-logo {
    width: 12px !important;
    height: 12px !important;
  }
}

/* Enhanced Customer Center - Mobile-First Responsive Design */
@media (min-width: 640px) {
	.search-filter-section .buttons-container {
		display: flex !important;
		flex-direction: row !important;
		gap: 0.5rem !important;
		width: 100% !important;
	}
	
	.search-filter-section button,
	.search-filter-section a {
		flex: 1 !important;
		padding: 0.5rem 1rem !important;
		width: auto !important;
	}
}

@media (min-width: 768px) {
	.customer-summary-stats {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

/* ===== Team Center Minimal Additions (2025-09-24) ===== */

/* (Optional) tiny token layer for gradual cleanup */
:root{
  --posh-pink:#E0457B;
  --posh-pink-dark:#c73869;
  --posh-border:#e8e8e8;
  --posh-shadow:0 8px 32px rgba(0,0,0,0.15);
  --posh-radius:12px;
  --posh-font:Poppins, sans-serif;
}

/* ===== Simple Filters System (2025-01-29) ===== */

.posh-simple-filters {
  margin-bottom: 16px;
}

.posh-simple-filter-panel {
  background: #fff;
  border: 2px solid #E0457B;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.posh-simple-filter-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.posh-filter-select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e8e8e8;
  border-radius: 8px;
  font-size: 14px;
  font-family: Poppins, sans-serif;
  background: #fff;
  color: #2c3e50;
  transition: border-color 0.2s;
}

.posh-filter-select:focus {
  outline: none;
  border-color: #E0457B;
  box-shadow: 0 0 0 4px rgba(224, 69, 123, 0.15);
}

@media (max-width: 768px) {
  .posh-simple-filter-panel {
    padding: 16px;
  }
}

/* ===== Advanced Filters System (2025-01-29) - DEPRECATED ===== */

/* Toolbar */
.posh-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  flex-wrap: wrap;
}

.posh-toolbar-left,
.posh-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.posh-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: Poppins, sans-serif;
  white-space: nowrap;
}

.posh-toolbar-btn-primary {
  background: #E0457B;
  color: #fff;
}

.posh-toolbar-btn-primary:hover {
  background: #c73869;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(224, 69, 123, 0.3);
}

.posh-toolbar-btn-secondary {
  background: #fff;
  color: #E0457B;
  border: 2px solid #E0457B;
}

.posh-toolbar-btn-secondary:hover {
  background: #fce5ef;
  border-color: #c73869;
}

.posh-filter-count-badge {
  display: inline-block;
  background: #fff;
  color: #E0457B;
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  min-width: 18px;
  text-align: center;
}

/* Filter Chips Bar */
.posh-filter-chips-bar {
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.posh-filter-chips-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.posh-filter-chips-label {
  font-weight: 600;
  font-size: 13px;
  color: #2c3e50;
}

.posh-filter-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.posh-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #E0457B;
  color: #fff;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
}

.posh-filter-chip-remove {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.posh-filter-chip-remove:hover {
  background: rgba(255, 255, 255, 0.2);
}

.posh-filter-clear-all {
  background: #6c757d;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.posh-filter-clear-all:hover {
  background: #5a6268;
}

/* Advanced Filter Panel */
.posh-advanced-filter-panel {
  background: #fff;
  border: 2px solid #E0457B;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  margin-bottom: 16px;
  overflow: hidden;
}

.posh-filter-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #E0457B 0%, #c73869 100%);
  color: #fff;
}

.posh-filter-panel-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.posh-filter-panel-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.posh-filter-panel-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.posh-filter-panel-body {
  padding: 20px;
}

.posh-filter-panel-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e8e8e8;
}

/* Filter Builder */
.posh-filter-builder,
.posh-sort-builder {
  margin-bottom: 24px;
}

.posh-filter-builder h4,
.posh-sort-builder h4 {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.posh-filter-rules,
.posh-sort-rules {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.posh-filter-rule,
.posh-sort-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  flex-wrap: wrap;
}

.posh-filter-logic,
.posh-filter-field,
.posh-filter-operator,
.posh-filter-value,
.posh-sort-field,
.posh-sort-direction {
  padding: 8px 12px;
  border: 2px solid #e8e8e8;
  border-radius: 6px;
  font-size: 14px;
  font-family: Poppins, sans-serif;
  background: #fff;
  transition: border-color 0.2s;
}

.posh-filter-logic {
  min-width: 60px;
  font-weight: 700;
  color: #E0457B;
}

.posh-filter-field,
.posh-filter-operator,
.posh-sort-field {
  min-width: 140px;
}

.posh-filter-value {
  flex: 1;
  min-width: 150px;
}

.posh-filter-value-to {
  min-width: 150px;
}

.posh-filter-logic-placeholder {
  width: 60px;
}

.posh-filter-rule-remove,
.posh-sort-rule-remove {
  background: #dc3545;
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.posh-filter-rule-remove:hover,
.posh-sort-rule-remove:hover {
  background: #c82333;
}

.posh-add-filter-rule,
.posh-add-sort-rule {
  background: #0ABAB5;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.posh-add-filter-rule:hover,
.posh-add-sort-rule:hover {
  background: #089a95;
}

.posh-sort-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #E0457B;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

/* Display Options */
.posh-display-options {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e8e8e8;
}

.posh-display-options h4 {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.posh-display-option-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.posh-display-option-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.posh-display-option-row label span {
  font-size: 13px;
  font-weight: 600;
  color: #34495e;
}

.posh-display-option-row select,
.posh-display-option-row input[type="date"] {
  padding: 10px 12px;
  border: 2px solid #e8e8e8;
  border-radius: 6px;
  font-size: 14px;
  font-family: Poppins, sans-serif;
}

/* Filter Buttons */
.posh-filter-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: Poppins, sans-serif;
}

.posh-filter-btn-primary {
  background: #E0457B;
  color: #fff;
}

.posh-filter-btn-primary:hover {
  background: #c73869;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(224, 69, 123, 0.3);
}

.posh-filter-btn-secondary {
  background: #fff;
  color: #E0457B;
  border: 2px solid #E0457B;
}

.posh-filter-btn-secondary:hover {
  background: #fce5ef;
}

/* Smart Filters Menu */
.posh-smart-filters-dropdown,
.posh-presets-dropdown {
  position: relative;
}

.posh-smart-filters-menu,
.posh-presets-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: #fff;
  border: 2px solid #E0457B;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  z-index: 1000;
  overflow: hidden;
}

.posh-smart-filter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.posh-smart-filter-item:hover {
  background: #fce5ef;
}

.posh-smart-filter-icon {
  font-size: 20px;
}

.posh-smart-filter-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.posh-smart-filter-text strong {
  font-size: 14px;
  color: #2c3e50;
}

.posh-smart-filter-text small {
  font-size: 12px;
  color: #6c757d;
}

/* Presets Menu */
.posh-presets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #e8e8e8;
}

.posh-presets-header strong {
  font-size: 14px;
  color: #2c3e50;
}

.posh-preset-save-btn {
  background: #0ABAB5;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.posh-presets-list {
  max-height: 300px;
  overflow-y: auto;
}

.posh-preset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.posh-preset-item:last-child {
  border-bottom: none;
}

.posh-preset-load {
  flex: 1;
  background: none;
  border: none;
  text-align: left;
  padding: 0;
  font-size: 14px;
  color: #2c3e50;
  cursor: pointer;
}

.posh-preset-load:hover {
  color: #E0457B;
}

.posh-preset-delete {
  background: #dc3545;
  color: #fff;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.posh-presets-empty {
  padding: 20px;
  text-align: center;
  color: #6c757d;
  font-size: 13px;
}

/* Bulk Actions */
.posh-bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #E0457B;
}

.posh-bulk-count {
  font-weight: 600;
  font-size: 13px;
  color: #2c3e50;
  margin-right: 8px;
}

/* Bulk Checkbox */
.posh-bulk-checkbox {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .posh-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .posh-toolbar-left,
  .posh-toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .posh-toolbar-btn {
    flex: 1;
    min-width: 0;
  }

  .posh-filter-rule,
  .posh-sort-rule {
    flex-direction: column;
    align-items: stretch;
  }

  .posh-filter-logic-placeholder {
    display: none;
  }

  .posh-filter-field,
  .posh-filter-operator,
  .posh-filter-value,
  .posh-sort-field,
  .posh-sort-direction {
    width: 100%;
    min-width: 0;
  }

  .posh-smart-filters-menu,
  .posh-presets-menu {
    left: 0;
    right: 0;
    width: 100%;
  }
}

/* Unified autocomplete dropdown used by team-search.js
   NOTE: Keeps visual parity with existing dropdowns. */
.search-autocomplete{
  position:absolute;
  top:100%;
  left:0;
  right:0;
  background:#fff;
  border:2px solid var(--posh-pink);
  border-radius:var(--posh-radius);
  box-shadow:var(--posh-shadow);
  max-height:300px;
  overflow-y:auto;
  z-index:1000;
  margin-top:4px;
}
.search-autocomplete .search-result-item{
  padding:12px 16px;
  cursor:pointer;
  border-bottom:1px solid #f0f0f0;
  transition:background-color .2s ease;
}
.search-autocomplete .search-result-item:last-child{border-bottom:none}
.search-autocomplete .search-result-item:hover{background-color:#fce5ef}

/* Lineage focus header container (shown by JS when a member is selected) */
.team-lineage-header{
  font-family:var(--posh-font);
  font-size:14px;
  color:#2c3e50;
  display:none; /* JS toggles */
}
.team-lineage-header .pink-pill{
  /* Reuse existing .pink-pill styles; ensure compact spacing here */
  padding:8px 14px;
  font-weight:700;
  font-size:14px;
  border-radius:999px;
}

/* Intelligent Search Styles */
.posh-intelligent-search-container {
  position: relative;
  margin-bottom: 24px;
}

.posh-intelligent-search-input {
  width: 100%;
  padding: 14px 16px;
  min-height: 64px;
  max-height: 120px;
  font-size: 15px;
  line-height: 1.5;
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: Poppins, sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
  color: #2c3e50;
  resize: none;
  overflow-y: auto;
  box-sizing: border-box;
  /* Shimmering/glowing electric blue border animation */
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.6),
              0 0 20px rgba(0, 191, 255, 0.4),
              0 0 30px rgba(0, 191, 255, 0.3),
              inset 0 0 10px rgba(0, 191, 255, 0.15);
  animation: shimmer-blue 2s ease-in-out infinite;
  position: relative;
}

@keyframes shimmer-blue {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.6),
                0 0 20px rgba(0, 191, 255, 0.4),
                0 0 30px rgba(0, 191, 255, 0.3),
                inset 0 0 10px rgba(0, 191, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.8),
                0 0 40px rgba(0, 191, 255, 0.6),
                0 0 60px rgba(0, 191, 255, 0.4),
                inset 0 0 15px rgba(0, 191, 255, 0.25);
  }
}

.posh-intelligent-search-input::placeholder {
  color: #999;
  opacity: 1;
  white-space: pre-line;
}

.posh-intelligent-search-input:focus {
  outline: none;
  border-color: #00bfff;
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.4);
  animation: none; /* Stop animation on focus */
}

.posh-search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid #e8e8e8;
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.posh-search-suggestion {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 14px;
  color: #2c3e50;
  border-bottom: 1px solid #f0f0f0;
}

.posh-search-suggestion:last-child {
  border-bottom: none;
}

.posh-search-suggestion:hover {
  background-color: #fce5ef;
}

.posh-search-suggestion-rotating {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  color: #999;
  font-style: italic;
  transition: opacity 0.5s ease-in-out, color 0.2s ease;
  text-align: center;
  min-height: 20px;
  display: block;
}

.posh-search-suggestion-rotating:hover {
  color: #E0457B;
  font-style: normal;
}

.posh-query-preview {
  margin-top: 8px;
  font-size: 13px;
  color: #666;
  font-style: italic;
}

.posh-search-results {
  margin-top: 16px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.posh-report-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f0f8ff;
  border: 1px solid #00bfff;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 15px;
}

.posh-report-summary strong {
  color: #222;
  font-weight: 600;
}

.posh-report-total {
  color: #00bfff;
  font-weight: 600;
  font-size: 16px;
}

.posh-search-result-advancement-percent {
  color: #E0457B;
  font-weight: 600;
}

.posh-search-result-days-inactive {
  color: #ff6b6b;
  font-weight: 600;
}

.posh-search-results-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.posh-search-time {
  font-size: 12px;
  color: #999;
  font-weight: 400;
}

.posh-search-results-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.posh-search-result-card {
  padding: 8px 12px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  margin-bottom: 4px;
  position: relative;
}

.posh-search-result-card:hover {
  background: #fce5ef;
  border-color: #E0457B;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(224, 69, 123, 0.2);
}

/* Progress bar - desktop only */
.posh-search-result-progress-bar {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #f0f0f0;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .posh-search-result-progress-bar {
    display: block;
  }
}

.posh-search-result-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #E0457B 0%, #0ABAB5 100%);
  transition: width 0.3s ease;
  border-radius: 0 0 6px 6px;
}

.posh-search-result-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13px;
  line-height: 1.5;
}

.posh-search-result-line-1 {
  font-weight: 500;
  margin-bottom: 4px;
}

.posh-search-result-line-2 {
  font-size: 12px;
  color: #666;
}

.posh-search-result-name {
  font-weight: 600;
  font-size: 14px;
  color: #2c3e50;
  white-space: nowrap;
}

.posh-search-result-separator {
  color: #ddd;
  margin: 0 8px;
  user-select: none;
}

.posh-search-name-clickable {
  cursor: pointer;
  color: #E0457B;
  text-decoration: none;
  transition: all 0.2s ease;
}

.posh-search-name-clickable:hover {
  color: #c73869;
  text-decoration: underline;
}

.posh-search-result-id {
  color: #999;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.posh-search-result-line > span {
  white-space: nowrap;
}

.posh-search-result-down {
  font-weight: 500;
  color: #666;
  font-size: 12px;
}

.posh-search-result-rank {
  color: #E0457B;
  font-weight: 600;
  font-size: 12px;
}

.posh-search-result-sales {
  color: #2c3e50;
  font-weight: 500;
  font-size: 12px;
}

.posh-search-result-sales-primary {
  color: #2c3e50;
  font-weight: 700;
  font-size: 14px;
}

.posh-search-result-location {
  color: #666;
  font-size: 12px;
}

.posh-search-result-location-primary {
  color: #2c3e50;
  font-weight: 600;
  font-size: 13px;
}

.posh-search-result-sponsor {
  color: #0ABAB5;
  font-weight: 500;
  font-size: 12px;
}

.posh-search-result-join-date {
  color: #666;
  font-size: 12px;
  font-style: italic;
}

.posh-search-result-name-secondary {
  color: #666;
  font-size: 13px;
}

.posh-search-result-product-sales {
  color: #0ABAB5;
  font-weight: 500;
  font-size: 12px;
}

.posh-search-result-pool-bonus {
  color: #0ABAB5;
  font-weight: 600;
  font-size: 12px;
}

.posh-search-result-advancement {
  color: #E0457B;
  font-weight: 500;
  font-size: 12px;
}

/* Rank badge in advancement text - matches team card rank badge style */
/* Base badge styles - must be defined outside media query to work on all screen sizes */
.posh-search-result-advancement .team-card-rank-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
  padding: 3px 8px;
  font-size: 10px;
  line-height: 1.2;
  flex-shrink: 0;
  border-radius: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid;
  white-space: nowrap;
}

/* Rank badge colors in search results - defined outside media query for all screen sizes */
.posh-search-result-advancement .team-card-rank-badge[data-rank="0"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="1"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="2"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="3"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="4"] {
  background: #fff;
  color: #000;
  border-color: #000;
}

.posh-search-result-advancement .team-card-rank-badge[data-rank="5"] {
  background: #E0457B;
  color: #fff;
  border-color: #E0457B;
}

.posh-search-result-advancement .team-card-rank-badge[data-rank="6"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="7"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="8"] {
  background: #EAA26D;
  color: #000;
  border-color: #EAA26D;
}

.posh-search-result-advancement .team-card-rank-badge[data-rank="9"] {
  background: #0ABAB5;
  color: #fff;
  border-color: #0ABAB5;
}

.posh-search-result-advancement .team-card-rank-badge[data-rank="10"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="11"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="12"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="13"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="14"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="15"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="16"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="17"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="18"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="19"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="20"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="21"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="22"],
.posh-search-result-advancement .team-card-rank-badge[data-rank="23"] {
  background: #375275;
  color: #fff;
  border-color: #375275;
}

.posh-search-loading {
  text-align: center;
  padding: 24px;
  color: #666;
  font-style: italic;
}

.posh-search-no-results {
  text-align: center;
  padding: 24px;
  color: #999;
}

.posh-search-error {
  padding: 16px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
}

.posh-search-error-message {
  font-weight: 600;
  color: #856404;
  margin-bottom: 12px;
}

.posh-search-error-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.posh-search-error-suggestion {
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  color: #856404;
  font-size: 13px;
}

/* Clarification UI */
.posh-search-clarification {
  padding: 20px;
  background: #D2C4A1;
  border: 1px solid #D2C4A1;
  border-radius: 8px;
  margin: 16px 0;
}

.posh-search-clarification-question {
  font-size: 1.1em;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.posh-search-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.posh-quick-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #EAA26D;
  border: 2px solid #EAA26D;
  border-radius: 6px;
  font-size: 0.95em;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.posh-quick-button:hover {
  background: #d18a4f;
  border-color: #d18a4f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.posh-quick-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.posh-quick-button-icon {
  font-size: 1.2em;
  line-height: 1;
}

.posh-quick-button-label {
  line-height: 1.2;
}

@media (max-width: 768px) {
  .posh-search-result-line {
    flex-wrap: wrap;
    gap: 0;
  }
  
  /* Keep separators visible on mobile for consistency with desktop */
  
  .posh-search-quick-buttons {
    flex-direction: column;
  }
  
  .posh-quick-button {
    width: 100%;
    justify-content: center;
  }
}