:root {
    --primary: #007BFF;
    --primary-dark: #0056b3;
    --background: #f5f7fa;
    --text: #333;
    --card-bg: #fff;
    --border: #ddd;
    --radius: 8px;
}

/* 全体 */
body {
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    margin: 20px;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* 見出し */
h1, h2 {
    font-size: 1.8em;
    color: #222;
    margin-bottom: 20px;
}

/* リンク */
a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* フォーム */
form {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    max-width: 650px;
    margin-bottom: 30px;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}
input[type="text"],
input[type="date"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-sizing: border-box;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}
input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 4px rgba(0,123,255,0.4);
    outline: none;
}

/* ボタン */
button {
    padding: 12px 18px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}
button:hover {
    background-color: var(--primary-dark);
}

/* テーブル */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: var(--card-bg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-radius: var(--radius);
    overflow: hidden;
}
th, td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
th {
    background-color: var(--primary);
    color: white;
    font-weight: bold;
}
tr:nth-child(even) td {
    background: #f9f9f9;
}

/* エラー表示 */
.error {
    color: red;
    margin-bottom: 10px;
    font-weight: bold;
}

/* レスポンシブ対応 */
@media screen and (max-width: 600px) {
    body {
        margin: 10px;
    }

    form, table {
        font-size: 14px;
    }

    table, thead, tbody, th, td, tr {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--card-bg);
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        padding: 10px;
    }

    td {
        display: flex;
        justify-content: space-between;
        border: none;
        padding: 8px 0;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #555;
    }
}
