/* ============================================================
   components.css — Componentes Específicos
   Portal ADC Embraer Botucatu
   ============================================================ */

/* ── CAROUSEL DE BANNERS ──────────────────────────────────── */
.carousel-section {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    margin: 0 var(--content-padding);
    background: var(--color-bg-secondary);
    box-shadow: var(--shadow-lg);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    height: clamp(180px, 45vw, 320px);
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gradiente sobre a imagem */
.carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10,22,40,0.85) 0%,
        rgba(10,22,40,0.3) 50%,
        transparent 100%
    );
}

.carousel-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-5);
    z-index: 1;
}

.carousel-slide-title {
    font-family: var(--font-display);
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-2);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.carousel-slide-desc {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: var(--space-3);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.4);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    width: 20px;
    background: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent);
}

/* Nav Arrows */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(10,22,40,0.6);
    border: 1px solid var(--color-border);
    color: var(--color-white);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition-fast);
    backdrop-filter: blur(8px);
}

.carousel-prev { left: var(--space-3); }
.carousel-next { right: var(--space-3); }

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0,212,255,0.2);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
}

.carousel-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: calc(var(--space-6) + 14px);
    transform: translateX(-50%);
    z-index: 2;
    display: none;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 16px;
    border-radius: var(--radius-full);
    background: rgba(10,22,40,0.52);
    border: 1px solid rgba(255,255,255,0.22);
    backdrop-filter: blur(10px);
    color: #FFFFFF;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.carousel-scroll-hint__text {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.carousel-scroll-hint__icon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.carousel-scroll-hint__icon span {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
    transform: rotate(45deg);
    animation: carouselScrollHint 1.5s ease-in-out infinite;
}

.carousel-scroll-hint__icon span:last-child {
    animation-delay: 0.2s;
    opacity: 0.72;
}

.carousel-scroll-hint:hover {
    background: rgba(10,22,40,0.82);
    border-color: rgba(0,212,255,0.45);
    box-shadow: var(--shadow-glow);
}

.carousel-scroll-hint--static {
    position: static;
    transform: none;
}

@keyframes carouselScrollHint {
    0%, 100% {
        transform: rotate(45deg) translate(0, 0);
        opacity: 0.45;
    }
    50% {
        transform: rotate(45deg) translate(4px, 4px);
        opacity: 1;
    }
}

@media (min-width: 992px) {
    .carousel-scroll-hint,
    .carousel-scroll-hint--static {
        display: inline-flex;
    }

    .carousel-slide {
        height: clamp(380px, 40vw, 520px);
    }
}

/* ── CARTEIRINHA DIGITAL ──────────────────────────────────── */
.wallet-card {
    background: var(--gradient-hero);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    max-width: 380px;
    margin: 0 auto;
}

/* Padrão de fundo da carteirinha */
.wallet-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0,212,255,0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.wallet-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(123,97,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.wallet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.wallet-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wallet-plan-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(0,212,255,0.2);
    color: var(--color-accent);
    border: 1px solid rgba(0,212,255,0.4);
}

.wallet-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--color-accent);
    box-shadow: 0 0 20px var(--color-accent-glow);
    margin-bottom: var(--space-4);
}

.wallet-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-1);
}

.wallet-id {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-5);
}

.wallet-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
}

.wallet-info-item label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 3px;
}

.wallet-info-item span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-white);
}

.wallet-qr {
    display: flex;
    justify-content: center;
    background: rgba(255,255,255,0.97);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    margin-top: var(--space-4);
}

.wallet-qr canvas,
.wallet-qr img {
    display: block;
    width: 100px;
    height: 100px;
}

/* ── ADMIN SIDEBAR ────────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--color-bg-secondary);
    border-right: var(--glass-border);
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    overflow: hidden;
    /* display: none; */ /* Removing default none */
    z-index: 100;
}

@media (min-width: 768px) {
    .admin-sidebar { display: flex; flex-direction: column; }
    .admin-main    { margin-left: 240px; flex: 1; padding: var(--space-6); }
}

