/* ============================================
   FaithPresent Public Styles
   ============================================ */

:root {
    --fp-primary: #3b82f6;
    --fp-primary-dark: #2563eb;
    --fp-secondary: #64748b;
    --fp-success: #22c55e;
    --fp-error: #ef4444;
    --fp-warning: #f59e0b;
    --fp-bg: #f8fafc;
    --fp-card: #ffffff;
    --fp-text: #1e293b;
    --fp-text-muted: #64748b;
    --fp-border: #e2e8f0;
    --fp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --fp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --fp-radius: 12px;
    --fp-radius-sm: 8px;
    
    /* Event type colors (defaults - overridden by plugin settings) */
    --fp-event-default: #3b82f6;
    --fp-event-service: #8b5cf6;
    --fp-event-meeting: #22c55e;
    --fp-event-special: #f59e0b;
}

/* ============================================
   Members Grid & Cards
   ============================================ */
.fp-members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.fp-member-card { background: var(--fp-card); border: 1px solid var(--fp-border); border-radius: var(--fp-radius); padding: 20px; text-align: center; }
.fp-member-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.fp-member-card h4 { margin: 10px 0 5px; }
.fp-member-dept { color: var(--fp-text-muted); font-size: 14px; margin: 0 0 10px; }

/* ============================================
   Buttons
   ============================================ */
.fp-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    padding: 12px 24px; 
    background: var(--fp-primary); 
    color: #fff; 
    text-decoration: none; 
    border-radius: var(--fp-radius-sm); 
    border: none; 
    cursor: pointer; 
    font-size: 14px; 
    font-weight: 600; 
    transition: all 0.2s ease;
}
.fp-btn:hover { background: var(--fp-primary-dark); color: #fff; transform: translateY(-1px); }
.fp-btn-primary { background: var(--fp-primary); }
.fp-btn-secondary { background: var(--fp-secondary); }
.fp-btn-secondary:hover { background: #475569; }
.fp-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.fp-btn-export { background: #059669; }
.fp-btn-export:hover { background: #047857; }
.fp-btn-icon-sm { width: 16px; height: 16px; }

.fp-pagination { margin-top: 20px; text-align: center; }
.fp-pagination a { display: inline-block; padding: 8px 12px; margin: 0 2px; background: #f1f1f1; text-decoration: none; border-radius: 4px; }
.fp-pagination a.active { background: var(--fp-primary); color: #fff; }

/* ============================================
   My QR Code Page
   ============================================ */
.fp-my-qr-container { max-width: 600px; margin: 0 auto; padding: 30px; background: var(--fp-card); border-radius: var(--fp-radius); box-shadow: var(--fp-shadow); }
.fp-my-qr-header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid var(--fp-border); }
.fp-my-qr-header h2 { margin: 0 0 10px 0; color: var(--fp-text); font-size: 28px; }
.fp-my-qr-header p { margin: 0; color: var(--fp-text-muted); font-size: 16px; }
.fp-my-qr-member-info { text-align: center; margin-bottom: 25px; }
.fp-qr-member-name { font-size: 22px; font-weight: bold; color: var(--fp-text); margin-bottom: 5px; }
.fp-qr-member-id { font-size: 14px; color: var(--fp-text-muted); font-family: monospace; }
.fp-my-qr-code { text-align: center; margin: 30px 0; padding: 20px; background: var(--fp-bg); border-radius: var(--fp-radius-sm); }
.fp-my-qr-code img { max-width: 300px; height: auto; border: 5px solid #fff; border-radius: var(--fp-radius-sm); box-shadow: var(--fp-shadow); }
.fp-my-qr-actions { display: flex; gap: 15px; margin: 25px 0; justify-content: center; }
.fp-btn-icon { font-size: 18px; }
.fp-my-qr-instructions { margin: 30px 0; padding: 20px; background: var(--fp-bg); border-radius: var(--fp-radius-sm); }
.fp-my-qr-instructions h3 { margin: 0 0 15px 0; color: var(--fp-text); font-size: 18px; }
.fp-my-qr-instructions ol { margin: 0; padding-left: 25px; color: var(--fp-text-muted); }
.fp-my-qr-instructions li { margin-bottom: 10px; line-height: 1.6; }
.fp-qr-tip { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--fp-border); color: var(--fp-text-muted); font-size: 14px; }
.fp-qr-tip strong { color: var(--fp-success); }
.fp-my-qr-security { text-align: center; margin-top: 25px; padding-top: 20px; border-top: 2px solid var(--fp-border); }
.fp-security-note { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; background: #fef3c7; border: 1px solid #fbbf24; border-radius: var(--fp-radius-sm); color: #92400e; font-size: 14px; margin: 0; }
.fp-security-icon { font-size: 20px; }

@media (max-width: 640px) {
    .fp-my-qr-container { padding: 20px; }
    .fp-my-qr-actions { flex-direction: column; }
    .fp-my-qr-actions .fp-btn { width: 100%; justify-content: center; }
    .fp-my-qr-code img { max-width: 250px; }
}

/* ============================================
   Kiosk Page - Modern Design with Custom Branding
   ============================================ */
.fp-kiosk {
    /* Default kiosk branding variables */
    --fp-kiosk-bg-start: #0f172a;
    --fp-kiosk-bg-end: #1e293b;
    --fp-kiosk-card: rgba(255, 255, 255, 0.05);
    --fp-kiosk-heading: #ffffff;
    --fp-kiosk-text: #94a3b8;
    --fp-kiosk-accent: #3b82f6;
    --fp-kiosk-calendar: #3b82f6;
    
    min-height: 100vh;
    background: linear-gradient(135deg, var(--fp-kiosk-bg-start) 0%, var(--fp-kiosk-bg-end) 100%);
    color: var(--fp-kiosk-heading);
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fp-kiosk-container {
    max-width: 1200px;
    margin: 0 auto;
}

.fp-kiosk-header {
    text-align: center;
    margin-bottom: 40px;
}

.fp-kiosk-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--fp-kiosk-accent) 0%, #8b5cf6 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
}

.fp-kiosk-logo.fp-kiosk-logo-custom {
    background: transparent;
    box-shadow: none;
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 100px;
}

.fp-kiosk-logo.fp-kiosk-logo-custom img {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
}

.fp-kiosk-logo svg {
    width: 40px;
    height: 40px;
    stroke: #fff;
}

.fp-kiosk-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.025em;
    color: var(--fp-kiosk-heading);
}

.fp-kiosk-subtitle {
    color: var(--fp-kiosk-text);
    font-size: 1.1rem;
    margin: 0;
}

/* Kiosk Event Widget */
.fp-kiosk-event-widget {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.fp-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--fp-kiosk-calendar, var(--fp-kiosk-accent)) 0%, #8b5cf6 100%);
    border-radius: 12px;
    padding: 12px 18px;
    min-width: 70px;
}

.fp-event-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.fp-event-month {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    color: #fff;
}

.fp-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--fp-primary) 0%, #8b5cf6 100%);
    border-radius: 12px;
    padding: 12px 18px;
    min-width: 70px;
}

.fp-event-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.fp-event-month {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.fp-event-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fp-event-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.fp-event-time {
    font-size: 0.95rem;
    color: #94a3b8;
}

@media (max-width: 500px) {
    .fp-kiosk-event-widget {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .fp-event-date {
        padding: 10px 20px;
    }
}

/* Kiosk Grid - Top Row (Scanner Left, Recent Right) */
.fp-kiosk-grid-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .fp-kiosk-grid-top {
        grid-template-columns: 1fr;
    }
}

/* Full Width Bottom Card */
.fp-kiosk-full-width {
    width: 100%;
    margin-bottom: 24px;
}

.fp-manual-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .fp-manual-content {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .fp-manual-content .fp-search-wrapper {
        flex: 1;
    }
    
    .fp-manual-content .fp-divider {
        flex-shrink: 0;
        margin: 0 16px;
    }
    
    .fp-manual-content .fp-manual-input-group {
        flex: 1;
    }
}

/* QR Notice in Recent */
.fp-qr-notice {
    margin-top: 16px;
    padding: 12px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.8rem;
    text-align: center;
}

/* Kiosk Cards */
.fp-kiosk-card {
    background: var(--fp-kiosk-card, rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.fp-kiosk-card h2,
.fp-kiosk-card .fp-card-header h2 {
    color: var(--fp-kiosk-heading, #fff);
}

.fp-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fp-card-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.fp-card-icon {
    width: 24px;
    height: 24px;
    stroke: var(--fp-primary);
    flex-shrink: 0;
}

/* QR Scanner */
#fp-qr-reader {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 1;
    max-width: 100%;
}

/* Disable mirror mode on camera video - force no flip for all elements */
#fp-qr-reader,
#fp-qr-reader video,
#fp-qr-reader canvas,
#fp-qr-reader img,
#fp-qr-reader > div,
#fp-qr-reader > div > video {
    transform: scaleX(1) !important;
    -webkit-transform: scaleX(1) !important;
    -moz-transform: scaleX(1) !important;
    -ms-transform: scaleX(1) !important;
}

/* Success pulse animation */
@keyframes fp-success-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
    50% { box-shadow: 0 0 0 30px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes fp-error-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    50% { box-shadow: 0 0 0 30px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.fp-kiosk-scanner-card.fp-pulse-success {
    animation: fp-success-pulse 0.8s ease-out;
    border-color: rgba(34, 197, 94, 0.5) !important;
}

.fp-kiosk-scanner-card.fp-pulse-error {
    animation: fp-error-pulse 0.8s ease-out;
    border-color: rgba(239, 68, 68, 0.5) !important;
}

/* Settings panel toggle */
.fp-kiosk-settings-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1000;
}

.fp-kiosk-settings-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fp-kiosk-settings-toggle svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
}

/* Settings panel */
.fp-kiosk-settings-panel {
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    height: 100vh;
    background: #1e293b;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.fp-kiosk-settings-panel.fp-settings-open {
    right: 0;
}

.fp-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fp-settings-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}

.fp-settings-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fp-settings-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fp-settings-close svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
}

.fp-settings-section {
    margin-bottom: 28px;
}

.fp-settings-section h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin: 0 0 16px;
}

