/**
 * ALERSON TOOLS — CSS Customizado
 * Estilos modernos para blog/ferramentas
 * Cores: #be1615 (vermelho), #000000 (preto), #1f1f1f (cinza escuro), #ffffff (branco)
 * Font: Inter (sans-serif moderno)
 */

/* ═══════════════════════════════════════════════════════════════
   BASE & TIPOGRAFIA
   ═══════════════════════════════════════════════════════════════ */

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-feature-settings: 'ss01', 'ss02', 'cv01', 'cv03';
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR PÚBLICO
   ═══════════════════════════════════════════════════════════════ */

.nav-link {
    color: #4B5563;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #000000;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #be1615;
    transition: width 0.3s ease;
}

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

.btn-ghost {
    padding: 0.625rem 1.25rem;
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 9999px;
    border: 1px solid #E5E7EB;
    transition: all 0.2s ease;
    background: white;
}

.btn-ghost:hover {
    border-color: #000000;
    background: white;
}

.btn-primary {
    padding: 0.625rem 1.25rem;
    background-color: #be1615;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background-color: #000000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    transition: all 0.15s ease;
    border-radius: 0.5rem;
    margin: 0 0.25rem;
}

.dropdown-item:hover {
    background-color: #F9FAFB;
    color: #000000;
}

.dropdown-item:active {
    background-color: #F3F4F6;
}

/* ═══════════════════════════════════════════════════════════════
   MENU MOBILE OVERLAY
   ═══════════════════════════════════════════════════════════════ */

.mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.mobile-menu.hidden {
    opacity: 0;
    pointer-events: none;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    font-weight: 500;
    font-size: 1rem;
    color: #E5E7EB;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.mobile-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.mobile-menu-link:active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN/USER SIDEBAR
   ═══════════════════════════════════════════════════════════════ */

.admin-sidebar,
.user-sidebar {
    width: 280px;
    background: #1f1f1f;
    border-right: 1px solid #2D2D2D;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 40;
}

.admin-sidebar-item,
.user-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    color: #9CA3AF;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar-item:hover,
.user-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-left-color: #be1615;
}

.admin-sidebar-item.active,
.user-sidebar-item.active {
    background: rgba(190, 22, 21, 0.1);
    color: #ffffff;
    border-left-color: #be1615;
}

.admin-sidebar-item.active svg,
.user-sidebar-item.active svg {
    color: #be1615;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD CONTENT AREA
   ═══════════════════════════════════════════════════════════════ */

.admin-content,
.user-content {
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
    background: #ffffff;
}

@media (max-width: 768px) {
    .admin-content,
    .user-content {
        margin-left: 0;
        padding: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD STATS CARDS
   ═══════════════════════════════════════════════════════════════ */

.stat-card {
    background: #1f1f1f;
    border: 1px solid #2D2D2D;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: #be1615;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(190, 22, 21, 0.1);
}

.stat-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-center;
    background: rgba(190, 22, 21, 0.1);
    color: #be1615;
    margin-bottom: 1rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.stat-card-label {
    font-size: 0.875rem;
    color: #9CA3AF;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════════════════════════ */

.flash-message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    max-width: 28rem;
    z-index: 9999;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(2rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flash-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10B981;
    color: #10B981;
}

.flash-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #EF4444;
    color: #EF4444;
}

.flash-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid #FBBF24;
    color: #FBBF24;
}

.flash-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3B82F6;
    color: #3B82F6;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    color: #111827;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #be1615;
    box-shadow: 0 0 0 3px rgba(190, 22, 21, 0.1);
}

.form-input::placeholder {
    color: #9CA3AF;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-error {
    font-size: 0.875rem;
    color: #EF4444;
    margin-top: 0.375rem;
}

/* Admin/Dashboard Forms (dark theme) */
.admin-sidebar ~ * .form-input,
.user-sidebar ~ * .form-input,
.bg-black .form-input {
    background: #000000;
    border-color: #374151;
    color: #ffffff;
}

.admin-sidebar ~ * .form-input:focus,
.user-sidebar ~ * .form-input:focus,
.bg-black .form-input:focus {
    border-color: #be1615;
    background: #000000;
}

.admin-sidebar ~ * .form-label,
.user-sidebar ~ * .form-label,
.bg-\[#1f1f1f\] .form-label {
    color: #D1D5DB;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Custom scrollbar for admin/user panels */
.admin-sidebar::-webkit-scrollbar,
.user-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track,
.user-sidebar::-webkit-scrollbar-track {
    background: #1f1f1f;
}

.admin-sidebar::-webkit-scrollbar-thumb,
.user-sidebar::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover,
.user-sidebar::-webkit-scrollbar-thumb:hover {
    background: #be1615;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .admin-sidebar,
    .user-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.active,
    .user-sidebar.active {
        transform: translateX(0);
    }

    body {
        padding-bottom: 4rem; /* Space for bottom nav */
    }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-slide-up {
    animation: slideUp 0.4s ease;
}

/* ═══════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════ */

@media print {
    .navbar-desktop,
    .mobile-menu,
    .admin-sidebar,
    .user-sidebar,
    footer {
        display: none;
    }
}
