:root {
    --bg-color: #f0f0f0;
    --main-border: 3px solid #000;
    --shadow: 5px 5px 0px #000;
    --shadow-active: 2px 2px 0px #000;
    --c-primary: #ff90e8; /* Pink */
    --c-secondary: #23a6d5; /* Blue */
    --c-accent: #ffc900; /* Yellow */
    --c-success: #5dfdcb; /* Green */
    --font-main: "Courier New", Courier, monospace;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- UI COMPONENTS --- */
.nb-box {
    border: var(--main-border);
    box-shadow: var(--shadow);
    background: #fff;
    padding: 10px;
    margin-bottom: 10px;
}

.nb-btn {
    border: var(--main-border);
    box-shadow: var(--shadow);
    background: var(--c-accent);
    font-family: inherit;
    font-weight: bold;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.1s;
    text-transform: uppercase;
}

.nb-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 6px 6px 0px #000;
}

.nb-btn:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-active);
}

.nb-input {
    border: var(--main-border);
    padding: 8px;
    font-family: inherit;
    width: 100%;
    outline: none;
    background: #fff;
}

.nb-input:focus {
    background: #eef;
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: var(--main-border);
}

#project-name {
    font-size: 2rem;
    font-weight: 900;
    background: var(--c-primary);
    padding: 5px 10px;
    border: var(--main-border);
    box-shadow: var(--shadow);
    outline: none;
}

.controls {
    display: flex;
    gap: 10px;
}

/* --- LAYOUT --- */
.app-container {
    display: flex;
    gap: 20px;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

/* --- LEFT PANE (Unscheduled) --- */
.sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    background: #e0e0e0;
    border: var(--main-border);
    box-shadow: var(--shadow);
    padding: 15px;
}

.sidebar h2 {
    margin-top: 0;
    background: var(--c-secondary);
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    padding: 5px;
    border: var(--main-border);
    text-align: center;
}

.task-list {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    background: repeating-linear-gradient(
        45deg,
        #fff,
        #fff 10px,
        #f0f0f0 10px,
        #f0f0f0 20px
    );
    border: var(--main-border);
}

/* --- RIGHT PANE (Calendar) --- */
.calendar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: var(--main-border);
    box-shadow: var(--shadow);
    background: #fff;
    padding: 15px;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.2rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: 30px auto; /* Header row + days */
    gap: 2px;
    background: #000; /* For border effect */
    border: 3px solid #000;
    flex: 1;
    overflow-y: auto;
}

.day-header {
    background: var(--c-accent);
    text-align: center;
    padding: 5px;
    font-weight: bold;
    border: 1px solid #000;
}

.day-cell {
    background: #fff;
    min-height: 100px;
    padding: 5px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.day-cell.today {
    background: #fffbe6;
}

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
    pointer-events: none;
}

/* --- TASK CARD --- */
.task-card {
    background: #fff;
    border: 2px solid #000;
    padding: 5px;
    cursor: grab;
    font-size: 0.9rem;
    position: relative;
    box-shadow: 3px 3px 0px #000;
    transition: transform 0.1s;
}

.task-card:active {
    cursor: grabbing;
}

.task-card.completed {
    background: var(--c-success);
    text-decoration: line-through;
    opacity: 0.7;
}

.task-card:hover {
    transform: translate(-1px, -1px);
    z-index: 10;
}

.task-card .task-actions {
    margin-top: 5px;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.icon-btn {
    background: none;
    border: 2px solid #000;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 5px;
}

.icon-btn:hover {
    background: #000;
    color: #fff;
}

/* --- MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal {
    background: #fff;
    border: var(--main-border);
    box-shadow: 10px 10px 0px #000;
    padding: 20px;
    width: 400px;
    max-width: 90%;
}

.modal textarea {
    width: 100%;
    height: 100px;
    margin: 10px 0;
    border: var(--main-border);
    font-family: inherit;
    padding: 5px;
    resize: none;
}

/* --- UTILS --- */
.hidden {
    display: none;
}
.drag-over {
    background-color: #e0f7fa !important;
}
