/* styles.css */

:root {
    --bg: #111827;
    --sidebar: #1f2937;
    --card: #374151;
    --text: #f9fafb;
    --accent: #3b82f6;
    --border: #4b5563;
}

[data-theme="light"] {
    --bg: #f3f4f6;
    --sidebar: #ffffff;
    --card: #ffffff;
    --text: #111827;
    --accent: #2563eb;
    --border: #d1d5db;
}

.main-content {
    flex: 1;

    display: flex;

    flex-direction: column;

    min-width: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

.app {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 240px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.logo {
    margin-bottom: 30px;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text);
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    text-align: left;
    border-radius: 8px;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--accent);
}

.sidebar-bottom {
    margin-top: auto;
}

/* MAIN */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* TOPBAR */

.topbar {
    height: 70px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--sidebar);
}

#projectName {
    padding: 10px;
    width: 300px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

.topbar-actions {
    display: flex;
    gap: 10px;
}

button,
.load-btn {
    background: var(--accent);
    border: none;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
}

/* VIEWS */

.view {
    display: none;
    flex: 1;
    overflow: auto;
}

.active-view {
    display: flex;
}

/* BOARD */
#boardView {
    display: none;
    flex-direction: column;

    height: 100%;

    overflow: hidden;

    padding: 20px;
}

#boardView.active-view {
    display: flex;
}

/* SCROLL AREA */

.board-scroll-wrapper {
    flex: 1;

    overflow-x: scroll;
    overflow-y: auto;

    min-height: 0;
    min-width: 0;

    width: 100%;
}

/* BUCKET ROW */

.bucket-container {
    display: flex;

    gap: 20px;

    align-items: flex-start;

    width: max-content;

    min-width: 100%;

    padding-bottom: 10px;
}

/* BUCKET */

.bucket {
    width: 320px;
    min-width: 320px;

    background: var(--sidebar);

    border-radius: 12px;

    padding: 15px;

    flex-shrink: 0;
}

/* FOOTER */

.board-footer {
    padding-top: 15px;

    flex-shrink: 0;
}

/* SCROLLBAR */

.board-scroll-wrapper::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.board-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--sidebar);
}

.board-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
.task-list {
    min-height: 100px;
}

.task {
    background: var(--card);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: grab;
	border: 1px solid var(--border);
}

.task-title {
    font-weight: bold;
    margin-bottom: 6px;
}

.task-date {
    font-size: 12px;
    opacity: 0.8;
}

.add-task-btn,
.add-bucket-btn {
    margin-top: 10px;
}

/* TIMELINE */

#timelineView {
    padding: 20px;
    flex-direction: column;
    overflow-y: auto;
    height: 100%;
}

.timeline-task {
    background: var(--card);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* CALENDAR */

#calendarView {
    padding: 20px;
    height: 100%;
	width: 100%;
    overflow: hidden;
}

#calendar {
    height: 100%;
	width: 100%;
    background: var(--sidebar);
    border-radius: 12px;
    padding: 10px;
}

/* COMPLETED TASKS */

.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.task-complete {
    opacity: 0.7;
}

.bucket-complete {
    border: 2px solid #22c55e;
}

/* TASK LAYOUT */

.task-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.task-left {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.task-actions,
.bucket-actions {
    display: flex;
    gap: 6px;
}

.task-actions button,
.bucket-actions button {
    padding: 6px 8px;
    font-size: 12px;
}

.bucket-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* TEAM VIEW */

#teamView {
    flex-direction: column;

    padding: 20px;

    overflow: hidden;

    height: 100%;
}

.team-toolbar {
    margin-bottom: 20px;

    flex-shrink: 0;
}

.team-table-wrapper {
    flex: 1;

    overflow: auto;

    background: var(--sidebar);

    border-radius: 12px;
}

.team-table {
    width: 100%;

    border-collapse: collapse;
}

.team-table th,
.team-table td {
    padding: 14px;

    text-align: left;

    border-bottom: 1px solid var(--border);
}

.team-table th {
    background: var(--card);

    position: sticky;

    top: 0;
}

.team-table tr:hover {
    background: rgba(255,255,255,0.03);
}

.task-assignments {
    display: flex;
    gap: 10px;

    margin-top: 10px;

    font-size: 12px;
}

.task-assignments label {
    display: flex;
    flex-direction: column;

    gap: 4px;
}

.task-assignments select {
    padding: 4px;

    border-radius: 6px;

    border: 1px solid var(--border);

    background: var(--card);

    color: var(--text);
}

.task-panel {
    position: fixed;
    right: 0;
    top: 0;

    width: 350px;
    height: 100%;

    background: var(--sidebar);
    border-left: 1px solid var(--border);

    padding: 15px;

    overflow-y: auto;

    z-index: 1000;
}

.hidden {
    display: none;
}

.task-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-panel-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#workerMultiSelect label {
    display: block;
}

.team-tabs {
    display: flex;
    gap: 10px;

    margin-bottom: 20px;
}

.team-tab {
    padding: 10px 16px;
}

.team-tab-view {
    display: none;

    flex-direction: column;

    height: 100%;
}

.active-team-tab {
    display: flex;
}

.report-filters {
    display: flex;
    gap: 10px;

    margin-bottom: 20px;

    flex-wrap: wrap;
}

.report-card {
    background: var(--sidebar);

    padding: 12px;

    border-radius: 10px;

    margin-bottom: 10px;
}