*,
::after,
::before {
    box-sizing: border-box;
    appearance: none;
}

:root {
    --c-0: #24a6aa;
    --c-1: #fff;
    --c-2: #000;
    --c-3: #ddd;
    --c-4: #454545;
    --c-5: #eee;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, sans-serif;
    background: var(--c-1);
    margin: 0;
    color: var(--c-4);
}

.center-body {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
    background: var(--c-1);
    flex-direction: column;
    align-items: center;
}

/* Auth */
.auth-card {
    background: var(--c-1);
    margin: 0 auto;
    padding: 1rem;
    border-radius: 8px;
    max-width: 400px;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.auth-card .tabs {
    width: 280px;
}

.auth-card img {
    text-align: center;
    width: 100px;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--c-3);
    color: var(--c-4);
}

.tabs button {
    color: var(--c-4);
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
}

.tabs button.active {
    border-bottom: 3px solid var(--c-2);
    color: var(--c-2);
    font-weight: bold;
}

/* Forms */
input,
select,
textarea {
    width: 100%;
    padding: 12px;
    margin: 5px 0;
    border: 1px solid var(--c-5);
    background: var(--c-5);
    border-radius: 4px;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, sans-serif;
    resize: none;
    color: var(--c-4);
}

.btn-primary {
    background: var(--c-2);
    color: var(--c-1);
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

/* HEADER --- */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 64px;
    border-bottom: 1px solid var(--c-3);
    background: var(--c-1);
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    z-index: 2;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-icon {
    color: var(--c-4);
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
}

.menu-icon:hover {
    background-color: var(--c-3);
}

.logo {
    font-size: 16px;
    font-weight: 500;
    color: var(--c-4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 40px;
    position: relative;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Icon Buttons (Plus, Logout, etc) */
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--c-4);
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: var(--c-3);
}

.icon-btn .material-icons {
    font-size: 24px;
}

/* Profile Circle */
.profile-icon {
    width: 32px;
    height: 32px;
    background-color: #24a6aa;
    /* Google Purple */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-left: 10px;
    margin-right: 5px;
    cursor: default;
}

/* --- GRID & CARDS --- */
.container {
    padding: 1rem;
    max-width: 1300px;
    margin: 0 auto;
}

.card {
    border-radius: 8px;
    overflow: hidden;
    background: var(--c-1);
    display: flex;
    flex-direction: column;
}

.card-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.25rem;
}

.card-header small {
    opacity: 0.9;
}

.card-footer {
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    gap: 0px;
    background: rgba(0, 0, 0, 0.2);
}

.card i {
    font-size: 1.5em !important;
}

.icon-btn-small {
    background: none;
    border: none;
    cursor: pointer;
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 50%;
}

.icon-btn-small:hover {
    background-color: #070707;
}

.tabs-nav {
    margin: 1rem auto;
    max-width: 1000px;
}

.tabs-nav a {
    padding: 0.5rem;
    cursor: pointer;
    color: var(--c-4);
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.tabs-nav a.active {
    color: var(--c-2);
    border-bottom-color: var(--c-2);
}

/* Layout */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

/* Cards */
.card {
    border: 1px solid var(--c-3);
    border-radius: 8px;
    overflow: hidden;
    background: white;
    background: #24a6aa;
}

.card-header {
    /* background-image: linear-gradient(to right, #7317c9, #a83495); */
    color: white;
    padding: 16px;
    height: 120px;
}

.box {
    border: 1px solid var(--c-3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--c-1);
}

.box a {
    color: var(--c-0);
}

.assignment-row {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.assignment-row:hover {
    background-color: var(--c-3);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.icon {
    background: var(--c-2);
    color: var(--c-1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 16px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.assigned {
    background: var(--c-3);
    color: var(--c-2);
}

.turned_in {
    background: rgb(0, 179, 119);
    color: #fff;
}

.returned {
    background: var(--c-3);
    color: var(--c-2);
}

/* --- MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--c-1);
    padding: 24px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    transition: transform 0.2s;
}

.modal-overlay.open .modal-box {
    transform: translateY(0);
}

.modal-title {
    margin-top: 0;
    font-size: 1.25rem;
    color: var(--c-4);
}

.modal-msg {
    color: var(--c-4);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Modal Inputs */
.modal-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--c-2);
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 1rem;
    outline: none;
}

/* Modal Buttons */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-text {
    background: none;
    border: none;
    padding: 10px 20px;
    color: var(--c-4);
    cursor: pointer;
    font-weight: 500;
    border-radius: 4px;
}

.btn-0 {
    outline: none;
    border: none;
    background: transparent;
    color: var(--c-4);
    cursor: pointer;
}

.btn-fill {
    background: var(--c-2);
    border: none;
    padding: 10px 24px;
    color: var(--c-1);
    cursor: pointer;
    font-weight: 500;
    border-radius: 4px;
}


.btn-danger {
    background: #d93025;
    color: white;
}

/* Red for delete */
.btn-danger:hover {
    background: #b0271f;
}

.user-initial {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: 2rem 1rem 0 1rem;
    max-width: 1300px;
}

.user-initial h3,
.user-initial p {
    margin: 0;
}


/* footer */
footer .container {
    margin: 0 auto;
    max-width: 1300px;
    display: flex;
    align-items: center;
    flex-direction: column;
    font-size: 0.8em;
    color: var(--c-2);
    opacity: 0.7;
    padding: 2rem 1rem;
    gap: 0.3rem;
}

footer a {
    text-decoration: none;
    color: var(--c-2);
}

footer .container h2,
footer .container p {
    margin: 0;
    padding: 0;
}

footer .container h2 {
    font-size: 1.8em;
}

.center-body .btn {
    padding: 1rem;
    width: 100%;
    border-radius: 50px;
    color: var(--c-1);
    background: var(--c-2);
    border: var(--c-2);
    outline: none;
    font-family: sans-serif;
    cursor: pointer;
    margin-top: 0.5rem;
}

.center-body input,
.center-body select {
    border-radius: 50px;
    border: 1px solid var(--c-3);
}

.center-body label {
    font-size: 14px;
}

/* loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    background: var(--c-1);
    display: flex;
    justify-content: center;
    align-items: center;
}
.loader .ball {
    width: 50px;
    height: 50px;
    background: var(--c-0);
    border-radius: 50%;
    animation: sizing 1s infinite ease-in-out;
}

@keyframes sizing {
    0% {
        scale: 0.4;
    }
    50% {
        scale: 1;
    }
    100% {
        scale: 0.4;
    }
}

/* MEDIA */
@media screen and (max-width: 500px) {
    * {
        font-size: 14px;
    }

    .logo h2 {
        font-size: 18px;
    }
}


/* THEME */
@media (prefers-color-scheme: dark) {
    :root {
        --c-0: #24a6aa;
        --c-1: #000000;
        --c-2: #ffffff;
        --c-3: #353535;
        --c-4: #d4d4d4;
        --c-5: #353535;
    }
}