/* -------------------------------------------------------------
 * VIBRANT GLASSMORPHISM DESIGN SYSTEM
 * ------------------------------------------------------------- */
:root {
    /* Color Palette: Bright & Vibrant Gradients */
    --primary-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --secondary-grad: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --success-grad: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger-grad: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --warning-grad: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --purple-grad: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    
    /* Flat Colors */
    --color-primary: #8b5cf6;
    --color-secondary: #06b6d4;
    --color-success: #10b981;
    --color-danger: #f43f5e;
    --color-warning: #f59e0b;
    --color-dark: #0f172a;
    --color-light: #f8fafc;
    --color-gray: #64748b;
    --color-border: rgba(226, 232, 240, 0.8);
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.06);
    --glass-blur: blur(16px);
    
    /* Sidebar Specific */
    --sidebar-bg: rgba(15, 23, 42, 0.95);
    --sidebar-text: #94a3b8;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    
    /* Layout Dimensions */
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 16px;
    --transition-speed: 0.3s;
}

/* -------------------------------------------------------------
 * RESET & BASE STYLES
 * ------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Sarabun', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: radial-gradient(circle at 10% 20%, rgba(243, 244, 246, 0.8) 0%, rgba(229, 231, 235, 0.4) 90%), 
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%236366f1' fill-opacity='0.025'%3E%3Cpath fill-rule='evenodd' d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm1-61c3.147 0 5.7-2.553 5.7-5.7 0-3.148-2.553-5.7-5.7-5.7-3.148 0-5.7 2.553-5.7 5.7 0 3.147 2.553 5.7 5.7 5.7zm29 57c3.147 0 5.7-2.553 5.7-5.7 0-3.148-2.553-5.7-5.7-5.7-3.148 0-5.7 2.553-5.7 5.7 0 3.147 2.553 5.7 5.7 5.7zM10 90c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm66-72c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm-33-30c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm-20 4c0-1.657-1.343-3-3-3s-3 1.343-3 3 1.343 3 3 3c1.657 0 3-1.343 3-3zm4 49c0-1.657-1.343-3-3-3s-3 1.343-3 3 1.343 3 3 3c1.657 0 3-1.343 3-3zm44 16c0-1.657-1.343-3-3-3s-3 1.343-3 3 1.343 3 3 3c1.657 0 3-1.343 3-3zm-14-49c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zm-35-18c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zm17 56c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zm28-48c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zm-12 85c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zM48 30c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zM16 5c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zm60 30c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zM35 15c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zm-8 49c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zm46 25c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zM67 55c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zM80 50c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2zM73 80c0-1.105-.895-2-2-2s-2 .895-2 2 .895 2 2 2 2-.895 2-2z'/%3E%3C/g%3E%3C/svg%3E%3C/svg%3E");
    background-attachment: fixed;
    color: var(--color-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.4);
}

/* -------------------------------------------------------------
 * APP CONTAINER & SIDEBAR
 * ------------------------------------------------------------- */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    color: white;
    z-index: 100;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    height: 100vh;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
    width: 44px;
    height: 44px;
    background: var(--primary-grad);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.brand-icon {
    font-size: 20px;
    color: white;
    animation: pulse 2s infinite;
}

.brand-text h2 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text p {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.sidebar-menu {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--sidebar-text);
    font-weight: 500;
    transition: all 0.25s ease;
}

.menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.menu-item:hover {
    color: white;
    background: var(--sidebar-hover-bg);
    transform: translateX(4px);
}

.menu-item.active {
    background: var(--primary-grad);
    color: white;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
    font-weight: 600;
}

.sidebar-footer {
    padding: 24px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    color: #ef4444;
    font-weight: 500;
    transition: all 0.25s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: translateX(4px);
}

/* -------------------------------------------------------------
 * MAIN CONTENT & HEADER
 * ------------------------------------------------------------- */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-width));
    transition: all var(--transition-speed) ease;
}

.header {
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--color-dark);
    font-size: 20px;
    cursor: pointer;
    display: none; /* Desktop default hidden */
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-action {
    position: relative;
}

.badge-container {
    position: relative;
}

.action-btn {
    background: white;
    border: 1px solid var(--color-border);
    color: var(--color-gray);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.action-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 92, 246, 0.15);
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger-grad);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* User Profile Widget */
.profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid var(--color-border);
    padding: 6px 16px 6px 8px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.profile-trigger:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 92, 246, 0.1);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-grad);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-dark);
}

