/* ============================================
   GymPro - Premium Gym Management System
   ============================================ */

/* === CSS Variables === */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2035;
    --bg-card-hover: #1f2847;
    --bg-input: #0f1629;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-focus: #00F5A0;

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #00F5A0;
    --accent-secondary: #00D9F5;
    --accent-gradient: linear-gradient(135deg, #00F5A0, #00D9F5);
    --accent-gradient-2: linear-gradient(135deg, #f472b6, #a855f7);
    --accent-gradient-3: linear-gradient(135deg, #fbbf24, #f97316);
    --accent-gradient-4: linear-gradient(135deg, #60a5fa, #3b82f6);

    --danger: #ef4444;
    --warning: #fbbf24;
    --success: #22c55e;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 245, 160, 0.15);

    --sidebar-width: 260px;
    --header-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 160, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 245, 160, 0.5);
}

/* ============================================
   LOGIN PAGE
   ============================================ */

/* Background Animation */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 245, 160, 0.3), transparent);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(0, 217, 245, 0.25), transparent);
    bottom: -10%;
    left: -5%;
    animation-delay: -3s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.2), transparent);
    top: 40%;
    left: 50%;
    animation-delay: -6s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 245, 160, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 160, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
}

/* Brand */
.brand-section {
    text-align: center;
    animation: fadeInDown 0.8s ease;
}

.logo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(0, 245, 160, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(0, 245, 160, 0.6));
    }
}

.brand-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-name span {
    font-weight: 400;
    -webkit-text-fill-color: rgba(0, 217, 245, 0.85);
}

.brand-tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Face Scanner */
.face-scanner-wrapper {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.scanner-frame {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-card);
    border: 2px solid rgba(0, 245, 160, 0.1);
}

.scanner-frame video,
.scanner-frame canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.scanner-frame canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* Scanner Corners */
.corner {
    position: absolute;
    width: 30px;
    height: 30px;
    z-index: 5;
}

.corner::before,
.corner::after {
    content: '';
    position: absolute;
    background: var(--accent-primary);
    border-radius: 2px;
}

.corner-tl {
    top: 10px;
    left: 10px;
}

.corner-tl::before {
    width: 3px;
    height: 20px;
    top: 0;
    left: 0;
}

.corner-tl::after {
    width: 20px;
    height: 3px;
    top: 0;
    left: 0;
}

.corner-tr {
    top: 10px;
    right: 10px;
}

.corner-tr::before {
    width: 3px;
    height: 20px;
    top: 0;
    right: 0;
}

.corner-tr::after {
    width: 20px;
    height: 3px;
    top: 0;
    right: 0;
}

.corner-bl {
    bottom: 10px;
    left: 10px;
}

.corner-bl::before {
    width: 3px;
    height: 20px;
    bottom: 0;
    left: 0;
}

.corner-bl::after {
    width: 20px;
    height: 3px;
    bottom: 0;
    left: 0;
}

.corner-br {
    bottom: 10px;
    right: 10px;
}

.corner-br::before {
    width: 3px;
    height: 20px;
    bottom: 0;
    right: 0;
}

.corner-br::after {
    width: 20px;
    height: 3px;
    bottom: 0;
    right: 0;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 5%;
    width: 90%;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(0, 245, 160, 0.5);
    opacity: 0;
    z-index: 4;
}

.scan-line.active {
    opacity: 1;
    animation: scanline 2.5s ease-in-out infinite;
}

@keyframes scanline {
    0% {
        top: 10px;
    }

    50% {
        top: calc(100% - 13px);
    }

    100% {
        top: 10px;
    }
}

.face-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

.face-overlay svg {
    width: 80%;
    height: 80%;
    animation: pulse-face 3s ease-in-out infinite;
}

@keyframes pulse-face {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.03);
    }
}

/* Scanner Status */
.scanner-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 245, 160, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 245, 160, 0.1);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.scanner-status.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.scanner-status.success .pulse-dot {
    background: var(--success);
}

.scanner-status.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.scanner-status.error .pulse-dot {
    background: var(--danger);
}

/* Login Actions */
.login-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 280px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--accent-gradient);
    color: #000;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 245, 160, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-glow {
    box-shadow: var(--shadow-glow);
}

/* Face ID Biometric Button */
.btn-faceid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-faceid::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn-faceid:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.35);
}

.btn-faceid:hover::before {
    opacity: 1;
}

.btn-faceid:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-xs {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.btn-primary:disabled,
.btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* PIN Modal */
.pin-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.pin-modal.active {
    display: flex;
}

.pin-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    width: 320px;
    text-align: center;
    position: relative;
}