.fp-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.fp-settings-label {
    color: #fff;
    font-size: 0.95rem;
}

/* Toggle switch */
.fp-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.fp-toggle.fp-toggle-on {
    background: var(--fp-primary);
}

.fp-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.fp-toggle.fp-toggle-on::after {
    transform: translateX(22px);
}

/* Volume slider */
.fp-volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.fp-volume-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.fp-volume-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--fp-primary);
    border-radius: 50%;
    cursor: pointer;
}

.fp-volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--fp-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.fp-volume-value {
    color: #94a3b8;
    font-size: 0.85rem;
    min-width: 40px;
    text-align: right;
}

/* Camera select */
.fp-camera-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 8px;
}

.fp-camera-select option {
    background: #1e293b;
    color: #fff;
}

/* Settings overlay */
.fp-settings-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.fp-settings-overlay.fp-settings-open {
    display: block;
}

.fp-scanner-hint {
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 12px 0 0;
}

/* Scanner mode toggle buttons */
.fp-scanner-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.fp-scanner-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fp-scanner-mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.fp-scanner-mode-btn.fp-scanner-mode-active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--fp-primary);
    color: var(--fp-primary);
}

.fp-scanner-mode-btn svg {
    flex-shrink: 0;
}

/* External scanner view */
.fp-external-scanner-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.fp-external-scanner-icon {
    color: var(--fp-primary);
    margin-bottom: 20px;
    animation: fp-pulse 2s ease-in-out infinite;
}

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

.fp-external-scanner-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px;
}

.fp-external-scanner-hint {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

/* NFC Scanner View */
.fp-nfc-scanner-view {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 300px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 12px;
    text-align: center;
}

.fp-nfc-scanner-icon {
    position: relative;
    margin-bottom: 24px;
}

.fp-nfc-scanner-icon svg {
    stroke: var(--fp-kiosk-accent, #3b82f6);
    animation: fp-nfc-pulse 2s ease-in-out infinite;
}

@keyframes fp-nfc-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.fp-nfc-scanner-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--fp-kiosk-heading, #fff);
    margin: 0 0 8px;
}

.fp-nfc-scanner-hint {
    font-size: 0.9rem;
    color: var(--fp-kiosk-text, #94a3b8);
    margin: 0 0 20px;
}

.fp-nfc-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.fp-nfc-status-ready {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.fp-nfc-status-scanning {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    animation: fp-nfc-scanning-pulse 1s ease-in-out infinite;
}

@keyframes fp-nfc-scanning-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.fp-nfc-status-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* NFC mode button styling */
.fp-nfc-mode-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%) !important;
}

.fp-nfc-mode-btn.fp-scanner-mode-active {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
    color: #fff !important;
}

/* ============================================
   Test Mode Styles
   ============================================ */

.fp-settings-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0 0 12px;
}

.fp-test-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.fp-test-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fp-test-btn svg {
    flex-shrink: 0;
}

.fp-test-btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.fp-test-btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
}

.fp-test-btn-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.fp-test-btn-error:hover {
    background: rgba(239, 68, 68, 0.25);
}

.fp-test-btn-duplicate {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.fp-test-btn-duplicate:hover {
    background: rgba(245, 158, 11, 0.25);
}

/* Test Mode Indicator */
.fp-test-mode-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(239, 68, 68, 0.2) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 20px;
    color: #f59e0b;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    animation: fp-test-pulse 2s ease-in-out infinite;
}

.fp-test-mode-indicator svg {
    flex-shrink: 0;
}

@keyframes fp-test-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Search Wrapper */
.fp-search-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.fp-search-input-container {
    position: relative;
}

.fp-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: #64748b;
    pointer-events: none;
}

#fp-member-search {
    width: 100%;
    padding: 14px 14px 14px 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

#fp-member-search::placeholder { color: #94a3b8; }
#fp-member-search:focus {
    outline: none;
    border-color: var(--fp-primary);
    background: rgba(255, 255, 255, 0.15);
}

/* Search Results */
#fp-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    margin-top: 8px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--fp-shadow-lg);
}

.fp-search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--fp-border);
    color: var(--fp-text);
}