.profile-role {
    font-size: 10px;
    color: var(--color-gray);
}

.profile-arrow {
    font-size: 10px;
    color: var(--color-gray);
    margin-left: 4px;
    transition: transform 0.2s;
}

.profile-trigger:hover .profile-arrow {
    color: var(--color-primary);
}

/* Dropdown Menus */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    padding: 8px 0;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.badge-text {
    font-size: 10px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--color-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
}

.dropdown-body {
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--color-dark);
    transition: background 0.2s;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--color-primary);
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--color-gray);
}

.dropdown-item:hover i {
    color: var(--color-primary);
}

.noti-item {
    border-bottom: 1px solid #f8fafc;
    align-items: flex-start;
}

.noti-item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.noti-title {
    font-weight: 600;
    font-size: 12px;
}

.noti-desc {
    font-size: 11px;
    color: var(--color-gray);
}

.noti-time {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}

hr {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 8px 0;
}

/* -------------------------------------------------------------
 * CONTENT WORKSPACE AND PANELS
 * ------------------------------------------------------------- */
.content-container {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.tab-panel {
    display: none;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.4s ease;
}

.tab-panel.active {
    display: flex;
}

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

.tab-header h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
}

.text-secondary {
    color: var(--color-gray);
}

/* -------------------------------------------------------------
 * CARD AND GLASSMORPHISM ELEMENTS
 * ------------------------------------------------------------- */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-blur);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.glass {
    /* Pure glass styling */
}

.card:hover {
    box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.08);
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-dark);
}

/* -------------------------------------------------------------
 * KPI CARDS DESIGN
 * ------------------------------------------------------------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    z-index: 2;
}

.kpi-details {
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.kpi-label {
    font-size: 13px;
    color: var(--color-gray);
    font-weight: 500;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    margin: 4px 0;
}

.kpi-subtext {
    font-size: 11px;
    color: #94a3b8;
}

/* Glow styles for KPI Cards based on theme */
.kpi-blue {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.kpi-blue .kpi-icon {
    background: var(--primary-grad);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}
.kpi-blue .kpi-value {
    color: #6366f1;
}

.kpi-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.04) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.kpi-success .kpi-icon {
    background: var(--success-grad);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
.kpi-success .kpi-value {
    color: #10b981;
}

.kpi-danger {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, rgba(225, 29, 72, 0.04) 100%);
    border: 1px solid rgba(244, 63, 94, 0.2);
}
.kpi-danger .kpi-icon {
    background: var(--danger-grad);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.3);
}
.kpi-danger .kpi-value {
    color: #f43f5e;
}

.kpi-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.04) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.kpi-warning .kpi-icon {
    background: var(--warning-grad);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}
.kpi-warning .kpi-value {
    color: #f59e0b;
}

/* Background watermark blobs for cards */
.kpi-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.03;
    z-index: 1;
}

/* -------------------------------------------------------------
 * DASHBOARD GRID & CHARTS
 * ------------------------------------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.chart-flex {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: space-around;
}

.chart-container-pie {
    position: relative;
    height: 200px;
    width: 200px;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-item .legend-percent {
    margin-left: auto;
    font-weight: 600;
    color: var(--color-gray);
}

.chart-container-line {
    position: relative;
    height: 280px;
    width: 100%;
}

.chart-container-report {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Financial Summary rows */
.financial-summary-card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.financial-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.metric-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255,255,255,0.5);
    transition: all 0.25s ease;
}

.metric-info:hover {
    transform: translateY(-4px);
    background: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.05);
}

