/* ===== ワスケ | いわ木薬局グループ シフト管理 共通スタイル =====
 * ブランドカラー: ネイビー #1e2a52 (ロゴ背景), シルバー #cbd5e1 (結晶/根)
 * アクセント: 深い金 #b8924a (和モダン)
 */

:root {
  --brand-navy:       #1e2a52;  /* メインブランド色 (ロゴ背景) */
  --brand-navy-dark:  #151e3d;  /* ホバー・濃い面 */
  --brand-navy-light: #2e3e6e;  /* グラデーション・サイドバー */
  --brand-silver:     #cbd5e1;  /* 結晶/根の色 */
  --brand-gold:       #b8924a;  /* アクセント (和のテイスト) */
  --brand-gold-light: #d4b377;
  --bg-cream:         #fafaf7;  /* 背景クリーム */
  --text-base:        #1e293b;
  --text-muted:       #64748b;
  --border-soft:      #e5e7eb;
}

/* 全体背景: 和紙のような温かみあるクリーム */
body {
  background: var(--bg-cream) !important;
  color: var(--text-base);
}

/* スクロールバー */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ページ切替時のフェード */
.fade-in { animation: fadeIn 0.25s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* トースト */
.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(30,42,82,0.25);
  z-index: 9999;
  animation: slideIn 0.25s ease-out;
  max-width: 340px;
}
.toast.success { background: #10b981; color: white; }
.toast.error   { background: #ef4444; color: white; }
.toast.info    { background: var(--brand-navy); color: white; }
.toast.warning { background: var(--brand-gold); color: white; }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ===== サイドバー: ダークネイビー地 ===== */
.sidebar-nav {
  background: linear-gradient(180deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
  color: #e5e7eb;
}

.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  color: #cbd5e1;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}
.sidebar-link.active {
  background: var(--brand-gold);
  color: white;
  box-shadow: 0 2px 8px rgba(184,146,74,0.35);
}
.sidebar-link.active:hover {
  background: var(--brand-gold-light);
  color: white;
}

/* モバイルナビは薄色地 */
.sidebar-link.mobile {
  color: #475569;
}
.sidebar-link.mobile:hover { background: #e2e8f0; color: var(--brand-navy); }
.sidebar-link.mobile.active { background: var(--brand-navy); color: white; }

/* ブランドロゴエリア */
.brand-header {
  background: var(--brand-navy-dark);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-header .brand-name {
  color: white;
  letter-spacing: 0.05em;
}
.brand-header .brand-sub {
  color: #94a3b8;
}

/* ユーザー情報エリア (サイドバー下部) */
.user-panel {
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-panel .user-name { color: white; }
.user-panel .user-role { color: #94a3b8; }
.user-panel .logout-btn {
  color: #cbd5e1;
  transition: color 0.15s;
}
.user-panel .logout-btn:hover { color: #fca5a5; }

/* ===== カード ===== */
.card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(30,42,82,0.06), 0 1px 2px rgba(30,42,82,0.04);
  border: 1px solid var(--border-soft);
}

/* カードヘッダー (アクセント付き) */
.card-header-gold {
  border-left: 4px solid var(--brand-gold);
  padding-left: 0.75rem;
}

/* ===== ボタン ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.15s;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand-navy);
  color: white;
}
.btn-primary:hover { background: var(--brand-navy-dark); box-shadow: 0 4px 12px rgba(30,42,82,0.25); }
.btn-primary:disabled { background: #94a3b8; cursor: not-allowed; box-shadow: none; }

.btn-secondary {
  background: #e5e7eb;
  color: var(--brand-navy);
}
.btn-secondary:hover { background: #d1d5db; }

.btn-gold {
  background: var(--brand-gold);
  color: white;
}
.btn-gold:hover { background: #a57d3b; box-shadow: 0 4px 12px rgba(184,146,74,0.3); }

.btn-danger {
  background: #ef4444; color: white;
}
.btn-danger:hover { background: #dc2626; }

.btn-ghost {
  background: transparent;
  color: var(--brand-navy);
  border: 1px solid var(--border-soft);
}
.btn-ghost:hover { background: #f1f5f9; }

/* ===== フォーム ===== */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-base);
  margin-bottom: 0.25rem;
}
.form-input, input[type="text"], input[type="date"], input[type="month"],
input[type="time"], input[type="number"], input[type="email"], input[type="password"],
input[type="datetime-local"], select, textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.form-input:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(30,42,82,0.12);
}

/* チェックボックス・ラジオのアクセント */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--brand-navy);
}

/* ===== タブ ===== */
.tab-btn {
  padding: 0.625rem 1rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--brand-navy); }
.tab-btn.active {
  color: var(--brand-navy);
  border-bottom-color: var(--brand-gold);
}

/* ===== バッジ ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-navy { background: rgba(30,42,82,0.1); color: var(--brand-navy); }
.badge-gold { background: rgba(184,146,74,0.15); color: var(--brand-gold); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ===== カレンダーイベント色(FullCalendar) ===== */
.event-shift { background: #10b981 !important; border-color: #059669 !important; }
.event-duty  { background: #ef4444 !important; border-color: #dc2626 !important; }
.event-event { background: var(--brand-gold) !important; border-color: #a57d3b !important; }
.event-leave { background: #a855f7 !important; border-color: #9333ea !important; }
.event-visit { background: var(--brand-navy) !important; border-color: var(--brand-navy-dark) !important; }

/* ===== ログイン画面専用 ===== */
.login-bg {
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
}
.login-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  display: block;
}
.login-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-navy);
  letter-spacing: 0.05em;
}
.login-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* ===== テーブル ===== */
table.app-table {
  width: 100%;
  border-collapse: collapse;
}
table.app-table thead {
  background: #f8f9fb;
}
table.app-table th {
  padding: 0.625rem 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-navy);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-soft);
}
table.app-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}
table.app-table tr:hover td { background: #f8f9fb; }

/* ===== レポート画面 タブ ===== */
.rpt-tab {
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.rpt-tab-active {
  color: var(--brand-navy);
  border-bottom-color: var(--brand-gold);
  font-weight: 600;
}
.rpt-tab:hover:not(.rpt-tab-active) {
  color: var(--brand-navy);
}