.fp-search-result:last-child { border-bottom: none; }
.fp-search-result:hover { background: var(--fp-bg); }

.fp-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fp-primary) 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.fp-result-info { flex: 1; min-width: 0; }
.fp-result-name { display: block; font-weight: 600; color: var(--fp-text); }
.fp-result-meta { display: block; font-size: 0.8rem; color: var(--fp-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fp-no-results {
    padding: 20px;
    text-align: center;
    color: var(--fp-text-muted);
}

/* Divider */
.fp-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #64748b;
    font-size: 0.875rem;
}

.fp-divider::before,
.fp-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Manual Input */
.fp-manual-input-group {
    display: flex;
    gap: 10px;
}

.fp-manual-input-group input {
    flex: 1;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
}

.fp-manual-input-group input::placeholder { color: #94a3b8; }
.fp-manual-input-group input:focus {
    outline: none;
    border-color: var(--fp-primary);
}

/* Kiosk Buttons */
.fp-kiosk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.fp-kiosk-btn svg {
    width: 20px;
    height: 20px;
}

.fp-kiosk-btn-primary {
    background: linear-gradient(135deg, var(--fp-primary) 0%, #2563eb 100%);
    color: #fff;
}

.fp-kiosk-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Status Display */
.fp-kiosk-status {
    text-align: center;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-height: 56px;
}

.fp-kiosk-status.fp-status-visible {
    opacity: 1;
    transform: translateY(0);
}

.fp-kiosk-status.fp-status-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.fp-kiosk-status.fp-status-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.fp-kiosk-status.fp-status-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

/* Recent Check-ins - Match Scanner Width */
.fp-kiosk-recent-card {
    /* No max-width - uses grid column width to match scanner */
}

.fp-kiosk-grid-top .fp-kiosk-recent-card {
    display: flex;
    flex-direction: column;
}

.fp-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fp-recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.fp-recent-item.fp-recent-new {
    background: rgba(34, 197, 94, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.fp-recent-name { font-weight: 500; }
.fp-recent-time { color: #94a3b8; font-size: 0.875rem; }

.fp-empty-state {
    text-align: center;
    color: var(--fp-kiosk-text, #64748b);
    padding: 30px;
    margin: 0;
}

/* Kiosk Status moved under camera */
.fp-kiosk-scanner-card .fp-kiosk-status {
    margin: 16px 0 0;
    min-height: auto;
    padding: 12px 16px;
}

/* ============================================
   Check-in Page - Modern Design
   ============================================ */
.fp-checkin-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fp-checkin-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--fp-shadow-lg);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.fp-checkin-header {
    margin-bottom: 30px;
}

.fp-checkin-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--fp-primary) 0%, #8b5cf6 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.25);
}

.fp-checkin-icon svg {
    width: 36px;
    height: 36px;
    stroke: #fff;
}

.fp-checkin-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fp-text);
    margin: 0 0 8px;
}

.fp-checkin-header p {
    color: var(--fp-text-muted);
    margin: 0;
    font-size: 1rem;
}

/* User Info */
.fp-checkin-user {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--fp-bg);
    border-radius: 16px;
    margin-bottom: 24px;
}

.fp-checkin-avatar {
    flex-shrink: 0;
}

.fp-checkin-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
}

.fp-checkin-user-info {
    text-align: left;
    flex: 1;
    min-width: 0;
}

.fp-checkin-user-name {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--fp-text);
    margin-bottom: 4px;
}

.fp-checkin-user-email {
    display: block;
    color: var(--fp-text-muted);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status Display */
.fp-checkin-status {
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.fp-checkin-status.fp-status-visible {
    opacity: 1;
    max-height: 60px;
    margin-bottom: 20px;
}

.fp-checkin-status.fp-status-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.fp-checkin-status.fp-status-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Check-in Button */
.fp-checkin-button {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, var(--fp-primary) 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fp-checkin-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
}

.fp-checkin-button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.fp-btn-content,
.fp-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fp-btn-icon {
    width: 22px;
    height: 22px;
}

.fp-btn-loading {
    display: none;
}

.fp-checkin-button.fp-loading .fp-btn-content { display: none; }
.fp-checkin-button.fp-loading .fp-btn-loading { display: flex; }

.fp-checkin-button.fp-success-state {
    background: linear-gradient(135deg, var(--fp-success) 0%, #16a34a 100%);
}

/* Spinner */
.fp-spin {
    animation: fp-spin 1s linear infinite;
}

@keyframes fp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Location Notice */
.fp-checkin-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    padding: 14px 20px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 12px;
    color: #92400e;
    font-size: 0.875rem;
}

.fp-checkin-notice svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Footer */
.fp-checkin-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--fp-border);
    color: var(--fp-text-muted);
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    .fp-checkin-card { padding: 30px 24px; }
    .fp-checkin-header h1 { font-size: 1.5rem; }
}

/* ============================================
   Member Profile Page - Modern Design
   ============================================ */
.fp-profile-page {
    min-height: 100vh;
    background: var(--fp-bg);
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fp-profile-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Profile Header Card */
.fp-profile-card {
    background: var(--fp-card);
    border-radius: var(--fp-radius);
    box-shadow: var(--fp-shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.fp-profile-header-card {
    position: relative;
}

.fp-profile-cover {
    height: 120px;
    background: linear-gradient(135deg, var(--fp-primary) 0%, #8b5cf6 100%);
}

.fp-profile-avatar-section {
    padding: 0 24px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
    margin-top: -50px;
    position: relative;
}

.fp-profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.fp-profile-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: var(--fp-shadow);
}

.fp-profile-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: var(--fp-secondary);
}

.fp-profile-status.fp-status-active {
    background: var(--fp-success);
}

.fp-profile-name-section {
    flex: 1;
    min-width: 200px;
    padding-top: 55px;
}

.fp-profile-name-section h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fp-text);
}

.fp-profile-department,
.fp-profile-member-id {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--fp-text-muted);
    margin-right: 16px;
}

.fp-profile-department svg,
.fp-profile-member-id svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.fp-profile-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--fp-primary);
    color: #fff;
    border: none;
    border-radius: var(--fp-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}

.fp-profile-edit-btn:hover {
    background: var(--fp-primary-dark);
    transform: translateY(-1px);
}

.fp-profile-edit-btn svg {
    width: 16px;
    height: 16px;
}

/* Stats Cards */
.fp-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.fp-stat-card {
    background: var(--fp-card);
    border-radius: var(--fp-radius);
    box-shadow: var(--fp-shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.fp-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fp-stat-icon svg {
    width: 24px;
    height: 24px;
}

.fp-stat-icon-blue {
    background: rgba(59, 130, 246, 0.1);
}

.fp-stat-icon-blue svg {
    stroke: var(--fp-primary);
}

.fp-stat-icon-green {
    background: rgba(34, 197, 94, 0.1);
}

.fp-stat-icon-green svg {
    stroke: var(--fp-success);
}

.fp-stat-content { flex: 1; }
.fp-stat-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--fp-text); }
.fp-stat-label { display: block; font-size: 0.875rem; color: var(--fp-text-muted); }

/* Card Title */
.fp-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--fp-text);
    margin: 0;
    padding: 20px 24px;
    border-bottom: 1px solid var(--fp-border);
}

