@keyframes showAsideWide {
    0% {
        margin-left: 0;
        max-width: 100vw;
    }
    100% {
        margin-left: 100vw;
    }
}

@keyframes showMainWide {
    0% {
        margin-left: 100vw;
    }

    100% {
        margin-left: 0;
    }
}

@keyframes moveButtonAsideWide {
    0% {
        margin-left: 0;
        background-color: #2c3e50;
    }

    100% {
        margin-left: calc(100vw - 1.8em);
        background-color: #3498db;
    }
}

@keyframes moveButtonMainWide {
    0% {
        margin-left: calc(100vw - 1.8em);
        background-color: #3498db;
    }

    100% {
        margin-left: 0;
        background-color: #2c3e50;
    }
}

@keyframes showAside {
    0% {
        margin-left: 0;
        max-width: 100vw;
    }

    100% {
        margin-left: 22vw;
        max-width: 78vw;
    }
}

@keyframes showMain {
    0% {
        margin-left: 22vw;
        max-width: 78vw;
    }

    100% {
        margin-left: 0;
        max-width: 100vw;
    }
}

@keyframes moveButtonAside {
    0% {
        margin-left: 0;
        background-color: #3498db;
    }

    100% {
        margin-left: 22vw;
        background-color: #2c3e50;
    }
}

@keyframes moveButtonMain {
    0% {
        margin-left: 22vw;
        background-color: #2c3e50;
    }

    100% {
        margin-left: 0;
        background-color: #3498db;
    }
}

body {
    max-height: 100dvh;
}

#main {
    display: block;
    min-height: calc(100vh - calc(50px + 3em));
    margin-top: calc(50px + 3em);
    max-height: calc(100vh - calc(50px + 3em));
    overflow: hidden;
    min-width: 100vw;
    max-width: 100vw;
    position: absolute;
    top: 0;
    z-index: 25;
    background-color: #f9f9f9;
}

.h {
    display: none;
    pointer-events: none;
}

#main>*,
#main>* :not(*) {
    max-height: calc(100vh - calc(50px + 3em));
    overflow: scroll;
}

#disp.activities-panel {
  flex: 1;
  padding: 30px;
  background-color: #f9f9f9;
}

#disp.activities-panel article:not(:first-of-type) {
    margin-top: 1.2em;
}

#disp.error {
    margin-left: 0;
}

/* Panel izquierdo - Grupos */
.groups-panel {
    width: 22vw;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    min-height: inherit;
}

.groups-panel h3, #disp section header {
    border-bottom: 2px solid #3498db;
    padding-bottom: 7px;
    margin-bottom: 10px;
}

.groups-panel h3:nth-of-type(2) {
    margin-top: 1em;
}

.group-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-x: visible;
}

.group-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
}

.group-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.group-card h4 {
    color: #3498db;
    margin-bottom: 5px;
}

.group-card p {
    font-size: 0.9rem;
    color: #ecf0f1;
}
#disp {
    margin: 0 0 0 22vw;
    top: 0;
    right: 0;
    max-width: 78vw;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

#disp section:not(:first-of-type, .incol) {
    margin-top: 1.2em;
}

#disp section header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alumni {
    list-style: none;
}
.alumni .matricula {
    font-weight: 550;
}

#hide-side {
    display: block;
    position: absolute;
    margin-left: 22vw;
    top: 0;
    z-index: 50;
    width: 1.8em;
    height: 1.8em;
    background-color: #2c3e50;
    border: none;
    color: #f1f1f1;
    font-size: large;
    font-weight: bold;
    border-radius: 0 0 20% 0
}

.m #disp {
    margin-left: 0;
    max-width: 100vw;
    animation: showAside 1s cubic-bezier(0.215, 0.610, 0.355, 1) 0.2s 1 normal forwards;
}

.aside #disp {
    max-width: 78vw;
    animation: showMain 1s cubic-bezier(0.215, 0.610, 0.355, 1) 0.2s 1 normal forwards;
}

.m #hide-side {
    animation: moveButtonAside 1s cubic-bezier(0.215, 0.610, 0.355, 1) 0.2s 1 normal forwards;
    margin-left: 0;
    background-color: #3498db;
}

.aside #hide-side {
    animation: moveButtonMain 1s cubic-bezier(0.215, 0.610, 0.355, 1) 0.2s 1 normal forwards;
}

.redaction {
  background-color: #e74c3c;
  color: white;
}

.redaction:hover, .alert-close-button:hover {
  background-color: #c0392b;
}