.pin-modal-content h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.close-modal {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text-primary);
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0, 245, 160, 0.3);
    transition: var(--transition);
}

.pin-dot.filled {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 245, 160, 0.4);
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 240px;
    margin: 0 auto;
}

.pin-key {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.pin-key:hover {
    background: rgba(0, 245, 160, 0.1);
    border-color: rgba(0, 245, 160, 0.3);
}

.pin-key:active {
    transform: scale(0.95);
    background: rgba(0, 245, 160, 0.2);
}

.pin-key-empty {
    visibility: hidden;
}

.pin-key-delete {
    color: var(--danger);
}

.pin-hint {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   DOOR OPEN ANIMATION
   ============================================ */

.door-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.door-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.door-container {
    position: absolute;
    inset: 0;
    display: flex;
    overflow: hidden;
}

.door-panel {
    flex: 1;
    background: linear-gradient(180deg, #1a2035, #0f1629);
    position: relative;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.5);
}

.door-panel::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(0, 245, 160, 0.1);
}

.door-left::before {
    right: 0;
}

.door-right::before {
    left: 0;
}

.door-left {
    border-right: 2px solid rgba(0, 245, 160, 0.15);
}

.door-right {
    border-left: 2px solid rgba(0, 245, 160, 0.15);
}

.door-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 3px;
    box-shadow: 0 0 15px rgba(0, 245, 160, 0.3);
}

.door-left .door-handle {
    right: 20px;
}

.door-right .door-handle {
    left: 20px;
}

/* Door opening animation */
.door-overlay.opening .door-left {
    transform: translateX(-105%);
}

.door-overlay.opening .door-right {
    transform: translateX(105%);
}

/* Glow effect when opening */
.door-overlay.opening .door-left::after,
.door-overlay.opening .door-right::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 160, 0.1));
    animation: doorGlow 1s ease forwards;
}

.door-overlay.opening .door-left::after {
    right: -50px;
}

.door-overlay.opening .door-right::after {
    left: -50px;
    transform: scaleX(-1);
}

@keyframes doorGlow {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Door Status */
.door-status {
    position: relative;
    z-index: 5;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.door-icon {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    animation: doorIconPulse 1s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 245, 160, 0.4));
}

@keyframes doorIconPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.door-title {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.door-member-name {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.door-lock-animation {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto;
}

.lock-ring {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(0, 245, 160, 0.2);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: lockSpin 1s linear infinite;
}

@keyframes lockSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-primary);
}

/* Lock Unlocked State */
.door-overlay.unlocked .lock-ring {
    border-color: var(--success);
    animation: none;
    border-width: 3px;
}

.door-overlay.unlocked .lock-icon {
    color: var(--success);
}

