@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,600&display=swap");

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    background-color: #f9fafc;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.body-btn {
    position: relative;
    display: block;
    width: fit-content;
    margin: 20px auto 0;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #1b50b2;
    background: #eaf7fd;
    border: 2px solid #1b7bb2;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-border 2.5s ease-in-out infinite;
}

.body-btn:hover {
    background: #1b7bb2;
    color: white;
    transform: translateY(-2px);
    animation: none;
}

@keyframes pulse-border {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(27, 123, 178, 0);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(27, 123, 178, 0.2);
    }
}

div p {
    text-align: center;
    margin-top: 20px;
}

.desk-text p {
    text-align: center;
    margin-top: 20px;
}

nav {
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

nav a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 15px;
}

nav a:hover {
    color: white;
    text-decoration: underline;
}


/* Site Header */
.site-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%);
    color: #f8fafc;
    padding: 0 clamp(16px, 3vw, 40px);
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -20%, rgba(99, 102, 241, 0.35), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(34, 211, 238, 0.2), transparent);
    pointer-events: none;
}

.site-header--hero {
    padding-bottom: clamp(100px, 15vw, 140px);
}

.site-header .inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90px;
    padding: 0 40px;
    box-sizing: border-box;
}

.site-header .logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: auto;
}

.site-header .logo img {
    height: 200px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.site-nav a {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 1.3rem;
    padding: 8px 16px;
    border-radius: 999px;
    white-space: nowrap;
}

.site-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.site-nav .nav-cta {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #1e06d4 100%);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.site-nav .nav-cta:hover {
    filter: brightness(1.08);
    color: #fff;
}

@media (max-width: 600px) {
    .site-header .inner {
        min-height: auto;
        padding: 10px 0;
    }

    .site-header .logo img {
        height: clamp(48px, 14vw, 64px);
    }

    .site-nav a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}


/* Desk Card*/
.desk-card {
    display: flex;
    background-color: white;
    max-width: 900px;
    margin: -80px auto 40px;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    align-items: center;
    gap: 30px;
}

.desk-text {
    flex: 1;
}

.desk-text h2 {
    color: #1e293b;
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.desk-image {
    flex: 1;
    text-align: center;
}

.desk-image img {
    max-width: 100%;
    height: auto;
}


/* Features Section */
.features {
    display: flex;
    max-width: 1000px;
    margin: 40px auto 80px;
    justify-content: space-between;
    gap: 30px;
    padding: 0 40px;
    position: relative;
    z-index: 5;
}

.feature-box {
    position: relative;
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        20px 20px 50px rgba(0, 0, 0, 0.12),
        -15px -15px 40px rgba(255, 255, 255, 0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.feature-box:hover {
    transform: translateY(-8px);
    box-shadow:
        20px 30px 60px rgba(0, 0, 0, 0.22),
        -15px -15px 40px rgba(255, 255, 255, 0.6);
}

/* Inner glass panel */
.feature-box .fb-bg {
    position: absolute;
    inset: 6px;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.88),
            rgba(245, 245, 255, 0.65));
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    z-index: 1;
}

/* Aurora blob */
.feature-box .fb-aurora {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    filter: blur(30px);
    z-index: 0;
    opacity: 0.8;
    animation: aurora-move 7s infinite ease-in-out;
}

@keyframes aurora-move {
    0% {
        transform: translate(-55%, -60%) scale(1);
    }

    30% {
        transform: translate(5%, -40%) scale(1.15);
    }

    60% {
        transform: translate(15%, 15%) scale(1.05);
    }

    80% {
        transform: translate(-35%, 10%) scale(1.2);
    }

    100% {
        transform: translate(-55%, -60%) scale(1);
    }
}

/* Content sits above the glass and aurora */
.feature-box .fb-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-box .fb-content img {
    height: 60px;
    margin-bottom: 15px;
}

.feature-box .fb-content h3 {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.feature-box .fb-content p {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin-top: 0;
    text-align: center;
}

/*  DASHBOARD REDESIGN  */

.dash-greeting {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dash-greeting h1 {
    color: #fff;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    font-weight: 700;
    margin: 0 0 6px;
    text-align: left;
}

.dash-greeting p {
    color: #c7d2fe;
    font-size: 0.9rem;
    margin: 0;
    text-align: left;
}

.dash-streak {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.dash-streak i {
    color: #fb923c;
    font-size: 1rem;
}

/* Stat Cards */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.dash-stat-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dash-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.dash-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.dash-stat-icon--blue { background: #eef2ff; color: #4338ca; }
.dash-stat-icon--red  { background: #fef2f2; color: #dc2626; }
.dash-stat-icon--green{ background: #f0fdf4; color: #15803d; }

.dash-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 4px;
}

.dash-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.dash-stat-sub {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 4px;
}

/* Quote card */
.dash-quote {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 18px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-quote i {
    font-size: 1.8rem;
    color: #15803d;
    flex-shrink: 0;
}

.dash-quote-text {
    font-size: 0.88rem;
    color: #166534;
    line-height: 1.6;
    font-style: italic;
}

.dash-quote-author {
    font-size: 0.75rem;
    color: #15803d;
    margin-top: 4px;
    font-weight: 600;
}

/* Two column layout */
.dash-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 0;
}

/* Generic card */
.dash-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;
    padding: 20px;
}

.dash-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-card-title i {
    font-size: 1rem;
    color: #6366f1;
}

.dash-empty {
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
    padding: 16px 0;
    margin: 0;
}

/* Deadline items */
.dash-deadline-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dash-deadline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-deadline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-deadline-dot.high   { background: #ef4444; }
.dash-deadline-dot.medium { background: #f59e0b; }
.dash-deadline-dot.low    { background: #22c55e; }

.dash-deadline-name {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 600;
    flex: 1;
}

.dash-deadline-date {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* Today plan items */
.dash-session-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dash-session-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-session-time {
    font-size: 0.75rem;
    color: #94a3b8;
    min-width: 80px;
}

.dash-session-course {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 600;
    flex: 1;
}

.dash-status-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.dash-status-pill.pending  { background: #fef3c7; color: #92400e; }
.dash-status-pill.completed{ background: #dcfce7; color: #166534; }
.dash-status-pill.missed   { background: #fee2e2; color: #991b1b; }

/* Weekly progress bars */
.dash-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dash-progress-row:last-child { margin-bottom: 0; }

.dash-progress-label {
    font-size: 0.8rem;
    color: #1e293b;
    min-width: 130px;
}

.dash-progress-bar-wrap {
    flex: 1;
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}

.dash-progress-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

.dash-progress-pct {
    font-size: 0.75rem;
    color: #64748b;
    min-width: 34px;
    text-align: right;
}



/* COURSES GRID */
.courses-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 12px;
}

.courses-toolbar .add-course-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: filter 0.2s, transform 0.2s;
}

.courses-toolbar .add-course-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    text-decoration: none;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.course-card {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.course-card__accent {
    height: 5px;
    width: 100%;
}

.course-card__body {
    padding: 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.course-card__sub {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 2px;
}

.course-card__badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.course-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.course-badge--credits { background: #eef2ff; color: #4338ca; }
.course-badge--active  { background: #f0fdf4; color: #15803d; }

.course-card__footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    display: flex;
    gap: 8px;
}

.course-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    color: #64748b;
    text-decoration: none;
}

.course-action:hover {
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
}

.course-action--edit {
    background: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

.course-action--edit:hover { background: #e0e7ff; }

.course-action--remove {
    all: unset;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    color: #64748b;
    box-sizing: border-box;
}
.course-action--remove:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
}
.courses-grid:has(p) {
    display: block;
    text-align: center;
}
/* Add Course Page */

.form-card {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 32px 36px;
    max-width: 560px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
    width: 100%;
    margin: 0;
}

.form-card form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    width: 100%;
    margin: 0;
    box-shadow: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.form-group .input-format {
    margin-bottom: 0;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group .input-format:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 5px;
}

.form-divider {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    align-items: center;
}

.btn-submit {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
    margin: 0;
    width: auto;
}

.btn-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.btn-back {
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-back:hover {
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
}

/* --- Styles from General CSS block --- */

/* HEADINGS */
h1,
h2,
h3 {
    text-align: center;
    color: #2c3e50;
}

.banner {
    display: block;
    width: 100%;
    max-width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Inside sidebar pages: break out of app-main padding so banner spans sidebar-end to page-right */
.app-main .banner {
    width: calc(100% + 2 * clamp(20px, 3vw, 36px));
    max-width: none;
    margin-top: calc(-1 * clamp(20px, 3vw, 36px));
    margin-left: calc(-1 * clamp(20px, 3vw, 36px));
    margin-right: calc(-1 * clamp(20px, 3vw, 36px));
    margin-bottom: clamp(16px, 2vw, 24px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.container {
    width: 80%;
    margin: auto;
    padding: 20px;
}

form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 60%;
    margin: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.input-format {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 15pt;
    background-color: #3498db;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    background-color: #2980b9;
}

a {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

/* LISTS (courses page) */
ul {
    list-style: none;
    padding: 0;
    width: 60%;
    margin: auto;
}

li {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}


/* LOGIN and REGISTER PAGES */

.page-auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #eef2f7 100%);
}
.auth-top {
    padding: 24px 32px;
}
.auth-top a {
    display: inline-flex;
    align-items: center;
}
.auth-top img {
    height: 150px;
    width: auto;
}
.auth-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 48px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    color: #1e293b;
}

.auth-card .subtitle {
    text-align: center;
    color: #64748b;
    margin: 0 0 28px;
    font-size: 0.95rem;
}

.auth-card form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    width: 100%;
    margin: 0;
    box-shadow: none;
}

.auth-card label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.auth-card .input-format {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    background: #ffffff;
    transition: all 0.2s ease;
}

.auth-card .input-format:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-card button {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.auth-card button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

.auth-card p {
    margin: 0 0 6px;
}

.auth-card p a {
    font-size: 0.85rem;
    color: #3b82f6;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #64748b;
}

.auth-footer a {
    color: #3b82f6;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.page-auth .auth-card form {
    background: transparent;
    padding: 0;
    width: 100%;
}

/* --- App Shell & Sidebar Styles --- */

/* CSS Variables for Sidebar */
:root {
    --sidebar-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%);
    --sidebar-border: rgba(148, 163, 184, 0.15);
    --sidebar-text: #cbd5e1;
    --sidebar-text-hover: #ffffff;
    --radius-md: 10px;
    --color-text: #1e293b;
    --color-muted: #64748b;
}

/* Page App Container */
.page-app {
    min-height: 100vh;
    background: #f9fafc;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.app-sidebar {
    width: 288px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 16px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    box-sizing: border-box;
}


/* Brand/Logo Section */
.app-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px 24px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--sidebar-border);
    text-decoration: none;
}

.app-brand:hover {
    opacity: 0.92;
    text-decoration: none;
}

.app-brand-logo {
    height: 170px;
    width: auto;
    border-radius: 10px;
}

/* Navigation */
.app-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.app-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Course count badge */
.app-nav__badge {
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
    border-radius: 999px;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
}

/* Availability status dot */
.app-nav__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.app-nav__dot--set {
    background: #4ade80;
}

.app-nav__dot--unset {
    background: rgba(148, 163, 184, 0.4);
}

.app-nav__link:hover {
    color: var(--sidebar-text-hover);
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.app-nav__link[aria-current="page"] {
    color: #fff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(34, 211, 238, 0.12));
    border: 1px solid rgba(148, 163, 184, 0.15);
}

/* Sidebar Footer */
.app-sidebar__footer {
    padding-top: 16px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-nav__link--muted {
    font-size: 1.1rem;
    opacity: 0.75;
}

#sidebar-container {
    width: 288px;
    min-width: 288px;
    flex-shrink: 0;
    position: relative;
    z-index: 1000;
}

/* Main Content Area */
.app-main {
    flex: 1;
    min-width: 0;
    padding: clamp(20px, 3vw, 36px);
    background: #f9fafc;
}

/* Page Header */
.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: left;
    color: var(--color-text);
}

.page-header p {
    margin: 0;
    color: var(--color-muted);
    text-align: left;
    max-width: 560px;
}

/* Override dashboard styles for sidebar layout */
.page-app .content {
    width: 100%;
    margin: 0;
    padding: 0;
}

.page-app .overview {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.page-app .card {
    flex: 1;
    min-width: 180px;
}

.page-app .buttons {
    justify-content: flex-start;
    margin-bottom: 30px;
}

.page-app h2 {
    text-align: left;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-app .deadline,
.page-app .studyPlan {
    margin-top: 0;
}

.page-app table {
    width: 100%;
    margin: 0;
}


@media (max-width: 480px) {
    .app-sidebar {
        padding: 12px;
    }

    .app-brand {
        padding: 4px 8px 12px;
    }

    .app-brand-logo {
        height: 35px;
    }

    .app-nav__link {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* TOPBAR */
.app-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 28px;
    height: 68px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 12px rgba(15, 23, 42, 0.08);
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.app-content-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;
}

#topbar-container {
    width: 100%;
    flex-shrink: 0;
}

.app-topbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;

}

.topbar-btn-wrap {
    position: relative;
}

/* Icon Button (bell) */
.topbar-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    padding: 0;
}

.topbar-icon-btn:hover {
    background: #f1f5f9;
    color: #6366f1;
    border-color: #6366f1;
}


/* Notification dot */
.topbar-notif-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 9px;
    height: 9px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

/* Dismiss all button */
.notif-dismiss-all {
    background: none;
    border: none;
    font-size: 0.72rem;
    color: #6366f1;
    cursor: pointer;
    font-weight: 600;
    padding: 2px 6px;
    margin-left: auto;
    white-space: nowrap;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.notif-dismiss-all:hover {
    background: #fee2e2;
    color: #ef4444;
    border-radius: 6px;
    text-decoration: none;
}

/* Notification items */
.notif-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 12px;
    border-radius: 12px;
    margin-bottom: 5px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.notif-item:hover { background: #f1f5f9; }

.notif-item--deadline { border-left: 3px solid #f59e0b; }
.notif-item--session  { border-left: 3px solid #6366f1; }

.notif-item__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.notif-item--deadline .notif-item__icon { background: #fef3c7; color: #d97706; }
.notif-item--session  .notif-item__icon { background: #eef2ff; color: #6366f1; }

.notif-item__body {
    flex: 1;
    min-width: 0;
}

.notif-item__title {
    font-size: 0.81rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item__sub {
    font-size: 0.73rem;
    color: #64748b;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item__label {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 1px 7px;
    border-radius: 20px;
}

.notif-item--deadline .notif-item__label { background: #fef3c7; color: #b45309; }
.notif-item--session  .notif-item__label { background: #eef2ff; color: #4338ca; }

.notif-item__dismiss {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
    padding: 0;
}

.notif-item__dismiss:hover {
    background: #fee2e2;
    color: #ef4444;
}

#notif-dropdown {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
}

#notif-dropdown.open {
    transform: translateX(-50%) translateY(0);
}

/* Profile Button */
.topbar-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1e293b;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.topbar-profile-btn:hover {
    background: #f1f5f9;
    border-color: #6366f1;
}


/* Avatar circle */
.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.topbar-profile-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.topbar-profile-btn svg {
    stroke: #94a3b8;
}


/* Dropdowns */
.topbar-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 270px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    z-index: 200;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all 0.2s ease;
}

.topbar-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.topbar-dropdown__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
}

.topbar-dropdown__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topbar-dropdown__name,
.topbar-dropdown__email {
    text-align: left;
    margin-top: 0;
    margin-bottom: 0;
}

.topbar-dropdown__body {
    padding: 8px;
}

.topbar-dropdown__empty {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 20px 0;
    margin: 0;
}

.topbar-dropdown__item {
    display: block;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease;
}

.topbar-dropdown__item:hover {
    background: #f1f5f9;
    text-decoration: none;
    color: #1e293b;
}

.topbar-dropdown__header>div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* FOOTER */
footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #312e81 100%);
    color: #94a3b8;
    text-align: center;
    padding: 12px 19px;
    font-size: 0.875rem;
    box-sizing: border-box;
    margin-top: auto;
}

footer a {
    color: #cbd5e1;
    font-weight: 500;
    text-decoration: none;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}
.deadline-card{
    background:#fff;
    border-radius:16px;
    padding:20px;
    margin-top:20px;
    box-shadow:0 2px 10px rgba(0,0,0,0.08);
    border-left:6px solid #3b82f6;
}

.deadline-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.deadline-header h3{
    margin:0;
    font-size:1.3rem;
    color:#1e293b;
}

.priority{
    padding:6px 12px;
    border-radius:999px;
    font-size:0.8rem;
    font-weight:bold;
    color:white;
}

.priority.high{
    background:#ef4444;
}

.priority.medium{
    background:#f59e0b;
}

.priority.low{
    background:#22c55e;
}

.deadline-card p{
    margin:10px 0;
    color:#475569;
}

.deadline-actions{
    display:flex;
    gap:10px;
    margin-top:20px;
}

.deadline-actions button{
    flex:1;
    border:none;
    padding:12px;
    border-radius:10px;
    cursor:pointer;
    font-weight:bold;
    color:white;
    background:#3b82f6;
    transition:0.2s;
}

.deadline-actions button:hover{
    opacity:0.9;
}

.deadline-card.completed{
    opacity:0.7;
    border-left-color:#22c55e;
}

.deadline-card.overdue{
    border-left-color:#ef4444;
    background:#fffafa;
}

.deadline-overdue-badge{
    font-size:0.72rem;
    font-weight:700;
    color:#b91c1c;
    background:#fee2e2;
    padding:3px 8px;
    border-radius:20px;
    text-transform:uppercase;
    letter-spacing:0.05em;
}
/* =========================
   STUDY PLANNER
========================= */

#generate-plan-btn {
    width: 100%;
    margin-bottom: 18px;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    cursor: pointer;
    transition: all 0.25s ease;
}

#generate-plan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

/* ====================== */
/* CHARTS LAYOUT          */
/* ====================== */

.charts-grid {
    display: grid;
    gap: 24px;
}

.charts-grid--2col {
    grid-template-columns: 1fr 1fr;
}

.chart-card {
    background: white;
    border-radius: 18px;
    padding: 18px 20px 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
}

.chart-card canvas {
    flex: 1;
    min-height: 0;
}

.chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
    text-transform: capitalize;
    letter-spacing: 0.01em;
}


/* ====================== */
/* DEADLINE COUNTDOWN     */
/* ====================== */

.deadline-countdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.countdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
}

.countdown-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.countdown-dot--urgent { background: #f87171; }
.countdown-dot--soon   { background: #fbbf24; }
.countdown-dot--ok     { background: #60a5fa; }

.countdown-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.countdown-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.countdown-course {
    font-size: 0.72rem;
    color: #94a3b8;
}

.countdown-label {
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 20px;
}

.countdown-label--urgent { background: #fee2e2; color: #b91c1c; }
.countdown-label--soon   { background: #fef3c7; color: #92400e; }
.countdown-label--ok     { background: #eff6ff; color: #1d4ed8; }

.countdown-empty {
    color: #94a3b8;
    font-size: 0.88rem;
    text-align: center;
    margin-top: 20px;
}

/* ====================== */
/* STAT CARDS             */
/* ====================== */

.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
}

.stat-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.stat-card__icon--blue   { background: #dbeafe; color: #1d4ed8; }
.stat-card__icon--green  { background: #dcfce7; color: #15803d; }
.stat-card__icon--purple { background: #f3e8ff; color: #7e22ce; }
.stat-card__icon--indigo { background: #e0e7ff; color: #4338ca; }

.stat-card__value {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    word-break: break-all;
}

.stat-card__label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.75;
}

.stat-card--blue   { background: #eff6ff; color: #1d4ed8; }
.stat-card--indigo { background: #eef2ff; color: #4338ca; }
.stat-card--green  { background: #f0fdf4; color: #15803d; }
.stat-card--amber  { background: #fffbeb; color: #b45309; }
.stat-card--red    { background: #fef2f2; color: #b91c1c; }
.stat-card--purple { background: #faf5ff; color: #7e22ce; }

@media (max-width: 900px) {
    .stat-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stat-cards-grid {
        grid-template-columns: 1fr;
    }
}

.plan-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.plan-table thead tr {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
}

.plan-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    border: none;
    background: transparent;
}

.plan-table td {
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: #334155;
    text-align: left;
}

.plan-table tbody tr:last-child td {
    border-bottom: none;
}

#study-plan-body tr {
    transition: background 0.15s ease;
}

#study-plan-body tr:hover {
    background: #f8faff;
}

.planner-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: capitalize;
    min-width: 90px;
}

.planner-status.completed {
    background: #dcfce7;
    color: #166534;
}

.planner-status.missed {
    background: #fee2e2;
    color: #991b1b;
}

#study-plan-body button {
    width: auto;
    padding: 8px 14px;
    margin: 4px;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#study-plan-body button:first-child {
    background: #f0fdf4;
    color: #15803d;
}

#study-plan-body button:last-child {
    background: #fee2e2;
    color: #991b1b;
}

#study-plan-body button:hover {
    transform: scale(1.04);
}

/* Study plan loading */
.plan-loading {
    text-align: center;
    padding: 32px;
    color: #94a3b8;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.plan-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Availability Day Toggles */
.avail-days-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.avail-day-toggle input {
    display: none;
}

.avail-day-toggle span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    user-select: none;
}

.avail-day-toggle span:hover {
    border-color: #6366f1;
    color: #4338ca;
}

.avail-day-toggle input:checked + span {
    background: #eef2ff;
    border-color: #6366f1;
    color: #4338ca;
}

/* Availability Schedule Section */
.avail-schedule {
    margin-top: 32px;
    background: white;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #103b80;
}

.avail-schedule__title {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #103b80;
}

.avail-slot {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.avail-slot:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.avail-slot:first-child {
    padding-top: 0;
}

.avail-day-badge {
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 90px;
    text-align: center;
}

.avail-slot__times {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.avail-slot__row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.avail-slot__time {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

.avail-delete-btn {
    background: none;
    border: none;
    color: #b0b8c1;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    margin: 0;
    width: auto;
}

.avail-delete-btn:hover {
    background: #f1f5f9;
    color: #64748b;
}
