body {
    box-sizing: border-box;
}

/* ========================
   ANIMAÇÕES GLOBAIS
   ======================== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(234, 179, 8, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(234, 179, 8, 0.8), 0 0 30px rgba(234, 179, 8, 0.6);
    }
}

/* ========================
   CLASSES DE ANIMAÇÃO
   ======================== */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.glow-effect {
    animation: glow 2s ease-in-out infinite;
}

/* ========================
   COMPONENTE DE ÍCONE
   ======================== */
.icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 12px;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
}

.icon-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.icon-container:hover::before {
    animation: shimmer 0.5s;
    opacity: 1;
}

.icon-container:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 15px rgba(234, 179, 8, 0.5);
}

.icon-container:active {
    transform: translateY(-1px) scale(0.98);
}

.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-container svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
    display: block;
    flex-shrink: 0;
}

.icon-container:hover svg {
    transform: rotate(5deg);
}

/* Tamanhos de ícones */
.icon-md {
    width: 40px;
    height: 40px;
}

.icon-md svg {
    width: 24px;
    height: 24px;
}

.icon-sm {
    width: 32px;
    height: 32px;
}

.icon-sm svg {
    width: 18px;
    height: 18px;
}

.icon-lg {
    width: 56px;
    height: 56px;
}

.icon-lg svg {
    width: 32px;
    height: 32px;
}

.icon-xl {
    width: 72px;
    height: 72px;
}

.icon-xl svg {
    width: 40px;
    height: 40px;
}

/* Variantes de cor */
.icon-yellow {
    background: transparent;
    box-shadow: none;
    color: #d4af37 !important;
}

.icon-yellow svg {
    fill: none;
    stroke: #d4af37;
    stroke-width: 2.5;
    color: #d4af37;
}

/* Para ícones com fill no SVG (como cookie) */
.icon-yellow svg circle[fill],
.icon-yellow svg path[fill] {
    fill: #3a3a3a;
}

.icon-yellow svg circle[fill="#2a2a2a"],
.icon-yellow svg circle[fill="#1a1a1a"] {
    fill: #2a2a2a;
}

.icon-green {
    background: transparent;
    box-shadow: none;
    color: #10b981 !important;
}

.icon-green svg {
    fill: none;
    stroke: #10b981;
    stroke-width: 2.5;
    color: #10b981;
}

.icon-blue {
    background: transparent;
    box-shadow: none;
    color: #3b82f6 !important;
}

.icon-blue svg {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 2.5;
    color: #3b82f6;
}

.icon-red {
    background: transparent;
    box-shadow: none;
    color: #ef4444 !important;
}

.icon-red svg {
    fill: none;
    stroke: #ef4444;
    stroke-width: 2.5;
    color: #ef4444;
}

.icon-purple {
    background: transparent;
    box-shadow: none;
    color: #8b5cf6 !important;
}

.icon-purple svg {
    fill: none;
    stroke: #8b5cf6;
    stroke-width: 2.5;
    color: #8b5cf6;
}

/* ========================
   CARDS E ELEMENTOS
   ======================== */
.service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(234, 179, 8, 0.1), transparent);
    transition: left 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: #EAB308 !important;
}

.service-card:active {
    transform: translateY(-4px) scale(0.98);
}

