/* 代表脳みそボード v0.4.0 */

.dnb-wrap {
    max-width: 1100px;
    margin: 24px auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #222;
}

.dnb-wrap * {
    box-sizing: border-box;
}

.dnb-login-card {
    max-width: 460px;
    margin: 56px auto;
    background: linear-gradient(135deg, #ffffff, #eef2ff);
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 16px 46px rgba(20, 20, 40, 0.09);
}

.dnb-login-logo {
    font-size: 42px;
    margin-bottom: 8px;
}

.dnb-login-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.dnb-login-card p {
    margin: 0 0 18px;
    color: #555;
    line-height: 1.7;
}

.dnb-login-form {
    display: grid;
    gap: 12px;
}

.dnb-login-form label {
    font-weight: 800;
    font-size: 14px;
}

.dnb-login-form input[type="text"],
.dnb-login-form input[type="password"] {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    font-size: 16px;
}

.dnb-login-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 11px 13px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-weight: 800;
}

.dnb-hero {
    background: linear-gradient(135deg, #ffffff, #eef2ff);
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(20, 20, 40, 0.06);
}

.dnb-hero h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

.dnb-hero p {
    margin: 0;
    color: #555;
}

.dnb-user-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dnb-user {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    white-space: nowrap;
}

.dnb-logout {
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
    font-size: 14px;
}

.dnb-card,
.dnb-task {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(20, 20, 40, 0.05);
}

.dnb-message {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 700;
}

.dnb-create summary {
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 14px;
}

.dnb-form,
.dnb-comment-form {
    display: grid;
    gap: 11px;
}

.dnb-form label {
    font-weight: 700;
    font-size: 14px;
}

.dnb-form input,
.dnb-form select,
.dnb-form textarea,
.dnb-filters input,
.dnb-filters select,
.dnb-inline input,
.dnb-comment-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
}

.dnb-form textarea,
.dnb-comment-form textarea {
    resize: vertical;
    line-height: 1.6;
}

.dnb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dnb-check {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dnb-check input {
    width: auto;
}

.dnb-button {
    border: none;
    border-radius: 12px;
    padding: 10px 13px;
    font-weight: 800;
    cursor: pointer;
    background: #e5e7eb;
    color: #222;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    line-height: 1.4;
}

.dnb-button:hover {
    filter: brightness(0.97);
}

.dnb-primary {
    background: #2563eb;
    color: #fff;
}

.dnb-danger {
    background: #fee2e2;
    color: #991b1b;
}

.dnb-filters {
    display: grid;
    grid-template-columns: 1.2fr 1.4fr 1.2fr 1fr auto;
    gap: 10px;
}

.dnb-list {
    display: grid;
    gap: 14px;
}

.dnb-empty {
    text-align: center;
    color: #777;
    background: #fff;
    padding: 30px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
}

.dnb-task {
    border-left: 8px solid #d1d5db;
}

.dnb-priority-高 {
    border-left-color: #ef4444;
}

.dnb-priority-中 {
    border-left-color: #f59e0b;
}

.dnb-priority-低 {
    border-left-color: #10b981;
}

.dnb-task-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.dnb-task h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.5;
}

.dnb-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.dnb-meta span {
    background: #f3f4f6;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    color: #555;
}

.dnb-badge {
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.dnb-status-未着手 {
    background: #f3f4f6;
}

.dnb-status-担当中 {
    background: #dbeafe;
    color: #1d4ed8;
}

.dnb-status-確認待ち {
    background: #fef3c7;
    color: #92400e;
}

.dnb-status-完了 {
    background: #dcfce7;
    color: #166534;
}

.dnb-status-保留 {
    background: #fee2e2;
    color: #991b1b;
}

.dnb-detail {
    color: #333;
    line-height: 1.8;
    white-space: pre-wrap;
    margin-top: 12px;
    background: #f9fafb;
    border-radius: 14px;
    padding: 12px;
}

.dnb-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    color: #777;
    font-size: 13px;
    margin-top: 12px;
}

.dnb-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.dnb-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dnb-inline input {
    min-width: 220px;
}

.dnb-comments {
    margin-top: 14px;
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
}

.dnb-comments summary {
    cursor: pointer;
    font-weight: 800;
}

.dnb-comment-form {
    margin-top: 12px;
}

.dnb-comment-list {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.dnb-comment {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px;
    line-height: 1.7;
}

.dnb-comment-meta {
    color: #666;
    font-size: 12px;
    margin-bottom: 6px;
}

@media (max-width: 760px) {
    .dnb-wrap {
        margin: 14px auto;
    }

    .dnb-login-card {
        margin: 22px auto;
        padding: 22px;
    }

    .dnb-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .dnb-user-box {
        justify-content: flex-start;
    }

    .dnb-grid,
    .dnb-filters {
        grid-template-columns: 1fr;
    }

    .dnb-task-head {
        flex-direction: column;
    }

    .dnb-actions,
    .dnb-inline {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .dnb-inline input {
        min-width: 0;
    }

    .dnb-button {
        width: 100%;
        text-align: center;
    }
}


/* v0.3.0 表形式 */
.dnb-table-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 0;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(20, 20, 40, 0.05);
    overflow: hidden;
}

.dnb-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.dnb-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
    font-size: 13px;
}

