@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --side-bg: #111114;
    --main-bg: #1A1A1F;
    --text-primary: #ffffff;
    --text-muted: #7d899b;
    --active-gradient: linear-gradient(90deg, rgba(0, 157, 255, 0.3) 0%, rgba(0, 157, 255, 0) 100%);
    --cyan-glow: #00d9ff;
    --green-badge: #144633;
    --green-text: #4ade80;
    --badge-cyan-bg: #1d8ebb;
    --badge-cyan-txt: #081220;
    --badge-green-bg: rgba(74, 222, 128, 0.1);
    --badge-green-txt: #4ade80;
    --view-all-link: #1d8ebb;
    --link-light-mode: #fff;
    --border-color: rgba(255, 255, 255, 0.1);
    --sidebar-width: 280px;
    --sidebar-collapsed: 100px;
    --sidebar-bg: #2c2f33;
    --sidebar-text: #ffffff;
}

[data-theme="light"] {
    --side-bg: #ffffff;
    --main-bg: #f4f7fa;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --active-gradient: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0) 100%);
    --cyan-glow: #2563eb;
    --green-badge: #dcfce7;
    --green-text: #166534;
    --badge-cyan-bg: #2563eb;
    --badge-cyan-txt: #ffffff;
    --badge-green-bg: #dcfce7;
    --badge-green-txt: #15803d;
    --view-all-link: #1d8ebb;
    --link-light-mode: #1e293b;
    --border-color: #aeb3b9;
    --sidebar-bg: #5199E4;
    --sidebar-text: #ebeced;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', serif;
    color: var(--text-primary);
}

p{
    font-family: 'Mulish', serif;
    font-weight: 100;
    color: var(--text-primary);
    line-height: 1.6;
}

[data-theme="light"] .nav-item.active {
    background: #ffffff !important;
    color: var(--active-blue) !important;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
    border-radius: 12px;
}

.nav-item.active {
    background: var(--main-bg);
    color: white !important;
    border-radius: 12px;
}