.fp-card-title svg {
    width: 20px;
    height: 20px;
    stroke: var(--fp-primary);
    flex-shrink: 0;
}

/* Contact Grid */
.fp-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 24px;
}

.fp-contact-item { }
.fp-contact-full { grid-column: 1 / -1; }
.fp-contact-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fp-text-muted); margin-bottom: 4px; }
.fp-contact-value { display: block; font-size: 1rem; color: var(--fp-text); font-weight: 500; }

/* History List */
.fp-history-list {
    padding: 16px 24px 24px;
}

.fp-history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--fp-bg);
    border-radius: 10px;
    margin-bottom: 8px;
}

.fp-history-item:last-child { margin-bottom: 0; }

.fp-history-date {
    text-align: center;
    background: var(--fp-primary);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 50px;
}

.fp-history-day { display: block; font-size: 1.25rem; font-weight: 700; line-height: 1; }
.fp-history-month { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

.fp-history-details { flex: 1; }
.fp-history-time { display: block; font-weight: 600; color: var(--fp-text); }
.fp-history-method { display: inline-block; font-size: 0.75rem; padding: 4px 10px; border-radius: 20px; background: var(--fp-border); color: var(--fp-text-muted); margin-top: 4px; }

.fp-method-qr { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }
.fp-method-kiosk { background: rgba(59, 130, 246, 0.1); color: var(--fp-primary); }
.fp-method-self { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.fp-method-manual { background: rgba(245, 158, 11, 0.1); color: #d97706; }

.fp-empty-history {
    text-align: center;
    padding: 40px 20px;
    color: var(--fp-text-muted);
}

.fp-empty-history svg {
    width: 48px;
    height: 48px;
    stroke: var(--fp-border);
    margin-bottom: 12px;
}

.fp-empty-history p { margin: 0; }

/* ============================================
   Profile Edit Modal
   ============================================ */
.fp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fp-modal-overlay.fp-modal-open {
    display: flex;
}

.fp-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlide 0.3s ease;
}

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

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

.fp-modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--fp-text);
}

.fp-modal-header h2 svg {
    width: 24px;
    height: 24px;
    stroke: var(--fp-primary);
}

.fp-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--fp-bg);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.fp-modal-close:hover {
    background: var(--fp-border);
}

.fp-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--fp-text-muted);
}

.fp-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 180px);
}

.fp-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.fp-form-group {
    margin-bottom: 16px;
}

.fp-form-full {
    grid-column: 1 / -1;
}

.fp-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fp-text);
    margin-bottom: 8px;
}

.fp-form-group label svg {
    width: 16px;
    height: 16px;
    stroke: var(--fp-text-muted);
}

.fp-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--fp-border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--fp-text);
    transition: all 0.2s;
    box-sizing: border-box;
}

.fp-form-group input:focus {
    outline: none;
    border-color: var(--fp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fp-form-message {
    display: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
    margin: 0 24px;
}

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

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

.fp-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--fp-border);
    background: var(--fp-bg);
}

.fp-btn-cancel {
    flex: 1;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid var(--fp-border);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--fp-text);
    cursor: pointer;
    transition: all 0.2s;
}

.fp-btn-cancel:hover {
    background: var(--fp-bg);
}

.fp-btn-save {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--fp-primary);
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.fp-btn-save:hover:not(:disabled) {
    background: var(--fp-primary-dark);
}

.fp-btn-save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.fp-btn-save svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 640px) {
    .fp-profile-page { padding: 20px 16px; }
    .fp-profile-avatar-section { padding: 0 16px 16px; }
    .fp-profile-avatar img { width: 80px; height: 80px; }
    .fp-profile-name-section { padding-top: 40px; }
    .fp-profile-name-section h1 { font-size: 1.25rem; }
    .fp-profile-edit-btn { width: 100%; justify-content: center; margin-top: 16px; }
    .fp-contact-grid { padding: 16px; }
    .fp-history-list { padding: 12px 16px 16px; }
    .fp-modal { max-height: 95vh; border-radius: 16px 16px 0 0; position: fixed; bottom: 0; }
    .fp-kiosk-grid { grid-template-columns: 1fr; }
}

/* Legacy support */
.fp-member-profile-public { max-width: 800px; margin: 0 auto; }
.fp-profile-header-legacy { display: flex; gap: 20px; align-items: center; margin-bottom: 30px; }
.fp-profile-img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.fp-profile-info h2 { margin: 0 0 10px; }
.fp-member-id { font-family: monospace; color: var(--fp-text-muted); }
.fp-table { width: 100%; border-collapse: collapse; }
.fp-table th, .fp-table td { padding: 10px; border-bottom: 1px solid var(--fp-border); text-align: left; }
.fp-checkin-widget { max-width: 400px; margin: 0 auto; text-align: center; padding: 30px; background: var(--fp-bg); border-radius: var(--fp-radius); }
#fp-checkin-status { min-height: 30px; margin-bottom: 15px; }
.fp-success { color: var(--fp-success); font-weight: bold; }
.fp-error { color: var(--fp-error); }
.fp-checkin-note { font-size: 12px; color: var(--fp-text-muted); margin-top: 15px; }
.fp-btn-edit-profile { margin-top: 10px; }
.fp-public-modal { display: none; position: fixed; z-index: 100000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); overflow: auto; }
.fp-public-modal-content { background: #fff; margin: 5% auto; padding: 30px; border-radius: var(--fp-radius); max-width: 500px; position: relative; box-shadow: var(--fp-shadow-lg); }
.fp-public-modal-close { position: absolute; right: 15px; top: 10px; font-size: 28px; cursor: pointer; color: var(--fp-text-muted); line-height: 1; }
.fp-public-modal-close:hover { color: var(--fp-text); }
.fp-public-modal h2 { margin: 0 0 20px; padding-bottom: 15px; border-bottom: 1px solid var(--fp-border); }
#fp-profile-edit-message { margin-top: 15px; padding: 10px 15px; border-radius: 4px; text-align: center; }
#fp-profile-edit-message.fp-success { background: #d4edda; color: #155724; }
#fp-profile-edit-message.fp-error { background: #f8d7da; color: #721c24; }

/* ============================================
   Frontend Attendance Records Page
   ============================================ */
.fp-attendance-records {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fp-ar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.fp-ar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fp-text);
    margin: 0 0 8px;
}

.fp-ar-icon {
    width: 32px;
    height: 32px;
    stroke: var(--fp-primary);
}

.fp-ar-subtitle {
    color: var(--fp-text-muted);
    margin: 0;
    font-size: 1rem;
}

.fp-ar-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Stats Grid */
.fp-ar-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.fp-ar-stat-card {
    background: var(--fp-card);
    border-radius: var(--fp-radius);
    padding: 24px;
    box-shadow: var(--fp-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fp-ar-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fp-shadow-lg);
}

.fp-ar-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fp-ar-stat-icon svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
}

.fp-ar-stat-today .fp-ar-stat-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.fp-ar-stat-week .fp-ar-stat-icon { background: linear-gradient(135deg, #22c55e, #16a34a); }
.fp-ar-stat-month .fp-ar-stat-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.fp-ar-stat-pending .fp-ar-stat-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }

.fp-ar-stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fp-text);
    line-height: 1.2;
}

