/* ===============================
   BASE RESET & LAYOUT
   =============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #f4f6fb;
}

.layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    height: 100vh;
}

/* ===============================
   SIDEBAR & NAVIGATION
   =============================== */
.sidebar {
    background: #dbe2f0;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    height: 100vh; 
    position: sticky; 
    top: 0;
}

.menu {
    margin-top: 70px;
}

.menu-btn {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border-radius: 20px;
    border: 2px solid #3e66ff;
    background: white;
    color: #3e66ff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.menu-btn:hover, .menu-btn.active {
    background: #3e66ff;
    color: white;
}

/* Logout Button Anchored to Bottom */
.logout {
    margin-top: auto; 
    width: 100%;
}

.logout-btn {
    width: 100%;
    padding: 14px;
    border-radius: 20px;
    border: 2px solid #d16464;
    background: white;
    color: #d16464;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.logout-btn:hover {
    background: #d16464;
    color: white;
}

.logout-icon {
    font-size: 16px;
}

/* ===============================
   SHARED MAIN LAYOUT (Dashboard/Lectures)
   =============================== */
.main {
    padding: 40px 40px 40px 60px;
    /* If full height is needed for calendar, we override inline or handle below */
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    width: 100%;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #000000;
    padding: 12px 20px;
    border-radius: 30px;
    width: 500px;
    background: white;
    position: absolute;
    left: 40%;
    transform: translateX(-50%);
}

.search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 15px;
}

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.profile img {
    border-radius: 50%;
}

.profile p {
    font-size: 13px;
    color: #555;
}

/* ===============================
   DASHBOARD SPECIFIC
   =============================== */
.task-button {
    border: 2px solid #d16464;
    color: #d16464;
    background: white;
    padding: 10px 25px;
    border-radius: 20px;
    margin-bottom: 25px;
    font-weight: 600;
    width: fit-content;
    cursor: pointer;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

#tasksContainer {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.task {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #d8e0f2;
    padding: 20px 30px;
    border-radius: 5px;
}

.task h2 {
    color: #1f4fa5;
    font-size: 28px;
}

.task-info {
    text-align: right;
    color: #1f4fa5;
}

.task-info span {
    font-size: 14px;
}

.right-card {
    background: #cfd7ea;
    padding: 40px;
    height: 65vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#dayName {
    color: #3c63ff;
    font-size: 26px;
    font-weight: 700;
    margin-top: 10px;
}

/* ===============================
   LECTURES SPECIFIC
   =============================== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.course-card {
    background: #e2e7f3;
    border-radius: 25px;
    padding: 40px 30px;
    text-align: center;
}

.course-code {
    display: inline-block;
    background: #3556e8;
    color: white;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

.course-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.course-instructor {
    color: #444;
    margin-bottom: 25px;
}

.course-btn {
    background: #8c9ec7;
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.course-btn:hover {
    background: #7385af;
}

/* ===============================
   CALENDAR APP SPECIFIC
   =============================== */

/* Overrides the default .main padding so the calendar fills the screen */
.calendar-app {
    display: flex;
    flex: 1; /* Fills remaining height in main */
    background: white;
    border-radius: 15px; /* Optional: gives it a nice contained look */
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-top: 10px;
}

/* 1. Left Sidebar (Blue Mini Calendar Panel) */
.cal-sidebar {
    width: 260px;
    background: #EAF0FA; 
    padding: 20px;
    border-right: 1px solid #dcdcdc;
    display: flex;
    flex-direction: column;
}

.cal-title {
    color: #1a45b8;
    font-size: 24px;
    margin-bottom: 30px;
}

/* Mini Calendar */
.mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 700;
    color: #444;
}

.mini-nav button {
    border: none;
    background: none;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    padding: 5px;
}

.mini-nav button:hover {
    color: #3c40fa;
}

.mini-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 5px;
}

.mini-day {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.mini-day:hover {
    background: #d6e2f5;
}

.mini-day.active {
    background: #3c40fa; 
    color: white;
}

/* 2. Main Area (Weekly Grid) */
.cal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

/* Toolbar */
.cal-toolbar {
    padding: 15px 25px;
    border-bottom: 1px solid #dadce0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: #5f6368;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.today-btn {
    background: white;
    border: 1px solid #dadce0;
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    color: #3c40fa;
    transition: background 0.2s;
}

.today-btn:hover {
    background: #f8faff;
}

.nav-arrows button {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    color: #5f6368;
    padding: 0 5px;
}

.nav-arrows button:hover {
    color: #3c40fa;
}

.date-range {
    font-size: 18px;
    color: #3c40fa; 
    font-weight: 500;
    margin-left: 10px;
}

.view-btn {
    padding: 6px 12px;
    background: #f1f3f4;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Week Grid Layout */
.week-view-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Grid Header (Mon 15, Tue 16...) */
.week-header {
    display: flex;
    border-bottom: 1px solid #dadce0;
    background: white;
}

.time-col-header {
    width: 60px; 
    border-right: 1px solid #dadce0;
    flex-shrink: 0;
}

.day-header {
    flex: 1;
    text-align: left;
    padding: 10px;
    border-right: 1px solid #dadce0;
    display: flex;
    flex-direction: column;
}

.day-name {
    font-size: 12px;
    color: #70757a;
    font-weight: 600;
    text-transform: uppercase;
}

.day-num {
    font-size: 26px;
    color: #70757a;
}

/* Grid Body */
.week-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
}

.time-column {
    width: 60px;
    flex-shrink: 0;
    border-right: 1px solid #dadce0;
    background: white;
}

.time-slot {
    height: 60px; /* Height per hour */
    display: flex;
    justify-content: center;
    font-size: 12px;
    color: #70757a;
    position: relative;
    top: -8px; /* Align text exactly with the border lines */
}

.days-grid {
    flex: 1;
    display: flex;
    background: #fcfcfc; /* subtle background for empty grid */
}

.day-column {
    flex: 1;
    border-right: 1px solid #dadce0;
    position: relative;
}

/* Grid lines inside the day columns */
.grid-cell {
    height: 60px;
    border-bottom: 1px solid #e0e0e0;
}