/**
 * Premium UI/UX Enhancements
 *
 * Apple-like polish: Glassmorphism, Micro-interactions, Spring Animations,
 * Subtle Shadows, Smooth Transitions, and Premium Visual Details.
 *
 * @package WebAppTheme
 * @since 1.0.0
 */

/* ==========================================================================
   Enhanced Design Tokens
   ========================================================================== */

:root {
    /* Apple-like Spring Animations */
    --spring-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --spring-smooth: cubic-bezier(0.23, 1, 0.32, 1);
    --spring-snappy: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);

    /* Premium Shadows - Layered & Colored */
    --shadow-glow-primary: 0 0 20px -5px rgba(99, 102, 241, 0.4);
    --shadow-glow-success: 0 0 20px -5px rgba(34, 197, 94, 0.4);
    --shadow-glow-error: 0 0 20px -5px rgba(239, 68, 68, 0.4);

    /* Elevated Shadows - More Realistic */
    --shadow-elevated-sm:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-elevated-md:
        0 2px 4px rgba(0, 0, 0, 0.02),
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.06),
        0 16px 32px rgba(0, 0, 0, 0.04);
    --shadow-elevated-lg:
        0 4px 8px rgba(0, 0, 0, 0.02),
        0 8px 16px rgba(0, 0, 0, 0.04),
        0 16px 32px rgba(0, 0, 0, 0.06),
        0 32px 64px rgba(0, 0, 0, 0.08);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-subtle: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-blur: 20px;
    --glass-blur-strong: 40px;

    /* Subtle Gradients */
    --gradient-shine: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    --gradient-surface: linear-gradient(
        180deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(248, 250, 252, 1) 100%
    );
    --gradient-primary: linear-gradient(
        135deg,
        #818CF8 0%,
        #6366F1 50%,
        #4F46E5 100%
    );
    --gradient-subtle-blue: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.08) 0%,
        rgba(99, 102, 241, 0.02) 100%
    );

    /* Premium Text Rendering */
    --text-shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.05);

    /* Interactive Feedback */
    --scale-press: 0.97;
    --scale-hover: 1.02;
    --lift-hover: -2px;
    --lift-press: 0px;
}

/* Dark Mode Enhancements */
[data-theme="dark"] {
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-bg-subtle: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);

    --gradient-surface: linear-gradient(
        180deg,
        rgba(30, 41, 59, 1) 0%,
        rgba(15, 23, 42, 1) 100%
    );

    --shadow-elevated-sm:
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-elevated-md:
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Smooth Scroll & Global Enhancements
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced Focus States */
:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px var(--surface),
        0 0 0 4px var(--primary),
        var(--shadow-glow-primary);
    transition: box-shadow 0.2s var(--ease-apple);
}

/* Premium Selection */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: inherit;
}

/* Refined Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* ==========================================================================
   Glassmorphism Components
   ========================================================================== */

/* Glass Surface */
.glass,
.webapp-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

.glass-strong {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur-strong));
    -webkit-backdrop-filter: blur(var(--glass-blur-strong));
}

/* Glassmorphic Topbar */
.webapp-topbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .webapp-topbar {
    background: var(--glass-bg) !important;
    border-bottom-color: rgba(255, 255, 255, 0.06);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Glassmorphic Sidebar */
.webapp-sidebar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .webapp-sidebar {
    border-right-color: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Premium Button Styles
   ========================================================================== */

/* Base Button Enhancement */
.app-btn,
.webapp-btn,
.gform_button,
button[type="submit"] {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition:
        transform 0.2s var(--spring-smooth),
        box-shadow 0.2s var(--ease-apple),
        background-color 0.2s var(--ease-apple);
}

/* Button Hover Lift Effect */
.app-btn:hover,
.webapp-btn:hover {
    transform: translateY(var(--lift-hover));
}

/* Button Press Effect */
.app-btn:active,
.webapp-btn:active {
    transform: translateY(var(--lift-press)) scale(var(--scale-press));
}

/* Primary Button - Premium Gradient */
.app-btn--primary,
.webapp-btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 2px 8px rgba(99, 102, 241, 0.25),
        0 4px 16px rgba(99, 102, 241, 0.15);
}

.app-btn--primary:hover,
.webapp-btn-primary:hover {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 4px 12px rgba(99, 102, 241, 0.35),
        0 8px 24px rgba(99, 102, 241, 0.2);
}

.app-btn--primary:active,
.webapp-btn-primary:active {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 2px 4px rgba(99, 102, 241, 0.2);
}

/* Secondary Button - Refined */
.app-btn--secondary {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-elevated-sm);
}

.app-btn--secondary:hover {
    background: var(--surface);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-elevated-md);
}

/* Ghost Button - Subtle Feedback */
.app-btn--ghost {
    position: relative;
}

.app-btn--ghost::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.app-btn--ghost:hover::before {
    opacity: 0.06;
}

.app-btn--ghost:active::before {
    opacity: 0.1;
}

/* Button Shine Effect */
.app-btn--primary::after,
.webapp-btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.app-btn--primary:hover::after,
.webapp-btn-primary:hover::after {
    left: 100%;
}

/* Icon Button Polish */
.app-btn--icon {
    border-radius: var(--radius-lg);
}

.app-btn--icon svg {
    transition: transform 0.2s var(--spring-smooth);
}

.app-btn--icon:hover svg {
    transform: scale(1.1);
}

.app-btn--icon:active svg {
    transform: scale(0.95);
}

/* ==========================================================================
   Premium Card Styles
   ========================================================================== */