.fp-ar-stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--fp-text-muted);
}

/* Filters */
.fp-ar-filters {
    background: var(--fp-card);
    border-radius: var(--fp-radius);
    padding: 24px;
    box-shadow: var(--fp-shadow);
    margin-bottom: 24px;
}

.fp-ar-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.fp-ar-filter-group {
    flex: 1;
    min-width: 150px;
}

.fp-ar-filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fp-text);
    margin-bottom: 8px;
}

.fp-ar-input,
.fp-ar-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--fp-border);
    border-radius: 10px;
    font-size: 0.9375rem;
    color: var(--fp-text);
    background: #fff;
    transition: all 0.2s;
    box-sizing: border-box;
}

.fp-ar-input:focus,
.fp-ar-select:focus {
    outline: none;
    border-color: var(--fp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fp-ar-filter-actions {
    display: flex;
    gap: 10px;
}

/* Table Wrapper */
.fp-ar-table-wrapper {
    background: var(--fp-card);
    border-radius: var(--fp-radius);
    box-shadow: var(--fp-shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.fp-ar-table {
    width: 100%;
    border-collapse: collapse;
}

.fp-ar-table th {
    background: var(--fp-bg);
    padding: 16px 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--fp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    border-bottom: 1px solid var(--fp-border);
}

.fp-ar-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--fp-border);
    vertical-align: middle;
}

.fp-ar-table tbody tr:hover {
    background: var(--fp-bg);
}

.fp-ar-table tbody tr:last-child td {
    border-bottom: none;
}

.fp-ar-member-cell {
    min-width: 200px;
}

.fp-ar-member {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fp-ar-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.fp-ar-member-name {
    display: block;
    font-weight: 600;
    color: var(--fp-text);
}

.fp-ar-member-id {
    display: block;
    font-size: 0.8rem;
    color: var(--fp-text-muted);
    font-family: monospace;
}

.fp-ar-event-cell {
    min-width: 120px;
}

.fp-ar-event-name {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--fp-primary);
    font-weight: 500;
}

.fp-ar-event-none {
    color: var(--fp-text-muted);
}

.fp-ar-datetime {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fp-ar-date {
    font-weight: 600;
    color: var(--fp-text);
}

.fp-ar-time {
    font-size: 0.875rem;
    color: var(--fp-text-muted);
}

.fp-ar-method,
.fp-ar-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.fp-ar-method-qr { background: #dbeafe; color: #1d4ed8; }
.fp-ar-method-nfc { background: #dcfce7; color: #166534; }
.fp-ar-method-kiosk { background: #fef3c7; color: #92400e; }
.fp-ar-method-self { background: #ede9fe; color: #7c3aed; }
.fp-ar-method-manual { background: #f1f5f9; color: #475569; }

.fp-ar-status-confirmed { background: #dcfce7; color: #166534; }
.fp-ar-status-manual { background: #dbeafe; color: #1d4ed8; }
.fp-ar-status-pending_review { background: #fef3c7; color: #92400e; }
.fp-ar-status-duplicate { background: #fee2e2; color: #991b1b; }

.fp-ar-notes {
    color: var(--fp-text-muted);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fp-ar-empty {
    text-align: center;
    padding: 60px 20px !important;
    color: var(--fp-text-muted);
}

.fp-ar-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    stroke: var(--fp-text-muted);
}

/* Pagination */
.fp-ar-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.fp-ar-page-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
    border-radius: 10px;
    color: var(--fp-text);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.fp-ar-page-btn:hover {
    background: var(--fp-primary);
    border-color: var(--fp-primary);
    color: #fff;
}

.fp-ar-page-btn svg {
    width: 18px;
    height: 18px;
}

.fp-ar-page-numbers {
    display: flex;
    gap: 6px;
}

.fp-ar-page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--fp-text);
    font-weight: 600;
    transition: all 0.2s;
}

.fp-ar-page-num:hover {
    background: var(--fp-bg);
}

.fp-ar-page-active {
    background: var(--fp-primary) !important;
    color: #fff !important;
}

.fp-ar-page-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    color: var(--fp-text-muted);
}

/* ============================================
   Enhanced Member Directory
   ============================================ */
.fp-members-directory {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fp-md-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.fp-md-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fp-text);
    margin: 0 0 8px;
}

.fp-md-icon {
    width: 32px;
    height: 32px;
    stroke: var(--fp-primary);
}

.fp-md-subtitle {
    color: var(--fp-text-muted);
    margin: 0;
    font-size: 1rem;
}

.fp-md-search-form {
    flex-shrink: 0;
}

.fp-md-search-wrapper {
    position: relative;
}

.fp-md-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: var(--fp-text-muted);
    pointer-events: none;
}

.fp-md-search-input {
    padding: 12px 16px 12px 48px;
    width: 280px;
    border: 1px solid var(--fp-border);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--fp-card);
    transition: all 0.2s;
}

.fp-md-search-input:focus {
    outline: none;
    border-color: var(--fp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Member Grid */
.fp-md-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.fp-md-card {
    background: var(--fp-card);
    border-radius: var(--fp-radius);
    box-shadow: var(--fp-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.fp-md-card-header {
    background: linear-gradient(135deg, var(--fp-primary), #8b5cf6);
    height: 80px;
    position: relative;
}

.fp-md-avatar-wrapper {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
}

.fp-md-avatar {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: var(--fp-shadow);
}

.fp-md-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #fff;
}

.fp-status-active { background: var(--fp-success); }
.fp-status-inactive { background: var(--fp-secondary); }

.fp-md-card-body {
    padding: 50px 20px 16px;
    text-align: center;
}

.fp-md-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--fp-text);
    margin: 0 0 6px;
}

.fp-md-dept {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--fp-text-muted);
    margin: 0 0 8px;
}

.fp-md-dept svg {
    width: 14px;
    height: 14px;
}

.fp-md-id {
    font-size: 0.75rem;
    color: var(--fp-text-muted);
    font-family: monospace;
    margin: 0;
}

.fp-md-card-footer {
    padding: 0 20px 20px;
    text-align: center;
}

.fp-btn-view-profile {
    width: 100%;
    justify-content: center;
}

.fp-btn-view-profile svg {
    width: 18px;
    height: 18px;
}

.fp-md-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--fp-text-muted);
}

.fp-md-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

/* Directory Pagination */
.fp-md-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.fp-md-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
    border-radius: 12px;
    color: var(--fp-text);
    text-decoration: none;
    transition: all 0.2s;
}

.fp-md-page-btn:hover {
    background: var(--fp-primary);
    border-color: var(--fp-primary);
    color: #fff;
}

.fp-md-page-btn svg {
    width: 20px;
    height: 20px;
}

.fp-md-page-numbers {
    display: flex;
    gap: 6px;
}

.fp-md-page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--fp-text);
    font-weight: 600;
    transition: all 0.2s;
}

.fp-md-page-num:hover {
    background: var(--fp-bg);
}

.fp-md-page-active {
    background: var(--fp-primary) !important;
    color: #fff !important;
}

/* ============================================
   Enhanced Modal System
   ============================================ */
.fp-modal-overlay {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
}

.fp-modal-container {
    background: var(--fp-card);
    margin: 0 auto;
    max-width: 600px;
    width: 100%;
    border-radius: var(--fp-radius);
    box-shadow: var(--fp-shadow-lg);
    position: relative;
    animation: fp-modal-in 0.3s ease;
}

.fp-modal-lg {
    max-width: 900px;
}

@keyframes fp-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.fp-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fp-text);
}

