@charset "UTF-8";

/* ===================================================
   ベース設定 & カラーテーマ (#2c3e50)
=================================================== */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 16px; /* [変更] 基本サイズを大きく(14px -> 16px) */
    background-color: #f8f9fa;
    color: #333;
}

/* [追加] PHP側の small タグやクラスの影響を打ち消して大きくする */
.small, small {
    font-size: 1rem !important; /* 強制的に標準サイズにする */
}

/* [追加] テーブル内の文字サイズ確保 */
.table {
    font-size: 1rem !important;
}

/* [追加] フォーム入力欄の文字サイズ確保 */
.form-control, .form-select, .btn {
    font-size: 1rem !important;
}

/* --- テーマカラーの上書き (Bootstrap Override) --- */
/* 一般ユーザーのヘッダーや主要ボタンを #2c3e50 に統一 */
.bg-primary {
    background-color: #2c3e50 !important;
}
.btn-primary {
    background-color: #2c3e50;
    border-color: #2c3e50;
}
.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
    background-color: #1a252f !important; /* ホバー時は少し暗く */
    border-color: #1a252f !important;
}
.text-primary {
    color: #2c3e50 !important;
}
.border-primary {
    border-color: #2c3e50 !important;
}
.btn-outline-primary {
    color: #2c3e50;
    border-color: #2c3e50;
}
.btn-outline-primary:hover {
    background-color: #2c3e50;
    color: #fff;
}

/* --- 権限ごとの区別 (変更なし) --- */
/* 管理者(admin)は黒系 */
.bg-dark {
    background-color: #212529 !important;
}
/* 経理(accounting)は緑系 */
.bg-success {
    background-color: #198754 !important;
}

/* ===================================================
   ログイン画面
=================================================== */
body.login-body {
    background: #ecf0f1; /* 背景も少しテーマに合わせる */
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    max-width: 400px;
    width: 100%;
    border-top: 5px solid #2c3e50; /* アクセントカラー */
}

/* ===================================================
   メイン画面
=================================================== */
.navbar {
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.receipt-thumb {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.app-row:hover {
    background-color: #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* テーブルのスマホ対応（横スクロール） */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* iOSでのスクロール滑らかに */
}

/* 入力フォームの幅調整（スマホで見やすく） */
.min-w-150 { min-width: 150px; }
.min-w-200 { min-width: 200px; }
.min-w-100 { min-width: 100px; }

/* スマホ表示時の微調整 */
@media (max-width: 576px) {
    body {
        font-size: 14px; /* [変更] スマホでも少し大きく(13px -> 14px) */
    }
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    /* ボタンを押しやすく */
    .btn-lg {
        width: 100%;
        margin-bottom: 10px;
    }
    /* フォームの縦並び間隔 */
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* ===================================================
   印刷画面
=================================================== */
body.print-body {
    background: #fff;
    padding: 20px;
    font-size: 14px; /* [変更] 印刷時も大きく(12px -> 14px) */
}

.print-wrap {
    max-width: 900px;
    margin: 0 auto;
    border: 2px solid #000;
    padding: 30px;
}

.p-header {
    border-bottom: 2px solid #000;
    margin-bottom: 20px;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.tbl-print {
    width: 100%;
    border-collapse: collapse;
}
.tbl-print th, .tbl-print td {
    border: 1px solid #000 !important;
    padding: 6px;
}
.tbl-print th {
    background: #eee !important;
    text-align: center;
}

.stamp-area {
    text-align: right;
}
.stamp-box {
    width: 70px;
    height: 70px;
    border: 1px solid #000;
    display: inline-block;
    margin-left: 5px;
    position: relative;
    vertical-align: top;
}
.stamp-label {
    font-size: 10px;
    text-align: center;
    border-bottom: 1px solid #000;
    background: #eee;
    line-height: 16px;
}
.stamp-seal {
    width: 54px;
    height: 54px;
    border: 2px solid #f00;
    border-radius: 50%;
    color: #f00;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px auto 0;
    text-align: center;
    line-height: 1.1;
    flex-direction: column;
}
.stamp-date {
    font-size: 9px;
    border-top: 1px solid #f00;
    border-bottom: 1px solid #f00;
    width: 100%;
    margin: 2px 0;
}

.img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    page-break-inside: avoid;
}
.img-item {
    border: 1px solid #ddd;
    padding: 5px;
    page-break-inside: avoid;
    text-align: center;
}
.img-item img, .pdf-canvas {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border: 1px solid #eee;
}

@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
}