.app-card {
    background: var(--gradient-surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-elevated-sm);
    transition:
        transform 0.3s var(--spring-smooth),
        box-shadow 0.3s var(--ease-apple);
    overflow: hidden;
}

/* Card Inner Glow */
.app-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.8),
        rgba(255, 255, 255, 0) 50%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
}

/* Hoverable Card */
.app-card.app-card--hover:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: var(--shadow-elevated-lg);
}

/* Card Header Polish */
.app-card-header {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(248, 250, 252, 0.5) 100%
    );
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* Card Footer Polish */
.app-card-footer {
    background: rgba(248, 250, 252, 0.8);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .app-card {
    background: var(--gradient-surface);
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .app-card::before {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0) 50%
    );
}

/* ==========================================================================
   Premium Input Fields
   ========================================================================== */

.app-input,
.webapp-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04) inset,
        0 0 0 0 transparent;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.app-input:hover,
input[type="text"]:hover,
input[type="email"]:hover,
textarea:hover,
select:hover {
    border-color: var(--border-strong);
}

.app-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.02) inset,
        0 0 0 3px rgba(99, 102, 241, 0.12),
        var(--shadow-glow-primary);
    outline: none;
}

/* Input with Icon */
.app-input-icon-wrapper {
    position: relative;
}

.app-input-icon-wrapper .app-input {
    padding-left: 42px;
}

.app-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.app-input-icon-wrapper:focus-within .app-input-icon {
    color: var(--primary);
}

/* ==========================================================================
   Premium Sidebar Interactions
   ========================================================================== */

/* Sidebar Item */
.webapp-sidebar-item {
    position: relative;
    border-radius: var(--radius-lg);
    margin: 2px 8px;
}

.webapp-sidebar-link {
    border-radius: var(--radius-lg);
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s var(--spring-smooth);
}

/* Hover Effect */
.webapp-sidebar-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Active State - Pill Indicator */
.webapp-sidebar-item.is-active .webapp-sidebar-link {
    background: var(--primary-soft);
    color: var(--primary);
}

/* Active Indicator Line */
.webapp-sidebar-item.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
    animation: slideIn 0.2s var(--spring-bounce);
}

@keyframes slideIn {
    from {
        transform: translateY(-50%) scaleY(0);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) scaleY(1);
        opacity: 1;
    }
}

/* Icon Animation on Hover */
.webapp-sidebar-icon {
    transition: transform 0.2s var(--spring-smooth);
}

.webapp-sidebar-link:hover .webapp-sidebar-icon {
    transform: scale(1.1);
}

.webapp-sidebar-link:active .webapp-sidebar-icon {
    transform: scale(0.95);
}

/* Submenu Smooth Open */
.webapp-sidebar-submenu {
    overflow: hidden;
    transition:
        max-height 0.3s var(--ease-out-expo),
        opacity 0.2s ease;
}

/* ==========================================================================
   Dropdown Enhancements
   ========================================================================== */

.webapp-dropdown-menu {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-elevated-lg);
    transform-origin: top right;
    animation: dropdownOpen 0.2s var(--spring-smooth);
}

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

.webapp-dropdown-item {
    border-radius: var(--radius-md);
    margin: 2px 4px;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.webapp-dropdown-item:hover {
    background-color: var(--primary-soft);
    color: var(--primary);
}

.webapp-dropdown-item:active {
    background-color: var(--primary-soft-hover);
}

/* ==========================================================================
   Badge Enhancements
   ========================================================================== */

.app-badge {
    font-weight: var(--font-semibold);
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Animated Dot */
.app-badge-dot {
    animation: pulse 2s infinite;
}

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

/* Live/Active Indicator */
.app-badge--live .app-badge-dot {
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 currentColor;
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 4px transparent;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 transparent;
    }
}

/* ==========================================================================
   Table Enhancements
   ========================================================================== */

.app-table {
    border-collapse: separate;
    border-spacing: 0;
}

.app-table th {
    background: linear-gradient(
        180deg,
        var(--gray-50) 0%,
        var(--gray-100) 100%
    );
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.app-table th:first-child {
    border-radius: var(--radius-lg) 0 0 0;
}

.app-table th:last-child {
    border-radius: 0 var(--radius-lg) 0 0;
}

.app-table tbody tr {
    transition: background-color 0.15s ease;
}

.app-table tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.04);
}

/* Row Selection Highlight */
.app-table tbody tr.is-selected {
    background-color: var(--primary-soft);
}

.app-table tbody tr.is-selected:hover {
    background-color: var(--primary-soft-hover);
}

/* ==========================================================================
   Avatar Enhancements
   ========================================================================== */

.app-avatar {
    box-shadow: 0 0 0 2px var(--surface);
    transition: transform 0.2s var(--spring-smooth);
}

.app-avatar:hover {
    transform: scale(1.08);
    z-index: 10;
}

/* Avatar Status Indicator */
.app-avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    border: 2px solid var(--surface);
}

.app-avatar-status--online {
    background-color: var(--success);
}

.app-avatar-status--offline {
    background-color: var(--gray-400);
}

.app-avatar-status--busy {
    background-color: var(--error);
}

/* Avatar Group Overlap Animation */
.app-avatar-group .app-avatar {
    transition:
        margin-left 0.2s var(--spring-smooth),
        transform 0.2s var(--spring-smooth);
}

.app-avatar-group:hover .app-avatar {
    margin-left: -4px;
}

/* ==========================================================================
   Progress Bar Enhancements
   ========================================================================== */

.app-progress {
    background: linear-gradient(
        180deg,
        var(--gray-200) 0%,
        var(--gray-100) 100%
    );
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) inset;
    overflow: hidden;
}

