/**
 * ZELTRA Design System
 * Dark Premium Theme with Glassmorphism
 */

/* ============================================
   CSS Custom Properties (Variables)
   ============================================ */
:root {
    /* Colors - Dark backgrounds */
    --z-bg-darkest: #0B0B14;
    --z-bg-dark: #12121E;
    --z-bg-medium: #1A1A2E;
    --z-bg-card: rgba(255, 255, 255, 0.05);
    --z-bg-input: #1E1E30;

    /* Colors - Purple accents */
    --z-purple-dark: #6C2BD9;
    --z-purple-medium: #9333EA;
    --z-purple-light: #A855F7;
    --z-purple-glow: rgba(139, 92, 246, 0.3);
    --z-purple-text: #A78BFA;
    --z-purple-hover: #C4B5FD;

    /* Colors - Text */
    --z-text-white: #FFFFFF;
    --z-text-light: #E0E0E8;
    --z-text-muted: #B0B0C4;
    --z-text-dark: #8A8A9C;

    /* Colors - Status */
    --z-success: #22C55E;
    --z-success-bg: rgba(34, 197, 94, 0.1);
    --z-warning: #F59E0B;
    --z-warning-bg: rgba(245, 158, 11, 0.1);
    --z-danger: #EF4444;
    --z-danger-bg: rgba(239, 68, 68, 0.1);
    --z-info: #3B82F6;
    --z-info-bg: rgba(59, 130, 246, 0.1);

    /* Borders */
    --z-border-light: rgba(255, 255, 255, 0.1);
    --z-border-medium: rgba(255, 255, 255, 0.15);
    --z-border-focus: var(--z-purple-light);

    /* Shadows */
    --z-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --z-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --z-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --z-shadow-glow: 0 0 40px var(--z-purple-glow);

    /* Gradients */
    --z-gradient-purple: linear-gradient(135deg, var(--z-purple-dark) 0%, var(--z-purple-light) 100%);
    --z-gradient-bg: linear-gradient(135deg, var(--z-bg-darkest) 0%, var(--z-bg-medium) 100%);

    /* Spacing */
    --z-space-xs: 0.25rem;
    --z-space-sm: 0.5rem;
    --z-space-md: 1rem;
    --z-space-lg: 1.5rem;
    --z-space-xl: 2rem;
    --z-space-2xl: 3rem;

    /* Border Radius */
    --z-radius-sm: 6px;
    --z-radius-md: 10px;
    --z-radius-lg: 14px;
    --z-radius-xl: 20px;
    --z-radius-full: 9999px;

    /* Transitions */
    --z-transition-fast: 0.15s ease;
    --z-transition-normal: 0.3s ease;
    --z-transition-slow: 0.5s ease;

    /* Typography */
    --z-font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --z-font-size-xs: 0.75rem;
    --z-font-size-sm: 0.875rem;
    --z-font-size-md: 1rem;
    --z-font-size-lg: 1.125rem;
    --z-font-size-xl: 1.25rem;
    --z-font-size-2xl: 1.5rem;
    --z-font-size-3xl: 2rem;
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--z-font-family);
    font-size: var(--z-font-size-md);
    line-height: 1.6;
    color: var(--z-text-light);
    background: var(--z-gradient-bg);
    min-height: 100vh;
}

a {
    color: var(--z-purple-text);
    text-decoration: none;
    transition: color var(--z-transition-fast);
}

a:hover {
    color: var(--z-purple-hover);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--z-text-white);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: var(--z-font-size-3xl); }
h2 { font-size: var(--z-font-size-2xl); }
h3 { font-size: var(--z-font-size-xl); }
h4 { font-size: var(--z-font-size-lg); }

.z-text-white { color: var(--z-text-white) !important; }
.z-text-light { color: var(--z-text-light) !important; }
.z-text-muted { color: var(--z-text-muted) !important; }
.z-text-purple { color: var(--z-purple-text) !important; }
.z-text-success { color: var(--z-success) !important; }
.z-text-warning { color: var(--z-warning) !important; }
.z-text-danger { color: var(--z-danger) !important; }

/* ============================================
   Cards (Glassmorphism)
   ============================================ */
