/* 基本スタイル設定 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
    color: #2c3e50;
    background-color: #f4f6f8; /* 全体をほんのりシックなグレーに */
    line-height: 1.6;
}

/* ヘッダー装飾（角丸カード風に） */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background-color: #2c3e50; /* シックなダークネイビー */
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

header h1, header h2 {
    color: #ffffff;
    margin: 0;
}

h1, h2 {
    color: #1a252f;
    font-weight: 700;
}

/* ボタン類（丸みと影をつけてモダン化） */
button {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: 50px; /* カプセル型のぷっくりボタン */
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0, 102, 204, 0.25); /* 浮き出る影 */
    transition: all 0.2s ease;
}

button:hover {
    background-color: #0052a3;
    transform: translateY(-1px); /* ホバー時に少し浮く */
    box-shadow: 0 5px 12px rgba(0, 102, 204, 0.35);
}

button:disabled {
    background-color: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

#btn-logout {
    background-color: #6c757d;
    box-shadow: 0 3px 8px rgba(108, 117, 125, 0.2);
    margin-left: 10px;
}

#btn-logout:hover {
    background-color: #5a6268;
    box-shadow: 0 5px 12px rgba(108, 117, 125, 0.3);
}

/* ★ ライセンス一覧テーブル（モダンなカード配置へ切り替え） */
table {
    width: 100%;
    table-layout: fixed; /* 列幅を固定して自動伸縮を防ぐ */
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: 15px;
}

th, td {
    padding: 14px 12px;
    text-align: center; /* 中央揃えで見やすくする */
    vertical-align: middle;
    word-break: break-word; /* 基本的なテキストの折り返し */
}
/* 列ごとの幅（%）をきっちり指定する設定 */
th:nth-child(1), td:nth-child(1) { width: 10%; } /* 商品名 */
th:nth-child(2), td:nth-child(2) { width: 8%; }  /* Ver */
th:nth-child(3), td:nth-child(3) { width: 16%; } /* シリアルナンバー（改行防止） */
th:nth-child(4), td:nth-child(4) { width: 38%; } /* アクティベーションキー（広めに確保） */
th:nth-child(5), td:nth-child(5) { width: 10%; } /* ステータス */
th:nth-child(6), td:nth-child(6) { width: 18%; } /* 購入日時 */

/* ヘッダー行：灰色ブロック風 */
h {
    background-color: #e9ecef;
    color: #334155;
    font-weight: bold;
    border: none;
    white-space: nowrap; /* ヘッダーの文字（シリアルナンバー等）の意図しない改行を防止 */
}
th:first-child { border-radius: 6px 0 0 6px; }
th:last-child  { border-radius: 0 6px 6px 0; }

/* データ行：白い丸角カード風 */
tbody tr td {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* 行の左右のみ角丸と枠線をつける */
tbody tr td:first-child {
    border-left: 1px solid #e2e8f0;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
tbody tr td:last-child {
    border-right: 1px solid #e2e8f0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* コード表示（シリアルやキーなど） */
code {
    display: inline-block;
    max-width: 100%;
    background-color: #f1f5f9;
    color: #0f172a;
    padding: 6px 8px;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.85em;
    border: 1px solid #e2e8f0;
    word-break: break-all; /* 長い連番英数字（キー）を枠内で自動折り返しさせる */
    box-sizing: border-box;
}

/* EULA 表示エリア */
.eula-box {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    height: 120px;
    overflow-y: scroll;
    padding: 12px;
    background: #ffffff;
    font-size: 0.85em;
    margin-top: 8px;
    color: #475569;
}

/* フォーム装飾（カード風にクッキリさせる） */
#buy-section {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

input[type="text"], select {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* 入力項目フォーカス時の光るエフェクト */
input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}