.app-progress-bar {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

/* Animated Shine */
.app-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Indeterminate Progress */
.app-progress--indeterminate .app-progress-bar {
    width: 30% !important;
    animation: indeterminate 1.5s infinite ease-in-out;
}

@keyframes indeterminate {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(400%);
    }
}

/* ==========================================================================
   Tabs Enhancements
   ========================================================================== */

.app-tabs {
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) inset;
}

.app-tab {
    position: relative;
    z-index: 1;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.app-tab.is-active {
    color: var(--text);
    background: var(--surface);
    box-shadow: var(--shadow-elevated-sm);
}

/* Sliding Indicator (for JS implementation) */
.app-tabs-indicator {
    position: absolute;
    height: calc(100% - 8px);
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated-sm);
    transition: all 0.3s var(--spring-smooth);
    z-index: 0;
}

/* ==========================================================================
   Notification Badge Pulse
   ========================================================================== */

.webapp-notification-badge {
    animation: notificationPulse 2s infinite;
}

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

/* ==========================================================================
   Search Input Enhancement
   ========================================================================== */

.webapp-topbar-search {
    position: relative;
    transition:
        width 0.3s var(--spring-smooth),
        background-color 0.2s ease;
}

.webapp-search-input {
    background: var(--surface-hover);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        width 0.3s var(--spring-smooth);
}

.webapp-search-input:hover {
    background: var(--surface);
    border-color: var(--border);
}

.webapp-search-input:focus {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.12),
        var(--shadow-glow-primary);
    width: 280px;
}

.webapp-search-shortcut {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.webapp-topbar-search:hover .webapp-search-shortcut {
    opacity: 1;
}

/* ==========================================================================
   List Item Interactions
   ========================================================================== */

.app-list-item {
    border-radius: var(--radius-lg);
    margin: 2px 0;
    transition:
        background-color 0.15s ease,
        transform 0.15s var(--spring-smooth);
}

.app-list-item:hover {
    background-color: var(--surface-hover);
    transform: translateX(4px);
}

.app-list-item:active {
    transform: translateX(2px) scale(0.995);
}

/* Icon Container Glow on Hover */
.app-list-item-icon {
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.app-list-item:hover .app-list-item-icon {
    background-color: var(--primary-soft);
    color: var(--primary);
    box-shadow: var(--shadow-glow-primary);
}

/* ==========================================================================
   Stat Cards Animation
   ========================================================================== */

.app-stat-value {
    font-feature-settings: 'tnum' 1;
    transition: color 0.3s ease;
}

/* Number Counter Animation (for JS) */
.app-stat-value[data-animate] {
    animation: countUp 0.8s var(--ease-out-expo);
}

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

.app-stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
}

.app-stat-change--up {
    background-color: var(--success-soft);
    color: var(--success-text);
}

.app-stat-change--down {
    background-color: var(--error-soft);
    color: var(--error-text);
}

/* ==========================================================================
   Mobile Menu Overlay
   ========================================================================== */

.webapp-overlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ==========================================================================
   Page Transitions
   ========================================================================== */

.webapp-content {
    animation: pageEnter 0.4s var(--ease-out-expo);
}

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

/* ==========================================================================
   Skeleton Loading States
   ========================================================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-200) 25%,
        var(--gray-100) 50%,
        var(--gray-200) 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
}

.skeleton-button {
    width: 100px;
    height: 36px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.webapp-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-elevated-lg);
    animation: toastEnter 0.3s var(--spring-bounce);
}

@keyframes toastEnter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.webapp-toast.is-leaving {
    animation: toastLeave 0.2s var(--ease-in) forwards;
}

@keyframes toastLeave {
    to {
        opacity: 0;
        transform: translateY(8px) scale(0.95);
    }
}

/* Toast Variants */
.webapp-toast--success {
    border-left: 3px solid var(--success);
}

.webapp-toast--error {
    border-left: 3px solid var(--error);
}

.webapp-toast--warning {
    border-left: 3px solid var(--warning);
}

/* ==========================================================================
   Tooltip Styles
   ========================================================================== */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 6px 10px;
    background: var(--gray-900);
    color: var(--white);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    white-space: nowrap;
    border-radius: var(--radius-md);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.15s ease,
        transform 0.15s var(--spring-smooth),
        visibility 0.15s ease;
    pointer-events: none;
    z-index: var(--z-tooltip);
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gray-900);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.15s ease,
        visibility 0.15s ease;
    pointer-events: none;
    z-index: var(--z-tooltip);
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Interactive Hover States for Elementor Widgets
   ========================================================================== */

/* Image Hover Zoom */
.app-image-hover {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.app-image-hover img {
    transition: transform 0.5s var(--ease-out-expo);
}

.app-image-hover:hover img {
    transform: scale(1.05);
}

/* Link Underline Animation */
.app-link-underline {
    position: relative;
    display: inline-block;
}

.app-link-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s var(--ease-out-expo);
}

.app-link-underline:hover::after {
    width: 100%;
}

/* ==========================================================================
   Print Optimizations
   ========================================================================== */

@media print {
    .glass,
    .webapp-glass,
    .webapp-topbar,
    .webapp-sidebar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--surface) !important;
    }

    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   Apple-Like Refinements - Final Polish Layer
   ========================================================================== */

/* Enhanced Border Radius - Softer, More Organic */
:root {
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-default: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 24px;
}

/* Typography - Tighter, More Refined */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

h1, h2, h3, h4, h5, h6,
.webapp-page-title,
.app-card-title,
.app-section-title {
    letter-spacing: -0.02em;
    font-feature-settings: 'ss01', 'ss02';
}