.z-card {
    background: var(--z-bg-card);
    border: 1px solid var(--z-border-light);
    border-radius: var(--z-radius-lg);
    padding: var(--z-space-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--z-transition-normal);
}

.z-card:hover {
    border-color: var(--z-border-medium);
}

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

.z-card-header {
    padding-bottom: var(--z-space-md);
    margin-bottom: var(--z-space-md);
    border-bottom: 1px solid var(--z-border-light);
}

.z-card-title {
    font-size: var(--z-font-size-lg);
    font-weight: 600;
    color: var(--z-text-white);
    margin: 0;
}

/* ============================================
   Buttons
   ============================================ */
.z-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--z-space-sm);
    padding: 0.75rem 1.5rem;
    font-family: var(--z-font-family);
    font-size: var(--z-font-size-md);
    font-weight: 600;
    line-height: 1;
    border-radius: var(--z-radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--z-transition-normal);
    text-decoration: none;
}

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

.z-btn-primary {
    background: var(--z-gradient-purple);
    color: var(--z-text-white);
    box-shadow: 0 4px 15px var(--z-purple-glow);
}

.z-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--z-purple-glow);
    color: var(--z-text-white);
}

.z-btn-outline {
    background: transparent;
    color: var(--z-text-white);
    border: 1px solid var(--z-border-medium);
}

.z-btn-outline:hover:not(:disabled) {
    background: var(--z-bg-card);
    border-color: var(--z-purple-light);
    color: var(--z-text-white);
}

.z-btn-ghost {
    background: transparent;
    color: var(--z-text-light);
}

.z-btn-ghost:hover:not(:disabled) {
    background: var(--z-bg-card);
    color: var(--z-text-white);
}

.z-btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--z-font-size-sm);
}

.z-btn-lg {
    padding: 1rem 2rem;
    font-size: var(--z-font-size-lg);
}

.z-btn-block {
    width: 100%;
}

/* ============================================
   Form Inputs
   ============================================ */
.z-input,
.z-textarea,
.z-select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--z-font-family);
    font-size: var(--z-font-size-md);
    color: var(--z-text-white);
    background: var(--z-bg-input);
    border: 1px solid var(--z-border-light);
    border-radius: var(--z-radius-md);
    transition: all var(--z-transition-fast);
}

.z-input:focus,
.z-textarea:focus,
.z-select:focus {
    outline: none;
    border-color: var(--z-border-focus);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

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

.z-textarea {
    min-height: 120px;
    resize: vertical;
}

.z-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888899' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.z-label {
    display: block;
    margin-bottom: var(--z-space-sm);
    font-size: var(--z-font-size-sm);
    font-weight: 500;
    color: var(--z-text-light);
}

.z-form-group {
    margin-bottom: var(--z-space-lg);
}

/* ============================================
   Avatars
   ============================================ */
.z-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--z-radius-full);
    object-fit: cover;
    background: var(--z-gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--z-text-white);
    font-weight: 600;
    font-size: var(--z-font-size-lg);
}

.z-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: var(--z-font-size-sm);
}

.z-avatar-lg {
    width: 80px;
    height: 80px;
    font-size: var(--z-font-size-2xl);
}

.z-avatar-xl {
    width: 120px;
    height: 120px;
    font-size: var(--z-font-size-3xl);
}

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

/* ============================================
   Badges & Status
   ============================================ */
