/* =========================
   GENERAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #080b18;
    color: white;
    min-height: 100vh;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;

    width: 240px;
    height: 100vh;

    padding: 25px 15px;

    background: #10152b;
    border-right: 1px solid #252b4a;
}

.sidebar h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar a {
    text-decoration: none;
    color: #b9bfd8;

    padding: 12px 15px;
    border-radius: 10px;

    transition: 0.3s;
}

.sidebar a:hover {
    background: #20284b;
    color: white;
    transform: translateX(5px);
}


/* =========================
   MAIN CONTENT
========================= */

.main-content {
    margin-left: 240px;
    padding: 30px;
}


/* =========================
   TOP BAR
========================= */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 35px;
}

.topbar h2 {
    font-size: 24px;
}

#darkModeBtn {
    border: none;
    background: #20284b;
    color: white;

    padding: 10px 14px;
    border-radius: 10px;

    cursor: pointer;
    font-size: 18px;
}


/* =========================
   WELCOME
========================= */

.welcome {
    margin-bottom: 30px;
}

.welcome h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.welcome p {
    color: #9da5c5;
}

/* =========================
   STAT CARDS
========================= */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;

    margin-bottom: 25px;
}

.card {
    background: #11172d;

    padding: 20px;

    border: 1px solid #252b4a;
    border-radius: 15px;

    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #6674ff;
}

.card h3 {
    margin-bottom: 15px;
}

.card p {
    font-size: 30px;
    font-weight: bold;

    margin-bottom: 5px;
}

.card span {
    color: #8f97b5;
    font-size: 14px;
}


/* =========================
   DASHBOARD GRID
========================= */

.dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dashboard-card {
    background: #11172d;

    padding: 25px;

    border: 1px solid #252b4a;
    border-radius: 15px;
}

.dashboard-card h2 {
    margin-bottom: 20px;
}


/* =========================
   LIGHT MODE
========================= */

body.light-mode {
    background: #f2f4fa;
    color: #171a2b;
}

body.light-mode .sidebar {
    background: #ffffff;
    border-color: #dddddd;
}

body.light-mode .sidebar a {
    color: #555b72;
}

body.light-mode .sidebar a:hover {
    background: #e9ecf5;
    color: #171a2b;
}

body.light-mode .card{
    background: #ffffff;
    
}
body.light-mode .dashboard-card {
    background: #ffffff;
    border-color: #dddddd;
}

body.light-mode .card span,
body.light-mode .welcome p {
    color: #666b7d;
}

/* =========================
   CALENDAR
========================= */

.calendar-container {
    background: #11172d;
    border: 1px solid #252b4a;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
}


/* Calendar Header */

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.calendar-header h2 {
    font-size: 24px;
}

.calendar-header button {
    border: none;
    background: #252d55;
    color: white;

    width: 40px;
    height: 40px;

    border-radius: 10px;
    cursor: pointer;

    font-size: 20px;
}

.calendar-header button:hover {
    background: #37427a;
}


/* Weekdays */

.calendar-weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-weekdays div {
    text-align: center;
    color: #8f97b5;
    font-weight: bold;
    padding: 10px;
}


/* Calendar Days */

.calendar-day {
    min-height: 90px;

    border: 1px solid #252b4a;

    padding: 10px;

    cursor: pointer;

    transition: 0.2s;
}

.calendar-day:hover {
    background: #1b2341;
}

.calendar-day.empty {
    cursor: default;
    background: transparent;
}


/* Today's Date */

.calendar-day.today {
    background: #252d55;
    border: 2px solid #6674ff;
}

.calendar-day.today .day-number {
    color: #8d98ff;
    font-weight: bold;
}


/* Day Number */

.day-number {
    font-size: 16px;
}


/* Events */

.calendar-event {
    background: #6674ff;
    color: white;

    padding: 4px 6px;

    border-radius: 5px;

    font-size: 12px;

    margin-top: 8px;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================
   CALENDAR BOTTOM
========================= */

.calendar-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}


/* Event Inputs */

.calendar-bottom input {
    width: 100%;

    padding: 12px;

    margin-bottom: 10px;

    border: 1px solid #30385f;
    border-radius: 8px;

    background: #0b1022;
    color: white;
}

.calendar-bottom input:focus {
    outline: none;
    border-color: #6674ff;
}


/* Add Event Button */

#addEventBtn {
    border: none;

    padding: 12px 20px;

    border-radius: 8px;

    background: #6674ff;
    color: white;

    cursor: pointer;
}

#addEventBtn:hover {
    background: #5362e5;
}


/* Event List */

.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #1a2140;

    padding: 12px;

    margin-bottom: 8px;

    border-radius: 8px;
}

.delete-event {
    border: none;
    background: transparent;

    color: #ff6b6b;

    cursor: pointer;
}


/* =========================
   LIGHT MODE
========================= */

body.light-mode .calendar-container {
    background: white;
    border-color: #dddddd;
}

body.light-mode .calendar-day {
    border-color: #dddddd;
}

body.light-mode .calendar-day:hover {
    background: #f1f3f8;
}

body.light-mode .calendar-day.today {
    background: #eef3ff;
}

body.light-mode .calendar-header button {
    background: #e9edfa;
    color: #2c3e50;
}

body.light-mode .calendar-bottom input {
    background: #f5f6fa;
    color: #2c3e50;
    border-color: #d5d9e5;
}

body.light-mode .event-item {
    background: #f1f3f8;
}

body.light-mode .calendar-weekdays div {
    color: #666b7d;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 700px) {

    .calendar-day {
        min-height: 60px;
        padding: 5px;
    }

    .calendar-bottom {
        grid-template-columns: 1fr;
    }

    .calendar-event {
        font-size: 10px;
    }

}

/* =========================
   UPCOMING EVENTS
========================= */

.upcoming-event {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #1a2140;

    padding: 12px;
    margin-bottom: 8px;

    border-radius: 8px;
}

.upcoming-event strong {
    color: white;
}

.upcoming-event span {
    color: #9da5c5;
    font-size: 13px;
}


/* Light Mode */

body.light-mode .upcoming-event {
    background: #f1f3f8;
}

body.light-mode .upcoming-event strong {
    color: #2c3e50;
}

body.light-mode .upcoming-event span {
    color: #666b7d;
}

@media (max-width: 900px) {
    .sidebar {
        width: 190px;
    }

    .main-content {
        margin-left: 190px;
    }
}

@media (max-width: 700px) {
    body {
        overflow-x: hidden;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 18px 12px;
        border-right: 0;
        border-bottom: 1px solid #252b4a;
    }

    .sidebar h1 {
        margin-bottom: 14px;
        font-size: 21px;
    }

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sidebar a {
        flex: 1 1 135px;
        padding: 10px;
        text-align: center;
    }

    .sidebar a:hover {
        transform: none;
    }

    .main-content {
        margin-left: 0;
        padding: 18px 14px 28px;
    }

    .topbar {
        gap: 12px;
        margin-bottom: 24px;
    }

    .topbar h2 {
        font-size: 20px;
    }

    .welcome h1 {
        font-size: 26px;
    }

    .calendar-container,
    .dashboard-card {
        padding: 16px;
    }

    .calendar-header h2 {
        font-size: 19px;
    }

    .calendar-weekdays,
    .calendar-days {
        min-width: 560px;
    }

    .calendar-container {
        overflow-x: auto;
    }

    .calendar-day {
        min-height: 72px;
    }

    #addEventBtn {
        width: 100%;
        min-height: 44px;
    }
}