.door-overlay.unlocked .door-title {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   DASHBOARD PAGE
   ============================================ */

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: var(--transition);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo-small svg {
    width: 36px;
    height: 36px;
}

.sidebar-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand span {
    font-weight: 400;
    -webkit-text-fill-color: rgba(0, 217, 245, 0.85);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background: rgba(0, 245, 160, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(0, 245, 160, 0.1);
    color: var(--accent-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-gradient);
    border-radius: 3px;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: none;
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 40;
    align-items: center;
    padding: 0 1rem;
    justify-content: space-between;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.125rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-title span {
    font-weight: 400;
}

.header-actions {
    position: relative;
}

.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 45;
}

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

/* Page Sections */
.page-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: 0.25rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 245, 160, 0.1);
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.875rem;
    outline: none;
    width: 200px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab:hover {
    background: rgba(0, 245, 160, 0.05);
    border-color: rgba(0, 245, 160, 0.2);
}

.filter-tab.active {
    background: rgba(0, 245, 160, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3px;
    border-radius: 0 0 0 0;
}

.stat-gradient-1::before {
    background: var(--accent-gradient);
}

.stat-gradient-2::before {
    background: var(--accent-gradient-2);
}

.stat-gradient-3::before {
    background: var(--accent-gradient-3);
}

.stat-gradient-4::before {
    background: var(--accent-gradient-4);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 245, 160, 0.15);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-gradient-1 .stat-icon {
    background: rgba(0, 245, 160, 0.1);
    color: #00F5A0;
}

.stat-gradient-2 .stat-icon {
    background: rgba(244, 114, 182, 0.1);
    color: #f472b6;
}

.stat-gradient-3 .stat-icon {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.stat-gradient-4 .stat-icon {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Section Block */
.section-block {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 245, 160, 0.2);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon-1 {
    background: rgba(0, 245, 160, 0.1);
    color: #00F5A0;
}

.action-icon-2 {
    background: rgba(244, 114, 182, 0.1);
    color: #f472b6;
}

.action-icon-3 {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
}

/* Data Table */
.members-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.data-table thead {
    background: rgba(0, 245, 160, 0.04);
}

.data-table th {
    padding: 1rem;
    text-align: right;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(0, 245, 160, 0.03);
}

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

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-expired {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-frozen {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state svg {
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state p {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

/* Member Avatar */
.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 245, 160, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(0, 245, 160, 0.2);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-avatar svg {
    color: var(--accent-primary);
}

/* Action Buttons in Table */
.table-actions {
    display: flex;
    gap: 0.5rem;
}

.table-actions button {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.table-actions button:hover {
    border-color: rgba(0, 245, 160, 0.3);
    color: var(--accent-primary);
    background: rgba(0, 245, 160, 0.05);
}

.table-actions .btn-delete:hover {
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

/* Form Card */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9375rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 245, 160, 0.1);
}

.form-group select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
}

.form-group textarea {
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-section-title {
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 245, 160, 0.15);
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Member Info Card */
.member-info-card {
    background: rgba(0, 245, 160, 0.03);
    border: 1px solid rgba(0, 245, 160, 0.1);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin: 1.25rem 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-value {
    font-weight: 600;
    font-size: 0.875rem;
}

/* Camera Section */
.camera-section {
    margin: 1.5rem 0;
}

.camera-frame {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    margin: 0 auto 1rem;
}

.camera-frame video,
.camera-frame canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.camera-frame canvas {
    position: absolute;
    top: 0;
    left: 0;
}

.camera-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 0.5rem;
}

.camera-placeholder.hidden {
    display: none;
}

.camera-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Captured Faces */
.captured-faces {
    margin-top: 1.5rem;
    text-align: center;
}

.captured-faces h4 {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.face-thumbnails {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.face-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid rgba(0, 245, 160, 0.2);
    position: relative;
}

.face-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.face-thumbnail .check-mark {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    color: #fff;
}

/* Face Members Grid */
.face-register-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.face-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.face-member-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition);
}

.face-member-card:hover {
    border-color: rgba(0, 245, 160, 0.2);
    box-shadow: var(--shadow-sm);
}

.face-member-card .face-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    overflow: hidden;
    border: 3px solid rgba(0, 245, 160, 0.2);
}

.face-member-card .face-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.face-member-card .member-name {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.face-member-card .member-status {
    font-size: 0.75rem;
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* Revenue Chart */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    overflow-x: auto;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 250px;
    min-width: 600px;
    padding-bottom: 2rem;
    position: relative;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    justify-content: flex-end;
}

.bar-fill {
    width: 100%;
    max-width: 50px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: var(--accent-gradient);
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 4px;
}

.bar-fill:hover {
    filter: brightness(1.2);
}

.bar-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.bar-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

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

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-sm {
    max-width: 360px;
    text-align: center;
}

.modal-sm h3 {
    margin-bottom: 0.75rem;
}

.modal-sm p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 245, 160, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(0, 245, 160, 0.2);
}

.modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-body .info-row {
    padding: 0.75rem 0;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    pointer-events: auto;
    animation: slideIn 0.4s ease, fadeOut 0.4s ease 3s forwards;
    box-shadow: var(--shadow-lg);
}

.toast-success {
    background: rgba(34, 197, 94, 0.9);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #fff;
}

.toast-error {
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fff;
}

.toast-info {
    background: rgba(96, 165, 250, 0.9);
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: #fff;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-header {
        display: flex;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-right: 0;
        padding: 1.25rem;
        padding-top: calc(var(--header-height) + 1.25rem);
    }

    .page-title {
        font-size: 1.375rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
    }

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

    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .action-card {
        padding: 1rem;
        font-size: 0.8125rem;
    }

    .action-icon {
        width: 48px;
        height: 48px;
    }

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

    .data-table {
        font-size: 0.8125rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.625rem 0.75rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .header-controls {
        width: 100%;
    }

    .search-box {
        flex: 1;
    }

    .search-box input {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .page-header {
        flex-direction: column;
    }

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

    .scanner-frame {
        width: 240px;
        height: 240px;
    }

    .members-table-wrapper {
        overflow-x: auto;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
        padding-top: calc(var(--header-height) + 1rem);
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .stat-value {
        font-size: 1.125rem;
    }

    .stat-label {
        font-size: 0.6875rem;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.5rem;
    }

    .action-card {
        padding: 0.75rem;
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .action-icon {
        width: 40px;
        height: 40px;
    }

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

    .form-card {
        padding: 1.25rem;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

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

.text-success {
    color: var(--success);
}

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

.text-warning {
    color: var(--warning);
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}