.time-slot {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.time-slot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(234, 179, 8, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.time-slot:hover:not(.disabled)::after {
    width: 300px;
    height: 300px;
}

.time-slot:hover:not(.disabled) {
    transform: scale(1.08);
    z-index: 10;
}

.time-slot.selected {
    background: linear-gradient(135deg, #EAB308 0%, #FDE047 100%);
    color: #1a1a1a;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.5);
    animation: pulse 2s infinite;
}

.time-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.date-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.date-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.date-card:hover:not(.disabled)::before {
    opacity: 1;
}

.date-card:hover:not(.disabled) {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.date-card.selected {
    background: linear-gradient(135deg, #EAB308 0%, #FDE047 100%);
    color: #1a1a1a;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.5);
    transform: scale(1.05);
}

.date-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(100%);
}

/* ========================
   BOTÕES MELHORADOS
   ======================== */
button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Botões com gradiente */
.btn-gradient-yellow {
    background: linear-gradient(135deg, #EAB308 0%, #FDE047 100%);
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.4);
}

.btn-gradient-yellow:hover {
    background: linear-gradient(135deg, #FDE047 0%, #EAB308 100%);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.6);
}

.btn-gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-gradient-green:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* ========================
   CARDS DE BARBEIRO
   ======================== */
.barber-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.barber-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s;
}

.barber-card:hover::before {
    transform: scale(1);
}

.barber-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: #EAB308 !important;
}

.barber-card.selected {
    border: 3px solid #EAB308;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.6);
    animation: glow 2s ease-in-out infinite;
}

/* ========================
   MODAIS MELHORADOS
   ======================== */
.modal-backdrop {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* ========================
   INPUTS MELHORADOS
   ======================== */
input, select, textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus, select:focus, textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

/* ========================
   LOADING SPINNER
   ======================== */
.loading-spinner {
    border: 3px solid rgba(234, 179, 8, 0.1);
    border-top: 3px solid #EAB308;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================
   NOTIFICAÇÕES
   ======================== */
.notification {
    animation: slideInRight 0.4s ease-out, fadeIn 0.4s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ========================
   FLUXO DE CAIXA CARDS
   ======================== */
.cash-flow-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cash-flow-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s;
}

.cash-flow-card:hover::before {
    transform: scale(1);
}

.cash-flow-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ========================
   AGENDAMENTOS CARDS
   ======================== */
.appointment-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.appointment-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #EAB308, #FDE047);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.appointment-card:hover::after {
    transform: scaleY(1);
}

.appointment-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ========================
   EFEITOS DE GLOW
   ======================== */
.glow-yellow {
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
}

.glow-yellow:hover {
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.8);
}

/* ========================
   SIDEBAR ANIMATIONS
   ======================== */
#sidebarMenu {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebarMenu.show {
    transform: translateX(0) !important;
}

/* Garantir que o menu seja visível quando mostrar */
@media (max-width: 1024px) {
    #sidebarMenu.show {
        transform: translateX(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ========================
   RESPONSIVIDADE
   ======================== */
@media (max-width: 640px) {
    .fixed.inset-0 {
        padding: 0.5rem;
    }
    
    .grid {
        gap: 0.5rem;
    }
    
    .bg-gray-800.rounded-2xl {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    button {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    input, select, textarea {
        font-size: 16px;
    }

    .icon-container {
        width: 32px;
        height: 32px;
    }

    .icon-container svg {
        width: 18px;
        height: 18px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .grid {
        gap: 1rem;
    }
    
    .bg-gray-800.rounded-2xl {
        padding: 1.5rem;
    }
}

@media (min-width: 1025px) {
    .grid {
        gap: 1.5rem;
    }
    
    .bg-gray-800.rounded-2xl {
        padding: 2rem;
    }
}

@media (max-width: 1024px) {
    #sidebarMenu {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 40;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        visibility: hidden;
        opacity: 0;
    }
    
    #sidebarMenu.show {
        transform: translateX(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    #adminDashboard .flex-1 {
        margin-left: 0 !important;
    }
}

@media (min-width: 1025px) {
    #sidebarMenu {
        position: relative;
        transform: translateX(0);
    }
    
    #sidebarMenu.show {
        transform: translateX(0);
    }
    
    #adminDashboard .flex {
        gap: 0;
    }
    
    #mainContentArea {
        margin-left: 0 !important;
    }
}

@media (max-width: 640px) {
    .fixed.inset-0.flex {
        align-items: flex-start;
        padding-top: 1rem;
    }
    
    .bg-gray-800.rounded-2xl {
        max-width: calc(100% - 1rem);
        margin: 0.5rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    #dateGrid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #timeSlots {
        grid-template-columns: repeat(3, 1fr);
    }
    
    #modalDateGrid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #modalTimeSlots {
        grid-template-columns: repeat(3, 1fr);
    }

    #barbersGrid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    #dateGrid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    #timeSlots {
        grid-template-columns: repeat(4, 1fr);
    }
    
    #modalDateGrid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    #modalTimeSlots {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    #adminDashboard {
        padding: 0;
    }
    
    #adminDashboard .flex-1 {
        padding: 0.5rem;
    }
    
    #filterSection {
        padding: 1rem;
    }
    
    #appointmentsSection {
        padding: 1rem;
    }
    
    #cashFlowSection {
        padding: 1rem;
    }

    table {
        font-size: 0.875rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
    }

    button,
    a,
    .cursor-pointer {
        min-height: 44px;
        min-width: 44px;
    }
    
    input,
    select,
    textarea {
        min-height: 44px;
    }

    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
    }

    form {
        padding: 0.5rem;
    }
    
    .space-y-3.sm\\:space-y-4 > * + * {
        margin-top: 0.75rem;
    }

    .flex.gap-3 {
        flex-direction: column;
    }
    
    .flex.gap-3 > button {
        width: 100%;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

#filterSection .flex.flex-wrap button {
    margin-right: 0;
    margin-left: 0;
}

/* Estilos para o modal de agendamento */
.date-card-modal.selected {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #1a1a1a;
    font-weight: 600;
}

.service-card-modal.border-green-500 {
    border-color: #10b981 !important;
}

.time-slot-modal.selected {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #1a1a1a;
    font-weight: 600;
}

.border-green-500 {
    border-color: #10b981 !important;
}

.border-red-500 {
    border-color: #ef4444 !important;
}

input:invalid {
    border-color: #ef4444 !important;
}

/* ========================
   ESTILOS DA LANDING-PAGE
   Aplicados em todos os arquivos
   ======================== */

/* Cores da landing-page */
:root {
    --gold: #d4af37;
    --gold-dark: #b8941f;
    --gold-light: #f4d03f;
    --dark-bg: #0a0a0a;
    --dark-card: #1a1a1a;
    --dark-border: #2a2a2a;
}

/* Texto dourado gradiente */
.text-gold {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Botões com estilo da landing-page */
.btn-gold {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #0a0a0a;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    border: none;
    cursor: pointer;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

/* Cards com estilo da landing-page */
.card-landing {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 2px solid #2a2a2a;
    transition: all 0.3s ease;
}

.card-landing:hover {
    border-color: #d4af37;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

/* Inputs com estilo da landing-page */
.input-landing {
    background: #1a1a1a !important;
    border: 2px solid #2a2a2a !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.input-landing:focus {
    outline: none !important;
    border-color: #d4af37 !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3) !important;
}

.input-landing::placeholder {
    color: #666 !important;
}
