body {
    background: #BBC6D6;
    font-family: Georgia, serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.sidebar {
    width: 100%;
    background: linear-gradient(90deg, #1f2b34 0%, #2C4251 100%);
    color: white;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.22);
    z-index: 200;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    margin: 0;
    color: white;
    font-family: Georgia, serif;
    font-weight: normal;
}

.logo {
    height: 36px;
    width: auto;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-hamburger {
    position: relative;
    display: flex;
    align-items: center;
}

.menu-toggle {
    font-size: 22px;
    cursor: pointer;
    color: #c1c1c1;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.2s;
    user-select: none;
}

.menu-toggle:hover { color: white; }

.nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    margin: 0;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 400;
}

.nav-links li { display: block; }

.nav-links.active { display: flex; }

.nav-links a {
    text-decoration: none;
    color: #1f2b34;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-links a:hover {
    background-color: #b6c649;
    color: #fff;
}

.topbar-right {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 10px;
}

.avatar {
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255,255,255,0.3);
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.avatar:hover { border-color: #b6c649; }

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-menu {
    display: none; 
    position: absolute;
    top: 44px;
    right: 0;
    background-color: #1f2b34;
    padding: 8px 0;
    border-radius: 8px;
    flex-direction: column;
    gap: 0;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100;
}

.avatar-menu .menu-item {
    cursor: pointer;
    padding: 8px 16px;
    color: white;
    font-size: 13px;
    transition: background 0.15s;
}

.avatar-menu .menu-item:hover {
    background-color: #2c3e50;
}

.avatar-menu.active {
    display: flex;
}

.content {
    padding: 24px 24px 48px;
}

.tasks-header {
    margin-bottom: 18px;
}

.tasks-header h1 {
    font-size: 30px;
    color: #1f2b34;
    margin: 0;
    letter-spacing: -0.5px;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

#open-popup {
    padding: 9px 18px;
    background-color: #2c4251;
    color: white;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 6px rgba(44,66,81,0.3);
}

#open-popup:hover {
    background-color: #1f2b34;
    transform: translateY(-1px);
}

.filter-select {
    padding: 9px 32px 9px 14px;
    font-size: 14px;
    font-family: Georgia, serif;
    border: 1.5px solid #2c4251;
    border-radius: 7px;
    background-color: white;
    color: #2c4251;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232C4251' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #b6c649;
}

/*summary table*/
.summary-section {
    margin-bottom: 24px;
}

.summary-section h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #4a5e6d;
    margin: 0 0 8px;
}

.summary-table-wrap {
    border-radius: 8px;
    overflow: hidden;
    display: inline-block;
}

.summary-table {
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-size: 13px;
    min-width: 360px;
}

.summary-table th {
    background: #2C4251;
    color: white;
    padding: 9px 20px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.summary-table td {
    padding: 8px 20px;
    border-bottom: 1px solid #eef0f3;
    color: #2C4251;
}

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

.summary-table tr:hover td {
    background: #f5f8fb;
}

/*status badges in table*/
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
}

