/* ===== 目標達成シート スタイル ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif; background: #f0f4f8; color: #1e293b; font-size: 14px; }

/* ナビゲーション */
.gs-nav { background: #1e3a5f; color: white; position: sticky; top: 0; z-index: 50; }
.gs-nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 24px; }
.gs-nav-left { display: flex; align-items: center; gap: 16px; }
.gs-nav-brand { color: white; text-decoration: none; font-size: 18px; font-weight: 700; }
.gs-nav-year { background: #3b82f6; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.gs-nav-link { color: #93c5fd; text-decoration: none; font-size: 14px; padding: 4px 8px; border-radius: 6px; }
.gs-nav-link:hover, .gs-nav-link.active { background: rgba(255,255,255,0.1); color: white; }
.gs-nav-right { display: flex; align-items: center; gap: 16px; }
.gs-nav-user { color: #94a3b8; font-size: 13px; }
.gs-nav-portal { color: white; font-size: 13px; text-decoration: none; background: rgba(255,255,255,0.15); border-radius: 6px; padding: 4px 12px; }
.gs-nav-portal:hover { background: rgba(255,255,255,0.25); color: white; }
.gs-nav-logout { color: #94a3b8; font-size: 13px; text-decoration: none; }
.gs-nav-logout:hover { color: white; }

/* コンテンツ */
.gs-content { min-height: calc(100vh - 56px); }
.gs-page { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* フラッシュ */
.gs-flash-container { margin-bottom: 16px; }
.gs-flash { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 8px; }
.gs-flash-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.gs-flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.gs-flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.gs-flash-info { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* アラート */
.gs-alert { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 10px; margin-bottom: 16px; }
.gs-alert-warning { background: #fef3c7; border: 1.5px solid #f59e0b; }
.gs-alert-info { background: #dbeafe; border: 1.5px solid #bfdbfe; }
.gs-alert-icon { font-size: 18px; flex-shrink: 0; }
.gs-alert-body { flex: 1; font-size: 13px; color: #78350f; }
.gs-alert-info .gs-alert-body { color: #1d4ed8; }

/* カード */
.gs-card { background: white; border-radius: 12px; padding: 20px 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); margin-bottom: 16px; }
.gs-card-title { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 14px; }
.gs-card-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

/* ページタイトル */
.gs-page-title { font-size: 20px; font-weight: 700; color: #1e293b; }
.gs-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.gs-breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 13px; color: #64748b; flex-wrap: wrap; }
.gs-breadcrumb a { color: #3b82f6; text-decoration: none; }
.gs-muted { color: #64748b; font-size: 13px; }

/* ボタン */
.gs-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: opacity 0.15s; white-space: nowrap; }
.gs-btn:hover { opacity: 0.85; }
.gs-btn-primary { background: #3b82f6; color: white; }
.gs-btn-secondary { background: #f1f5f9; color: #374151; border: 1px solid #d1d5db; }
.gs-btn-danger { background: #ef4444; color: white; }
.gs-btn-teal { background: #0d9488; color: white; }
.gs-btn-blue { background: #eff6ff; color: #3b82f6; border: 1px solid #bfdbfe; }
.gs-btn-warning { background: #f59e0b; color: white; }
.gs-btn-orange { background: #ea580c; color: white; }
.gs-btn-full { width: 100%; }
.gs-btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }

/* バッジ */
.gs-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.gs-badge-blue { background: #dbeafe; color: #1d4ed8; }
.gs-badge-blue-light { background: #e0f2fe; color: #0369a1; }
.gs-badge-green { background: #d1fae5; color: #065f46; }
.gs-badge-teal { background: #ccfbf1; color: #0f766e; }
.gs-badge-yellow { background: #fef9c3; color: #a16207; }
.gs-badge-red { background: #fee2e2; color: #991b1b; }
.gs-badge-purple { background: #ede9fe; color: #6d28d9; }
.gs-badge-gray { background: #f1f5f9; color: #94a3b8; }

/* フォーム */
.gs-form-group { margin-bottom: 16px; }
.gs-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.gs-label-lg { font-size: 14px; font-weight: 700; color: #1e293b; }
.gs-input { width: 100%; padding: 9px 12px; border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 14px; outline: none; transition: border-color 0.15s; }
.gs-input:focus { border-color: #3b82f6; }
.gs-input-sm { padding: 6px 10px; font-size: 13px; }
.gs-textarea { width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px; resize: vertical; outline: none; font-family: inherit; min-height: 72px; }
.gs-textarea:focus { border-color: #3b82f6; }
.gs-textarea-sm { min-height: 48px; font-size: 12px; }
.gs-textarea-lg { min-height: 80px; font-size: 14px; }
.gs-textarea-auto { resize: none; overflow: hidden; min-height: 72px; }
.gs-textarea--warn { border: 1.5px solid #f59e0b; background: #fffbeb; }
.gs-select { border: 1.5px solid #d1d5db; border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #374151; background: white; cursor: pointer; }
.gs-select-sm { padding: 5px 8px; font-size: 12px; border-radius: 6px; }
.gs-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.gs-weight-input { width: 52px; text-align: center; border: 1.5px solid #d1d5db; border-radius: 6px; padding: 6px; font-size: 14px; font-weight: 700; }

/* テーブル */
.gs-table { width: 100%; border-collapse: collapse; }
.gs-table th { text-align: left; padding: 10px 14px; font-size: 13px; background: #f8fafc; border: 1px solid #e2e8f0; }
.gs-table td { padding: 12px 14px; font-size: 13px; border: 1px solid #e2e8f0; }
.gs-list-table { width: 100%; border-collapse: collapse; }
.gs-list-table th { padding: 11px 14px; text-align: left; font-size: 12px; color: #374151; background: #f8fafc; border-bottom: 2px solid #e2e8f0; }
.gs-list-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; }
.gs-list-table tbody tr:hover { background: #f8fafc; }
.gs-td-name { font-size: 14px; font-weight: 600; color: #1e293b; }
.gs-td-type { font-size: 12px; color: #64748b; }
.gs-td-code { font-size: 12px; color: #94a3b8; font-family: monospace; }

/* 目標テーブル */
.gs-goals-table { width: 100%; border-collapse: collapse; }
.gs-goals-table th { padding: 9px 10px; font-size: 12px; color: #374151; background: #f8fafc; border: 1px solid #e2e8f0; }
.gs-goals-table td { border: 1px solid #e2e8f0; padding: 6px; }
.gs-goals-no { text-align: center; font-size: 13px; font-weight: 600; color: #64748b; }
.gs-goals-total { background: #f8fafc; }
.gs-result-table { width: 100%; border-collapse: collapse; }
.gs-result-table th { padding: 9px 10px; font-size: 12px; color: #374151; background: #f8fafc; border: 1px solid #e2e8f0; }
.gs-result-table td { border: 1px solid #e2e8f0; padding: 8px 10px; font-size: 13px; vertical-align: top; }

/* タブ */
.gs-tabs { display: flex; border-bottom: 2px solid #e2e8f0; margin-bottom: 20px; }
.gs-tab { padding: 11px 20px; background: none; border: none; font-size: 14px; font-weight: 600; color: #64748b; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s; }
.gs-tab:hover { color: #3b82f6; }
.gs-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; }
.gs-tab-content { display: none; }
.gs-tab-content.active { display: block; }

/* ウェイト */
.gs-weight-indicator { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: #1d4ed8; }
.gs-weight-alert { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 10px 16px; margin-top: 12px; display: flex; align-items: center; font-size: 13px; color: #c2410c; gap: 10px; }
.gs-weight-ok { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 10px 16px; margin-top: 12px; font-size: 13px; color: #166534; font-weight: 600; }

/* レビューカード */
.gs-review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gs-review-card { border: 1.5px dashed #d1d5db; border-radius: 10px; padding: 14px 16px; background: #f8fafc; }
.gs-review-card--done { border-color: #a7f3d0; background: #f0fdf4; border-style: solid; }
.gs-review-card--pending { }
.gs-review-label { font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 8px; }
.gs-review-card--done .gs-review-label { color: #059669; }
.gs-review-date { font-size: 13px; color: #374151; margin-bottom: 4px; }
.gs-review-reviewer { font-size: 12px; color: #64748b; }

/* スコアガイド */
.gs-score-guide { display: flex; gap: 12px; font-size: 11px; color: #64748b; margin-top: 10px; flex-wrap: wrap; }
.gs-score-guide span:first-child { font-weight: 600; }

/* ダッシュボード グリッド */
.gs-dashboard-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.gs-dashboard-main { }
.gs-dashboard-side { display: flex; flex-direction: column; gap: 14px; }

/* 目標カード */
.gs-goal-card { background: white; border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); border-left: 4px solid #3b82f6; margin-bottom: 10px; }
.gs-goal-card--empty { border-left-color: #e2e8f0; opacity: 0.75; }
.gs-goal-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gs-goal-title { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.gs-goal-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gs-goal-detail { background: #f8fafc; border-radius: 7px; padding: 9px 11px; }
.gs-goal-detail--blue { background: #eff6ff; }
.gs-goal-detail-label { font-size: 10px; color: #94a3b8; font-weight: 600; margin-bottom: 4px; }
.gs-goal-detail-value { font-size: 13px; color: #374151; }
.gs-goal-empty-msg { font-size: 13px; color: #94a3b8; }
.gs-goal-score { font-size: 12px; color: #64748b; margin-top: 8px; background: #f8fafc; border-radius: 6px; padding: 6px 10px; }

/* 進捗ロウ */
.gs-progress-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; margin-bottom: 6px; text-decoration: none; color: inherit; }
.gs-progress-row--current { background: #eff6ff; border: 1.5px solid #93c5fd; }
.gs-progress-row--rejected { background: #fffbeb; border: 1px solid #fde68a; }
.gs-progress-quarter { font-size: 11px; font-weight: 600; color: #64748b; }
.gs-progress-row--current .gs-progress-quarter { color: #2563eb; }

/* スコア */
.gs-score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.gs-score-box { text-align: center; background: #f8fafc; border-radius: 8px; padding: 12px 8px; }
.gs-score-box--blue { background: #eff6ff; }
.gs-score-label { font-size: 10px; color: #64748b; font-weight: 600; margin-bottom: 4px; }
.gs-score-val { font-size: 22px; font-weight: 700; color: #1e293b; }
.gs-score-val--muted { color: #94a3b8; }
.gs-score-val--big { font-size: 28px; }
.gs-score-annual { text-align: center; background: #f8fafc; border-radius: 8px; padding: 10px; }
.gs-score-sm { display: inline-block; font-size: 14px; font-weight: 700; color: #1e293b; margin-right: 4px; }

/* 上長情報 */
.gs-manager-row { display: flex; align-items: center; gap: 10px; }
.gs-avatar { width: 38px; height: 38px; border-radius: 50%; background: #dbeafe; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #1d4ed8; flex-shrink: 0; }
.gs-manager-name { font-size: 14px; font-weight: 600; color: #1e293b; }

/* 統計カード */
.gs-stat-card { background: white; border-radius: 10px; padding: 14px 18px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.gs-stat-label { font-size: 12px; color: #64748b; margin-bottom: 4px; }
.gs-stat-val { font-size: 24px; font-weight: 700; color: #1e293b; }
.gs-stat-card--green .gs-stat-val { color: #059669; }
.gs-stat-card--yellow .gs-stat-val { color: #d97706; }
.gs-stat-card--red .gs-stat-val { color: #dc2626; }
.gs-stat-card--blue .gs-stat-val { color: #2563eb; }

/* 情報ボックス */
.gs-info-box { background: #f8fafc; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.gs-info-box-title { font-size: 13px; font-weight: 600; color: #374151; }

/* モーダル */
.gs-modal { background: white; border-radius: 12px; padding: 28px; width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.gs-modal-title { font-size: 16px; font-weight: 700; color: #1e293b; margin-bottom: 16px; }

/* 個人目標タブ内 店舗目標折りたたみ参照 */
.gs-store-ref { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 16px; overflow: hidden; }
.gs-store-ref-summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; cursor: pointer; font-size: 13px; font-weight: 600; color: #1e3a5f; list-style: none; user-select: none; }
.gs-store-ref-summary::-webkit-details-marker { display: none; }
.gs-store-ref-summary:hover { background: #f1f5f9; }
.gs-store-ref-summary::after { content: '▼'; font-size: 11px; color: #64748b; transition: transform 0.2s; }
details[open] .gs-store-ref-summary::after { transform: rotate(180deg); }
.gs-store-ref-badge { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.gs-store-ref-body { padding: 0 16px 16px; }
.gs-store-ref-body .gs-table { margin-top: 0; }
.gs-store-ref-body .gs-table th { background: #f1f5f9; font-size: 12px; width: 160px; }
.gs-store-ref-body .gs-table td { font-size: 13px; color: #374151; white-space: pre-wrap; }

/* 目標削除ボタン */
.gs-goals-del-cell { text-align: center; padding: 4px !important; width: 36px; }
.gs-btn-del-goal { background: none; border: none; color: #cbd5e1; font-size: 16px; font-weight: 700; cursor: pointer; width: 28px; height: 28px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s; }
.gs-btn-del-goal:hover { background: #fee2e2; color: #ef4444; }

/* 管理者閲覧バー */
.gs-admin-view-bar { display:flex; align-items:center; justify-content:space-between; background:#fef9c3; border:1px solid #fde68a; border-radius:8px; padding:10px 16px; margin-bottom:16px; }
.gs-admin-view-info { display:flex; align-items:center; gap:16px; font-size:13px; }
.gs-admin-view-info strong { color:#1e293b; }

/* 管理者サマリー：シートリンク */
.gs-sheet-link { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; min-width:36px; }
.gs-sheet-link:hover .gs-score-sm { background:#dbeafe; }
.gs-sheet-link-open { font-size:11px; color:#3b82f6; background:#eff6ff; border-radius:4px; padding:2px 6px; white-space:nowrap; }
.gs-sheet-link-open:hover { background:#dbeafe; }

/* ログイン */
.gs-login-body { background: linear-gradient(135deg, #1e3a5f 0%, #2d6a9f 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.gs-login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.gs-login-card { background: white; border-radius: 12px; padding: 40px; width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.gs-login-header { text-align: center; margin-bottom: 28px; }
.gs-login-sub { font-size: 12px; color: #64748b; letter-spacing: 2px; margin-bottom: 8px; }
.gs-login-title { font-size: 22px; font-weight: 700; color: #1e293b; }
.gs-login-bar { width: 40px; height: 3px; background: #3b82f6; margin: 12px auto 0; border-radius: 2px; }
