body {
    margin: 0;
    display: flex;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
}

* {
    font-family: 'Noto Sans JP', sans-serif;
    box-sizing: border-box;
}

p {
    margin: 0;
    margin-bottom: 10px;
}

th {
    word-break: keep-all;
}

td {
    word-break: keep-all;
}

#editor .ck-editor__editable {
    min-height: 500px;
}

.ck.ck-editor__main>.ck-editor__editable {
    height: 500px;
}

input[type=text],
input[type=search],
input[type=tel],
input[type=url],
input[type=email],
input[type=password],
input[type=datetime],
input[type=date],
input[type=month],
input[type=week],
input[type=time],
input[type=datetime-local],
input[type=number],
select,
textarea {
    padding: 6px;
    border-radius: 8px;
    border-style: solid;
    border-width: 1px;
    border-color: #cccccc;
    box-shadow: inset 0 1px 0px rgba(0, 0, 0, 0.1);
    height: unset;
}

/* ************ 簡易タスク登録フォーム ************ */
.quick-task-form-container,
.section-controls-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.quick-task-form-container .detail-box {
    margin: 0;
    background: white;
    border-radius: 8px;
    border: none;
    box-shadow: none;
}

.quick-task-form-container .form-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.quick-task-form-container .form-section-title {
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    flex: 1;
}

.quick-task-toggle-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    margin-left: 15px;
    margin-top: -16px;
}

.quick-task-toggle-btn:hover {
    background-color: #f8f9fa;
    color: #495057;
    transform: scale(1.1);
}

.quick-task-toggle-btn:active {
    transform: scale(0.95);
}

.quick-task-collapsed {
    height: 49px;
    overflow-y: hidden;
    transition: height 0.3s ease-in-out;
}

.quick-task-expanded {
    height: auto;
    transition: height 0.3s ease-in-out;
}

.quick-task-form {
    margin: 0;
}

.quick-task-form .form-row {
    display: flex;
    gap: 15px;
}

.quick-task-form .form-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.quick-task-form .form-group label {
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 13px;
    color: #495057;
}

.quick-task-form .required {
    color: #dc3545;
    font-weight: bold;
}

.quick-task-form .form-control {
    height: 42px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.quick-task-form .form-group select.form-control {
    padding: 8px 16px;
}

.quick-task-form .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    outline: none;
}

.quick-task-form .btn-big {
    height: 42px;
    padding: 0 20px;
    font-weight: 600;
    transition: all 0.15s ease-in-out;
    margin-top: 0;
}