.metric-label {
    font-size: 13px;
    color: var(--color-gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-val {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.metric-subtext {
    font-size: 11px;
    color: #94a3b8;
}

/* -------------------------------------------------------------
 * BUTTONS STYLING
 * ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    outline: none;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-gradient {
    background: var(--primary-grad);
    color: white;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3);
}

.btn-outline {
    background: white;
    border: 1px solid var(--color-border);
    color: var(--color-dark);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-success {
    background: var(--success-grad);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: var(--danger-grad);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.3);
}

.btn-blue {
    background: var(--secondary-grad);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
}

.btn-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3);
}

.btn:disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
}

/* Icon button modifiers */
.btn-icon-only {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    font-size: 14px;
}

/* -------------------------------------------------------------
 * TABLES AND BADGES
 * ------------------------------------------------------------- */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.table-main, .table-compact {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-main th {
    background: rgba(241, 245, 249, 0.6);
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gray);
    border-bottom: 2px solid #f1f5f9;
}

.table-main td {
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--color-dark);
}

.table-main tr:hover td {
    background: rgba(99, 102, 241, 0.015);
}

.table-compact th {
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gray);
    border-bottom: 2px solid #f1f5f9;
}

.table-compact td {
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}

.table-actions-cell {
    display: flex;
    gap: 8px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.normal {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-badge.pending {
    background: rgba(244, 63, 94, 0.1);
    color: #e11d48;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Table Filtering System CSS */
.table-filters-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray);
    font-size: 14px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
    background: white;
}

.search-box input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Custom Select Dropdowns */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray);
    font-size: 10px;
    pointer-events: none;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 10px 36px 10px 16px;
    font-size: 13px;
    color: var(--color-dark);
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Pagination Footer */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 0 0;
    border-top: 1px solid #f1f5f9;
    margin-top: 16px;
}

.pagination-info {
    font-size: 13px;
    color: var(--color-gray);
}

.pagination-buttons {
    display: flex;
    gap: 4px;
}

.pag-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pag-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pag-btn.active {
    background: var(--primary-grad);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.2);
}

.pag-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* -------------------------------------------------------------
 * DUAL LAYOUT STRUCTURE
 * ------------------------------------------------------------- */
.dual-layout {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 24px;
    align-items: start;
}

.select-member-card {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

.select-search-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 10px;
    width: 100%;
    background: white;
    cursor: pointer;
    border: 1px solid var(--color-border);
}

.select-search-trigger span {
    font-size: 14px;
    color: var(--color-gray);
}

.select-search-trigger:hover {
    border-color: var(--color-primary);
}

.member-details-box {
    margin-top: 16px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.03);
    border: 1px dashed rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.detail-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

.detail-rows {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    padding-bottom: 6px;
}

.detail-row:last-child {
    border: none;
}

.detail-label {
    color: var(--color-gray);
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: var(--color-dark);
}

.detail-value.text-bold {
    font-size: 15px;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.member-details-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: var(--color-gray);
}

.placeholder-icon {
    font-size: 48px;
    color: #cbd5e1;
    animation: bounce 2s infinite;
}

/* Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-dark);
}

.required {
    color: var(--color-danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    background: white;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-control:read-only {
    background: #f1f5f9;
    color: var(--color-gray);
    cursor: not-allowed;
}

.form-control:disabled {
    background: #f8fafc;
    color: #cbd5e1;
    cursor: not-allowed;
}

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

.input-unit-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-unit-group input {
    padding-right: 60px;
}

.input-unit {
    position: absolute;
    right: 16px;
    font-size: 13px;
    color: var(--color-gray);
    font-weight: 500;
    pointer-events: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Units Badge in recording */
.calculated-units-container {
    margin-top: 24px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: scaleUp 0.3s ease;
}

.calc-label {
    font-size: 14px;
    font-weight: 600;
    color: #0891b2;
}

.calc-value {
    font-size: 24px;
    font-weight: 700;
    color: #0284c7;
}

.calc-unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray);
}

/* -------------------------------------------------------------
 * PAYMENT PANEL ELEMENTS
 * ------------------------------------------------------------- */
.payment-main-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.payment-info-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.usage-mini-table, .calc-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    text-align: left;
}

.mini-row, .calc-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.mini-row.highlight {
    font-size: 15px;
}

.divider-sm {
    border: none;
    border-top: 1px dashed var(--color-border);
    margin: 4px 0;
}

.calc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.calc-total-row span {
    font-size: 13px;
    font-weight: 600;
}

/* Form Grid for receive payment options */
.payment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.payment-method-box {
    grid-column: span 2;
}

.radio-group-vertical {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.radio-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-content {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.radio-content i {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

.radio-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark);
}

.radio-desc {
    display: block;
    font-size: 11px;
    color: var(--color-gray);
    margin-top: 2px;
}

.radio-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.radio-card.active {
    border-color: var(--color-primary);
    background: rgba(139, 92, 246, 0.02);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.08);
}

.radio-card.active::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--color-primary);
    font-size: 14px;
}

.change-display-box {
    margin-top: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.04) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: scaleUp 0.3s ease;
}

.change-label {
    font-size: 14px;
    font-weight: 600;
    color: #059669;
}

.change-value {
    font-size: 24px;
    font-weight: 700;
}

.change-unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray);
}

