﻿/* ============================================================================
   site.css
   全ページ共通のスタイルシート（_Layout.cshtml から読み込まれる）。
   構成：色定義 → 全体レイアウト → ヘッダー／ナビ → 本文コンテナ →
        見出し・メッセージ → フォーム部品 → 候補選択UI → 表 → その他ユーティリティ
   ============================================================================ */

/* 色などの共通変数（ネイビー＝ヘッダー色、warn＝警告、ok＝成功メッセージ） */
:root {
    --navy: #1f3864;
    --blue: #2e75b6;
    --line: #d0d7e2;
    --bg: #f5f7fa;
    --warn-bg: #fce4d6;
    --warn-fg: #833c0c;
    --ok-bg: #e2efda;
    --ok-fg: #375623;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: "Meiryo","Hiragino Kaku Gothic ProN",Arial,sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #222;
    background: var(--bg)
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px
}

/* ヘッダー・ログイン中ユーザーバー */
.site-header {
    background: var(--navy);
    color: #fff;
    padding: 10px 0
}

.site-title {
    font-weight: bold
}

.user-bar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 6px 0;
    font-size: 13px
}

    .user-bar .container {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px
    }

    .user-bar .links a, .linklike {
        margin-left: 12px;
        color: var(--blue);
        text-decoration: none;
        background: none;
        border: none;
        font-size: 13px;
        cursor: pointer;
        font-family: inherit
    }

        .user-bar .links a:hover, .linklike:hover {
            text-decoration: underline
        }

.inline-form {
    display: inline
}
/* ログアウト等、リンクのように見せたい<form>用 */

/* 本文コンテナと見出し */
main {
    background: #fff;
    margin: 16px auto;
    padding: 24px 16px;
    max-width: 860px;
    border: 1px solid var(--line);
    border-radius: 4px
}

h1 {
    font-size: 20px;
    color: var(--navy);
    margin: 0 0 16px;
    border-bottom: 2px solid var(--navy);
    padding-bottom: 6px
}

h2 {
    font-size: 16px;
    color: var(--navy);
    margin: 24px 0 8px
}

/* 画面内の区切り線（宛先一覧生成画面の Outlook テンプレートと個別コピー欄の間など） */
.section-divider {
    border: 0;
    border-top: 2px solid var(--line);
    margin: 28px 0
}

/* 区切り線の直後に置く、以降のまとまりの小見出し（下に続く h2 より一段上に見えるよう少し大きくする） */
.section-lead {
    font-size: 17px;
    font-weight: bold;
    color: var(--navy);
    margin: 0
}

/* 成功・警告メッセージ（TempData["Success"/"Error"] や ValidationSummary で使用） */
.msg {
    padding: 10px 14px;
    border-radius: 4px;
    margin: 12px 0
}

    .msg.warn {
        background: var(--warn-bg);
        color: var(--warn-fg);
        font-weight: bold
    }

    .msg.ok {
        background: var(--ok-bg);
        color: var(--ok-fg)
    }

    .msg ul {
        margin: 0;
        padding-left: 20px
    }

/* フォーム部品 */
.field {
    margin-bottom: 14px
}

    .field label {
        display: block;
        font-weight: bold;
        font-size: 14px;
        margin-bottom: 4px
    }

input[type=text], input[type=password], input[type=email], input[type=datetime-local],
input[type=date], input[type=file], textarea, select {
    width: 100%;
    max-width: 420px;
    padding: 8px;
    border: 1px solid #b9c2cf;
    border-radius: 3px;
    font-family: inherit;
    font-size: 15px;
    background: #fffdf5
}

textarea {
    max-width: 100%;
    min-height: 120px
}

.hint {
    font-size: 12px;
    color: #666
}

button, .btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 3px;
    border: 1px solid var(--blue);
    background: #fff;
    color: var(--blue);
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit
}

    button.primary, .btn.primary {
        background: var(--blue);
        color: #fff;
        font-weight: bold
    }

    button:disabled {
        background: #ededed;
        color: #888;
        border-color: #ccc;
        cursor: not-allowed
    }

/* 投票画面の候補選択カード */
.candidate {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8fafc
}

    .candidate.selected {
        border-color: var(--blue);
        background: #eef5fc
    }

    .candidate label {
        font-weight: bold;
        cursor: pointer
    }

    .candidate a {
        margin-left: 12px;
        font-size: 13px
    }

/* 一覧表（履歴・集計・監査ログ等） */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 14px
}

th, td {
    border: 1px solid var(--line);
    padding: 6px 8px;
    text-align: left;
    vertical-align: top
}

th {
    background: #d9e2f3;
    color: var(--navy)
}

/* 確認画面などの定義リスト表示 */
.summary {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 12px;
    margin: 12px 0
}

    .summary dt {
        font-weight: bold;
        font-size: 13px;
        color: #555
    }

    .summary dd {
        margin: 0 0 8px
    }

/* ボタン群・数値セル・補足テキストなどの共通ユーティリティ */
.actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.num {
    text-align: right
}

.small {
    font-size: 13px;
    color: #555
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/*.menu-section {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}*/

.menu-section h3 {
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #ddd;
    font-size: 18px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    text-decoration: none;
}

/* 入力欄の横に並ぶリンクボタン（検索フォームのクリア等）は、隣の button と同じ大きさにする */
.field button, .field .btn {
    padding: 9px 20px;
    line-height: 1.5;
    vertical-align: middle;
}