.z-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: var(--z-font-size-xs);
    font-weight: 600;
    border-radius: var(--z-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.z-badge-active {
    background: var(--z-success-bg);
    color: var(--z-success);
}

.z-badge-pending {
    background: var(--z-warning-bg);
    color: var(--z-warning);
}

.z-badge-inactive {
    background: rgba(255, 255, 255, 0.05);
    color: var(--z-text-muted);
}

.z-badge-purple {
    background: rgba(168, 85, 247, 0.15);
    color: var(--z-purple-light);
}

.z-badge-outline {
    background: transparent;
    border: 1px solid var(--z-border-medium);
    color: var(--z-text-muted);
}

.z-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.z-status-dot-active { background: var(--z-success); }
.z-status-dot-pending { background: var(--z-warning); }
.z-status-dot-inactive { background: var(--z-text-muted); }

/* ============================================
   Progress Bar
   ============================================ */
.z-progress {
    width: 100%;
    height: 8px;
    background: var(--z-bg-input);
    border-radius: var(--z-radius-full);
    overflow: hidden;
}

.z-progress-bar {
    height: 100%;
    background: var(--z-gradient-purple);
    border-radius: var(--z-radius-full);
    transition: width var(--z-transition-slow);
}

.z-progress-sm {
    height: 4px;
}

.z-progress-lg {
    height: 12px;
}

/* ============================================
   Chat Bubbles
   ============================================ */
.z-chat-container {
    display: flex;
    flex-direction: column;
    gap: var(--z-space-md);
}

.z-chat-message {
    max-width: 80%;
    padding: var(--z-space-md);
    border-radius: var(--z-radius-lg);
}

.z-chat-user {
    align-self: flex-end;
    background: var(--z-purple-dark);
    color: var(--z-text-white);
    border-bottom-right-radius: var(--z-radius-sm);
}

.z-chat-ai {
    align-self: flex-start;
    background: var(--z-bg-card);
    border: 1px solid var(--z-border-light);
    border-bottom-left-radius: var(--z-radius-sm);
}

.z-chat-time {
    font-size: var(--z-font-size-xs);
    color: var(--z-text-muted);
    margin-top: var(--z-space-xs);
}

.z-typing-indicator {
    display: flex;
    gap: 4px;
    padding: var(--z-space-sm);
}

.z-typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--z-text-muted);
    border-radius: 50%;
    animation: z-typing 1.4s infinite ease-in-out both;
}

.z-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.z-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes z-typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ============================================
   Navigation
   ============================================ */
.z-navbar {
    background: rgba(11, 11, 20, 0.95);
    border-bottom: 1px solid var(--z-border-light);
    padding: var(--z-space-md) var(--z-space-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.z-navbar-brand {
    font-size: var(--z-font-size-xl);
    font-weight: 700;
    color: var(--z-text-white);
}

.z-navbar-brand .z {
    color: var(--z-purple-light);
    font-size: 1.5em;
}

.z-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(11, 11, 20, 0.98);
    border-top: 1px solid var(--z-border-light);
    display: flex;
    justify-content: space-around;
    padding: var(--z-space-sm) 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.z-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--z-space-sm);
    color: var(--z-text-muted);
    font-size: var(--z-font-size-xs);
    transition: color var(--z-transition-fast);
}

.z-mobile-nav-item:hover,
.z-mobile-nav-item.active {
    color: var(--z-purple-light);
}

.z-mobile-nav-item i {
    font-size: 1.25rem;
}

.z-mobile-nav-center {
    background: var(--z-gradient-purple);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    margin-top: -28px;
    box-shadow: 0 4px 15px var(--z-purple-glow);
}

.z-mobile-nav-center i {
    font-size: 1.5rem;
}

/* ============================================
   Alerts / Flash Messages
   ============================================ */
.z-alert {
    padding: var(--z-space-md);
    border-radius: var(--z-radius-md);
    margin-bottom: var(--z-space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--z-space-sm);
}

.z-alert-success {
    background: var(--z-success-bg);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--z-success);
}

.z-alert-error {
    background: var(--z-danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--z-danger);
}

.z-alert-warning {
    background: var(--z-warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--z-warning);
}

.z-alert-info {
    background: var(--z-info-bg);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--z-info);
}

/* ============================================
   Audio Player / Recorder
   ============================================ */
.z-audio-recorder {
    background: var(--z-bg-card);
    border: 1px solid var(--z-border-light);
    border-radius: var(--z-radius-lg);
    padding: var(--z-space-lg);
    text-align: center;
}

.z-record-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--z-gradient-purple);
    border: none;
    color: var(--z-text-white);
    font-size: 2rem;
    cursor: pointer;
    transition: all var(--z-transition-normal);
    box-shadow: var(--z-shadow-glow);
}

.z-record-btn:hover {
    transform: scale(1.05);
}

.z-record-btn.recording {
    animation: z-pulse 1.5s infinite;
    background: var(--z-danger);
}

@keyframes z-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
}

.z-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 40px;
    margin: var(--z-space-md) 0;
}

