/* 共通デザイン（Bootstrap 5 補助用） */

/* ログイン画面用 */
.auth-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    max-width: 400px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(25, 135, 84, 0.15);
}

.login-card .card-header {
    background: #198754;
    color: #fff;
    font-weight: 600;
    border-radius: 1rem 1rem 0 0;
    padding: 1rem 1.25rem;
}

.btn-login {
    background: #198754;
    border-color: #198754;
    font-weight: 500;
}

.btn-login:hover {
    background: #157347;
    border-color: #146c43;
}

.form-control:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* TOP メニュー共通 */
.btn-rich-green {
    background: linear-gradient(145deg, #28a745, #218838);
    border: none;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-radius: 12px;
}

.btn-rich-green:hover {
    background: linear-gradient(145deg, #218838, #1e7e34);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    color: white;
}

.btn-rich-green:active {
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
    transform: translateY(1px);
}

.icon-size-lg {
    font-size: 3rem;
}

/* マスタ管理メニュー: 検索・登録ボタン（押しやすいよう約2倍幅） */
.btn-master-nav {
    min-width: 3.25rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* アコーディオン調整（マスタメニュー） */
.accordion-button:not(.collapsed) {
    color: #218838;
    background-color: #e9f5ec;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

.accordion-button:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

/* 伝票入力画面 */
.btn-green-outline {
    color: #28a745;
    border-color: #28a745;
}

.btn-check:checked + .btn-green-outline {
    background-color: #28a745;
    color: white;
}

.input-group-text-green {
    background-color: #e9f5ec;
    color: #218838;
    border-right: none;
}

.form-label-custom {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: block;
}

/* 伝票入力画面: 顧客・販売店・簡易登録のフォントサイズ統一 */
.entry-form .form-select-entry,
.entry-form .form-control-entry {
    font-size: 1rem;
}

.entry-form .quick-register-card .card-body,
.entry-form .quick-register-card .form-control-entry,
.entry-form .quick-register-card .form-label-custom {
    font-size: 1rem;
}

.entry-form .quick-register-card .text-muted {
    font-size: 0.875rem;
}

/* 一覧モック: 行クリックで詳細・編集・削除は横並び・テーブルは横スクロールで一覧表示 */
.mock-list-table { cursor: pointer; }
.mock-list-table .btn { cursor: pointer; }
.mock-list-table .btn:hover { text-decoration: none; }
.table-scroll-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
.table-scroll-wrapper .table { margin-bottom: 0; min-width: 100%; table-layout: auto; }
/* 編集・削除を横並びに固定（折り返さない） */
.voucher-list-actions { white-space: nowrap; min-width: 8.5rem; }
.voucher-list-actions .d-flex { flex-wrap: nowrap; }
/* 名前・店舗名なども横に表示（スマホ含む）→ 横スクロールで一度に表示 */
.table-scroll-wrapper .table th,
.table-scroll-wrapper .table td { white-space: nowrap; }
.pagination-wrap { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.25rem; }

/* モック共通: 文字・入力枠を大きく、項目名をグリーンでメリハリ */
.mock-form .form-label,
.mock-form .card-title { font-size: 1.15rem; font-weight: 600; color: #198754; margin-bottom: 0.5rem; }
.mock-form .card-title { font-size: 1.35rem; margin-bottom: 1rem; }
.mock-form .form-control,
.mock-form .form-select,
.mock-form input[type="text"],
.mock-form input[type="search"],
.mock-form input[type="number"],
.mock-form input[type="date"],
.mock-form textarea { font-size: 1.1rem; padding: 0.6rem 0.85rem; min-height: 2.75rem; border-radius: 0.5rem; }
.mock-form textarea { min-height: 4.5rem; }
.mock-form .btn { font-size: 1.05rem; padding: 0.5rem 1rem; }
.mock-form .table { font-size: 1.05rem; }
.mock-form .table th,
.mock-form .table td { padding: 0.65rem 0.75rem; vertical-align: middle; }
.mock-form .pagination .page-link { font-size: 1rem; padding: 0.5rem 0.75rem; }
.mock-form .form-text { font-size: 0.95rem; }
.mock-form .d-flex .text-muted { font-size: 1rem; }
.date-input-slash { font-size: 1.1rem; padding: 0.6rem 0.85rem; width: 100%; max-width: 11rem; }
.date-picker-helper { font-size: 1rem; padding: 0.6rem; }

/* 必須項目の赤い＊ */
.form-label.required::after {
    content: ' *';
    color: #dc3545;
}

/* プレースホルダーの基本仕様: 少し薄めのグレー（約60%） */
::placeholder {
    color: #adb5bd;
    opacity: 1;
}
::-webkit-input-placeholder {
    color: #adb5bd;
}
:-ms-input-placeholder {
    color: #adb5bd;
}
::-ms-input-placeholder {
    color: #adb5bd;
}

/* スマホ: 日付・年月日を等幅表示（数字が揃う・入力幅を親に合わせる） */
@media (max-width: 767.98px) {
    input[type="date"],
    .date-display-large,
    .date-cell {
        font-variant-numeric: tabular-nums;
        font-feature-settings: "tnum";
    }
    input[type="date"] {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}

/* iPhone Safari: 日付 input にプレースホルダーが出ないため、疑似プレースホルダーを表示 */
.date-input-safari-wrap {
    position: relative;
}
.date-placeholder-safari {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    pointer-events: none;
    font-size: inherit;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}
.date-placeholder-safari.hide {
    opacity: 0;
    visibility: hidden;
}
.date-input-safari-wrap .form-control {
    position: relative;
    z-index: 1;
}

