body {
    font-family: "Segoe UI", sans-serif;
    background: #f4f6f9;
    margin: 0;
    padding: 20px;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
}

.login-card {
    width: 350px;
}

.login-title {
    text-align: center;
    margin-bottom: 20px;
}

.form-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;

}

.form-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}


/* カード */
.card {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* タイトル */
h3 {
    border-left: 6px solid #2ecc71;
    padding-left: 10px;
    margin-bottom: 15px;
}

/* テーブル */
.table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    table-layout: fixed;
}

/* ヘッダー */
.table th {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    color: white;
    padding: 12px;
    text-align: left;
}

/* セル */
.table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table-wrapper {
    overflow-x: auto;
}

/* 一般ページのセル幅 */
/* 項目 */
.table-user th:nth-child(1),
.table-user td:nth-child(1) {
    width: 5%;
}

/* 部署（課）*/
.table-user th:nth-child(2),
.table-user td:nth-child(2) {
    width: 10%
}

/*タイトル*/
.table-user th:nth-child(3),
.table-user td:nth-child(3) {
    width: 15%;
}

/*開催日*/
.table-user th:nth-child(4),
.table-user td:nth-child(4) {
    width: 8%;
}

/*記入者*/
.table-user th:nth-child(5),
.table-user td:nth-child(5) {
    width: 8%;
}

/*備考*/
.table-user th:nth-child(6),
.table-user td:nth-child(6) {
    width: 44%;
}

/*ファイル*/
.table-user th:nth-child(7),
.table-user td:nth-child(7) {
    width: 10%;
}

/* 議事録欄の行数制限 */
.clamp-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;

    -webkit-line-clamp: 3;
    line-clamp: 3;

    overflow: hidden;
    text-overflow: ellipsis;

    white-space: pre-wrap;
    word-break: break-word;
}

/*モーダルの備考欄改行反映*/
#d-content {
    white-space: pre-wrap;
}

/* 行ストライプ */
.table tr:nth-child(even) {
    background: #f9f9f9;
}

/* ホバー */
.table tr:hover {
    background: #eafaf1;
}

/* フォーム */
input:not([type="checkbox"]),
select,
textarea {
    padding: 8px;
    margin: 5px 5px 10px 0;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.wide-input {
    width: 100%;
    max-width: 500px;
}

.wide-textarea {
    width: 100%;
    max-width: 500px;
    min-height: 200px;
    /* 高さ調整 */
}

input:focus,
select:focus {
    border-color: #2ecc71;
    outline: none;
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.4);
}

/* ボタン */
button {
    width: 200px;
    padding: 8px 15px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

/* メインボタン */
.btn-primary {
    background: #2ecc71;
    color: white;
}

.btn-primary:hover {
    background: #27ae60;
}

/* サブボタン */
.btn-secondary {
    background: #b2b3b2;
    color: white;
}

.btn-secondary:hover {
    background: #9a9b9a;
}

/* ログアウト */
.logout {
    color: #e74c3c;
    text-decoration: none;
    font-weight: bold;
}

/* 新規登録 */
.regist {
    color: #2ecc71;
    text-decoration: none;
    font-weight: bold;
}

a {
    color: #278dbd;
    text-decoration: none;
}

.filename {
    text-align: center;
}

/* ログイン入力 */
.login-card input:not([type="checkbox"]) {
    width: 100%;
    box-sizing: border-box;
}

/* ボタン強調 */
.login-card button {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    color: white;
    font-size: 16px;
}

th a {
    color: white;
    text-decoration: none;
}

th a:hover {
    text-decoration: underline;
}

.modal {
    display: none;

    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.5);

    z-index: 999;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;

    width: 90%;
    max-width: 800px;

    max-height: 80vh;
    overflow-y: auto;

    position: relative;
}

#detailClose {
    font-size: 24px;
    padding: 5px 10px;
    cursor: pointer;

    position: absolute;
    top: 10px;
    right: 10px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.errorlist {
    color: red;
    margin: 0;
    padding: 0;
    list-style: none;
}

.file-area {
    font-size: 0;
}

.file-area input,
.file-area label {
    font-size: 14px;
}

.row-click {
    cursor: pointer;
}

.row-click:active {
    background-color: #eee;
}

.loading-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 9999;
}

.loading-content {
    background: white;
    padding: 24px 32px;
    border-radius: 8px;
    text-align: center;
}

.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;

    border: 4px solid #ddd;
    border-top: 4px solid #3498db;
    border-radius: 50%;

    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* スマホ用css */
@media (max-width: 768px) {

    body {
        padding: 10px;
    }

    .card {
        padding: 15px;
    }

    /* テーブル文字小さく */
    .table {
        font-size: 12px;
    }

    /* nowrap解除（重要） */
    .table td {
        white-space: middle;
    }

    /* 幅指定を無効化 */
    .table-user th,
    .table-user td {
        width: auto;
    }

    /* 入力フォーム */
    input:not([type="checkbox"], [type="file"]),
    select,
    textarea {
        width: 100%;
        box-sizing: border-box;
    }

    /* ボタン */
    button {
        width: 100%;
        margin-top: 10px;
    }

    /* モーダル */
    .modal-content {
        width: 90%;
    }

    .file-area {
        text-align: left;
    }

    .file-area input[type="checkbox"] {
        vertical-align: middle;
    }

    .file-area label {
        display: inline;
        margin-left: 4px;
    }
}