.badge-todo { background: #e8eef5; color: #4a6070; }
.badge-prog { background: #fff3cd; color: #8a6200; }
.badge-done { background: #e6f4ea; color: #2e7d32; }

.count-cell {
    font-weight: 700;
    font-size: 14px;
    color: #2C4251;
}

/*kanban board*/
.task-board {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.column {
    flex: 1;
    min-width: 220px;
    max-height: 68vh;
    overflow-y: auto;
    padding: 14px 12px;
    border-radius: 12px;
    background-color: #97A6BA;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/*colored top border per column*/
.column[data-col="todo"]       { border-top: 4px solid #7b9fc7; }
.column[data-col="inprogress"] { border-top: 4px solid #e8b84b; }
.column[data-col="completed"]  { border-top: 4px solid #b6c649; }

.column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.column-header h2 {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    color: #1f2b34;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/*count bubble in column header*/
.col-count {
    background: rgba(255,255,255,0.55);
    color: #1f2b34;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
}

/*task card*/
.task-card {
    background: white;
    border-radius: 8px;
    padding: 12px 13px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: transform 0.15s, box-shadow 0.15s;
    animation: cardIn 0.25s ease;
}

@keyframes cardIn { /*slides in from above when created*/
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.14);
}

.task-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2b34;
}

.task-card-desc {
    font-size: 12px;
    color: #667788;
    margin: 0;
    line-height: 1.4;
}

.task-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 3px;
}

/*priority on card*/
.priority-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.priority-low    { background: #e6f4ea; color: #2e7d32; }
.priority-medium { background: #fff8e1; color: #b07a00; }
.priority-high   { background: #fce8e6; color: #c62828; }

/*colored left border by priority*/
.task-card.prio-high   { border-left: 3px solid #e8a0a0; }
.task-card.prio-medium { border-left: 3px solid #e8cb80; }
.task-card.prio-low    { border-left: 3px solid #b6c649; }

.due-date {
    font-size: 11px;
    color: #999;
}

/*create/edit task popup*/
.popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.45);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.popup.open {
    display: flex;
}

.popup-content {
    background: white;
    padding: 28px 26px 24px;
    border-radius: 14px;
    width: 380px;
    max-width: 94vw;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: popIn 0.2s ease;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.popup-content h3 {
    margin: 0 0 20px;
    font-size: 19px;
    color: #2C4251;
}

.popup-close {
    position: absolute;
    top: 12px; right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    transition: color 0.15s;
}

.popup-close:hover {
    color: #333;
}

/*form fields inside popup*/
.form-group {
    margin-bottom: 13px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #8a9bb0;
    margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group textarea,
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 9px 11px;
    border: 1.5px solid #dde3ea;
    border-radius: 7px;
    font-family: Georgia, serif;
    font-size: 14px;
    color: #2C4251;
    background: #f7f9fb;
    box-sizing: border-box;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #2C4251;
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 68px;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

/*submit btn*/
.btn-create-task {
    width: 100%;
    padding: 11px;
    background: #b6c649;
    color: white;
    border: none;
    border-radius: 7px;
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(182,198,73,0.35);
    margin-top: 6px;
}

.btn-create-task:hover {
    background: #9faf30;
    transform: translateY(-1px);
}

/*float + clearfix = rubric req*/
.logo-float {
    float: left;
    margin-right: 10px;
}

.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

/*responsive*/
@media (max-width: 768px) {
    .task-board { flex-direction: column; }
    .column { max-height: none; }
    .toolbar { flex-direction: column; align-items: flex-start; }
    .summary-table { min-width: unset; width: 100%; }
}

@media (max-width: 480px) {
    .sidebar h2 { font-size: 13px; }
    #open-popup { width: 100%; justify-content: center; }
    .filter-select { width: 100%; }
    .content { padding: 16px; }
    .tasks-header h1 { font-size: 24px; }
}

/*member chips row (type + add button)*/
.member-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.member-input-row input[type="text"] { /*name entry field*/
    flex: 1;
    padding: 8px 11px;
    border: 1.5px solid #dde3ea;
    border-radius: 7px;
    font-family: Georgia, serif;
    font-size: 14px;
    color: #2C4251;
    background: #f7f9fb;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.member-input-row input[type="text"]:focus {
    border-color: #2C4251;
    background: white;
}

.member-input-row button { /*+ add button*/
    padding: 8px 13px;
    background: #2C4251;
    color: white;
    border: none;
    border-radius: 7px;
    font-family: Georgia, serif;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.member-input-row button:hover {
    background: #1f2b34;
}

/*chip container (holds all chips)*/
.member-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
}

/*individual name chip*/
.member-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e8eef5;
    color: #2C4251;
    border-radius: 99px;
    padding: 4px 10px 4px 12px;
    font-size: 12px;
    font-weight: 600;
    animation: chipIn 0.18s ease;
}

@keyframes chipIn { /*pops in when added*/
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

/*× remove button on chip*/
.chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #7a9bb0;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.chip-remove:hover {
    color: #c62828;
}

/*member avatar bubbles at bottom of card*/
.card-members {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.member-avatar { /*circular initial bubble*/
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2C4251;
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.15s;
    flex-shrink: 0;
}

.member-avatar:hover {
    transform: scale(1.15);
}

.member-avatar-more { 
    background: #97A6BA;
    color: #1f2b34;
    font-size: 9px;
}

.card-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
}

/*⋮ three dots button*/
.card-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #aab8c4;
    line-height: 1;
    padding: 0 2px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}

.card-menu-btn:hover {
    color: #2C4251;
    background: #eef2f5;
}

/*dropdown that appears when ⋮ clicked*/
.card-menu {
    display: none; /*hidden by default, .open shows it*/
    flex-direction: column;
    background: white;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14);
    overflow: hidden;
    z-index: 50;
    animation: menuIn 0.15s ease;
}

.card-menu.open {
    display: flex;
}

@keyframes menuIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-menu-item {
    padding: 9px 14px;
    font-size: 13px;
    cursor: pointer;
    color: #2C4251;
    transition: background 0.12s;
    white-space: nowrap;
}

.card-menu-item:hover {
    background: #f0f4f8;
}

/*delete option gets red tint on hover*/
.delete-item:hover {
    background: #fce8e6;
    color: #c62828;
}

.card-menu-item svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
    margin-right: 5px;
    flex-shrink: 0;
}

.due-date svg {
    width: 11px;
    height: 11px;
    stroke: #999;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
    margin-right: 2px;
}

/* dark mode */
body.dark { background: #1a2330; color: #e0e0e0; }

body.dark .sidebar { background-color: #0f1923; }
body.dark .nav-links { background-color: #1e2d3d; }
body.dark .nav-links a { color: #ccd6e0; }

body.dark .content { background: #1a2330; }
body.dark .tasks-header h1 { color: #e0e0e0; }
body.dark #open-popup { background-color: #4a7fc1; }
body.dark .filter-select { background: #243040; color: #e0e0e0; border-color: #344558; }

body.dark .summary-section { background: #243040; border-radius: 12px; padding: 16px; }
body.dark .summary-section h3 { color: #e0e0e0; }
body.dark .summary-table { background: #243040; }
body.dark .summary-table-wrap { border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; overflow: hidden; }
body.dark .summary-table th { background: #1e2d3d; color: #8a9bb0; border-color: #344558; }
body.dark .summary-table td { background: #243040; color: #ccd6e0; border-color: #344558; }
body.dark .summary-table tr:nth-child(even) td { background: #1e2d3d; }
body.dark .summary-table tr:hover td { background: #2c3e50; }
body.dark .badge-todo { background: #2c3e50; color: #8a9bb0; }
body.dark .badge-prog { background: #4a3a10; color: #f0c040; }
body.dark .badge-done { background: #1a3a28; color: #4caf7d; }

body.dark .column { background: #243040; }
body.dark .column-header h2 { color: #e0e0e0; }

body.dark .task-card { background: #1e2d3d; }
body.dark .task-card-title { color: #e0e0e0; }
body.dark .task-card-desc  { color: #8a9bb0; }
body.dark .task-card-meta  { color: #6a8aaa; }
body.dark .due-date        { color: #6a8aaa; }
body.dark .due-date svg    { stroke: #6a8aaa; }

body.dark .card-menu-btn { color: #8a9bb0; }
body.dark .card-menu { background: #1a2330; border-color: #344558; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
body.dark .card-menu-item { color: #ccd6e0; }
body.dark .card-menu-item:hover { background: #2c3e50; }

body.dark .popup { background: rgba(0,0,0,0.65); }
body.dark .popup-content { background: #243040; }
body.dark #popup-title { color: #e0e0e0; }
body.dark .popup-close { color: #6a8aaa; background: transparent; border: none; }
body.dark .form-group label { color: #8a9bb0; }
body.dark #task-name,
body.dark #task-desc,
body.dark #task-priority,
body.dark #task-status,
body.dark #task-due,
body.dark #member-input { background: #1a2330; color: #e0e0e0; border-color: #344558; }
body.dark #add-member-btn { background: #344558; color: #ccd6e0; border-color: #344558; }
body.dark .member-chip { background: #1e2d3d; border-color: #344558; color: #ccd6e0; }
body.dark .logo { mix-blend-mode: screen; opacity: 0.9; }