.dnb-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f9fafb;
    color: #555;
    text-align: left;
    padding: 10px 9px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.dnb-table td {
    padding: 9px;
    border-bottom: 1px solid #eef0f4;
    vertical-align: top;
}

.dnb-table tr:hover {
    background: #fbfdff;
}

.dnb-row-priority-高 {
    border-left: 5px solid #ef4444;
}

.dnb-row-priority-中 {
    border-left: 5px solid #f59e0b;
}

.dnb-row-priority-低 {
    border-left: 5px solid #10b981;
}

.dnb-td-center {
    text-align: center;
    font-weight: 800;
}

.dnb-td-main {
    min-width: 320px;
    max-width: 460px;
}

.dnb-row-title {
    font-weight: 900;
    font-size: 14px;
    line-height: 1.5;
}

.dnb-row-sub {
    color: #777;
    font-size: 11px;
    margin-top: 6px;
}

.dnb-row-detail,
.dnb-row-comments {
    margin-top: 5px;
}

.dnb-row-detail summary,
.dnb-row-comments summary {
    cursor: pointer;
    color: #2563eb;
    font-weight: 800;
    font-size: 12px;
}

.dnb-row-detail div {
    margin-top: 6px;
    background: #f9fafb;
    border-radius: 10px;
    padding: 8px;
    line-height: 1.6;
}

.dnb-td-actions {
    min-width: 250px;
}

.dnb-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dnb-row-actions form {
    margin: 0;
}

.dnb-row-complete {
    display: flex;
    gap: 5px;
}

.dnb-row-complete input {
    width: 120px;
    padding: 7px 8px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    font-size: 12px;
}

.dnb-small {
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 12px;
    width: auto;
}

.dnb-row-comment-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    margin-top: 7px;
}

.dnb-row-comment-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
}

.dnb-row-comment-list {
    display: grid;
    gap: 6px;
    margin-top: 7px;
}

.dnb-row-comment {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 7px;
    line-height: 1.5;
    font-size: 12px;
}

.dnb-row-comment span {
    color: #777;
    font-size: 11px;
    margin-left: 6px;
}

@media (max-width: 760px) {
    .dnb-table {
        font-size: 12px;
        min-width: 900px;
    }

    .dnb-table th,
    .dnb-table td {
        padding: 7px;
    }

    .dnb-td-main {
        min-width: 260px;
    }

    .dnb-row-complete {
        flex-direction: column;
    }

    .dnb-row-complete input {
        width: 100%;
    }
}


/* v0.3.1 入力欄を常時表示 */
.dnb-create-open {
    display: block !important;
}

.dnb-create-title {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 14px;
}

.dnb-create-open .dnb-form {
    display: grid !important;
}


/* v0.4.0 一覧は見るだけ、処理は詳細画面 */
.dnb-create-compact {
    padding: 14px;
}

.dnb-quick-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.dnb-quick-main label {
    display: block;
    font-weight: 900;
    margin-bottom: 6px;
}

.dnb-quick-main textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
}

.dnb-quick-more {
    grid-column: 1 / -1;
    background: #f9fafb;
    border-radius: 12px;
    padding: 10px;
}

.dnb-quick-more summary {
    cursor: pointer;
    color: #2563eb;
    font-weight: 900;
}

.dnb-simple-table {
    min-width: 860px;
}

.dnb-simple-table th,
.dnb-simple-table td {
    padding: 8px 9px;
}

.dnb-row-title-link {
    font-weight: 900;
    font-size: 13px;
    line-height: 1.45;
    color: #111827;
    text-decoration: none;
}

.dnb-row-title-link:hover {
    text-decoration: underline;
}

.dnb-row-preview {
    color: #777;
    font-size: 11px;
    line-height: 1.45;
    margin-top: 3px;
}

.dnb-row-updated {
    white-space: nowrap;
    color: #666;
    font-size: 12px;
}

.dnb-open-button {
    white-space: nowrap;
}

.dnb-detail-page h2 {
    margin: 12px 0 12px;
    font-size: 25px;
    line-height: 1.45;
}

.dnb-detail-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.dnb-back-link {
    color: #2563eb;
    font-weight: 900;
    text-decoration: none;
}

.dnb-detail-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.dnb-detail-meta span {
    background: #f3f4f6;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    color: #555;
}

.dnb-detail-body {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
    line-height: 1.8;
    margin: 14px 0;
}

.dnb-detail-actions {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.dnb-detail-actions form {
    margin: 0;
}

.dnb-detail-complete,
.dnb-detail-hold {
    display: grid;
    gap: 8px;
}

.dnb-detail-complete textarea,
.dnb-detail-hold input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 15px;
}

@media (max-width: 760px) {
    .dnb-quick-form {
        grid-template-columns: 1fr;
    }

    .dnb-simple-table {
        min-width: 760px;
    }

    .dnb-detail-page h2 {
        font-size: 22px;
    }
}