.z-waveform-bar {
    width: 4px;
    background: var(--z-purple-light);
    border-radius: 2px;
    animation: z-wave 0.5s ease-in-out infinite alternate;
}

.z-waveform-bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.z-waveform-bar:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.z-waveform-bar:nth-child(3) { height: 30px; animation-delay: 0.2s; }
.z-waveform-bar:nth-child(4) { height: 25px; animation-delay: 0.3s; }
.z-waveform-bar:nth-child(5) { height: 35px; animation-delay: 0.4s; }
.z-waveform-bar:nth-child(6) { height: 20px; animation-delay: 0.5s; }
.z-waveform-bar:nth-child(7) { height: 15px; animation-delay: 0.6s; }

@keyframes z-wave {
    to { height: 40px; }
}

/* ============================================
   Animations
   ============================================ */
.z-fade-in {
    animation: z-fadeIn var(--z-transition-normal) ease-out;
}

@keyframes z-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.z-slide-up {
    animation: z-slideUp var(--z-transition-normal) ease-out;
}

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

.z-glow-pulse {
    animation: z-glowPulse 2s ease-in-out infinite;
}

@keyframes z-glowPulse {
    0%, 100% { box-shadow: var(--z-shadow-glow); }
    50% { box-shadow: 0 0 60px var(--z-purple-glow); }
}

/* ============================================
   Utilities
   ============================================ */
.z-bg-dark { background: var(--z-bg-dark); }
.z-bg-card { background: var(--z-bg-card); }

.z-rounded { border-radius: var(--z-radius-md); }
.z-rounded-lg { border-radius: var(--z-radius-lg); }
.z-rounded-full { border-radius: var(--z-radius-full); }

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

.z-border { border: 1px solid var(--z-border-light); }

.z-p-0 { padding: 0; }
.z-p-sm { padding: var(--z-space-sm); }
.z-p-md { padding: var(--z-space-md); }
.z-p-lg { padding: var(--z-space-lg); }
.z-p-xl { padding: var(--z-space-xl); }

.z-m-0 { margin: 0; }
.z-m-sm { margin: var(--z-space-sm); }
.z-m-md { margin: var(--z-space-md); }
.z-m-lg { margin: var(--z-space-lg); }

.z-mb-0 { margin-bottom: 0; }
.z-mb-xs { margin-bottom: var(--z-space-xs); }
.z-mb-sm { margin-bottom: var(--z-space-sm); }
.z-mb-md { margin-bottom: var(--z-space-md); }
.z-mb-lg { margin-bottom: var(--z-space-lg); }
.z-mb-xl { margin-bottom: var(--z-space-xl); }

.z-mt-0 { margin-top: 0; }
.z-mt-xs { margin-top: var(--z-space-xs); }
.z-mt-sm { margin-top: var(--z-space-sm); }
.z-mt-md { margin-top: var(--z-space-md); }
.z-mt-lg { margin-top: var(--z-space-lg); }
.z-mt-xl { margin-top: var(--z-space-xl); }

.z-flex { display: flex; }
.z-flex-col { flex-direction: column; }
.z-flex-1 { flex: 1; }
.z-flex-wrap { flex-wrap: wrap; }
.z-items-center { align-items: center; }
.z-items-start { align-items: flex-start; }
.z-justify-center { justify-content: center; }
.z-justify-between { justify-content: space-between; }
.z-gap-sm { gap: var(--z-space-sm); }
.z-gap-md { gap: var(--z-space-md); }
.z-gap-lg { gap: var(--z-space-lg); }

