/* ========================================
   R-Trender クライアント用スタイル
   client/styles/client.css
   2026-01-01 デザイン統一（admin準拠）
   ======================================== */

/* リセット・基本 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #24292e;
  background: #f5f7fa;
}

/* アプリコンテナ */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ヘッダー（ダークグレー - admin統一） */
.app-header {
  background: #2d3748;
  color: #ffffff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left h1 {
  font-size: 18px;
  font-weight: 600;
}

.header-subtitle {
  font-size: 13px;
  opacity: 0.9;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  font-size: 13px;
  opacity: 0.9;
}

/* メインエリア */
.app-main {
  display: flex;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
}

/* サイドバー */
.sidebar {
  width: 200px;
  background: #ffffff;
  border-right: 1px solid #e1e4e8;
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
}

.sidebar-nav {
  padding: 16px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: #5f6368;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.nav-item:hover {
  background: #f8f9fa;
  color: #e57373;
}

.nav-item.active {
  background: #f5f7fa;
  color: #e57373;
  border-left-color: #e57373;
  font-weight: 600;
}

/* サイドバーアイコン（admin統一） */
.nav-icon {
  font-size: 14px;
  margin-right: 8px;
  width: 20px;
  text-align: center;
}

.nav-label {
  font-size: 14px;
}

/* コンテンツエリア */
.content-area {
  flex: 1;
  margin-left: 200px;
  padding: 24px;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #24292e;
}

/* カード */
.card {
  background: #ffffff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #24292e;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e1e4e8;
}

/* ステータスグリッド */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.status-item {
  text-align: center;
  padding: 16px;
  background: #f6f8fa;
  border-radius: 4px;
}

.status-label {
  display: block;
  font-size: 12px;
  color: #586069;
  margin-bottom: 4px;
}

.status-value {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #24292e;
}

/* ジャンルグリッド */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.genre-item {
  padding: 12px 16px;
  background: #f6f8fa;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.genre-name {
  font-size: 13px;
  color: #24292e;
}

.genre-count {
  font-size: 14px;
  font-weight: 600;
  color: #BF0000;
}

/* アカウント情報 */
.account-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-label {
  width: 140px;
  font-size: 13px;
  color: #586069;
}

.info-value {
  flex: 1;
  font-size: 14px;
  color: #24292e;
}

.info-text {
  color: #586069;
  font-size: 14px;
}

/* フォーム */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #24292e;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  max-width: 320px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.form-control:focus {
  outline: none;
  border-color: #BF0000;
  box-shadow: 0 0 0 3px rgba(191,0,0,0.1);
}

.password-form {
  max-width: 400px;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-primary {
  background: #BF0000;
  color: #ffffff;
  border-color: #BF0000;
}

.btn-primary:hover {
  background: #a00000;
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #ffffff;
}

.btn-sm {
  padding: 4px 12px;
  font-size: 13px;
}

/* ローディング */
.loading {
  text-align: center;
  padding: 40px;
  color: #586069;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    position: static;
    border-right: none;
    border-bottom: 1px solid #e1e4e8;
  }
  
  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 0;
  }
  
  .nav-item {
    padding: 12px 16px;
    white-space: nowrap;
    border-left: none;
  }
  
  .nav-item.active {
    border-left: none;
    border-bottom: 3px solid #e57373;
  }
  
  .nav-icon {
    margin-right: 4px;
  }
  
  .content-area {
    margin-left: 0;
  }
  
  .app-main {
    flex-direction: column;
  }
}

/* 店舗セル（2段表示） */
.shop-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shop-cell .shop-name {
  font-weight: 500;
  color: #24292e;
}

.shop-cell .shop-code {
  font-size: 11px;
  color: #6a737d;
}

/* フォーム静的表示 */
.form-static {
  padding: 8px 0;
  font-weight: 500;
  color: #24292e;
}