.fp-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--fp-bg);
    border-radius: 10px;
    font-size: 24px;
    color: var(--fp-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.fp-modal-close:hover {
    background: var(--fp-border);
    color: var(--fp-text);
}

.fp-modal-body {
    padding: 24px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Loader */
.fp-loader {
    text-align: center;
    padding: 60px 20px;
    color: var(--fp-text-muted);
}

.fp-spinner {
    width: 48px;
    height: 48px;
    stroke: var(--fp-primary);
    animation: fp-spin 1s linear infinite;
    stroke-dasharray: 50;
    stroke-dashoffset: 20;
}

/* Profile Modal Content */
.fp-profile-modal-content {
    display: grid;
    gap: 24px;
}

.fp-profile-modal-header {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: var(--fp-bg);
    border-radius: var(--fp-radius-sm);
}

.fp-profile-modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.fp-profile-modal-name {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--fp-text);
    margin: 0 0 6px;
}

.fp-profile-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--fp-text-muted);
    font-size: 0.875rem;
}

.fp-profile-modal-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fp-profile-modal-meta svg {
    width: 14px;
    height: 14px;
}

/* Stats Row */
.fp-profile-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.fp-profile-stat-card {
    background: var(--fp-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.fp-profile-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fp-text);
}

.fp-profile-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--fp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Charts Section */
.fp-profile-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.fp-chart-card {
    background: var(--fp-bg);
    border-radius: 12px;
    padding: 20px;
}

.fp-chart-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--fp-text);
    margin: 0 0 16px;
}

.fp-chart-canvas {
    width: 100%;
    height: 200px;
}

.fp-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.fp-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--fp-text-muted);
}

.fp-chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Attendance History */
.fp-profile-history-section {
    margin-top: 20px;
}

.fp-profile-history-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fp-text);
    margin: 0 0 16px;
}

.fp-profile-history-table {
    width: 100%;
    border-collapse: collapse;
}

.fp-profile-history-table th {
    background: var(--fp-bg);
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--fp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    border-bottom: 1px solid var(--fp-border);
}

.fp-profile-history-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--fp-border);
}

.fp-profile-history-table tbody tr:hover {
    background: var(--fp-bg);
}

.fp-modal-error {
    text-align: center;
    padding: 40px;
    color: var(--fp-error);
}

/* Responsive */
@media (max-width: 900px) {
    .fp-ar-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .fp-profile-charts { grid-template-columns: 1fr; }
    .fp-profile-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .fp-ar-header { flex-direction: column; align-items: flex-start; }
    .fp-ar-stats-grid { grid-template-columns: 1fr; }
    .fp-ar-filter-row { flex-direction: column; }
    .fp-ar-filter-group { min-width: 100%; }
    .fp-ar-table-wrapper { overflow-x: auto; }
    .fp-ar-table { min-width: 600px; }
    .fp-md-header { flex-direction: column; align-items: flex-start; }
    .fp-md-search-input { width: 100%; }
    .fp-md-grid { grid-template-columns: 1fr; }
    .fp-modal-body { padding: 16px; }
    .fp-profile-modal-header { flex-direction: column; text-align: center; }
    .fp-md-filter-row { flex-direction: column; }
    .fp-md-filter-select { width: 100%; }
}

/* ============================================
   Members Directory - Search & Filter Widget
   ============================================ */
.fp-md-filters {
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.fp-md-filter-form {
    width: 100%;
}

.fp-md-filter-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
}

.fp-md-filter-row .fp-md-search-wrapper {
    flex: 2;
    min-width: 200px;
}

.fp-md-filter-select {
    flex: 1;
    min-width: 150px;
    padding: 12px 16px;
    background: var(--fp-bg);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius-sm);
    color: var(--fp-text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.fp-md-filter-select:focus {
    outline: none;
    border-color: var(--fp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.fp-md-filter-btn {
    white-space: nowrap;
}

.fp-md-clear-btn {
    background: transparent;
    border: 1px solid var(--fp-border);
    color: var(--fp-text-muted);
}

.fp-md-clear-btn:hover {
    background: var(--fp-bg);
    border-color: var(--fp-text-muted);
    color: var(--fp-text);
    transform: none;
}

/* ============================================
   Calendar Widget - Frontend Display
   ============================================ */
.fp-calendar-widget {
    background: var(--fp-card);
    border-radius: var(--fp-radius);
    box-shadow: var(--fp-shadow);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.fp-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--fp-primary) 0%, #8b5cf6 100%);
    color: #fff;
}

.fp-calendar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fp-calendar-nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.fp-calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.fp-calendar-nav-btn svg {
    width: 20px;
    height: 20px;
}

.fp-calendar-month {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.fp-calendar-body {
    padding: 16px;
}

.fp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.fp-calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fp-text-muted);
    text-transform: uppercase;
    padding: 12px 0;
}

.fp-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 4px;
    border-radius: 10px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    min-height: 60px;
}

.fp-calendar-day:hover {
    background: var(--fp-bg);
}

.fp-calendar-day.fp-day-other-month {
    opacity: 0.3;
}

.fp-calendar-day.fp-day-today {
    background: var(--fp-bg);
    box-shadow: inset 0 0 0 2px var(--fp-primary);
}

.fp-calendar-day-number {
    font-size: 1rem;
    font-weight: 600;
    color: var(--fp-text);
    margin-bottom: 4px;
}

.fp-calendar-day.fp-day-today .fp-calendar-day-number {
    color: var(--fp-primary);
}

.fp-calendar-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
}

.fp-calendar-event-dot {
    height: 4px;
    border-radius: 2px;
    width: 100%;
}

.fp-calendar-event-dot.fp-event-service { background: var(--fp-event-service); }
.fp-calendar-event-dot.fp-event-meeting { background: var(--fp-event-meeting); }
.fp-calendar-event-dot.fp-event-special { background: var(--fp-event-special); }
.fp-calendar-event-dot.fp-event-default { background: var(--fp-event-default); }

/* Event List Below Calendar */
.fp-calendar-events-list {
    padding: 20px 24px;
    border-top: 1px solid var(--fp-border);
}

.fp-calendar-events-list h3 {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--fp-text);
}

.fp-event-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--fp-bg);
    border-radius: var(--fp-radius-sm);
    margin-bottom: 12px;
    transition: all 0.2s;
}

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