.z-text-center { text-align: center; }
.z-text-sm { font-size: var(--z-font-size-sm); }
.z-text-lg { font-size: var(--z-font-size-lg); }
.z-font-bold { font-weight: 700; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    :root {
        --z-font-size-3xl: 1.75rem;
        --z-font-size-2xl: 1.25rem;
    }

    .z-card {
        padding: var(--z-space-md);
    }

    body {
        padding-bottom: 80px; /* Space for mobile nav */
    }

    .z-hide-mobile { display: none !important; }

    /* Dashboard mobile layout fixes */
    .z-card > .z-flex.z-items-center.z-gap-lg {
        flex-direction: column;
        text-align: center;
    }

    .z-card > .z-flex.z-items-center.z-gap-lg > .z-flex-1 {
        width: 100%;
    }

    .z-card > .z-flex.z-items-center.z-gap-lg > .z-btn {
        width: 100%;
        margin-top: var(--z-space-md);
    }

    .z-card > .z-flex.z-items-center.z-justify-between {
        flex-direction: column;
        text-align: center;
        gap: var(--z-space-md);
    }

    /* Quick actions full width on mobile */
    .z-flex.z-gap-md[style*="flex-wrap"] > .z-btn {
        flex: 1 1 100%;
    }

    /* Greeting section adjustments */
    .z-greeting-name {
        font-size: var(--z-font-size-xl);
    }

    .z-greeting-text {
        font-size: var(--z-font-size-lg);
    }

    /* Container full width on mobile */
    .container {
        max-width: 100% !important;
        padding-left: var(--z-space-md);
        padding-right: var(--z-space-md);
    }
}

@media (min-width: 769px) {
    .z-hide-desktop { display: none !important; }
    .z-mobile-nav { display: none; }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--z-bg-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--z-purple-dark);
}

/* ============================================
   NEW: Enhanced Avatar System
   ============================================ */
.z-avatar-xxl {
    width: 150px;
    height: 150px;
    font-size: 4rem;
}

.z-avatar-bordered {
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 0 0 4px var(--z-purple-medium),
        0 0 40px var(--z-purple-glow);
}

.z-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--z-radius-full);
}

/* ============================================
   NEW: Stat Cards with Gradients
   ============================================ */
.z-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--z-space-md);
}

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

.z-stat-card {
    background: var(--z-bg-card);
    border: 1px solid var(--z-border-light);
    border-radius: var(--z-radius-lg);
    padding: var(--z-space-lg);
    display: flex;
    align-items: center;
    gap: var(--z-space-md);
    transition: all var(--z-transition-normal);
}

.z-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--z-border-medium);
}

.z-stat-card-purple {
    background: linear-gradient(135deg, rgba(108, 43, 217, 0.2) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-color: rgba(168, 85, 247, 0.3);
}

.z-stat-card-pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(244, 114, 182, 0.1) 100%);
    border-color: rgba(244, 114, 182, 0.3);
}

.z-stat-card-cyan {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(34, 211, 238, 0.1) 100%);
    border-color: rgba(34, 211, 238, 0.3);
}

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

.z-stat-icon-purple {
    background: rgba(168, 85, 247, 0.2);
    color: var(--z-purple-light);
}

.z-stat-icon-pink {
    background: rgba(244, 114, 182, 0.2);
    color: #F472B6;
}

.z-stat-icon-cyan {
    background: rgba(34, 211, 238, 0.2);
    color: #22D3EE;
}

.z-stat-content {
    flex: 1;
}

.z-stat-value {
    font-size: var(--z-font-size-2xl);
    font-weight: 700;
    color: var(--z-text-white);
    line-height: 1.2;
}

.z-stat-label {
    font-size: var(--z-font-size-sm);
    color: var(--z-text-muted);
    margin-top: var(--z-space-xs);
}

/* ============================================
   NEW: Tab Navigation
   ============================================ */
.z-tabs {
    display: flex;
    border-bottom: 1px solid var(--z-border-light);
    margin-bottom: var(--z-space-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.z-tab {
    padding: var(--z-space-md) var(--z-space-lg);
    color: var(--z-text-muted);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--z-transition-fast);
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--z-font-family);
    font-size: var(--z-font-size-md);
}

.z-tab:hover {
    color: var(--z-text-light);
}

.z-tab-active,
.z-tab.active {
    color: var(--z-purple-light);
    border-bottom-color: var(--z-purple-light);
}

.z-tab-icon {
    margin-right: var(--z-space-sm);
}

/* ============================================
   NEW: Enhanced Waveform Visualization
   ============================================ */
.z-waveform-lg {
    height: 80px;
    gap: 4px;
    padding: var(--z-space-lg);
    background: var(--z-bg-card);
    border-radius: var(--z-radius-lg);
    border: 1px solid var(--z-border-light);
}

