:root {
    --primary-color: #6366f1;
    /* Indigo vibrant */
    --primary-hover: #4f46e5;
    --secondary-color: #1e293b;
    /* Slate dark */
    --accent-color: #8b5cf6;
    /* Violet */
    --success-color: #10b981;
    /* Emerald */
    --danger-color: #ef4444;
    /* Rose */
    --warning-color: #f59e0b;
    /* Amber */
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --radius: 16px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.01);
    --radius: 16px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.01);
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--content-bg);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    /* Changed to Roboto per request */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.sidebar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

/* Navbar Premium Desktop */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1050;
    /* Garantir que fique acima do jumbotron */
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    z-index: 1100;
    /* Acima da navbar */
}

/* Cards & Containers */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Jumbotron / Hero Section */
.jumbotron {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border-radius: 24px;
    padding: 3rem 2rem;
    color: white;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border: none;
}

.jumbotron::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(50px);
}

/* Tables Styling */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: transparent;
    border-top: none;
    border-bottom: 2px solid #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1.25rem 1rem;
}

.table td {
    border-top: 1px solid #f1f5f9;
    padding: 1.25rem 1rem;
    vertical-align: middle;
    font-weight: 400;
    /* Leve */
}

/* Badges */
.badge {
    padding: 0.5em 1em;
    border-radius: 99px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-success {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background-color: #fef3c7;
    color: #b45309;
}

.badge-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.badge-info {
    background-color: #e0e7ff;
    color: #4338ca;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.5);
}

/* MOBILE NATIVE APP LOOK */
@media (max-width: 768px) {
    body {
        padding-bottom: 85px;
        /* Altura da Bottom Nav */
        background-color: #f1f5f9;
    }

    .navbar {
        display: none !important;
    }

    .container {
        padding: 15px;
    }

    /* Transform Table to Native List Cards */
    .table-responsive {
        border: none;
        overflow: hidden;
    }

    .table thead {
        display: none;
    }

    .table tr {
        display: block;
        margin-bottom: 1rem;
        background: white;
        border-radius: 16px;
        padding: 1.25rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.02);
    }

    .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0 !important;
        border: none !important;
    }

    .table td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-muted);
        font-size: 0.8rem;
        text-transform: capitalize;
    }

    .table td.text-right {
        margin-top: 1rem;
        padding-top: 1rem !important;
        border-top: 1px solid #f1f5f9 !important;
        justify-content: space-around;
        gap: 10px;
    }

    .table td.text-right::before {
        display: none;
    }

    .table td.text-right .btn {
        flex: 1;
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    /* Bottom Navigation */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        height: 75px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        justify-content: space-around;
        align-items: center;
        z-index: 2000;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-nav-item {
        color: #94a3b8;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.7rem;
        font-weight: 500;
        transition: all 0.3s;
        width: 20%;
    }

    .mobile-nav-item i {
        font-size: 1.4rem;
        margin-bottom: 4px;
        transition: transform 0.2s;
    }

    .mobile-nav-item.active {
        color: var(--primary-color);
    }

    .mobile-nav-item.active i {
        transform: translateY(-3px);
    }

    h1 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.jumbotron {
    animation: fadeIn 0.5s ease-out forwards;
}

/* OFF-CANVAS SIDEBAR (MOBILE) */
.offcanvas-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--secondary-color);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    padding: 2rem 1.5rem;
    color: white;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

.offcanvas-sidebar.active {
    left: 0;
}

.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(3px);
}

.offcanvas-overlay.active {
    display: block;
}

.sidebar-link {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.sidebar-link i {
    width: 24px;
    margin-right: 15px;
    font-size: 1.2rem;
}

/* Mobile Header Bar */
.mobile-top-bar {
    display: none;
    position: sticky;
    top: 0;
    background: #fff;
    padding: 12px 15px;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .mobile-top-bar {
        display: flex;
    }
}

.menu-toggle-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.4rem;
    padding: 5px;
}

