/* =========================
   RESET (IMPORTANT)
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* =========================
   GLOBAL BODY
========================= */
body {
    font-family: 'Poppins', sans-serif;
    background: #f4f4f4;
    color: #333;
}

/* =========================
   LAYOUT FIX (SIDEBAR SAFE)
========================= */
.main,
.container {
    margin-left: 250px;
    padding: 20px;
}

/* =========================
   WRAPPER
========================= */
.wrapper {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    padding: 30px;
    background: #f4f4f4;
    border-radius: 12px;
    max-width: 100%;
}

/* =========================
   CALENDAR
========================= */
.calendar {
    flex: 2;
    min-width: 0;
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Header */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h2 {
    font-size: 1.5rem;
    color: #F59E0B;
}

/* Navigation */
.month-nav {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    color: #F59E0B;
    text-decoration: none;
    transition: 0.2s;
}

.month-nav:hover {
    background: #F59E0B;
    color: #fff;
}

/* =========================
   GRID CALENDAR
========================= */
.grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.day-name {
    text-align: center;
    font-weight: 700;
    color: #666;
}

.day {
    background: #fff;
    border-radius: 12px;
    min-height: 110px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: 0.2s;
}

.day:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.day.active {
    background: #1D4ED8;
    color: #fff;
}

.day.today {
    box-shadow: inset 0 0 0 2px #F59E0B;
}

.date-number {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.events-preview {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #F59E0B;
}

/* =========================
   EVENTS SIDEBAR
========================= */
.events {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-3px);
}

/* =========================
   FORM
========================= */
.form-card label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 600;
}

.form-card input,
.form-card textarea {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #ddd;
}

.form-card button,
.form-card .button {
    margin-top: 16px;
    background: #1D4ED8;
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

/* =========================
   FOOTER SAFE
========================= */
.footer {
    width: 100%;
    overflow-x: hidden;
}

.footer-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* =========================
   RESPONSIVE (IMPORTANT)
========================= */

/* Tablet */
@media (max-width: 980px) {
    .wrapper {
        flex-direction: column;
        gap: 30px;
    }
}

/* Mobile */
@media (max-width: 768px) {

    .main,
    .container {
        margin-left: 0 !important;
    }

    .wrapper {
        padding: 15px;
        gap: 20px;
    }

    .calendar,
    .events {
        width: 100%;
    }

    .grid {
        gap: 6px;
    }

    .day {
        min-height: 80px;
        padding: 10px;
    }

    .footer-bottom {
        grid-template-columns: 1fr;
    }
}