.z-waveform-lg .z-waveform-bar {
    width: 6px;
}

.z-waveform-gradient .z-waveform-bar {
    background: linear-gradient(to top, var(--z-purple-dark), var(--z-purple-light));
}

.z-recording-timer {
    font-size: var(--z-font-size-2xl);
    font-weight: 700;
    color: var(--z-text-white);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.z-recording-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--z-space-lg);
    margin-top: var(--z-space-lg);
}

.z-control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--z-transition-fast);
}

.z-control-btn-primary {
    background: var(--z-gradient-purple);
    color: var(--z-text-white);
    box-shadow: 0 4px 15px var(--z-purple-glow);
}

.z-control-btn-primary:hover {
    transform: scale(1.1);
}

.z-control-btn-danger {
    background: var(--z-danger);
    color: var(--z-text-white);
}

.z-control-btn-danger:hover {
    background: #DC2626;
    transform: scale(1.1);
}

.z-control-btn-ghost {
    background: var(--z-bg-card);
    color: var(--z-text-light);
    border: 1px solid var(--z-border-light);
}

.z-control-btn-ghost:hover {
    background: var(--z-bg-medium);
}

/* ============================================
   NEW: Security Checklist
   ============================================ */
.z-checklist {
    display: flex;
    flex-direction: column;
    gap: var(--z-space-sm);
}

.z-check-item {
    display: flex;
    align-items: center;
    gap: var(--z-space-md);
    padding: var(--z-space-md);
    background: var(--z-bg-card);
    border: 1px solid var(--z-border-light);
    border-radius: var(--z-radius-md);
}

.z-check-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.z-check-complete .z-check-icon {
    background: var(--z-success-bg);
    color: var(--z-success);
}

.z-check-incomplete .z-check-icon {
    background: rgba(255, 255, 255, 0.05);
    color: var(--z-text-muted);
}

.z-check-content {
    flex: 1;
}

.z-check-title {
    font-weight: 500;
    color: var(--z-text-white);
}

.z-check-description {
    font-size: var(--z-font-size-sm);
    color: var(--z-text-muted);
    margin-top: 2px;
}

.z-check-action {
    flex-shrink: 0;
}

/* ============================================
   NEW: Beneficiary Cards
   ============================================ */
.z-beneficiary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--z-space-lg);
}

.z-beneficiary-card {
    background: var(--z-bg-card);
    border: 1px solid var(--z-border-light);
    border-radius: var(--z-radius-lg);
    padding: var(--z-space-xl);
    text-align: center;
    transition: all var(--z-transition-normal);
}

.z-beneficiary-card:hover {
    border-color: var(--z-purple-light);
    transform: translateY(-2px);
}

.z-beneficiary-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--z-space-md);
}

.z-beneficiary-name {
    font-size: var(--z-font-size-lg);
    font-weight: 600;
    color: var(--z-text-white);
    margin-bottom: var(--z-space-xs);
}

.z-relationship-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(168, 85, 247, 0.15);
    color: var(--z-purple-light);
    border-radius: var(--z-radius-full);
    font-size: var(--z-font-size-sm);
    font-weight: 500;
    margin-bottom: var(--z-space-md);
}

.z-beneficiary-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--z-space-xs);
    font-size: var(--z-font-size-sm);
    color: var(--z-text-muted);
}

.z-beneficiary-actions {
    display: flex;
    gap: var(--z-space-sm);
    margin-top: var(--z-space-lg);
}

.z-beneficiary-actions .z-btn {
    flex: 1;
}

/* ============================================
   NEW: Landing Page Hero
   ============================================ */
.z-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--z-space-2xl);
    position: relative;
    overflow: hidden;
}

.z-hero-content {
    max-width: 800px;
    z-index: 1;
}

.z-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--z-text-white);
    line-height: 1.1;
    margin-bottom: var(--z-space-lg);
}

@media (max-width: 768px) {
    .z-hero-title {
        font-size: 2.25rem;
    }
}

