/* ===== 案A：ミニマル・ネイビー ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
    background: #f0f2f5;
    font-size: 13px;
    color: #2c3e50;
}

/* Header */
.header {
    background: #1a2744;
    border-bottom: none;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #8fa3c4;
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.logo {
    width: 28px;
    height: 28px;
    background: #3a6fd8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.brand-name {
    font-size: 10px;
    color: #6b88b0;
    line-height: 1.2;
}

.app-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
}

.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #c8d8f0;
    transition: all 0.15s;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.btn-primary {
    background: #3a6fd8;
    color: #fff;
    border-color: #3a6fd8;
    font-weight: 600;
}

.btn-primary:hover {
    background: #2d5bbf;
    border-color: #2d5bbf;
}

.user-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #3a6fd8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
}

/* App body */
.app-body {
    display: flex;
    margin-top: 52px;
    min-height: calc(100vh - 52px);
    position: relative;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 52px;
    left: -280px;
    width: 260px;
    height: calc(100vh - 52px);
    background: #162040;
    color: #fff;
    transition: left 0.25s ease;
    z-index: 150;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-title {
    font-size: 13px;
    font-weight: 600;
    color: #8fa3c4;
    letter-spacing: 0.5px;
}

.sidebar-close {
    background: none;
    border: none;
    color: #6b88b0;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
}

.sidebar-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.new-project-btn {
    margin: 12px;
    padding: 9px 14px;
    background: #3a6fd8;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    transition: background 0.15s;
}

.new-project-btn:hover {
    background: #2d5bbf;
}

.project-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px 16px;
}

.project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background 0.12s;
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.project-item.proj-current {
    background: rgba(58, 111, 216, 0.25);
    border-left: 3px solid #3a6fd8;
    padding-left: 7px;
}

.project-item.proj-done {
    opacity: 0.5;
}

.project-item.proj-done:hover {
    opacity: 0.75;
}

.project-item-info {
    flex: 1;
    min-width: 0;
}

.project-item-name {
    font-size: 13px;
    color: #dce8ff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-item.proj-done .project-item-name {
    text-decoration: line-through;
    color: #6b88b0;
}

.project-item-sub {
    font-size: 11px;
    color: #6b88b0;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proj-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.12s;
}

.project-item:hover .proj-actions {
    opacity: 1;
}

.proj-complete-btn {
    background: none;
    border: none;
    color: #6b88b0;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 5px;
    border-radius: 4px;
}

.proj-complete-btn:hover {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.15);
}

.project-item-del {
    background: none;
    border: none;
    color: #6b88b0;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 5px;
    border-radius: 4px;
}

.project-item-del:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
}

.proj-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.dot-active {
    background: #4fc3f7;
    box-shadow: 0 0 4px rgba(79, 195, 247, 0.6);
}

.dot-done {
    background: #555;
}

.proj-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #4a6080;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 8px 10px 4px;
}

.proj-empty {
    font-size: 12px;
    color: #4a6080;
    padding: 4px 10px 8px;
    font-style: italic;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 140;
}

.sidebar-overlay.show {
    display: block;
}

/* Main */
.main {
    flex: 1;
    padding: 16px 20px;
    min-width: 0;
}

