/* ============================================
   プロタゴ 見積書システム スタイル
   ============================================ */

:root {
  --protago-blue: #0d6efd;
  --profit-green: #198754;
  --profit-red: #dc3545;
}

/* 粗利表示エリア（入力画面のみ・PDF非表示） */
.profit-panel {
  background: #f8f9fa;
  border: 2px solid #198754;
  border-radius: 8px;
  padding: 16px;
}

.profit-panel .profit-value {
  font-size: 1.4rem;
  font-weight: bold;
}

.profit-good  { color: var(--profit-green); }
.profit-warn  { color: #fd7e14; }
.profit-bad   { color: var(--profit-red); }

/* 見積明細テーブル */
.estimate-table th {
  background: #e9ecef;
  white-space: nowrap;
  font-size: 0.85rem;
}

.estimate-table td {
  vertical-align: middle;
}

/* 仕切り列（薄い背景で内部用と分かるように） */
.col-shikiri {
  background: #fff9e6 !important;
  font-size: 0.85rem;
  color: #666;
}

.col-shikiri th {
  background: #fff0c0 !important;
}

/* 金額入力 */
input.money-input {
  text-align: right;
}

/* 合計エリア */
.total-area {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #dee2e6;
}

.total-row.grand-total {
  font-size: 1.2rem;
  font-weight: bold;
  border-bottom: 2px solid #0d6efd;
  color: #0d6efd;
}

.total-row.discount {
  color: #dc3545;
}

/* ステータスバッジ */
.status-draft    { background: #6c757d; }
.status-sent     { background: #0d6efd; }
.status-approved { background: #198754; }
.status-lost     { background: #dc3545; }

/* ダッシュボードカード */
.stat-card {
  border-left: 4px solid var(--protago-blue);
}

/* レスポンシブ：スマホでテーブルスクロール */
.table-responsive-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 印刷・PDF用（@media print でPDF出力時に適用） */
@media print {
  .navbar, .btn, .no-print, .profit-panel, .col-shikiri {
    display: none !important;
  }

  body { font-size: 11pt; }

  .print-only { display: block !important; }

  .estimate-table th,
  .estimate-table td {
    font-size: 10pt;
    padding: 4px 6px;
  }
}