.z-hero-title .z-highlight {
    background: var(--z-gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.z-hero-subtitle {
    font-size: var(--z-font-size-xl);
    color: var(--z-text-muted);
    max-width: 600px;
    margin: 0 auto var(--z-space-xl);
    line-height: 1.6;
}

.z-hero-ctas {
    display: flex;
    gap: var(--z-space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.z-cta-primary {
    padding: 1rem 2.5rem;
    font-size: var(--z-font-size-lg);
    background: var(--z-gradient-purple);
    color: var(--z-text-white);
    border: none;
    border-radius: var(--z-radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--z-transition-normal);
    box-shadow: 0 4px 20px var(--z-purple-glow);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--z-space-sm);
}

.z-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--z-purple-glow);
    color: var(--z-text-white);
}

.z-cta-secondary {
    padding: 1rem 2.5rem;
    font-size: var(--z-font-size-lg);
    background: transparent;
    color: var(--z-text-white);
    border: 1px solid var(--z-border-medium);
    border-radius: var(--z-radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--z-transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--z-space-sm);
}

.z-cta-secondary:hover {
    background: var(--z-bg-card);
    border-color: var(--z-purple-light);
    color: var(--z-text-white);
}

/* Hero Background Effects */
.z-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.z-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 200px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 300px 60px, rgba(255,255,255,0.2), transparent);
    background-repeat: repeat;
    background-size: 400px 200px;
    animation: z-twinkle 4s ease-in-out infinite;
}

@keyframes z-twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.z-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.z-glow-orb-1 {
    width: 400px;
    height: 400px;
    background: var(--z-purple-dark);
    top: -100px;
    right: -100px;
}

.z-glow-orb-2 {
    width: 300px;
    height: 300px;
    background: #EC4899;
    bottom: -50px;
    left: -50px;
}

/* ============================================
   NEW: Feature Grid
   ============================================ */
.z-feature-section {
    padding: var(--z-space-2xl) var(--z-space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.z-section-title {
    font-size: var(--z-font-size-2xl);
    text-align: center;
    margin-bottom: var(--z-space-2xl);
}

.z-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--z-space-xl);
}

@media (max-width: 768px) {
    .z-feature-grid {
        grid-template-columns: 1fr;
    }
}

.z-feature-card {
    background: var(--z-bg-card);
    border: 1px solid var(--z-border-light);
    border-radius: var(--z-radius-lg);
    padding: var(--z-space-xl);
    text-align: center;
    transition: all var(--z-transition-normal);
}

.z-feature-card:hover {
    border-color: var(--z-purple-light);
    transform: translateY(-4px);
}

.z-feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--z-radius-lg);
    background: rgba(168, 85, 247, 0.15);
    color: var(--z-purple-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto var(--z-space-lg);
}

.z-feature-title {
    font-size: var(--z-font-size-lg);
    font-weight: 600;
    color: var(--z-text-white);
    margin-bottom: var(--z-space-sm);
}

.z-feature-description {
    color: var(--z-text-muted);
    line-height: 1.6;
}

/* ============================================
   NEW: How It Works Steps
   ============================================ */
.z-steps {
    display: flex;
    gap: var(--z-space-xl);
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .z-steps {
        flex-direction: column;
    }
}

.z-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.z-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--z-gradient-purple);
    color: var(--z-text-white);
    font-weight: 700;
    font-size: var(--z-font-size-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--z-space-md);
}

.z-step-title {
    font-size: var(--z-font-size-lg);
    font-weight: 600;
    color: var(--z-text-white);
    margin-bottom: var(--z-space-sm);
}

.z-step-description {
    color: var(--z-text-muted);
}

/* Connector line between steps */
.z-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    left: calc(50% + 30px);
    width: calc(100% - 60px);
    height: 2px;
    background: var(--z-border-light);
}

@media (max-width: 768px) {
    .z-step:not(:last-child)::after {
        display: none;
    }
}

/* ============================================
   NEW: Chat Header Enhancement
   ============================================ */
.z-chat-header {
    display: flex;
    align-items: center;
    gap: var(--z-space-md);
    padding: var(--z-space-md) var(--z-space-lg);
    background: var(--z-bg-card);
    border-bottom: 1px solid var(--z-border-light);
}

.z-chat-header-info {
    flex: 1;
}

.z-chat-header-name {
    font-weight: 600;
    color: var(--z-text-white);
}

