/**
 * VirtualNutri+ - Modern UI 2025
 * Ultra-modern design with glassmorphism, microinteractions & smooth animations
 * Inspirado nas últimas tendências de UI/UX
 * Author: Claude Code 2025
 */

/* ========================================
   MODERN GLASSMORPHISM EFFECTS
   ======================================== */

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px 0 rgba(0, 112, 74, 0.08),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 20px 60px 0 rgba(0, 112, 74, 0.15),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.7);
}

.glass-card-dark {
    background: rgba(0, 112, 74, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 168, 98, 0.2);
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* ========================================
   MODERN CARDS WITH DEPTH
   ======================================== */

.card {
    background: #ffffff;
    border: none;
    border-radius: 24px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--brand-primary),
        var(--brand-secondary),
        var(--brand-accent)
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 12px 24px rgba(0, 112, 74, 0.1),
        0 24px 48px rgba(0, 112, 74, 0.08);
}

/* ========================================
   SMOOTH MICROINTERACTIONS
   ======================================== */

.btn,
button,
.form-control,
.form-select,
input,
textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   ELEGANT FORM CONTROLS
   ======================================== */

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 14px 20px;
    font-size: 15px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus,
.form-select:focus {
    background: #ffffff;
    border-color: var(--brand-secondary);
    box-shadow:
        0 0 0 4px rgba(0, 168, 98, 0.1),
        0 4px 12px rgba(0, 168, 98, 0.15);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #a0a0a0;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.form-control:focus::placeholder {
    opacity: 0.4;
}

/* ========================================
   MODERN INPUT GROUPS
   ======================================== */

.input-group {
    position: relative;
}

.input-group-text {
    background: linear-gradient(135deg, rgba(0, 168, 98, 0.05), rgba(0, 112, 74, 0.08));
    border: 2px solid transparent;
    color: var(--brand-primary);
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* ========================================
   PREMIUM BUTTONS
   ======================================== */

.btn-primary {
    background: linear-gradient(135deg, #00A862 0%, #00704A 100%);
    border: none;
    box-shadow:
        0 4px 12px rgba(0, 168, 98, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.03em;
    position: relative;
    z-index: 1;
}

.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #00704A 0%, #00583D 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

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

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 24px rgba(0, 168, 98, 0.4),
        0 2px 8px rgba(0, 112, 74, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow:
        0 4px 12px rgba(0, 168, 98, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Accent Button */
.btn-accent {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    border: none;
    box-shadow:
        0 4px 12px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ========================================
   MODERN BADGES & PILLS
   ======================================== */

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.badge-success {
    background: linear-gradient(135deg, rgba(0, 168, 98, 0.9), rgba(0, 112, 74, 0.9));
    color: #ffffff;
}

.badge-warning {
    background: linear-gradient(135deg, rgba(242, 169, 0, 0.9), rgba(212, 175, 55, 0.9));
    color: #ffffff;
}

.badge-danger {
    background: linear-gradient(135deg, rgba(214, 43, 31, 0.9), rgba(180, 36, 26, 0.9));
    color: #ffffff;
}

/* ========================================
   SMOOTH PAGE TRANSITIONS
   ======================================== */

.page-content {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========================================
   MODERN SHADOWS & DEPTH
   ======================================== */

.shadow-soft {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.04),
        0 8px 32px rgba(0, 0, 0, 0.04);
}

.shadow-medium {
    box-shadow:
        0 4px 12px rgba(0, 112, 74, 0.08),
        0 8px 24px rgba(0, 112, 74, 0.06),
        0 16px 48px rgba(0, 112, 74, 0.04);
}

.shadow-strong {
    box-shadow:
        0 8px 24px rgba(0, 112, 74, 0.12),
        0 16px 48px rgba(0, 112, 74, 0.10),
        0 24px 80px rgba(0, 112, 74, 0.08);
}

/* ========================================
   ELEGANT HOVER STATES
   ======================================== */

.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-glow:hover {
    box-shadow:
        0 0 20px rgba(0, 168, 98, 0.4),
        0 0 40px rgba(0, 168, 98, 0.2);
}

/* ========================================
   MODERN PROGRESS BARS
   ======================================== */

.progress {
    height: 8px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.05);
    overflow: visible;
}

.progress-bar {
    border-radius: 20px;
    background: linear-gradient(90deg, var(--brand-secondary), var(--brand-primary));
    box-shadow: 0 2px 8px rgba(0, 168, 98, 0.3);
    position: relative;
    overflow: visible;
}

.progress-bar::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--brand-secondary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px var(--brand-secondary), 0 0 0 6px rgba(0, 168, 98, 0.2);
    }
    50% {
        box-shadow: 0 0 0 3px var(--brand-secondary), 0 0 0 12px rgba(0, 168, 98, 0);
    }
}

/* ========================================
   MODERN CHECKBOXES & RADIOS
   ======================================== */

.form-check-input {
    width: 22px;
    height: 22px;
    border: 2px solid #d0d0d0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--brand-secondary);
    border-color: var(--brand-secondary);
    box-shadow:
        0 0 0 3px rgba(0, 168, 98, 0.1),
        0 2px 8px rgba(0, 168, 98, 0.3);
    transform: scale(1.1);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(0, 168, 98, 0.15);
}

/* ========================================
   LOADING STATES
   ======================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.04) 25%,
        rgba(0, 0, 0, 0.08) 50%,
        rgba(0, 0, 0, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

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

/* ========================================
   MODERN TABLE STYLES
   ======================================== */

.table {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table thead th {
    background: linear-gradient(135deg, rgba(0, 112, 74, 0.08), rgba(0, 168, 98, 0.06));
    border: none;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--brand-primary);
    padding: 16px 20px;
}

.table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table tbody tr:hover {
    background: rgba(0, 168, 98, 0.03);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 168, 98, 0.08);
}

/* ========================================
   MODERN ALERTS
   ======================================== */

.alert {
    border: none;
    border-radius: 16px;
    padding: 18px 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, rgba(0, 168, 98, 0.12), rgba(0, 168, 98, 0.08));
    border-left-color: var(--brand-secondary);
    color: #00583D;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(242, 169, 0, 0.12), rgba(242, 169, 0, 0.08));
    border-left-color: #F2A900;
    color: #8B6F00;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(214, 43, 31, 0.12), rgba(214, 43, 31, 0.08));
    border-left-color: #D62B1F;
    color: #8B1D15;
}

/* ========================================
   MODERN TOOLTIPS
   ======================================== */

[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: rgba(30, 57, 50, 0.95);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 13px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* ========================================
   SMOOTH SCROLL BEHAVIOR
   ======================================== */

html {
    scroll-behavior: smooth;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--brand-secondary) rgba(0, 0, 0, 0.05);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
    border-radius: 10px;
    transition: background 0.3s;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary);
}

/* ========================================
   RESPONSIVE SPACING
   ======================================== */

.section-padding {
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.container-modern {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

/* ========================================
   MODERN GRID LAYOUT
   ======================================== */

.grid-modern {
    display: grid;
    gap: clamp(1rem, 2vw, 2rem);
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

/* ========================================
   ACCESSIBILITY FOCUS STATES
   ======================================== */

*:focus-visible {
    outline: 3px solid rgba(0, 168, 98, 0.5);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .glass-card,
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .btn {
        background: #00704A !important;
        color: #fff !important;
    }
}