.welcome-banner {
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  background-image: linear-gradient(to right, #f0f9ff, #ffffff);
  border-left: 4px solid #3b82f6;
}

.welcome-banner h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
  font-weight: 600;
}

.welcome-banner p {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 0.95rem;
}

.smallabel {
    font-size: 0.9rem;
}

progress {
    vertical-align: middle;
}

.initmsg:has(+:not(:empty)), .welcome-banner:has(+ .initmsg + :not(:empty)) {
    display: none;
    pointer-events: none;
}

.group-card .classProgress {
    width: 5em;
}

.class-display {
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

#materia-actual {
  color: #3b82f6;
}

.class-display main span {
    display: block;
}

.class-display main span > * {
    display: inline;
}

.class-display header {
    text-align: center;
    padding-bottom: 1em;
    border-bottom: 2px solid #3b82f6;
    margin-bottom: 1em;
}

.class-display:has(table) {
    overflow: scroll;
}

#disp .class-display:has(table) header {
    margin-bottom: 0;
}

.class-display > table + * {
    margin-top: 1.2rem;
}

.marks {
    border-spacing: 5px;
    border-collapse: collapse;
    margin: auto;
}

.marks th {
    max-width: 10em;
}

.marks :is(th,td) {
    padding: 0.5rem 0.5rem;
}

.marks tr th:not(:last-child) {
    border-right: 2px solid gray;
}

.marks tr td:not(:last-child) {
    border-right: 2px solid black;
}

.marks td {
    text-align: center;
}

.marks tbody tr {
    border-top: 2px dotted darkgray;
}

#currentCard header {
    border-bottom: 2px dotted #94ADD5;
}

#currentCard footer {
    margin-top: 1em;
    padding-top: 1em;
    border-top: 2px dotted #94ADD5;
}

#currentCard nav {
    display: flex;
    justify-content: space-between;
}

#currentCard footer nav a {
    font-style: italic;
    font-size: 1.3rem;
}

#currentCard footer .forwardlink {
    text-align: end;
}

#currentCard header nav {
    margin-top: 0.3rem;
}

.forwardlink, .backlink {
    text-decoration: green wavy underline;
}

:not(:empty) + .separate {
    border-left: 2px solid #94add5;
    margin: 0 1.2em;
}

.separate.smaller {
    border-left: none;
}
:not(:empty) + .separate.smaller::after {
    content: "|";
    color: #94add5;
}

.forwardlink:not(:empty)::after {
    content: " →";
}

.backlink:not(:empty)::before {
    content: "← ";
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 2rem;
}

.question-description {
    font-style: italic;
}

div.item {
    display: flex;
    justify-content: space-evenly;
}

.column-from .item span {
    display: inline;
}

.column-to {
    text-align: center;
}

.column-to li.item {
    list-style: lower-latin;
    list-style-position: inside;
}

.column-to li.item::marker {
    color: #3b82f6;
}

.column-marker {
    border-radius: 100%;
    border: 1px solid black;
    min-width: 1.4rem;
    height: 1.4rem;
    display: inline !important;
    text-align: center;
    line-height: 1.1rem;
}

.dispAlert {
    position: fixed;
    background-color: white;
    border-radius: 12px;
    width: calc(78% * 4 / 6);
    height: calc(calc(200% / 3) - 33dvh);
    left: calc(22dvw + calc(78dvw / 6));
    right: calc(78dvw / 6);
    margin: auto;
    top: calc(33dvh + calc(100% / 6));
    z-index: 100;
    top: calc(3em + 50px + 30px + calc(100% / 6));
    box-shadow: 0 0 5px 10px rgba(59, 130, 246, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    padding: 0.6rem;
}

#disp:has(.dispAlert) > *:not(.dispAlert) {
    filter: grayscale(80%) blur(3px);
    transition: filter cubic-bezier(0.215, 0.610, 0.355, 1) 0.2s;
}

#disp > *:not(.dispAlert) {
    transition: filter cubic-bezier(0.215, 0.610, 0.355, 1) 0.2s;
}

#disp:has(.dispAlert) *:not(.dispAlert, .dispAlert *) {
    pointer-events: none;
    user-select: none;
}

.dispAlert footer button {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
}

.dispAlert footer button:not(:first-child) {
    margin-left: 0.6rem;
}

.dispAlert button {
    border-radius: 4px;
    background-color: rgb(59, 130, 246);
    color: #fefefe;
    border: none;
}

.dispAlert object {
    width: 100%;
    height: 40vh;
}

