:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --bg: #f0f2f5;
    --white: #ffffff;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    margin: 0;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--primary);
    color: white;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.user-info-side {
    text-align: center;
    margin-bottom: 40px;
}

.avatar {
    width: 70px;
    height: 70px;
    background: var(--accent);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-btn {
    background: none;
    border: none;
    color: #bdc3c7;
    padding: 12px 15px;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.3s;
}

.nav-btn:hover,
.nav-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.logout {
    margin-top: auto;
    color: #e74c3c;
}

/* Conteúdo Principal */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* .header-tab h1 {
    color: var(--primary);
    margin-bottom: 5px;
}

.header-tab p {
    color: #7f8c8d;
    margin-bottom: 30px;
} */

.header-tab {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;

    flex-wrap: wrap;
}

.header-info h1 {

    font-size: 34px;

    color: var(--primary);

    margin-bottom: 8px;
}

.header-info p {

    color: #7f8c8d;

    font-size: 16px;
}

.btn-catalogo-header {

    height: 48px;

    padding: 0 22px;

    border-radius: 14px;

    background: #2563eb;

    color: white;

    text-decoration: none;

    display: flex;
    align-items: center;
    gap: 12px;

    font-weight: 600;

    transition: .2s;

    flex-shrink: 0;
}

.btn-catalogo-header:hover {

    background: #1d4ed8;

    transform: translateY(-2px);
}

.btn-catalogo-header i {

    font-size: 15px;
}

/* Meus Materiais Vazio */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.empty-state i {
    font-size: 4rem;
    color: #dcdde1;
    margin-bottom: 20px;
}

.btn-catalog {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

/* Cards de Configuração */
.settings-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.settings-card h3 {
    margin-bottom: 20px;
    color: var(--primary);
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 10px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.btn-save {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.btn-alt {
    background: var(--accent);
}

hr {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid #eee;
}

/* ===============================
    CARD DOS MATERIAIS COMPRADOS 
    ==============================*/
.material-card {

    display: flex;
    align-items: center;
    gap: 20px;

    background: #111827;

    border-radius: 20px;

    padding: 18px;

    border: 1px solid rgba(255, 255, 255, 0.06);

    margin-bottom: 18px;

    transition: .2s;
}

.material-card:hover {

    transform: translateY(-3px);

    border-color: rgba(59, 130, 246, 0.4);
}

.material-thumb {

    width: 120px;
    height: 90px;

    flex-shrink: 0;

    overflow: hidden;

    border-radius: 14px;
}

.material-thumb img {

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.material-info {

    flex: 1;
}

.material-info h3 {

    font-size: 20px;

    margin-bottom: 15px;

    color: white;
}

.material-actions {

    display: flex;
    gap: 12px;

    flex-wrap: wrap;
}

.btn-material {

    height: 42px;

    padding: 0 18px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    gap: 10px;

    text-decoration: none;

    font-weight: 600;

    transition: .2s;
}

.btn-material i {

    font-size: 15px;
}

.btn-material.acessar {

    background: #2563eb;
    color: white;
}

.btn-material.acessar:hover {

    background: #1d4ed8;
}

.btn-material.baixar {

    background: #10b981;
    color: white;
}

.btn-material.baixar:hover {

    background: #059669;
}

/* ===============
    PAGINATION
    ============== */
.pagination {

    margin-top: 35px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 20px;
}

.page-btn {

    width: 44px;
    height: 44px;

    border: none;

    border-radius: 12px;

    background: #1e293b;

    color: white;

    cursor: pointer;

    transition: .2s;
}

.page-btn:hover {

    background: #2563eb;

    transform: translateY(-2px);
}

.page-btn:disabled {

    opacity: .4;

    cursor: not-allowed;

    transform: none;
}

.page-info {

    color: #cbd5e1;

    font-weight: 600;
}


@media (max-width: 768px) {

    * {
        min-width: 0;
    }

    body,
    html {
        overflow-x: hidden;
    }

    .main-content {
        width: 100%;
        overflow-x: hidden;
    }

    .grid-materiais {
        width: 100%;
    }

    .dashboard-container {
        flex-direction: column;
    }

    /* ======================================================
       SIDEBAR MOBILE
       ====================================================== */

    .sidebar {
        width: 100%;

        padding: 12px;

        flex-direction: column;

        gap: 12px;

        position: sticky;
        top: 0;

        z-index: 999;

        overflow: hidden;
    }

    .user-info-side {
        display: flex;

        align-items: center;

        gap: 12px;

        margin-bottom: 0;

        text-align: left;
    }

    .avatar {
        width: 45px;
        height: 45px;

        font-size: 1rem;

        margin: 0;
    }

    nav {
        display: flex;

        flex-direction: row;

        gap: 8px;

        overflow-x: auto;

        padding-bottom: 4px;

        scrollbar-width: none;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    .nav-btn {
        white-space: nowrap;

        flex-shrink: 0;

        padding: 10px 14px;

        font-size: 0.85rem;

        border-radius: 10px;
    }

    .logout {
        margin-top: 0;
    }

    /* ======================================================
       CONTEÚDO
       ====================================================== */

    .main-content {
        padding: 18px 14px 30px;
    }

    .header-tab {
        flex-direction: column;

        align-items: stretch;

        gap: 14px;
    }

    .header-info h1 {
        font-size: 1.7rem;
    }

    .header-info p {
        font-size: 0.95rem;
    }

    .btn-catalogo-header {
        width: 100%;

        justify-content: center;

        border-radius: 12px;
    }

    /* ======================================================
       MATERIAL CARD
       ====================================================== */

       .material-card {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .material-thumb {
        width: 100%;
        height: 180px;
        border-radius: 14px;
    }

    .material-thumb img {
        width: 100%;
        display: block;
    }

    .material-info h3 {
        font-size: 1rem;

        line-height: 1.4;

        margin-bottom: 14px;
    }

    .material-actions {
        flex-direction: column;

        width: 100%;

        gap: 10px;
    }

    .btn-material {
        width: 100%;

        justify-content: center;

        height: 46px;

        border-radius: 12px;

        font-size: 0.92rem;
    }

    /* ======================================================
       SETTINGS
       ====================================================== */

    .settings-card {
        padding: 20px;

        border-radius: 16px;
    }

    .input-group input {
        font-size: 16px;
    }

    /* ======================================================
       PAGINAÇÃO
       ====================================================== */

    .pagination {
        gap: 10px;

        margin-top: 24px;
    }

    .page-btn {
        width: 40px;
        height: 40px;
    }

    .page-info {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {

    .header-info h1 {
        font-size: 1.45rem;
    }

    .material-thumb {
        height: 160px;
    }

    .material-info h3 {
        font-size: 0.95rem;
    }

    .btn-material {
        font-size: 0.88rem;
    }

    .settings-card {
        padding: 16px;
    }
}