/* Sidebar - Premium Polish */
.webapp-sidebar {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(248, 250, 252, 0.95) 100%
    ) !important;
    border-right: none !important;
    box-shadow:
        1px 0 0 rgba(0, 0, 0, 0.04),
        4px 0 16px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .webapp-sidebar {
    background: linear-gradient(
        180deg,
        rgba(30, 41, 59, 0.98) 0%,
        rgba(15, 23, 42, 0.95) 100%
    ) !important;
    box-shadow:
        1px 0 0 rgba(255, 255, 255, 0.03),
        4px 0 16px rgba(0, 0, 0, 0.1);
}

/* Sidebar Header - More Breathing Room */
.webapp-sidebar-header {
    padding: var(--space-4) var(--space-5);
    border-bottom: none;
    background: transparent;
}

/* Sidebar Navigation - Refined Spacing */
.webapp-sidebar-nav {
    padding: var(--space-2) var(--space-3);
}

.webapp-sidebar-section {
    margin-bottom: var(--space-6);
}

.webapp-sidebar-section-label {
    padding: var(--space-2) var(--space-4);
    margin-bottom: var(--space-2);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    opacity: 0.8;
}

/* Sidebar Items - Apple-like Feel */
.webapp-sidebar-menu {
    gap: 2px;
}

.webapp-sidebar-link {
    padding: var(--space-2-5) var(--space-4);
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s var(--spring-smooth),
        box-shadow 0.15s ease;
}

.webapp-sidebar-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
    transform: translateX(2px);
}

[data-theme="dark"] .webapp-sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

/* Active State - More Prominent */
.webapp-sidebar-item.is-active > .webapp-sidebar-link,
.webapp-sidebar-item.current-menu-item > .webapp-sidebar-link {
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--primary-soft-hover) 100%);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.webapp-sidebar-item.is-active > .webapp-sidebar-link .webapp-sidebar-icon,
.webapp-sidebar-item.current-menu-item > .webapp-sidebar-link .webapp-sidebar-icon {
    color: var(--primary);
}

/* Sidebar Footer - Refined */
.webapp-sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    background: rgba(0, 0, 0, 0.01);
}

[data-theme="dark"] .webapp-sidebar-footer {
    border-top-color: rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.1);
}

.webapp-sidebar-toggle {
    border-radius: var(--radius-lg);
    padding: var(--space-3);
}

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

/* Topbar - Premium Glass Effect */
.webapp-topbar {
    padding: 0 var(--space-8);
    border-bottom: none !important;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.04),
        0 4px 20px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .webapp-topbar {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03),
        0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Page Title - Refined */
.webapp-page-title {
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

/* Search - More Refined */
.webapp-topbar-search {
    margin-right: var(--space-2);
}

.webapp-search-input {
    height: 38px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid transparent;
    padding-left: 40px;
    padding-right: 60px;
}

.webapp-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.webapp-search-input:hover {
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .webapp-search-input {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .webapp-search-input:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Topbar Buttons - More Polish */
.webapp-topbar-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s var(--spring-smooth);
}

.webapp-topbar-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text);
}

[data-theme="dark"] .webapp-topbar-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.webapp-topbar-btn:active {
    transform: scale(0.95);
}

/* User Avatar Button - Refined */
.webapp-user-avatar-btn {
    border-radius: var(--radius-full);
    padding: 2px;
    transition: box-shadow 0.15s ease;
}

.webapp-user-avatar-btn:hover {
    box-shadow: 0 0 0 2px var(--primary-soft);
}

.webapp-user-avatar {
    border-radius: var(--radius-full);
    box-shadow: 0 0 0 2px var(--surface);
}