.quick-task-form .btn-big:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.quick-task-form .btn-big:disabled {
    transform: none;
    box-shadow: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.quick-task-form .alert {
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.quick-task-form .alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.quick-task-form .alert-success {
    background-color: #d1eddb;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* レスポンシブ対応 */
.quick-task-form .form-row {
    gap: 10px;
}

.quick-task-form .form-group {
    flex: 1 1 100% !important;
}


/* ************* header ************* */
.header {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 48px;
    background-color: #e2e2e2;
    z-index: 10;
    overflow: hidden;
    display: block;
}

.header a:hover {
    opacity: 0.6;
}

.header p {
    position: absolute;
    left: 0;
    padding-left: 15px;
    padding-top: 5px;
}

.header p span {
    display: block;
    font-size: 12px;
    line-height: 1;
    font-weight: bold;
}

.header p a {
    color: #333;
    text-decoration: none;
    line-height: 1;
    font-size: 18px;
    font-weight: bold;
    padding-top: 2px;
    display: block;
}

.header ul {
    position: absolute;
    right: 220px;
    display: flex;
}

.header ul li {
    line-height: 48px;
    padding-left: 20px;
    font-size: 14px;
    font-weight: bold;
}

.header ul li a {
    color: #333;
    text-decoration: none;
}

.header .search-bar {
    position: absolute;
    right: 0px;
    display: flex;
    width: 200px;
    height: 48px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 5px;
}

.header .search-bar i {
    font-size: 16px;
}

.header .search-bar input[type="text"] {
    border: none;
    outline: none;
    margin-left: 10px;
    height: 26px;
    width: 154px;
}

/* ************* sidebar ************* */

.sidebar {
    width: 250px;
    background: #f8fafd;
    padding: 0px;
    width: 250px;
    overflow: hidden;
    position: relative;
    margin-top: 0;
}

.sidebar.on {
    width: 60px;
    padding: 0px;
}

.btn_sidemenu_toggle {
    position: absolute;
    right: 0;
    top: 0;
    width: 60px;
    height: 60px;
    padding: 10px;
    line-height: 40px;
    text-align: center;
    font-size: 20px;
    z-index: 10;
}

.sidebar .menu-item span {
    display: inline-block;
    transition: opacity 0.3s;
}

.sidebar-menu {
    margin-top: 50px;
    font-size: 20px;
    font-weight: bold;
    padding: 0 20px;
}

.on .sidebar-menu {
    padding: 0;
}

.sidebar-menu .menu-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    overflow: hidden;
    color: #333;
    /*
    line-height: 40px;
    width: 250px;
    height: 60px;
    */
}

.on .sidebar-menu .menu-item {
    text-align: center;
    display: block;
    width: 60px;
}

.sidebar-menu .menu-item i {
    margin-right: 10px;
}

.on .sidebar-menu .menu-item i {
    margin-right: 0px;
}


.on .sidebar-menu .menu-item span {
    display: none;
}

.sidebar-menu .menu-item:hover,
.menu-item.active {
    opacity: 0.5;
}

/* ************* login ************* */

.login {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login .main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    height: 100vh;
}

.login-form {
    width: 100%;
    max-width: 384px;
    padding: 24px;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    color: #1f2937;
    margin-bottom: 20px;
    margin-top: 0;
}

.login-error {
    color: #ef4444;
    font-size: 14px;
    text-align: center;
    margin-bottom: 16px;
}

/* ************* dashboard ************* */

.dashboard {
    display: flex;
    min-height: calc(100vh - 48px);
    margin-top: 48px;
}

/* ************* main-content ************* */

.main-content {
    flex: 1;
    padding: 20px 40px;
    background-color: #fff;
    width: calc(100vw - 250px);
}

.sidebar_on .main-content {
    width: calc(100vw - 60px);
}

/* ************* section-title ************* */
.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* ************* mini_form ************* */

[name=mini_form] {
    padding: 10px;
    background-color: #fafafa;
    border-radius: 5px;
    margin-bottom: 10px;
    border: 1px solid #f8fafd;
    width: fit-content;
}

[name=mini_form] h2 {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}

[name=mini_form] [type=text] {
    border-radius: 3px 0px 0px 3px;
    height: 34px;
    width: 350px;
    font-size: 12px;
}

[name=mini_form] .btn {
    border-radius: 0px 3px 3px 0px;
    height: 33px;
    width: 80px;
    text-align: center;
    margin: 0;
    line-height: 16px;
}


/* ************* table ************* */

.task-table-container {
    width: 100%;
    overflow-x: scroll;
    white-space: nowrap;
    height: calc(100vh - 320px);
}

.task-table {
    width: 100%;
    border-collapse: collapse;
}

.task-table th,
.task-table td {
    border-bottom: 1px solid #fff !important;
    border-right: 1px solid #fff !important;
    line-height: 24px;
    padding: 2px 5px;
    font-size: 12px;
}

.task-table th {
    font-weight: 600;
    color: #111827;
    background-color: #eee !important;
    text-align: center;
}

.task-table th a {
    color: #ccc;
    margin: 0 4px;
    font-size: 18px;
}

.task-table th a.sort_on {
    color: #999;
}

.task-table td {
    color: #444444;
    font-family: monospace;
    background-color: #fff;
    vertical-align: middle;
    font-size: 14px;
    font-size: 12px;
    line-height: 26px;
}

.task-table tr:nth-child(even) td.c1 {
    background-color: #f7f7f7 !important;
}

.task-table tr:nth-child(even):hover td.c1 {
    background-color: #f8fafd !important;
}

.task-table td.c1 {
    background-color: #fff !important;
}

.task-table tr:hover td.c1 {
    background-color: #eee !important;
}

.task-table td.status0 {
    background-color: #eaf1ff !important;
}

.task-table tr:hover td.status0 {
    background-color: #bbd2ff !important;
}

.task-table td.status1 {
    background-color: #dcffe6 !important;
}

.task-table tr:hover td.status1 {
    background-color: #8ff3ab !important;
}

.task-table td.status2 {
    background-color: #ffe5e5 !important;
}

.task-table tr:hover td.status2 {
    background-color: #ffb7b7 !important;
}

.task-table tr:hover td * {
    font-weight: bold !important;
}

.task-table td.title {}

.task-table td.title a {
    color: #333;
    text-decoration: none;
    width: calc(100% - 30px);
    display: inline-block;
    font-weight: normal;
}

.task-table td.title span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    line-height: 28px;
    vertical-align: middle;
    padding-left: 10px;
}

.task-table td.title span:nth-child(0) {}

.task-table td.title span:nth-child(1) {}

.task-table td.title span:nth-child(2) {
    display: none;
}

.task-table td.title i {
    display: inline-block;
    color: #000;
    margin-left: 10px;
    cursor: pointer;
}

.task-table td.cell_title {
    width: 700px;
    max-width: 700px;
}

.task-table td.cell_btn {
    width: 0px;
    max-width: 0px;
}

.task-table td.cell_mini {
    width: 120px;
    max-width: 120px;
}

.task-table td.cell_detail {
    word-break: break-all;
    word-break: break-word;
    overflow-wrap: break-word;
}

.detail th {
    width: 120px;
    max-width: 120px;
    text-align: right;
}

/* ************* btn ************* */

.btn {
    padding: 4px 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
    box-shadow: unset !important;
    text-shadow: unset !important;
}

.btn:hover {
    box-shadow: unset !important;
    text-shadow: unset !important;
}

.login .btn {
    padding: 5px;
    height: 40px;
    width: 100%;
}

.btn i {
    margin-right: 5px;
    margin-right: 0px;
}

table .btn-edit,
table .btn-delete {
    width: 28px;
    height: 28px;
    line-height: 30px;
    font-size: 12px;
    padding: 0;
}

.btn-c1 {
    color: #fff;
    background-color: #4982ff;
}

.btn-c1:hover {
    color: #fff;
    background-color: #3c71e6;
}

.btn-c2 {
    color: #fff;
    background-color: #ff5555;
}

.btn-c2:hover {
    color: #fff;
    background-color: #d64343;
}

.btn-c3 {
    color: #fff;
    background-color: #61dd85;
}

.btn-c3:hover {
    color: #fff;
    background-color: #4bb76a;
}

.btn-c4 {
    color: #fff;
    background-color: #999;
}

.btn-c4:hover {
    color: #fff;
    background-color: #666;
}

.btn-big {
    margin-top: 10px;
    padding: 8px 16px
}

.btn-wide {
    min-width: 200px;
}

.btn-submit {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}


/* ************* input ************* */

.input-label {
    margin-bottom: 5px;
    display: inline-block;
    font-size: 16px;
    font-weight: bold;
}

.form-control,
.input-text,
.input-select,
.input-date,
.textarea {
    width: 100%;
    border: 1px solid #ccc;
    outline: none;
}

.input-select,
.input-date {
    border-radius: 8px;
}

.textarea {
    resize: vertical;
}

/* ************* status ************* */
.status0,
.priority0,
.date3 {
    color: #fff !important;
    font-weight: bold;
    background-color: #4982ff !important;
    padding: 2px 5px 3px 5px;
}

span.status0,
span.priority0,
span.date3 {
    border-radius: 5px;
    cursor: pointer;
}

.status1,
.priority1,
.date2 {
    color: #fff !important;
    font-weight: bold;
    background-color: #61dd85 !important;
    padding: 2px 5px 3px 5px;
}

span.status1,
span.priority1,
span.date2 {
    border-radius: 5px;
    cursor: pointer;
}

.status2,
.priority2,
.date1 {
    color: #fff !important;
    font-weight: bold;
    background-color: #ff5555 !important;
    padding: 2px 5px 3px 5px;
}

span.status2,
span.priority2,
span.date1 {
    border-radius: 5px;
    cursor: pointer;
}

.form-container {
    padding: 24px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-container input,
.form-container select,
.form-container textarea {
    margin-bottom: 15px;
}

.form-container input+.text-muted,
.form-container select+.text-muted,
.form-container textarea+.text-muted {
    margin-top: -10px;
    display: block;
    margin-bottom: 15px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.text-right {
    text-align: right;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: red;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    padding: 2px 6px;
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-avatar {
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    padding: 5px 10px;
    margin-right: 10px;
    font-weight: bold;
}

.detail-box {
    display: block;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #444444;
    background-color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ************* dashboard-list ************* */

.dashboard-list {}

.dashboard-list h2 {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}

/* ************* 詳細ページ用CSS（シンプル版） ************* */
.detail-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    color: #2c3e50;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 0px 5px rgba(0, 0, 0, 0.1);
}

.detail-page-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.detail-page-title .icon {
    background: #f8f9fa;
    color: #6c757d;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.detail-page-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.detail-page-meta .meta-item {
    background: #f8f9fa;
    color: #495057;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

.detail-cards-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.detail-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 0px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.detail-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-card-title i {
    color: #6c757d;
}

.detail-info-grid {
    display: grid;
    gap: 5px;
}

.detail-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-info-item:last-child {
    border-bottom: none;
}

.detail-info-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.detail-info-content {
    flex: 1;
}

.detail-info-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.detail-info-value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.detail-description {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-top: 15px;
    line-height: 1.6;
    color: #555;
}

.detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-stats-grid:last-child {
    margin-bottom: 0px;
}

.detail-stat-item {
    text-align: center;
    padding: 5px 10px;
    background: white;
    color: #495057;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.detail-stat-number {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 0px;
    color: #2c3e50;
}

.detail-stat-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.detail-actions-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    margin-top: 20px;
}

.detail-actions-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.detail-action-btn.primary {
    background-color: #999;
    color: white;
    box-shadow: 0 4px 15px #99999954;
}

.detail-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px #99999999;
}

.detail-action-btn.secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.detail-action-btn.secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.detail-action-btn.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.detail-action-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.progress-bar-container {
    margin: 15px 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #f8f9fa;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.progress-bar-fill {
    height: 100%;
    background: #007bff;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.timeline-container {
    margin-top: 20px;
}

.timeline-item {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.timeline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-date {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.timeline-title {
    font-weight: 600;
    margin: 5px 0;
    color: #333;
}

.timeline-description {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.detail-actions-grid {
    grid-template-columns: 1fr;
}

.detail-page-title {
    font-size: 20px;
}

.detail-page-header {
    padding: 15px;
    margin-bottom: 15px;
}

.detail-stat-item {
    padding: 12px;
}

.detail-stat-number {
    font-size: 18px;
}

/* ************* セクションコントロール ************* */
.section-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 10px 13px;
    border-bottom: 1px solid #e5e5e5;
}

.section-controls .actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.section-controls button {
    padding: 8px 15px;
}

.section-controls {
    flex-direction: column;
    align-items: stretch;
}

.section-controls .actions {
    justify-content: center;
}


/* ************* ページネーション ************* */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #e5e5e5;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-info {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    min-width: 120px;
    text-align: center;
}

.pagination-info {
    text-align: center;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* ボタンの余白調整 */
.btn.ml5 {
    margin-left: 5px;
}

.btn.mr5 {
    margin-right: 5px;
}

.btn.mr10 {
    margin-right: 10px;
}

.btn.mt20 {
    margin-top: 20px;
}

.btn.mb10 {
    margin-bottom: 10px;
}

.btn.mb20 {
    margin-bottom: 20px;
}

/* ************* 設定ページ ************* */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.settings-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.settings-card-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-card-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.settings-icon {
    color: #6c757d;
    font-size: 20px;
}

.settings-card-body {
    padding: 20px;
}

.settings-card-body p {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.5;
}

.settings-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.settings-features li {
    padding: 5px 0;
    color: #6c757d;
    position: relative;
    padding-left: 20px;
}

.settings-features li:before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.settings-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ************* バッジ ************* */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
}

.badge-system {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.badge-custom {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* ************* 優先度値 ************* */
.priority-value {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #dee2e6;
}

/* ************* インライン編集 ************* */
.editable-cell {
    position: relative;
    transition: background-color 0.2s ease;
}

.editable-cell:hover {
    background-color: #e3f1ff !important;
    border-radius: 4px;
}

.editable-cell:hover:after {
    content: "編集";
    position: absolute;
    top: 2px;
    right: 2px;
    background: #007bff;
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 2px;
    pointer-events: none;
    opacity: 0.8;
}

/* ************* インライン編集モーダル ************* */
.inline-edit-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.inline-edit-modal.show {
    display: block;
}

.inline-edit-modal .modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.inline-edit-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.inline-edit-modal .modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.inline-edit-modal .modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.inline-edit-modal .modal-close:hover {
    background-color: #e9ecef;
    color: #495057;
}

.inline-edit-modal .modal-body {
    padding: 20px;
}

.inline-edit-modal .form-group {
    margin-bottom: 15px;
}

.inline-edit-modal .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.inline-edit-modal .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.inline-edit-modal .form-control:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.inline-edit-modal .form-actions {
    margin-top: 10px;
}

.inline-edit-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* ボタンスタイルの統一 */
.inline-edit-modal .btn {
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: inline-block;
    user-select: none;
}

.inline-edit-modal .btn:focus {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.inline-edit-modal .btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.inline-edit-modal .btn-outline {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

.inline-edit-modal .btn-outline:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.inline-edit-modal .btn-c1 {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.inline-edit-modal .btn-c1:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.inline-edit-modal .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブ対応 */
.inline-edit-modal .modal-content {
    margin: 5% auto;
    width: 95%;
    max-width: none;
}

.inline-edit-modal .modal-header,
.inline-edit-modal .modal-body,
.inline-edit-modal .modal-footer {
    padding: 15px;
}

.inline-edit-modal .modal-footer {
    flex-direction: column;
    gap: 8px;
}

.inline-edit-modal .btn {
    width: 100%;
}

/* 期限超過スタイル */
.deadline-overdue {
    color: #dc3545 !important;
    font-weight: bold;
}

/* 状態と優先度のスタイル（既存スタイルとの互換性確保） */
.status-completed {
    color: #28a745;
}

.status-progress {
    color: #007bff;
}

.status-review {
    color: #ffc107;
}

.status-hold {
    color: #6c757d;
}

.status-pending {
    color: #dc3545;
}

.priority-high {
    color: #dc3545;
    font-weight: bold;
}

.priority-medium {
    color: #ffc107;
}

.priority-low {
    color: #28a745;
}

/* プロジェクトリンクとタスクリンクのスタイル */
.project-link,
.task-link {
    text-decoration: none;
    color: #007bff;
    transition: color 0.2s ease;
}

.project-link:hover,
.task-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.task-link strong {
    font-weight: 600;
}


/* ************ タスク詳細モーダル ************ */
.task-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.task-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.task-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    max-width: 1200px;
    max-height: 800px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.task-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

.task-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.task-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.task-modal-close:hover {
    background-color: #e5e5e5;
}

.task-modal-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.task-detail-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* モーダル表示時のiframe内調整用クラス */
.modal-view {
    padding-top: 0 !important;
}

.modal-view .dashboard {
    min-height: auto !important;
    margin-top: 0 !important;
    width: 100% !important;
}

.modal-view .header,
.modal-view .sidebar {
    display: none !important;
}

.modal-view .main-content {
    margin-left: 0 !important;
    padding: 20px !important;
}

.modal-content-view {
    margin-left: 0 !important;
    padding: 20px !important;
    width: 100% !important;
}

/* モーダル表示時のセクションヘッダー非表示 */
.modal-view .section-header,
.modal-view .section-title {
    display: none !important;
}

/* ************ ガントチャート リサイズハンドル ************ */
.gantt-task-bar {
    position: relative;
}

.gantt-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    background-color: transparent;
    z-index: 10;
}

.gantt-resize-left {
    left: 0;
    cursor: ew-resize;
}

.gantt-resize-right {
    right: 0;
    cursor: ew-resize;
}

/* ホバー時に視覚的フィードバック */
.gantt-resize-handle:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* ************ ガントチャート 中央コンテンツ ************ */
.gantt-center-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    white-space: nowrap;
    z-index: 11;
    pointer-events: none;
}

.gantt-center-content .gantt-detail-btn {
    pointer-events: auto;
}

/* ************ ガントチャート 移動ハンドル ************ */
.gantt-move-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: calc(50% - 30px);
    background-color: transparent;
    cursor: move;
    z-index: 9;
}

.gantt-move-center-left {
    left: 10px;
    /* 左のリサイズハンドルを避ける */
    right: calc(50% + 30px);
    /* 中央コンテンツを避ける */
}

.gantt-move-center-right {
    left: calc(50% + 30px);
    /* 中央コンテンツを避ける */
    right: 10px;
    /* 右のリサイズハンドルを避ける */
}

/* ホバー時に視覚的フィードバック */
.gantt-move-handle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 日数テキストのz-index調整 */
.gantt-bar-text {
    position: relative;
    pointer-events: none;
    /* クリックイベントを透過 */
    user-select: none;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

/* ************ ガントチャート 詳細表示ボタン ************ */
.gantt-detail-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    cursor: pointer;
    border-radius: 3px;
    padding: 0;
    vertical-align: middle;
    pointer-events: auto;
    /* クリック可能にする */
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.gantt-detail-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.1);
}

.gantt-detail-btn:active {
    transform: scale(0.95);
}

/* ************ ガントチャート ツールチップ ************ */
.gantt-tooltip {
    position: fixed;
    z-index: 1000;
    background: rgba(30, 30, 30, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    line-height: 1.4;
    max-width: 320px;
    min-width: 240px;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gantt-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-title {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.tooltip-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 18px;
}

.tooltip-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    flex-shrink: 0;
    margin-right: 12px;
}

.tooltip-value {
    color: white;
    font-size: 13px;
    text-align: right;
    flex-grow: 1;
    font-weight: 500;
}

/* ステータス・優先度の色分け */
.tooltip-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.tooltip-priority {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}