.dispAlert:has(object) {
    height: calc(calc(1100% / 12) - 33dvh);
    width: calc(78% * 5 / 6);
    left: calc(22dvw + calc(78dvw / 12));
    right: calc(78dvw / 12);
    top: calc(3em + 50px + 30px + calc(100% / 12));
}

button.alert-close-button {
    background-color: #e74c3c;
}

.send {
    margin-top: 2rem;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    background-color: #3498db;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    float: right;
}

.send:hover, button.bigblue:hover {
  background-color: #2980b9;
}

.vert {
    display: inline-flex;
    flex-direction: column;
}

ul, ol {
    list-style-position: inside;
}

.no-list-style {
    list-style: none;
}

select {
    max-width: 75%;
}

.two-column-layout > * {
    min-width: 100%;
}

/* Responsive */
@media (max-width: 1200px) {
    .professor-dashboard {
        flex-direction: column;
    }

    .groups-panel,
    .subjects-panel {
        width: 100%;
        order: 2;
    }

    .activities-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .dispAlert object {
        width: 100%;
        height: 40vh;
    }
    
    .dispAlert:has(object) {
        width: calc(500% / 6);
        left: calc(100% / 12);
        top: calc(3em + 50px + 30px + calc(100% / 12));
    }
}

button.all-terms {
    border-radius: 4px;
    padding: 0.2rem 0.3rem;
    background-color: transparent;
    color: #f1f1f1;
    border: 1px solid #f1f1f1;
    transition: background-color 0.3s, color 0.3s;
}

button + .group-list {
    margin-top: 0.8rem;
}

.fw {
    width: 100%;
}

.all-terms:hover {
    background-color: #3498db;
    color: #333;
}

.resource-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

#classwrap .resource-card:not(:first-of-type) {
    padding-top: 0.325rem;
    margin-top: 0.45rem;
    border-top: 2px dotted #3498db;
}

.resource-card h3 {
    grid-column: 1 / 3;
}

.resource {
    display: flex;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.resource button {
    margin: 0.3rem 0.6rem;
}

button.bigblue {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    background-color: #3498db;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

button.bigblue[disabled] {
    background-color: #B4BBBF;
    font-weight: normal;
    pointer-events: none;
}

@media (min-width: 769px) {
    #classwrap:has(.resources) {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    #classwrap .resources {
        margin-left: 1em;
        margin-right: 1em;
    }
    #classwrap article.resources:nth-child(2) {
        margin-top: 0;
    }
    .aside #classwrap:has(.resources) {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .aside #classwrap article.resources:nth-child(3) {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    #main {
        overflow: hidden;
    }
    #main, #disp {
        max-height: calc(100dvh - 3em - 50px - 1em - 44px);
        min-height: calc(100dvh - 3em - 50px - 1em - 44px);
        max-width: 100dvw;
    }
    aside {
        max-height: calc(100dvh - 3em - 50px - 1em - 44px - 40px);
        min-height: calc(100dvh - 3em - 50px - 1em - 44px - 40px);
        overflow-y: scroll;
    }

    #disp {
        display: flex;
        margin: 0;
        max-width: 100dvw;
        flex-direction: column;
        overflow-y: scroll;
    }
    .m #disp {
        margin-left: 100vw;
    }
    .sticky-nav {
        position: relative;
    }
    #main {
        position: relative;
        margin: 0;
    }
    #hide-side {
        margin: 0;
        transition: border-radius cubic-bezier(0.215, 0.610, 0.355, 1) 1.2s;
    }

    .aside #disp {
        max-width: 100dvw;
        animation: showAsideWide 1s cubic-bezier(0.215, 0.610, 0.355, 1) 0.2s 1 normal forwards;
    }
    .m #disp {
        animation: showMainWide 1s cubic-bezier(0.215, 0.610, 0.355, 1) 0.2s 1 normal forwards;
    }

    .aside #hide-side {
        animation: moveButtonAsideWide 1s cubic-bezier(0.215, 0.610, 0.355, 1) 0.2s 1 normal forwards;
        border-radius: 0 0 0 20%;
    }
    .m #hide-side {
        animation: moveButtonMainWide 1s cubic-bezier(0.215, 0.610, 0.355, 1) 0.2s 1 normal forwards;
        margin-left: calc(100vw - 1.8em);
        background-color: #3498db;
    }

    .activities-grid {
        grid-template-columns: 1fr;
    }

    .nav-buttons {
        gap: 10px;
    }
}