/* Notification Badge - More Visible */
.webapp-notification-badge {
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    top: 2px;
    right: 2px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Dropdowns - Premium Feel */
.webapp-dropdown-menu {
    border-radius: var(--radius-xl);
    padding: var(--space-2);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .webapp-dropdown-menu {
    border-color: rgba(255, 255, 255, 0.06);
}

.webapp-dropdown-item {
    border-radius: var(--radius-lg);
    padding: var(--space-2-5) var(--space-4);
    margin: 1px 0;
    font-size: 14px;
    font-weight: 500;
}

.webapp-dropdown-header {
    padding: var(--space-4);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: var(--space-2);
}

.webapp-dropdown-divider {
    margin: var(--space-2) 0;
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .webapp-dropdown-header {
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

/* Cards - Maximum Premium */
.app-card {
    border-radius: var(--radius-xl);
    border: none;
    background: var(--surface);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 2px 4px rgba(0, 0, 0, 0.02),
        0 4px 8px rgba(0, 0, 0, 0.02),
        0 8px 16px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .app-card {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.15);
}

.app-card.app-card--hover:hover {
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.03),
        0 8px 16px rgba(0, 0, 0, 0.04),
        0 16px 32px rgba(0, 0, 0, 0.06);
}

.app-card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    background: transparent;
}

.app-card-body {
    padding: var(--space-6);
}

.app-card-footer {
    padding: var(--space-4) var(--space-6);
    background: rgba(0, 0, 0, 0.01);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* Buttons - Apple-Like */
.app-btn {
    height: 40px;
    padding: 0 var(--space-5);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.app-btn--sm {
    height: 34px;
    padding: 0 var(--space-4);
    font-size: 13px;
}

.app-btn--lg {
    height: 48px;
    padding: 0 var(--space-8);
    font-size: 16px;
    border-radius: var(--radius-xl);
}

.app-btn--primary {
    background: linear-gradient(180deg, #7C7FFF 0%, #6366F1 50%, #5558E8 100%);
    border: none;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 1px 2px rgba(99, 102, 241, 0.2),
        0 4px 12px rgba(99, 102, 241, 0.25);
}

.app-btn--primary:hover {
    background: linear-gradient(180deg, #8B8EFF 0%, #7275F4 50%, #6164EB 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 2px 4px rgba(99, 102, 241, 0.25),
        0 8px 20px rgba(99, 102, 241, 0.3);
}

.app-btn--primary:active {
    background: linear-gradient(180deg, #6366F1 0%, #5558E8 50%, #4F51E0 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 1px 2px rgba(99, 102, 241, 0.2);
    transform: scale(0.98);
}

.app-btn--secondary {
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.app-btn--secondary:hover {
    background: var(--surface);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .app-btn--secondary {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Inputs - Refined */
.app-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    height: 42px;
    padding: 0 var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--surface);
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.app-input:hover,
input[type="text"]:hover,
input[type="email"]:hover,
textarea:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.app-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.04);
    outline: none;
}

[data-theme="dark"] .app-input,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"] {
    border-color: rgba(255, 255, 255, 0.1);
}

textarea {
    height: auto;
    min-height: 100px;
    padding: var(--space-4);
}

/* Tables - Premium */
.app-table {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.app-table th {
    background: rgba(0, 0, 0, 0.02);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: var(--space-4) var(--space-5);
}

.app-table td {
    padding: var(--space-4) var(--space-5);
    font-size: 14px;
}

.app-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

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

.app-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02);
}

/* Badges - Refined */
.app-badge {
    padding: var(--space-1) var(--space-3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: var(--radius-md);
}

/* Tabs - Apple Style */
.app-tabs {
    background: rgba(0, 0, 0, 0.04);
    padding: 3px;
    border-radius: var(--radius-lg);
}

[data-theme="dark"] .app-tabs {
    background: rgba(255, 255, 255, 0.06);
}

.app-tab {
    padding: var(--space-2) var(--space-4);
    border-radius: calc(var(--radius-lg) - 2px);
    font-size: 13px;
    font-weight: 600;
}

.app-tab.is-active {
    background: var(--surface);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Stats - Premium Typography */
.app-stat-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-feature-settings: 'tnum' 1, 'ss01' 1;
}

.app-stat-label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
}

/* Progress Bar - Smoother */
.app-progress {
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.06);
}

.app-progress-bar {
    background: linear-gradient(90deg, var(--primary) 0%, #818CF8 100%);
}

/* Avatars - Refined */
.app-avatar {
    border-radius: var(--radius-full);
    box-shadow: 0 0 0 2px var(--surface);
}

/* Empty States */
.app-empty {
    padding: var(--space-16) var(--space-8);
}

.app-empty-icon {
    width: 56px;
    height: 56px;
    margin-bottom: var(--space-5);
    color: var(--text-muted);
    opacity: 0.5;
}

.app-empty-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.app-empty-description {
    font-size: 14px;
    line-height: 1.6;
    max-width: 280px;
}

/* Mobile - Premium Feel */
@media (max-width: 767px) {
    .webapp-topbar {
        padding: 0 var(--space-4);
    }

    .webapp-page-title {
        font-size: 16px;
    }

    /* Mobile Sidebar Overlay */
    .webapp-sidebar.is-open {
        box-shadow:
            0 0 0 9999px rgba(0, 0, 0, 0.3),
            8px 0 32px rgba(0, 0, 0, 0.15);
    }

    /* Smoother Mobile Menu */
    .webapp-mobile-menu-toggle {
        border-radius: var(--radius-lg);
    }

    .webapp-mobile-menu-toggle:active {
        transform: scale(0.95);
    }

    /* Touch-friendly Buttons */
    .app-btn {
        height: 48px;
        font-size: 16px;
    }

    .app-btn--sm {
        height: 42px;
        font-size: 15px;
    }

    /* Touch-friendly Inputs */
    .app-input,
    input[type="text"],
    input[type="email"],
    textarea {
        height: 48px;
        font-size: 16px;
    }

    /* Cards on Mobile */
    .app-card {
        border-radius: var(--radius-lg);
    }

    .app-card-body {
        padding: var(--space-5);
    }
}

/* High DPI / Retina Refinements */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .webapp-sidebar,
    .webapp-topbar,
    .app-card {
        /* Sharper borders on retina */
    }
}

/* Smooth Page Load */
.webapp-app-shell {
    opacity: 0;
    animation: fadeInPage 0.4s ease forwards;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Safe Areas for Notched Devices */
@supports (padding: env(safe-area-inset-top)) {
    .webapp-topbar {
        padding-top: env(safe-area-inset-top);
        height: calc(var(--topbar-height) + env(safe-area-inset-top));
    }

    .webapp-sidebar {
        padding-top: env(safe-area-inset-top);
        padding-left: env(safe-area-inset-left);
    }
}

/* Reduced Motion - Respect User Preference */
@media (prefers-reduced-motion: reduce) {
    .webapp-app-shell {
        animation: none;
        opacity: 1;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   ELEMENTOR WIDGETS - PREMIUM OVERRIDES
   Apple-like polish for all Elementor widgets
   ========================================================================== */

/* --------------------------------------------------------------------------
   Elementor Button Widget - Premium Gradient & Effects
   -------------------------------------------------------------------------- */

.webapp-content .elementor-button-wrapper .elementor-button {
    position: relative;
    overflow: hidden;
    height: auto;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg) !important;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition:
        transform 0.2s var(--spring-smooth),
        box-shadow 0.2s var(--ease-apple),
        background 0.2s ease;
}

/* Primary Button Style */
.webapp-content .elementor-button-wrapper .elementor-button.elementor-button-primary,
.webapp-content .elementor-button-wrapper .elementor-button[style*="background-color: #6366f1"],
.webapp-content .elementor-button-wrapper .elementor-button {
    background: linear-gradient(180deg, #7C7FFF 0%, #6366F1 50%, #5558E8 100%) !important;
    border: none !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 1px 2px rgba(99, 102, 241, 0.2),
        0 4px 12px rgba(99, 102, 241, 0.25);
}

.webapp-content .elementor-button-wrapper .elementor-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, #8B8EFF 0%, #7275F4 50%, #6164EB 100%) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 2px 4px rgba(99, 102, 241, 0.25),
        0 8px 20px rgba(99, 102, 241, 0.3);
}

.webapp-content .elementor-button-wrapper .elementor-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 1px 2px rgba(99, 102, 241, 0.2);
}

/* Button Shine Effect */
.webapp-content .elementor-button-wrapper .elementor-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.webapp-content .elementor-button-wrapper .elementor-button:hover::after {
    left: 100%;
}

/* Secondary/Outline Button */
.webapp-content .elementor-button-wrapper .elementor-button-link,
.webapp-content .elementor-button-wrapper .elementor-button[style*="background-color: transparent"] {
    background: var(--surface) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: var(--text) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.webapp-content .elementor-button-wrapper .elementor-button-link:hover {
    background: var(--surface) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   Elementor Form Widget - Premium Inputs
   -------------------------------------------------------------------------- */

.webapp-content .elementor-form .elementor-field-group {
    margin-bottom: var(--space-5);
}

.webapp-content .elementor-form .elementor-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-2);
    letter-spacing: -0.01em;
}

.webapp-content .elementor-form .elementor-field-textual {
    height: 44px;
    padding: 0 var(--space-4);
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: var(--surface);
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.webapp-content .elementor-form .elementor-field-textual:hover {
    border-color: rgba(0, 0, 0, 0.15) !important;
}

.webapp-content .elementor-form .elementor-field-textual:focus {
    border-color: var(--primary) !important;
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.1),
        0 1px 2px rgba(0, 0, 0, 0.04);
    outline: none;
}

.webapp-content .elementor-form textarea.elementor-field-textual {
    height: auto;
    min-height: 120px;
    padding: var(--space-4);
}

.webapp-content .elementor-form .elementor-field-type-select .elementor-field-textual {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' 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: right 14px center;
    padding-right: 44px;
}

/* Form Submit Button */
.webapp-content .elementor-form .elementor-button[type="submit"] {
    height: 48px;
    padding: 0 var(--space-8);
    border-radius: var(--radius-lg) !important;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(180deg, #7C7FFF 0%, #6366F1 50%, #5558E8 100%) !important;
    border: none !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 2px 4px rgba(99, 102, 241, 0.2),
        0 6px 16px rgba(99, 102, 241, 0.25);
    transition:
        transform 0.2s var(--spring-smooth),
        box-shadow 0.2s ease;
}

.webapp-content .elementor-form .elementor-button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 4px 8px rgba(99, 102, 241, 0.25),
        0 12px 24px rgba(99, 102, 241, 0.3);
}

/* Form Validation States */
.webapp-content .elementor-form .elementor-error .elementor-field-textual {
    border-color: var(--error) !important;
}

.webapp-content .elementor-form .elementor-message {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
}

.webapp-content .elementor-form .elementor-message-success {
    background: var(--success-soft);
    color: var(--success-text);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.webapp-content .elementor-form .elementor-message-danger {
    background: var(--error-soft);
    color: var(--error-text);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --------------------------------------------------------------------------
   Elementor Tabs Widget - Apple Style
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-tabs .elementor-tabs {
    border: none !important;
    border-radius: var(--radius-xl) !important;
    background: var(--surface);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 2px 4px rgba(0, 0, 0, 0.02),
        0 4px 8px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.webapp-content .elementor-widget-tabs .elementor-tabs-wrapper {
    background: rgba(0, 0, 0, 0.02);
    padding: 4px;
    border-bottom: none !important;
}

.webapp-content .elementor-widget-tabs .elementor-tab-title {
    padding: var(--space-3) var(--space-5) !important;
    border: none !important;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.webapp-content .elementor-widget-tabs .elementor-tab-title:hover {
    color: var(--text);
}

.webapp-content .elementor-widget-tabs .elementor-tab-title.elementor-active {
    background: var(--surface) !important;
    color: var(--text) !important;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.02);
}

.webapp-content .elementor-widget-tabs .elementor-tab-content {
    padding: var(--space-6) !important;
    border: none !important;
}

/* Vertical Tabs */
.webapp-content .elementor-widget-tabs.elementor-tabs-view-vertical .elementor-tabs-wrapper {
    border-right: none !important;
    padding: var(--space-2);
}

.webapp-content .elementor-widget-tabs.elementor-tabs-view-vertical .elementor-tab-title {
    text-align: left;
}

/* --------------------------------------------------------------------------
   Elementor Accordion Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-accordion .elementor-accordion {
    border: none !important;
    border-radius: 0;
}

.webapp-content .elementor-widget-accordion .elementor-accordion-item {
    border: none !important;
    background: var(--surface);
    border-radius: var(--radius-xl) !important;
    margin-bottom: var(--space-3);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 2px 4px rgba(0, 0, 0, 0.02),
        0 4px 8px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.webapp-content .elementor-widget-accordion .elementor-accordion-item:hover {
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.03),
        0 8px 16px rgba(0, 0, 0, 0.04);
}

.webapp-content .elementor-widget-accordion .elementor-tab-title {
    padding: var(--space-5) var(--space-6) !important;
    border: none !important;
    font-weight: 600;
    color: var(--text);
    transition: background-color 0.2s ease;
}

.webapp-content .elementor-widget-accordion .elementor-tab-title:hover {
    background: rgba(0, 0, 0, 0.02);
}

.webapp-content .elementor-widget-accordion .elementor-tab-title .elementor-accordion-icon {
    color: var(--text-muted);
    transition: transform 0.3s var(--spring-smooth);
}

.webapp-content .elementor-widget-accordion .elementor-tab-title.elementor-active .elementor-accordion-icon {
    color: var(--primary);
}

.webapp-content .elementor-widget-accordion .elementor-tab-content {
    padding: 0 var(--space-6) var(--space-6) !important;
    border: none !important;
}

/* --------------------------------------------------------------------------
   Elementor Toggle Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-toggle .elementor-toggle {
    border: none !important;
}

.webapp-content .elementor-widget-toggle .elementor-toggle-item {
    border: none !important;
    background: var(--surface);
    border-radius: var(--radius-xl) !important;
    margin-bottom: var(--space-3);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 2px 4px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.webapp-content .elementor-widget-toggle .elementor-tab-title {
    padding: var(--space-4) var(--space-5) !important;
    border: none !important;
    font-size: 14px;
    font-weight: 600;
}

.webapp-content .elementor-widget-toggle .elementor-tab-content {
    padding: 0 var(--space-5) var(--space-5) !important;
    border: none !important;
}

/* --------------------------------------------------------------------------
   Elementor Counter Widget - Premium Numbers
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-counter .elementor-counter {
    text-align: center;
}

.webapp-content .elementor-widget-counter .elementor-counter-number-wrapper {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-feature-settings: 'tnum' 1, 'ss01' 1;
    color: var(--text);
    margin-bottom: var(--space-2);
}

.webapp-content .elementor-widget-counter .elementor-counter-number-prefix,
.webapp-content .elementor-widget-counter .elementor-counter-number-suffix {
    font-weight: 600;
    color: var(--primary);
}

.webapp-content .elementor-widget-counter .elementor-counter-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   Elementor Progress Bar Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-progress .elementor-progress-wrapper {
    height: 8px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.webapp-content .elementor-widget-progress .elementor-progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--primary) 0%, #818CF8 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Progress Bar Shine Animation */
.webapp-content .elementor-widget-progress .elementor-progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 2s infinite;
}

.webapp-content .elementor-widget-progress .elementor-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-2);
}

.webapp-content .elementor-widget-progress .elementor-progress-percentage {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Elementor Image Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-image .elementor-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.webapp-content .elementor-widget-image img {
    border-radius: var(--radius-xl) !important;
    transition: transform 0.5s var(--ease-out-expo);
}

/* Image Hover Zoom Effect */
.webapp-content .elementor-widget-image.image-hover-zoom:hover img {
    transform: scale(1.05);
}

/* Image with Caption */
.webapp-content .elementor-widget-image .widget-image-caption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: var(--space-3);
    text-align: center;
}

/* --------------------------------------------------------------------------
   Elementor Icon Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-icon .elementor-icon {
    transition:
        transform 0.2s var(--spring-smooth),
        color 0.2s ease;
}

.webapp-content .elementor-widget-icon .elementor-icon:hover {
    transform: scale(1.1);
}

/* Icon with Background */
.webapp-content .elementor-widget-icon .elementor-icon.elementor-view-stacked {
    border-radius: var(--radius-xl) !important;
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--primary-soft-hover) 100%) !important;
    padding: var(--space-4);
}

.webapp-content .elementor-widget-icon .elementor-icon.elementor-view-framed {
    border-radius: var(--radius-xl) !important;
    border-width: 2px !important;
}

/* --------------------------------------------------------------------------
   Elementor Icon Box Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-icon-box {
    transition:
        transform 0.3s var(--spring-smooth),
        box-shadow 0.3s ease;
}

.webapp-content .elementor-widget-icon-box:hover {
    transform: translateY(-4px);
}

.webapp-content .elementor-widget-icon-box .elementor-icon-box-icon {
    margin-bottom: var(--space-4);
}

.webapp-content .elementor-widget-icon-box .elementor-icon-box-icon .elementor-icon {
    font-size: 32px;
    color: var(--primary);
}

.webapp-content .elementor-widget-icon-box .elementor-icon-box-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-2);
}

.webapp-content .elementor-widget-icon-box .elementor-icon-box-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Elementor Image Box Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-image-box .elementor-image-box-wrapper {
    transition: transform 0.3s var(--spring-smooth);
}

.webapp-content .elementor-widget-image-box:hover .elementor-image-box-wrapper {
    transform: translateY(-4px);
}

.webapp-content .elementor-widget-image-box .elementor-image-box-img img {
    border-radius: var(--radius-xl);
}

.webapp-content .elementor-widget-image-box .elementor-image-box-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.webapp-content .elementor-widget-image-box .elementor-image-box-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Elementor Social Icons Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-social-icons .elementor-social-icon {
    border-radius: var(--radius-lg) !important;
    transition:
        transform 0.2s var(--spring-smooth),
        box-shadow 0.2s ease;
}

.webapp-content .elementor-widget-social-icons .elementor-social-icon:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------------
   Elementor Star Rating Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-star-rating .elementor-star-rating {
    font-size: 18px;
    color: #F59E0B;
}

.webapp-content .elementor-widget-star-rating .elementor-star-rating i {
    transition: transform 0.2s var(--spring-bounce);
}

.webapp-content .elementor-widget-star-rating:hover .elementor-star-rating i {
    animation: starPulse 0.3s ease;
}

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

/* --------------------------------------------------------------------------
   Elementor Testimonial Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-testimonial .elementor-testimonial-wrapper {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 4px 8px rgba(0, 0, 0, 0.02),
        0 8px 16px rgba(0, 0, 0, 0.02);
}

.webapp-content .elementor-widget-testimonial .elementor-testimonial-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: var(--space-6);
    font-style: normal;
}

.webapp-content .elementor-widget-testimonial .elementor-testimonial-image img {
    border-radius: var(--radius-full);
    box-shadow: 0 0 0 3px var(--surface), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.webapp-content .elementor-widget-testimonial .elementor-testimonial-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.webapp-content .elementor-widget-testimonial .elementor-testimonial-job {
    font-size: 13px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Elementor Alert Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-alert .elementor-alert {
    border-radius: var(--radius-xl) !important;
    padding: var(--space-5) var(--space-6);
    border-width: 0 !important;
    border-left-width: 4px !important;
}

.webapp-content .elementor-widget-alert .elementor-alert-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.webapp-content .elementor-widget-alert .elementor-alert-description {
    font-size: 14px;
    line-height: 1.6;
}

.webapp-content .elementor-widget-alert .elementor-alert-info {
    background: var(--info-soft);
    border-color: var(--info) !important;
}

.webapp-content .elementor-widget-alert .elementor-alert-success {
    background: var(--success-soft);
    border-color: var(--success) !important;
}

.webapp-content .elementor-widget-alert .elementor-alert-warning {
    background: var(--warning-soft);
    border-color: var(--warning) !important;
}

.webapp-content .elementor-widget-alert .elementor-alert-danger {
    background: var(--error-soft);
    border-color: var(--error) !important;
}

.webapp-content .elementor-widget-alert .elementor-alert-dismiss {
    border-radius: var(--radius-md);
    transition:
        background-color 0.2s ease,
        transform 0.2s var(--spring-smooth);
}

.webapp-content .elementor-widget-alert .elementor-alert-dismiss:hover {
    background: rgba(0, 0, 0, 0.1);
}

.webapp-content .elementor-widget-alert .elementor-alert-dismiss:active {
    transform: scale(0.9);
}

/* --------------------------------------------------------------------------
   Elementor Divider Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-divider .elementor-divider {
    padding: var(--space-4) 0;
}

.webapp-content .elementor-widget-divider .elementor-divider-separator {
    border-top-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="dark"] .webapp-content .elementor-widget-divider .elementor-divider-separator {
    border-top-color: rgba(255, 255, 255, 0.06) !important;
}

/* --------------------------------------------------------------------------
   Elementor Spacer - Consistent
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-spacer {
    /* Ensure spacers maintain consistent rhythm */
}

/* --------------------------------------------------------------------------
   Elementor Text Editor Widget - Premium Typography
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-text-editor {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.webapp-content .elementor-widget-text-editor h1,
.webapp-content .elementor-widget-text-editor h2,
.webapp-content .elementor-widget-text-editor h3,
.webapp-content .elementor-widget-text-editor h4,
.webapp-content .elementor-widget-text-editor h5,
.webapp-content .elementor-widget-text-editor h6 {
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

.webapp-content .elementor-widget-text-editor p {
    margin-bottom: var(--space-4);
}

.webapp-content .elementor-widget-text-editor a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.webapp-content .elementor-widget-text-editor a:hover {
    color: var(--primary-hover);
}

.webapp-content .elementor-widget-text-editor ul,
.webapp-content .elementor-widget-text-editor ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}

.webapp-content .elementor-widget-text-editor li {
    margin-bottom: var(--space-2);
}

.webapp-content .elementor-widget-text-editor blockquote {
    border-left: 4px solid var(--primary);
    padding-left: var(--space-5);
    margin: var(--space-6) 0;
    font-style: italic;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Elementor Heading Widget - Premium Typography
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-heading .elementor-heading-title {
    letter-spacing: -0.02em;
    font-feature-settings: 'ss01', 'ss02';
}

/* --------------------------------------------------------------------------
   Elementor Video Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-video .elementor-wrapper {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-elevated-md);
}

.webapp-content .elementor-widget-video .elementor-custom-embed-play {
    transition: transform 0.3s var(--spring-bounce);
}

.webapp-content .elementor-widget-video .elementor-custom-embed-play:hover {
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   Elementor Google Maps Widget - Premium
   -------------------------------------------------------------------------- */

.webapp-content .elementor-widget-google_maps .elementor-custom-embed {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-elevated-sm);
}

/* --------------------------------------------------------------------------
   Dark Mode for Elementor Widgets
   -------------------------------------------------------------------------- */

[data-theme="dark"] .webapp-content .elementor-widget-tabs .elementor-tabs {
    background: var(--surface);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .webapp-content .elementor-widget-tabs .elementor-tabs-wrapper {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .webapp-content .elementor-widget-accordion .elementor-accordion-item,
[data-theme="dark"] .webapp-content .elementor-widget-toggle .elementor-toggle-item {
    background: var(--surface);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .webapp-content .elementor-widget-testimonial .elementor-testimonial-wrapper {
    background: var(--surface);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .webapp-content .elementor-form .elementor-field-textual {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: var(--surface);
}

[data-theme="dark"] .webapp-content .elementor-form .elementor-field-textual:hover {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .webapp-content .elementor-button-wrapper .elementor-button-link {
    border-color: rgba(255, 255, 255, 0.1) !important;
}