.z-chat-header-status {
    display: flex;
    align-items: center;
    gap: var(--z-space-xs);
    font-size: var(--z-font-size-sm);
    color: var(--z-text-muted);
}

.z-online-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--z-success);
    animation: z-pulse-dot 2s infinite;
}

@keyframes z-pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   NEW: Chat Input Enhancement
   ============================================ */
.z-chat-input-container {
    display: flex;
    align-items: center;
    gap: var(--z-space-sm);
    padding: var(--z-space-md);
    background: var(--z-bg-card);
    border-top: 1px solid var(--z-border-light);
}

.z-chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--z-bg-input);
    border: 1px solid var(--z-border-light);
    border-radius: var(--z-radius-full);
    color: var(--z-text-white);
    font-family: var(--z-font-family);
    font-size: var(--z-font-size-md);
}

.z-chat-input:focus {
    outline: none;
    border-color: var(--z-purple-light);
}

.z-chat-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--z-transition-fast);
}

.z-chat-btn-send {
    background: var(--z-gradient-purple);
    color: var(--z-text-white);
}

.z-chat-btn-send:hover {
    transform: scale(1.1);
}

.z-chat-btn-mic {
    background: var(--z-bg-input);
    color: var(--z-text-light);
    border: 1px solid var(--z-border-light);
}

.z-chat-btn-mic:hover {
    background: var(--z-bg-medium);
}

/* ============================================
   NEW: Empty States
   ============================================ */
.z-empty-state {
    text-align: center;
    padding: var(--z-space-2xl);
}

.z-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--z-radius-lg);
    background: var(--z-bg-card);
    border: 1px solid var(--z-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--z-text-muted);
    margin: 0 auto var(--z-space-lg);
}

.z-empty-title {
    font-size: var(--z-font-size-lg);
    font-weight: 600;
    color: var(--z-text-white);
    margin-bottom: var(--z-space-sm);
}

.z-empty-description {
    color: var(--z-text-muted);
    margin-bottom: var(--z-space-lg);
}

/* ============================================
   NEW: Progress Ring
   ============================================ */
.z-progress-ring {
    position: relative;
    width: 60px;
    height: 60px;
}

.z-progress-ring svg {
    transform: rotate(-90deg);
}

.z-progress-ring-bg {
    fill: none;
    stroke: var(--z-bg-input);
    stroke-width: 6;
}

.z-progress-ring-fill {
    fill: none;
    stroke: var(--z-purple-light);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset var(--z-transition-slow);
}

.z-progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--z-font-size-sm);
    font-weight: 600;
    color: var(--z-text-white);
}

/* ============================================
   NEW: Greeting Section
   ============================================ */
.z-greeting {
    text-align: center;
    margin-bottom: var(--z-space-xl);
}

.z-greeting-text {
    font-size: var(--z-font-size-xl);
    color: var(--z-text-muted);
    margin-top: var(--z-space-md);
}

.z-greeting-name {
    font-size: var(--z-font-size-2xl);
    font-weight: 700;
    color: var(--z-text-white);
}

/* Quick Actions Grid */
.z-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--z-space-md);
}

/* Main Content Area */
.z-main-content {
    padding: var(--z-space-lg);
    padding-bottom: 100px;
}

@media (max-width: 768px) {
    .z-main-content {
        padding: var(--z-space-md);
        padding-bottom: 100px;
    }

    .z-quick-actions {
        flex-direction: column;
    }

    .z-quick-actions .z-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Language Switcher
   ============================================ */
.z-language-switcher {
    display: flex;
    align-items: center;
    gap: var(--z-space-xs);
}

.z-lang-btn {
    padding: 0.25rem 0.5rem;
    font-size: var(--z-font-size-xs);
    font-weight: 600;
    color: var(--z-text-muted);
    text-decoration: none;
    border-radius: var(--z-radius-sm);
    transition: all var(--z-transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.z-lang-btn:hover {
    color: var(--z-text-light);
    background: var(--z-bg-card);
}

.z-lang-btn.active {
    color: var(--z-purple-light);
    background: rgba(168, 85, 247, 0.15);
}

.z-gap-xs {
    gap: var(--z-space-xs);
}