.badge-cyan {
    background: var(--badge-cyan-bg);
    color: var(--badge-cyan-txt);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-left: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


.btn-close {
    background: none;
    opacity: 1;
}

.btn-close::before {
    content: "✕";
    font-size: 18px;
    color: var(--text-primary);
}

.badge-green {
    background: var(--badge-green-bg);
    color: var(--badge-green-txt);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: auto;
}

.sidebar.collapsed .badge-cyan,
.sidebar.collapsed .badge-green {
    display: none;
}

body {
    background-color: var(--side-bg);
    color: var(--text-primary);
    font-family: 'Raleway', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    transition: background 0.3s;
}

.main-wrapper {
    background-color: var(--sidebar-bg);
    display: flex;
    height: 100vh;
    overflow: hidden;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    padding: 30px 20px;
    position: sticky;
    top: 0;
    border-right: none;
    display: flex;
    flex-direction: column;
    z-index: 1050;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
    padding: 30px 0;
}

.sidebar.collapsed .nav-label, 
.sidebar.collapsed .user-info, 
.sidebar.collapsed .section-title,
.sidebar.collapsed .badge-cyan,
.sidebar.collapsed .badge-green,
.sidebar.collapsed .badge-custom,
.sidebar.collapsed .add-icon,
.sidebar.collapsed .mode-btn span,
.sidebar.collapsed .icon-sub,
.sidebar.collapsed .view-all {
    display: none;
}

.sidebar.collapsed .profile-section,
.sidebar.collapsed .nav-item,
.sidebar.collapsed .team-member {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.collapsed .nav-item.active {
    background: var(--main-bg);
    box-shadow: none;
}

.toggle-sidebar {
    position: absolute;
    right: -15px;
    top: 40px;
    width: 30px;
    height: 30px;
    background: #4ac8de;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(74, 222, 215, 0.4);
}

.sidebar.collapsed .toggle-sidebar {
    transform: rotate(180deg);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 35px;
}

.avatar-wrapper {
    position: relative;
    min-width: 55px;
    height: 55px;
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.status-dot {
    position: absolute;
    top: 5px;
    right: 0;
    width: 12px;
    height: 12px;
    background: #4ade80;
    border: 2px solid var(--side-bg);
    border-radius: 50%;
}

.user-name {
    font-weight: 600;
    display: block;
    white-space: nowrap;
    color: var(--sidebar-text);
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.profile-actions a, .btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0;
    transition: 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-actions a:hover, .btn-logout:hover {
    color: var(--active-blue);
}

.sidebar.collapsed .profile-actions span {
    display: none;
}

.nav-menu {
    flex-grow: 1;
}

.search-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.search-box input {
    background: none;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.nav-menu {
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-height: 0;
    padding-bottom: 15px;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    text-decoration: none;
    color: #fff;
    border-radius: 30px;
    margin-bottom: 8px;
    transition: 0.3s;
    font-weight: 500;
}

.sidebar.collapsed .nav-item {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    padding: 0;
    justify-content: center;
    gap: 0;
    border-radius: 16px;
}

.sidebar.collapsed .theme-switcher .switch-pill {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    width: 100% !important;
    justify-content: center !important;
}

.sidebar.collapsed .mode-btn:not(.active) {
    display: none !important;
}

.sidebar.collapsed .mode-btn.active {
    display: flex !important;
    max-width: 56px !important;
    height: 56px !important;
    border-radius: 12px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item:hover {
    color: var(--sidebar-text);
}

.badge-custom {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: auto;
}

.badge-dot, .badge-dot-gray {
    width: 22px;
    height: 22px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    margin-left: auto;
}

.badge-dot { background: #334155; }

.add-icon {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin: 25px 0 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all {
    font-size: 0.65rem;
    text-decoration: none;
    color: var(--view-all-link);
    font-weight: 800;
    letter-spacing: 0.8px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-all:hover {
    color: var(--link-light-mode);
    filter: drop-shadow(0 0 5px rgba(22, 120, 249, 0.4));
}

.team-list {
    margin-bottom: 20px;
}

.team-member {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    border-radius: 15px;
    transition: 0.3s;
    cursor: pointer;
}

.team-member img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.theme-switcher {
    margin-top: auto;
}

.icon-pink { color: #ec4899; }
.icon-purple { color: #8b5cf6; }
.icon-green { color: #10b981; }

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    padding: 25px 15px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 30px;
    cursor: pointer;
}

.upload-area i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 10px;
    color: var(--active-blue);
}

.theme-switcher {
    margin-top: auto;
    flex-shrink: 0;
    padding-top: 10px;
}

.switch-pill {
    background: var(--card-bg);
    padding: 4px;
    border-radius: 40px;
    display: flex;
    border: 1px solid var(--border-color);
}

.mode-btn {
    flex: 1;
    border: none;
    background: none;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 35px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
}

.mode-btn.active {
    background: transparent;    
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.137);
    color: white;
}

[data-theme="light"] .mode-btn.active {
    background: transparent;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.137);
}

[data-theme="light"] .user-role {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="light"] .profile-actions a, 
[data-theme="light"] .btn-logout {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .profile-actions a:hover, 
[data-theme="light"] .btn-logout:hover {
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 20px 35px;
    transition: 0.4s;
    background-color: var(--main-bg);
    border-top-left-radius: 40px;
    height: 100vh;
    overflow-y: auto;
}

.hub-title {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.hub-title span {
    position: relative;
    z-index: 2;
}

.hub-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, #5cb0ff, transparent);
    transition: width 0.3s ease;
}

.hub-title:hover::after {
    width: 100%;
}

.professor-list-horizontal {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 10px 0 20px;
    scrollbar-width: none;
}

.professor-list-horizontal::-webkit-scrollbar {
    display: none;
}

.professor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 100px;
    transition: 0.3s;
}

.professor-item:hover {
    transform: translateY(-5px);
}

.prof-avatar-wrap {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(90deg, #5cb0ff, #7c5cff);
}

.prof-avatar-wrap img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--side-bg);
}

.prof-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

.btn-scroll {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--side-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    cursor: pointer;
}

.btn-scroll:hover {
    background: #5cb0ff;
    border-color: #5cb0ff;
    color: white;
    box-shadow: 0 5px 15px rgba(92, 176, 255, 0.3);
}

.cards {
    width: 100%;
    display: flex;
    gap: 20px;
    padding: 10px 0 30px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cards-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 25px !important;
    padding: 20px 0 !important;
    width: 100% !important;
    overflow: visible !important;
}

.cards-grid .card {
    width: 100% !important;
    margin: 0 !important;
}

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

.card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    background-color: var(--side-bg);
    width: 300px;
    flex: 0 0 auto;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(92, 176, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.card__img {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.5s ease;
}

.card:hover .card__img {
    transform: scale(1.05);
}

.card__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
}

.card__info-hover {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.card__clock-info {
    background: rgba(17, 17, 20, 0.75);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.card__time {
    font-size: 11px;
    color: #fff;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.card__info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--side-bg);
    position: relative;
    z-index: 5;
}

.card__category {
    font-family: 'Raleway', sans-serif;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--text-muted);
}

.badge-status {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.status-new { background: rgba(92, 176, 255, 0.1); color: #5cb0ff; border: 1px solid rgba(92, 176, 255, 0.2); }
.status-progress { background: rgba(251, 191, 36, 0.1); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.2); }
.status-completed { background: rgba(74, 222, 128, 0.1); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.2); }

.card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.card__description {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 15px;
}

.btn-hub{
    font-family: 'Raleway', sans-serif;
    font-size: 11.5px;
    letter-spacing: 0.18em;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color) !important;
    transition: all 0.25s ease;
}

.btn-hub:hover{
    color: #fff;
    background: linear-gradient(
        90deg,
        #5cb0ff,
        #7c5cff
    );
    border-color: transparent !important;
    box-shadow:
        0 6px 18px rgba(92,176,255,0.35);
}

.course-filter-menu {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.filter-toggle-btn {
    height: 42px;
    padding: 0 14px 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all 0.25s ease;
    position: relative;
}

.filter-toggle-btn i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.filter-toggle-btn:hover {
    border-color: rgba(92,176,255,0.5);
    background: rgba(92,176,255,0.08);
    color: #5cb0ff;
    box-shadow: 0 6px 20px rgba(92,176,255,0.15);
}

.filter-toggle-btn:active {
    transform: scale(0.97);
}

.filter-active-dot {
    width: 6px;
    height: 6px;
    background: #5cb0ff;
    border-radius: 50%;
    margin-left: 4px;
    box-shadow: 0 0 8px rgba(92,176,255,0.8);
}

.filter-dropdown {
    width: min(360px, calc(100vw - 40px));
    background: var(--side-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.filter-dropdown label {
    display: block;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

.btn-filter-apply,
.btn-filter-clear {
    flex: 1;
    height: 40px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-filter-apply {
    border: none;
    background: linear-gradient(135deg, #5cb0ff, #7c5cff);
    color: #fff;
}

.btn-filter-clear {
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    background: transparent;
}

.btn-filter-clear:hover {
    color: var(--text-primary);
    border-color: #5cb0ff;
}

/* Menu flutuante do perfil colapsado */
.avatar-wrapper { position: relative; }
.collapsed-profile-menu {
    display: none;
    position: absolute;
    left: 65px;
    top: -10px;
    width: 220px;
    background: var(--side-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    z-index: 9999;
    box-shadow: 2px 5px 30px rgba(0,0,0,0.3);
    overflow: hidden;
}

.profile-menu-header {
    padding: 20px 20px 15px;
    background: linear-gradient(180deg, rgba(128,128,128,0.03) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.menu-user-name {
    display: block;
    font-weight: 800;
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.menu-user-role {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--cyan-glow);
    background: rgba(92,176,255,0.1);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
}

.profile-menu-body {
    padding: 10px;
}

.menu-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 600;
}

.menu-action-item:hover {
    background: rgba(128,128,128,0.08);
    color: var(--text-primary);
}

.item-icon-box {
    width: 32px;
    height: 32px;
    background: rgba(128,128,128,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--cyan-glow);
}

.logout-icon {
    color: #ef4444;
}

.sidebar.collapsed .avatar-wrapper.active .collapsed-profile-menu {
    display: block;
    animation: fadeInMenu 0.2s ease-out;
}
@keyframes fadeInMenu { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 768px) {
    .main-wrapper { display: block; height: auto; overflow: visible; }
    .sidebar { width: 100% !important; height: 70px !important; position: fixed !important; bottom: 0 !important; top: auto !important; left: 0 !important; z-index: 1000 !important; flex-direction: row !important; padding: 0 !important; border-right: none !important; border-top: 1px solid var(--border-color) !important; background-color: var(--sidebar-bg) !important; display: flex !important; align-items: center !important; }
    .sidebar.collapsed { width: 100% !important; height: 70px !important; padding: 0 !important; }
    .nav-menu { display: flex !important; flex-direction: row !important; width: 100% !important; justify-content: space-around !important; align-items: center !important; overflow: visible !important; margin: 0 !important; padding: 0 10px !important; }
    .nav-item { margin: 0 !important; padding: 12px !important; width: auto !important; height: auto !important; border-radius: 12px !important; flex: 1 !important; justify-content: center !important; }
    .profile-section, .section-title, .theme-switcher, .nav-label, .badge-cyan, .badge-green, .view-all, .toggle-sidebar, .add-icon { display: none !important; }
    .main-content { padding: 20px 15px 90px 15px !important; border-top-left-radius: 0 !important; width: 100% !important; margin: 0 !important; min-height: 100vh !important; }
    .cards-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
}