/* Advertisement Banner */
.ads-banner {
    background: linear-gradient(90deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 15px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ads-banner::after {
    content: 'PATROCINADO';
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.ads-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ads-image {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ads-text h6 {
    margin-bottom: 2px;
    color: #f8fafc;
}

.ads-text p {
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.ads-upgrade-btn {
    margin-left: auto;
    background: var(--primary-color);
    color: white !important;
    font-size: 0.8rem;
    padding: 6px 15px;
    border-radius: 8px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.3s;
}

.ads-upgrade-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .ads-banner {
        margin: 10px 0 20px 0;
    }

}

/* =========================================
   NEW VERTICAL LAYOUT STYLES
   ========================================= */

:root {
    --sidebar-width: 260px;
    --header-height: 70px;
    --header-bg: #6366f1;
    /* Purple */
    --sidebar-bg: #ffffff;
    --content-bg: #f8fafc;
}

body {
    background-color: var(--content-bg);
}

/* Layout Wrapper */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (Desktop) */
.sidebar-desktop {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--sidebar-bg);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    /* Soft shadow instead of border */
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-color);
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1rem;
}

/* Sidebar Links */
.nav-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 1.5rem 0 0.5rem 0.8rem;
}

.nav-item-vertical {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none !important;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 400;
    font-size: 12px;
    margin-bottom: 0.2rem;
}

.nav-item-vertical i {
    width: 24px;
    margin-right: 10px;
    font-size: 1.1rem;
    text-align: center;
}

.nav-item-vertical:hover {
    background: rgba(99, 102, 241, 0.08);
    /* Primary fade */
    color: var(--primary-color);
}

.nav-item-vertical.active {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

/* Top Header */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background: var(--header-bg);
    z-index: 1030;
    transition: left 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-search {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.header-search input {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    color: white;
    width: 100%;
    transition: background 0.2s;
}

.header-search input:focus {
    background: rgba(255, 255, 255, 0.3);
    outline: none;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-icon-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.header-icon-btn:hover {
    color: white;
}

.header-icon-btn .badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--header-bg);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Main Content Area */
.content-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 2rem;
    transition: all 0.3s ease;
    width: calc(100% - var(--sidebar-width));
}

/* Mobile Toggle - Modified to be visible on desktop too usually, but we will use a specific class for desktop toggle */
.mobile-toggle {
    display: block;
    /* Always show, but adjust icon/behavior via JS if needed, or stick to same button */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    margin-right: 1rem;
    cursor: pointer;
}

@media (min-width: 992px) {
    .mobile-toggle {
        display: block;
        /* Ensure it is visible on desktop for collapsing */
    }
}

/* Collapsed Sidebar State (Desktop) */
body.sidebar-collapsed {
    --sidebar-width: 80px;
}

body.sidebar-collapsed .sidebar-brand span,
body.sidebar-collapsed .nav-item-vertical span,
body.sidebar-collapsed .nav-category {
    display: none;
}

body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-brand img {
    max-height: 30px;
}

body.sidebar-collapsed .nav-item-vertical {
    justify-content: center;
    padding: 0.8rem 0;
}

body.sidebar-collapsed .nav-item-vertical i {
    margin-right: 0;
    font-size: 1.3rem;
}

body.sidebar-collapsed .sidebar-content {
    padding: 1.5rem 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar-desktop {
        transform: translateX(-100%);
        width: 260px;
        /* Force width when showing */
    }

    .sidebar-desktop.show {
        transform: translateX(0);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
        z-index: 1050; /* Above overlay (1035) */
    }

    .top-header {
        left: 0;
        padding: 0 1rem;
    }

    .content-wrapper {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem 1rem;
    }

    .mobile-toggle {
        display: block;
    }

    .header-search {
        /* Hide search on small mobile? Or compact? */
        display: none;
    }
}

/* Overlay for Mobile Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    display: none;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
}