.fp-event-date-badge {
    width: 50px;
    height: 50px;
    background: var(--fp-primary);
    border-radius: var(--fp-radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.fp-event-date-day {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.fp-event-date-month {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.9;
}

.fp-event-info {
    flex: 1;
}

.fp-event-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--fp-text);
    margin: 0 0 4px;
}

.fp-event-time {
    font-size: 0.875rem;
    color: var(--fp-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.fp-event-time svg {
    width: 14px;
    height: 14px;
}

.fp-event-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.fp-event-type-service { background: color-mix(in srgb, var(--fp-event-service) 15%, transparent); color: var(--fp-event-service); }
.fp-event-type-meeting { background: color-mix(in srgb, var(--fp-event-meeting) 15%, transparent); color: var(--fp-event-meeting); }
.fp-event-type-special { background: color-mix(in srgb, var(--fp-event-special) 15%, transparent); color: var(--fp-event-special); }
.fp-event-type-default { background: color-mix(in srgb, var(--fp-event-default) 15%, transparent); color: var(--fp-event-default); }

.fp-no-events {
    text-align: center;
    color: var(--fp-text-muted);
    padding: 30px;
}

/* Kiosk Current Event Widget */
.fp-kiosk-event-widget {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.fp-kiosk-event-date {
    font-size: 0.875rem;
    color: #a78bfa;
    margin-bottom: 8px;
}

.fp-kiosk-event-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.fp-kiosk-event-time {
    font-size: 1rem;
    color: #94a3b8;
}

.fp-kiosk-no-event {
    color: #64748b;
    font-style: italic;
}

/* Calendar Responsive - Full Width on All Screens */
@media (max-width: 768px) {
    .fp-calendar-widget {
        border-radius: 0;
    }
    
    .fp-calendar-header {
        padding: 16px 12px;
    }
    
    .fp-calendar-month {
        font-size: 1.2rem;
    }
    
    .fp-calendar-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .fp-calendar-body {
        padding: 8px;
    }
    
    .fp-calendar-grid {
        gap: 2px;
    }
    
    .fp-calendar-day-header {
        font-size: 0.65rem;
        padding: 8px 0;
    }
    
    .fp-calendar-day {
        min-height: 44px;
        padding: 4px 2px;
        border-radius: 6px;
    }
    
    .fp-calendar-day-number {
        font-size: 0.75rem;
    }
    
    .fp-calendar-events-list {
        padding: 16px 12px;
    }
    
    .fp-event-item {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }
    
    .fp-event-date-badge {
        width: 100%;
        height: auto;
        flex-direction: row;
        gap: 8px;
        padding: 10px;
    }
}

@media (max-width: 400px) {
    .fp-calendar-day-header {
        font-size: 0.6rem;
    }
    
    .fp-calendar-day-number {
        font-size: 0.7rem;
    }
    
    .fp-calendar-day {
        min-height: 40px;
    }
}

/* ============================================
   Frontend Calendar Admin
   ============================================ */
.fp-calendar-admin {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fp-calendar-admin-locked {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #fee2e2 0%, #fef3c7 100%);
    border-radius: var(--fp-radius);
}

.fp-cal-lock-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.fp-calendar-admin-locked h3 {
    color: var(--fp-error);
    margin: 0 0 10px;
}

.fp-calendar-admin-locked p {
    color: var(--fp-text-muted);
    margin: 0;
}

/* Header */
.fp-cal-admin-header {
    background: linear-gradient(135deg, var(--fp-primary) 0%, #8b5cf6 100%);
    border-radius: var(--fp-radius) var(--fp-radius) 0 0;
    padding: 30px;
    color: #fff;
}

.fp-cal-admin-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.fp-cal-admin-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fp-cal-admin-icon {
    font-size: 2.5rem;
}

.fp-cal-admin-title h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.fp-cal-admin-title p {
    margin: 5px 0 0;
    opacity: 0.85;
    font-size: 1rem;
}

/* Buttons */
.fp-cal-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.fp-cal-btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.fp-cal-btn-icon {
    font-size: 1.25rem;
    font-weight: 700;
}

.fp-cal-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--fp-bg);
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius-sm);
    color: var(--fp-text);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fp-cal-btn-secondary:hover {
    background: var(--fp-border);
}

.fp-cal-btn-icon-only {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.fp-cal-btn-icon-only:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

/* Navigation */
.fp-cal-admin-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--fp-card);
    padding: 20px 30px;
    border-left: 1px solid var(--fp-border);
    border-right: 1px solid var(--fp-border);
}

.fp-cal-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--fp-bg);
    border: 1px solid var(--fp-border);
    border-radius: 50px;
    color: var(--fp-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.fp-cal-nav-btn:hover {
    background: var(--fp-primary);
    color: #fff;
    border-color: var(--fp-primary);
}

.fp-cal-nav-arrow {
    font-size: 1.1rem;
}

.fp-cal-current-month {
    text-align: center;
}

.fp-cal-month-name {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fp-text);
    letter-spacing: -0.02em;
}

.fp-cal-year {
    display: block;
    font-size: 1rem;
    color: var(--fp-text-muted);
}

/* Calendar Grid Wrapper */
.fp-cal-admin-grid-wrapper {
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
    border-top: none;
    padding: 20px 30px;
}

.fp-cal-admin-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.fp-cal-admin-weekdays > div {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--fp-text-muted);
    padding: 10px 0;
}

.fp-cal-admin-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.fp-cal-admin-day {
    min-height: 100px;
    background: var(--fp-bg);
    border-radius: var(--fp-radius-sm);
    padding: 10px;
    position: relative;
    transition: all 0.2s ease;
}

.fp-cal-admin-day:hover {
    background: #e2e8f0;
}

.fp-cal-day-empty {
    background: transparent;
}

.fp-cal-day-today {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid var(--fp-primary);
}

.fp-cal-day-has-events {
    cursor: pointer;
}

.fp-cal-day-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fp-text);
    margin-bottom: 6px;
}

.fp-cal-day-today .fp-cal-day-number {
    color: var(--fp-primary);
}

.fp-cal-day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fp-cal-day-event {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fp-cal-day-event:hover {
    transform: scale(1.02);
}

.fp-cal-event-time {
    font-weight: 600;
    margin-right: 4px;
}

.fp-cal-day-event.fp-event-type-service { background: color-mix(in srgb, var(--fp-event-service) 20%, transparent); color: var(--fp-event-service); }
.fp-cal-day-event.fp-event-type-meeting { background: color-mix(in srgb, var(--fp-event-meeting) 20%, transparent); color: var(--fp-event-meeting); }
.fp-cal-day-event.fp-event-type-special { background: color-mix(in srgb, var(--fp-event-special) 20%, transparent); color: var(--fp-event-special); }
.fp-cal-day-event.fp-event-type-default { background: color-mix(in srgb, var(--fp-event-default) 20%, transparent); color: var(--fp-event-default); }

/* Events Section */
.fp-cal-admin-events-section {
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
    border-top: none;
    border-radius: 0 0 var(--fp-radius) var(--fp-radius);
    padding: 30px;
}

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

.fp-cal-events-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--fp-text);
}

.fp-cal-events-count {
    background: var(--fp-bg);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--fp-text-muted);
}

.fp-cal-no-events {
    text-align: center;
    padding: 50px 20px;
    background: var(--fp-bg);
    border-radius: var(--fp-radius);
}

.fp-cal-no-events-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.fp-cal-no-events h4 {
    margin: 0 0 10px;
    color: var(--fp-text);
}

.fp-cal-no-events p {
    margin: 0;
    color: var(--fp-text-muted);
}