/* PromptPay QR Code styling */
.qr-code-box {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 16px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    max-width: 250px;
    width: 100%;
    margin: 10px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.promptpay-header {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.pp-logo {
    height: 24px;
    object-fit: contain;
}

.qr-image-wrapper {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.qr-code-img svg {
    display: block;
    width: 160px;
    height: 160px;
}

.qr-amount-badge {
    background: var(--purple-grad);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 15px;
    margin-top: 12px;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.2);
}

.qr-status-msg {
    font-size: 12px;
    margin-top: 8px;
}

/* -------------------------------------------------------------
 * PHYSICAL RECEIPT PRINT SIMULATOR
 * ------------------------------------------------------------- */
.receipt-outer-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: start;
}

.search-receipt-card {
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

.receipt-search-placeholder {
    padding: 30px 20px;
    text-align: center;
    color: var(--color-gray);
    font-size: 13px;
}

.receipt-viewer-main {
    width: 100%;
}

.receipt-paper {
    background: white;
    width: 100%;
    max-width: 550px;
    min-height: 650px;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Watermark */
.receipt-watermark-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 160px;
    color: rgba(99, 102, 241, 0.02);
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    pointer-events: none;
    z-index: 0;
}

.receipt-paper::before {
    content: '\f0d8';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 260px;
    color: rgba(99,102,241,0.015);
    pointer-events: none;
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    z-index: 1;
}

.receipt-logo {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.receipt-org-info h2 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.receipt-org-info h3 {
    font-size: 13px;
    color: var(--color-gray);
    font-weight: 500;
}

.receipt-no-info {
    text-align: right;
    font-size: 12px;
    color: #475569;
    line-height: 1.5;
}

.receipt-no-info strong {
    color: #1e293b;
}

.receipt-divider {
    border-top: 2px dashed #cbd5e1;
    margin: 16px 0;
    z-index: 1;
}

.receipt-customer-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    z-index: 1;
}

.customer-row {
    font-size: 13px;
    color: #334155;
}

.cust-label {
    color: var(--color-gray);
    font-weight: 500;
    margin-right: 4px;
}

.cust-val {
    color: #1e293b;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    z-index: 1;
}

.receipt-table th {
    border-bottom: 2px solid #334155;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.receipt-table td {
    padding: 12px 8px;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.receipt-table .total-row td {
    border-top: 2px solid #334155;
    border-bottom: 2px double #334155;
    padding: 12px 8px;
    font-size: 14px;
    color: #1e293b;
}

.receipt-thai-word {
    font-size: 12px;
    font-style: italic;
    color: var(--color-gray);
    text-align: right;
    margin-top: -12px;
    margin-bottom: 24px;
    z-index: 1;
}

.receipt-signatures {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: auto;
    padding-top: 40px;
    z-index: 1;
}

.sig-col {
    flex: 1;
}

.sig-line {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.sig-title {
    font-size: 12px;
    color: #475569;
    font-weight: 500;
}

.receipt-footer {
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    margin-top: 24px;
    font-size: 11px;
    color: var(--color-gray);
    line-height: 1.4;
    z-index: 1;
}

.receipt-footer .powered-by {
    font-size: 9px;
    color: #cbd5e1;
    margin-top: 8px;
}

.receipt-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

/* -------------------------------------------------------------
 * REPORTS PAGE SPECIFICS
 * ------------------------------------------------------------- */
.reports-filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.report-navbar {
    display: flex;
    border-bottom: 1px solid var(--color-border);
}

.report-nav-item {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.report-nav-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-grad);
    opacity: 0;
    transition: opacity 0.2s;
}

.report-nav-item.active {
    color: var(--color-primary);
    font-weight: 600;
}

.report-nav-item.active::after {
    opacity: 1;
}

.form-group-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.report-summary-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    height: 100%;
}

.rep-box {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.25s ease;
}

.rep-box:hover {
    transform: translateY(-2px);
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.rep-lbl {
    font-size: 12px;
    color: var(--color-gray);
    margin-bottom: 6px;
    font-weight: 500;
}

.rep-val {
    font-size: 18px;
    font-weight: 700;
}

/* -------------------------------------------------------------
 * SYSTEM SETTINGS ELEMENTS
 * ------------------------------------------------------------- */
.form-group-settings {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.4);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    gap: 16px;
}

.settings-range-lbl {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 600;
}

.badge-range-info {
    font-size: 11px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
}

.checkbox-card {
    background: rgba(255,255,255,0.4);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.checkbox-card input[type="checkbox"] {
    margin-top: 4px;
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
}

.checkbox-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkbox-title {
    font-size: 14px;
    font-weight: 600;
}

.checkbox-desc {
    font-size: 11px;
    color: var(--color-gray);
}

.checkbox-card:hover {
    border-color: var(--color-primary);
    background: white;
}

/* -------------------------------------------------------------
 * MODAL DIALOGS OVERLAYS
 * ------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    background: white;
    border-radius: 18px;
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-gray);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--color-dark);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 70vh;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Modal sizing modifiers */
.max-w-600 {
    max-width: 600px;
}
.max-w-400 {
    max-width: 400px;
}

/* Modal Selector List styles */
.selector-members-list-container {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.selector-members-list {
    list-style: none;
}

.selector-member-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

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

.selector-member-item:hover {
    background: rgba(139, 92, 246, 0.04);
}

.sel-mem-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sel-mem-house {
    font-weight: bold;
    color: var(--color-primary);
    font-size: 14px;
}

.sel-mem-name {
    font-size: 13px;
    font-weight: 500;
}

.sel-mem-zone {
    font-size: 11px;
    color: var(--color-gray);
}

/* -------------------------------------------------------------
 * ANIMATIONS SYSTEM
 * ------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-slide-down {
    animation: slideDown 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-scale-up {
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Helper Utilities */
.hidden { display: none !important; }
.mt-4 { margin-top: 24px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mr-1 { margin-right: 4px !important; }
.mr-2 { margin-right: 8px !important; }
.ml-auto { margin-left: auto !important; }
.ml-2 { margin-left: 8px !important; }
.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-bold { font-weight: 700 !important; }
.text-primary { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-purple { color: #8b5cf6 !important; }
.font-size-sm { font-size: 13px !important; }
.font-size-md { font-size: 15px !important; }
.font-size-lg { font-size: 18px !important; }
.font-size-xl { font-size: 24px !important; }
.font-size-xxl { font-size: 32px !important; }
.font-size-xxxl { font-size: 48px !important; }
.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-3 { padding-top: 12px !important; padding-bottom: 12px !important; }
.p-3 { padding: 12px !important; }
.p-4 { padding: 24px !important; }
.flex-col { display: flex; flex-direction: column; }
.flex-grow { flex-grow: 1; }
.flex-row { display: flex; align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.h-100 { height: 100% !important; }
.border-top-line { border-top: 1px solid var(--color-border); }
.border-top-none { border-top: none !important; }
.border-bottom-none { border-bottom: none !important; }
.max-w-200 { max-width: 200px; }
.max-w-300 { max-width: 300px; }
.flex-col-center { display: flex; flex-direction: column; align-items: center; }

/* -------------------------------------------------------------
 * RESPONSIVE ADAPTATIONS
 * ------------------------------------------------------------- */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dual-layout {
        grid-template-columns: 1fr;
    }
    
    .receipt-outer-layout {
        grid-template-columns: 1fr;
    }
    
    .select-member-card {
        position: static;
    }
    
    .search-receipt-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }
    
    .content-container {
        padding: 16px;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .payment-info-container {
        grid-template-columns: 1fr;
    }
    
    .payment-form-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-method-box {
        grid-column: span 1;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .table-filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-controls {
        justify-content: space-between;
    }
    
    .select-wrapper {
        flex-grow: 1;
    }
    
    select {
        width: 100%;
    }
    
    .chart-flex {
        flex-direction: column;
        gap: 20px;
    }
    
    .report-navbar {
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }
    
    .form-group-row {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .form-group-row .select-wrapper {
        width: 100%;
    }
    
    .form-group-row button {
        width: 100%;
    }
    
    .receipt-customer-details {
        grid-template-columns: 1fr;
    }
    
    .receipt-paper {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .financial-metric-row {
        flex-direction: column;
    }
    
    .metric-info {
        width: 100%;
    }
    
    .header-title {
        font-size: 16px;
    }
    
    .profile-info {
        display: none;
    }
    
    .report-summary-boxes {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------
 * PRINT STYLE SHEET (RECEIPT ONLY)
 * ------------------------------------------------------------- */
@media print {
    body * {
        visibility: hidden;
    }
    #printableReceiptArea, #printableReceiptArea * {
        visibility: visible;
    }
    #printableReceiptArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border: none;
        padding: 0;
    }
}