@media (max-width: 767px) {
    .admin-sidebar {
        display: flex;
        flex-direction: row;
        width: 100%;
        height: auto;
        top: auto;
        bottom: 0;
        border-right: none;
        border-top: var(--glass-border);
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        z-index: 999;
        background: var(--color-bg-glass);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .admin-sidebar > div:not(nav) { display: none !important; }
    .admin-sidebar > nav {
        display: flex;
        flex-direction: row;
        width: 100%;
        margin: 0;
        padding: 0 !important;
        overflow-x: auto;
    }
    .admin-sidebar .sidebar-nav-section { display: none !important; }
    .admin-sidebar .sidebar-nav-item {
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        flex: 1 0 auto;
        padding: var(--space-2) var(--space-3);
        font-size: 0.65rem;
        text-align: center;
        min-width: 70px;
    }
    .admin-sidebar .sidebar-nav-item span.stat-card__icon, 
    .admin-sidebar .sidebar-nav-item span:first-child {
        font-size: 1.25rem;
        margin: 0;
    }
    .admin-sidebar .sidebar-nav-item::before { display: none; }
    .admin-main { margin-bottom: 60px; padding: var(--space-4); }
}

.admin-main { flex: 1; padding: var(--space-4); }

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    cursor: pointer;
}

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

.sidebar-nav-item:hover {
    background: var(--color-bg-glass);
    color: var(--color-white);
}

.sidebar-nav-item.active {
    color: var(--color-accent);
    background: rgba(0,212,255,0.06);
}

.sidebar-nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
}

.sidebar-nav-section {
    padding: var(--space-2) var(--space-5) var(--space-1);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    opacity: 0.5;
    margin-top: var(--space-4);
}

/* ── STATS CARDS (Dashboard) ──────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
    background: var(--color-bg-glass);
    backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-card:hover::before { opacity: 1; }

.stat-card__icon {
    font-size: 1.6rem;
    margin-bottom: var(--space-3);
    display: block;
}

.stat-card__value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-white);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.stat-card__label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* ── TABELAS ──────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: var(--glass-border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead th {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background: var(--color-bg-secondary);
    border-bottom: var(--glass-border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--color-text);
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background: var(--color-bg-glass);
}

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

/* ── TOGGLE SWITCH ────────────────────────────────────────── */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: var(--color-text-muted);
    border-radius: 50%;
    transition: all var(--transition-spring);
}

.toggle input:checked + .toggle-slider {
    background: rgba(0,212,255,0.2);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px) translateY(-50%);
    background: var(--color-accent);
}

/* ── DROPDOWN MENU ────────────────────────────────────────── */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 180px;
    background: var(--color-bg-secondary);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.97);
    transition: all var(--transition-spring);
    z-index: var(--z-modal);
}

.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    color: var(--color-text);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--color-bg-glass);
    color: var(--color-white);
}

.dropdown-item.danger       { color: var(--color-danger); }
.dropdown-item.danger:hover { background: rgba(255,82,82,0.08); }

.dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-1) 0;
}

/* ── AVATAR ───────────────────────────────────────────────── */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--color-border);
    transition: border-color var(--transition-fast);
}

.avatar:hover { border-color: var(--color-accent); }

.avatar-sm { width: 28px; height: 28px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; border-width: 3px; }

/* Avatar placeholder (sem foto) */
.avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-bg-primary);
    flex-shrink: 0;
}

/* ── PLANS CARDS ──────────────────────────────────────────── */
.plan-card {
    background: var(--color-bg-glass);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    position: relative;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.plan-card.featured {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
    background: rgba(0,212,255,0.05);
}

.plan-card.featured::before {
    content: '⭐ Mais Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-accent);
    color: var(--color-bg-primary);
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    border-color: var(--color-border-hover);
}

.plan-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-white);
}

.plan-price {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plan-price small {
    font-size: 0.9rem;
    font-weight: 400;
    -webkit-text-fill-color: var(--color-text-muted);
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    flex: 1;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    color: var(--color-text);
}

.plan-feature::before {
    content: '✓';
    color: var(--color-success);
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}