.fp-cal-events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fp-cal-event-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: var(--fp-bg);
    border-radius: var(--fp-radius);
    transition: all 0.2s ease;
    cursor: pointer;
}

.fp-cal-event-card:hover {
    box-shadow: var(--fp-shadow);
    transform: translateY(-2px);
    background: #e2e8f0;
}

.fp-cal-event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 12px;
    background: linear-gradient(135deg, var(--fp-primary) 0%, #8b5cf6 100%);
    border-radius: var(--fp-radius-sm);
    color: #fff;
    text-align: center;
}

.fp-cal-event-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.fp-cal-event-weekday {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.9;
    margin-top: 4px;
}

.fp-cal-event-details {
    flex: 1;
    min-width: 0;
}

.fp-cal-event-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.fp-cal-event-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--fp-text);
}

.fp-cal-event-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.fp-cal-event-type-badge.fp-event-type-service { background: color-mix(in srgb, var(--fp-event-service) 15%, transparent); color: var(--fp-event-service); }
.fp-cal-event-type-badge.fp-event-type-meeting { background: color-mix(in srgb, var(--fp-event-meeting) 15%, transparent); color: var(--fp-event-meeting); }
.fp-cal-event-type-badge.fp-event-type-special { background: color-mix(in srgb, var(--fp-event-special) 15%, transparent); color: var(--fp-event-special); }
.fp-cal-event-type-badge.fp-event-type-default { background: color-mix(in srgb, var(--fp-event-default) 15%, transparent); color: var(--fp-event-default); }

.fp-cal-event-desc {
    margin: 0 0 10px;
    color: var(--fp-text-muted);
    font-size: 0.9rem;
}

.fp-cal-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.fp-cal-event-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--fp-text-muted);
}

.fp-meta-icon {
    font-size: 1rem;
}

.fp-cal-event-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.fp-cal-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.fp-cal-status-badge.fp-status-active { background: #dcfce7; color: #16a34a; }
.fp-cal-status-badge.fp-status-cancelled { background: #fee2e2; color: #dc2626; }
.fp-cal-status-badge.fp-status-completed { background: #e0e7ff; color: #4f46e5; }

.fp-cal-event-btns {
    display: flex;
    gap: 4px;
}

/* Modal */
.fp-cal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.fp-cal-modal {
    background: var(--fp-card);
    border-radius: var(--fp-radius);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: fpModalSlideIn 0.3s ease;
}

@keyframes fpModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fp-cal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid var(--fp-border);
    background: linear-gradient(135deg, var(--fp-primary) 0%, #8b5cf6 100%);
    border-radius: var(--fp-radius) var(--fp-radius) 0 0;
}

.fp-cal-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.fp-cal-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fp-cal-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

#fp-event-form {
    padding: 28px;
}

.fp-cal-form-group {
    margin-bottom: 20px;
}

.fp-cal-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--fp-text);
    font-size: 0.9rem;
}

.fp-required {
    color: var(--fp-error);
}

.fp-cal-input,
.fp-cal-select,
.fp-cal-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--fp-border);
    border-radius: var(--fp-radius-sm);
    font-size: 1rem;
    color: var(--fp-text);
    background: var(--fp-card);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.fp-cal-input:focus,
.fp-cal-select:focus,
.fp-cal-textarea:focus {
    outline: none;
    border-color: var(--fp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.fp-cal-form-section {
    background: var(--fp-bg);
    border-radius: var(--fp-radius-sm);
    padding: 16px;
    margin-bottom: 20px;
}

.fp-cal-form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fp-text);
}

.fp-section-icon {
    font-size: 1.1rem;
}

.fp-cal-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--fp-border);
}

.fp-cal-form-actions .fp-cal-btn-primary {
    background: linear-gradient(135deg, var(--fp-primary) 0%, #8b5cf6 100%);
    border: none;
    color: #fff;
    padding: 14px 28px;
}

/* Responsive */
@media (max-width: 768px) {
    .fp-cal-admin-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .fp-cal-admin-title {
        flex-direction: column;
    }
    
    .fp-cal-admin-nav {
        flex-direction: column;
        gap: 16px;
    }
    
    .fp-cal-nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .fp-cal-admin-grid-wrapper,
    .fp-cal-admin-events-section {
        padding: 20px 15px;
    }
    
    .fp-cal-admin-day {
        min-height: 60px;
        padding: 6px;
    }
    
    .fp-cal-day-number {
        font-size: 0.8rem;
    }
    
    .fp-cal-day-event {
        font-size: 0.6rem;
        padding: 2px 4px;
    }
    
    .fp-cal-event-card {
        flex-direction: column;
    }
    
    .fp-cal-event-date-badge {
        flex-direction: row;
        gap: 10px;
        width: 100%;
    }
    
    .fp-cal-event-actions {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }
    
    .fp-cal-form-row {
        grid-template-columns: 1fr;
    }
    
    .fp-cal-form-actions {
        flex-direction: column;
    }
    
    .fp-cal-form-actions button {
        width: 100%;
    }
}

/* ============================================
   Calendar Legend
   ============================================ */
.fp-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--fp-bg);
    border-radius: var(--fp-radius-sm);
    margin-bottom: 20px;
    border: 1px solid var(--fp-border);
}

.fp-legend-title {
    font-weight: 600;
    color: var(--fp-text);
    font-size: 0.9rem;
}

.fp-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.fp-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--fp-text-muted);
}

.fp-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fp-legend-dot.fp-event-default { background: var(--fp-event-default); }
.fp-legend-dot.fp-event-service { background: var(--fp-event-service); }
.fp-legend-dot.fp-event-meeting { background: var(--fp-event-meeting); }
.fp-legend-dot.fp-event-special { background: var(--fp-event-special); }

/* ============================================
   Color Settings Modal
   ============================================ */
.fp-cal-modal-settings {
    max-width: 500px;
}

.fp-cal-form-hint {
    margin: -8px 0 20px;
    color: var(--fp-text-muted);
    font-size: 0.9rem;
}

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

.fp-color-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--fp-bg);
    border-radius: var(--fp-radius-sm);
    border: 1px solid var(--fp-border);
    transition: all 0.2s ease;
}

.fp-color-setting-item:hover {
    border-color: var(--fp-primary);
}

.fp-color-setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--fp-text);
    cursor: pointer;
    margin: 0;
}

.fp-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.fp-color-input {
    width: 50px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: var(--fp-radius-sm);
    cursor: pointer;
    background: transparent;
}

.fp-color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.fp-color-input::-webkit-color-swatch {
    border: 2px solid var(--fp-border);
    border-radius: 6px;
}

.fp-color-input::-moz-color-swatch {
    border: 2px solid var(--fp-border);
    border-radius: 6px;
}

.fp-cal-admin-header-btns {
    display: flex;
    gap: 12px;
}

@media (max-width: 640px) {
    .fp-calendar-legend {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fp-color-settings-grid {
        grid-template-columns: 1fr;
    }
    
    .fp-cal-admin-header-btns {
        flex-direction: column;
        width: 100%;
    }
    
    .fp-cal-admin-header-btns button {
        width: 100%;
        justify-content: center;
    }
}