/* Section */
.section {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    border: 1px solid #dde3ec;
    box-shadow: 0 1px 4px rgba(26, 39, 68, 0.06);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.form-group label {
    font-size: 11px;
    color: #7a8faa;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.form-group input {
    border: 1px solid #dde3ec;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
    color: #2c3e50;
}

.form-group input:focus {
    border-color: #3a6fd8;
    box-shadow: 0 0 0 3px rgba(58, 111, 216, 0.1);
}

.form-group.small {
    flex: 0 0 140px;
}

.period-badge {
    background: #eef3ff;
    color: #3a6fd8;
    border: 1px solid #c5d5f5;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 600;
}

.progress-bar-wrap {
    background: #f0f2f5;
    border-radius: 6px;
    padding: 7px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-text-right {
    color: #3a6fd8;
    font-size: 12px;
    font-weight: 600;
}

/* Two column */
.two-col {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.two-col .section {
    flex: 1;
    margin-bottom: 0;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Assignee */
.assignee-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.assignee-name-input {
    border: 1px solid #dde3ec;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    width: 90px;
    outline: none;
}

.assignee-name-input:focus {
    border-color: #3a6fd8;
}

.role-select {
    border: 1px solid #dde3ec;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    flex: 1;
    outline: none;
    background: #fff;
}

.assignee-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    font-size: 16px;
    padding: 2px 4px;
}

.delete-btn:hover {
    color: #e74c3c;
}

.new-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.new-name-input {
    border: 1px solid #dde3ec;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    width: 90px;
    outline: none;
}

.new-role-select {
    border: 1px solid #dde3ec;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    flex: 1;
    outline: none;
    background: #fff;
    color: #aaa;
}

.add-btn {
    background: #3a6fd8;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    background: #2d5bbf;
}

/* Role */
.role-cards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.role-card:hover {
    background: #f0f2f5;
}

.role-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.role-label {
    font-size: 11px;
    color: #555;
    font-weight: 600;
}

.role-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.role-name-input {
    border: 1px solid #dde3ec;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    flex: 1;
    outline: none;
}

.color-pick {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    padding: 2px;
}

/* Gantt */
.gantt-section {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #dde3ec;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(26, 39, 68, 0.06);
}

.gantt-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eef1f6;
    background: #fafbfd;
}

.gantt-title {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gantt-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.nav-btn,
.today-btn {
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 5px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #4a6080;
    transition: all 0.12s;
}

.nav-btn:hover,
.today-btn:hover {
    background: #eef3ff;
    border-color: #3a6fd8;
    color: #3a6fd8;
}

.week-range-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-icon-btn {
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 5px;
    padding: 3px 7px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.cal-icon-btn:hover {
    background: #eef3ff;
    border-color: #3a6fd8;
}

.calendar-picker {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(26, 39, 68, 0.14);
    z-index: 300;
    padding: 12px;
    min-width: 240px;
}

.calendar-picker.open {
    display: block;
}

.cal-year-label {
    font-size: 12px;
    font-weight: 700;
    color: #4a6080;
    margin: 8px 0 4px;
}

.cal-year-label:first-child {
    margin-top: 0;
}

.cal-months-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.cal-month-btn {
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #2c3e50;
    transition: background 0.12s;
}

.cal-month-btn:hover {
    background: #eef3ff;
    color: #3a6fd8;
}

.cal-month-btn.active {
    background: #3a6fd8;
    color: #fff;
    font-weight: 600;
}

/* Gantt table */
.gantt-wrap {
    overflow-x: auto;
}

.gantt-table {
    width: 100%;
    border-collapse: collapse;
}

.gantt-table th {
    background: #fafbfd;
    border-bottom: 1px solid #eef1f6;
    padding: 7px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #4a6080;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.gantt-table td {
    border-bottom: 1px solid #f0f2f5;
    padding: 6px 8px;
    vertical-align: middle;
    white-space: nowrap;
}

.gantt-table tr:hover td {
    background: #f5f8ff;
}

.drag-handle {
    color: #ccc;
    cursor: grab;
    font-size: 16px;
}

.task-check {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3a6fd8;
}

.task-name {
    font-size: 13px;
    color: #2c3e50;
}

.task-name.done {
    text-decoration: line-through;
    color: #bbb;
}

.date-input {
    border: 1px solid #dde3ec;
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 12px;
    outline: none;
    background: #fff;
    color: #2c3e50;
}

.date-input:focus {
    border-color: #3a6fd8;
}

.assignee-multi {
    position: relative;
}

.assignee-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    border: 1px solid #dde3ec;
    border-radius: 6px;
    padding: 4px 6px;
    min-height: 30px;
    cursor: pointer;
    background: #fff;
    min-width: 130px;
}

.assignee-tags:hover {
    border-color: #3a6fd8;
}

.tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.placeholder {
    color: #bbb;
    font-size: 12px;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(26, 39, 68, 0.12);
    z-index: 100;
    min-width: 200px;
    padding: 6px 0;
    display: none;
}

.dropdown.open {
    display: block;
}

.dropdown-title {
    padding: 6px 12px 4px;
    font-size: 11px;
    color: #7a8faa;
    font-weight: 600;
}

.dropdown-item {
    padding: 7px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f5f8ff;
}

.dropdown-item input[type=checkbox] {
    accent-color: #3a6fd8;
}

.item-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.gantt-bar {
    position: absolute;
    height: 22px;
    top: 7px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    cursor: grab;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.15s;
    min-width: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.gantt-bar:hover {
    opacity: 0.85;
}

.gantt-bar.done {
    opacity: 0.35;
}

.gantt-bar .resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
}

.month-header {
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    background: #fafbfd;
    color: #4a6080;
    letter-spacing: 0.5px;
}

.day-header {
    text-align: center;
    font-size: 11px;
    color: #9aadbe;
    width: 24px;
    min-width: 24px;
    max-width: 24px;
}

.day-header.today {
    color: #3a6fd8;
    font-weight: 700;
}

.day-header.weekend {
    color: #b0bec5;
}

.day-cell {
    width: 24px;
    min-width: 24px;
    max-width: 24px;
    border-right: 1px solid #f0f2f5;
    padding: 0;
    position: relative;
}

.day-cell.today-col {
    background: rgba(58, 111, 216, 0.04);
}

.day-cell.weekend-col {
    background: #fafbfd;
}

.add-task-row td {
    padding: 8px 16px;
}

.add-task-btn {
    background: none;
    border: none;
    color: #3a6fd8;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.add-task-btn:hover {
    text-decoration: underline;
}

.legend-bar {
    padding: 10px 16px;
    border-top: 1px solid #eef1f6;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11px;
    color: #7a8faa;
    flex-wrap: wrap;
    background: #fafbfd;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    min-width: 340px;
    box-shadow: 0 8px 40px rgba(26, 39, 68, 0.2);
}

.modal h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2c3e50;
}

.modal textarea {
    width: 100%;
    height: 200px;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    font-family: monospace;
    outline: none;
    resize: vertical;
}

.modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f0f2f5;
}

::-webkit-scrollbar-thumb {
    background: #c8d0dc;
    border-radius: 3px;
}

.sidebar ::-webkit-scrollbar-track {
    background: #162040;
}

.sidebar ::-webkit-scrollbar-thumb {
    background: #2d4070;
}
/* ===== Icons (inline SVG / currentColor) ===== */
.icon {
    width: 1em;
    height: 1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.14em;
}

/* Icon + label buttons */
.nav-btn,
.new-project-btn,
.sidebar-title,
.proj-section-label,
.delete-btn,
.proj-complete-btn,
.project-item-del,
.sidebar-toggle,
.cal-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.proj-section-label {
    gap: 5px;
}

/* Context sizes */
.btn .icon,
.nav-btn .icon,
.add-task-btn .icon,
.gantt-title .icon {
    width: 14px;
    height: 14px;
}

.new-project-btn .icon,
.sidebar-title .icon {
    width: 15px;
    height: 15px;
}

.sidebar-toggle .icon,
.add-btn .icon {
    width: 18px;
    height: 18px;
}

.user-icon .icon {
    width: 16px;
    height: 16px;
}

.cal-icon-btn .icon {
    width: 15px;
    height: 15px;
    display: block;
}

.delete-btn .icon,
.sidebar-close .icon {
    width: 15px;
    height: 15px;
}

.proj-complete-btn .icon,
.project-item-del .icon {
    width: 14px;
    height: 14px;
}

.proj-section-label .icon {
    width: 12px;
    height: 12px;
}

/* Status colors for the project list section labels */
.proj-section-label .icon-active {
    display: inline-flex;
    color: #2ecc71;
}

.proj-section-label .icon-done {
    display: inline-flex;
    color: #3a6fd8;
}

.logo .icon {
    width: 15px;
    height: 15px;
}

.role-del {
    display: inline-flex;
    align-items: center;
    color: #b8c2cf;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: color 0.12s, background 0.12s;
}

.role-del .icon {
    width: 13px;
    height: 13px;
}

.role-del:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.12);
}

/* ===== Demo bar (portfolio) ===== */
.demo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 10px 16px;
    margin-bottom: 14px;
    background: #eaf1fb;
    border: 1px solid #d3e0f2;
    border-radius: 10px;
    font-size: 12px;
    color: #44607f;
}

.demo-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
}

.demo-note .icon {
    width: 14px;
    height: 14px;
    color: #3a6fd8;
}

.demo-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 6px;
    border: 1px solid #c3d4ea;
    background: #fff;
    color: #44607f;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.12s;
}

.demo-btn .icon {
    width: 13px;
    height: 13px;
}

.demo-btn:hover {
    border-color: #3a6fd8;
    color: #3a6fd8;
    background: #f5f9ff;
}

.demo-btn-danger:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: #fdf3f2;
}

@media (max-width: 720px) {
    .demo-bar {
        padding: 10px 12px;
        font-size: 11px;
    }

    .demo-actions {
        width: 100%;
    }

    .demo-btn {
        flex: 1;
        justify-content: center;
    }
}
