:root {
  --knot-navy: #1C2A39;
  --knot-gold: #D4A857;
  --knot-gray: #F5F6F7;
  --text-dark: #333;
  --text-light: #777;
}

body {
  margin: 0;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  background-color: var(--knot-gray);
  color: var(--text-dark);
}

a {
  text-decoration: none;
  color: inherit;
}

.p-4.text-center.text-xl.font-bold.tracking-widest {
  height: 80px;
  margin-top: -10px;
}

.header {
  height: 60px;
  background: var(--knot-navy);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 20px;
  justify-content: space-between;
}

.subtitle {
  font-size: 12px;
}

.sidebar {
  width: 240px;
  background-color: var(--knot-navy);
  color: #fff;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
}

.sidebar .logo {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: 2px;
}

.sidebar .logo .o {
  color: var(--knot-gold);
}

.sidebar nav a {
  display: block;
  padding: 14px 20px;
  border-left: 4px solid transparent;
  transition: background 0.2s, border-left 0.2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--knot-gold);
}

.header {
  margin-left: 240px;
  height: 60px;
  background-color: var(--knot-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.header input[type="text"] {
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  width: 250px;
}

.knot-logo {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  padding-left: 20px;
}

.knot-logo .o {
  color: var(--knot-gold);
}

.content {
  margin-left: 260px;
  padding: 25px;
}

.card {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.card h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card ul li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  color: var(--text-dark);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

input[type="email"],
input[type="password"] {
  font-size: 16px;
  background-color: #fff;
  color: var(--text-dark);
}

button:hover {
  cursor: pointer;
}

.text-green-600 {
  color: #2f855a;
}

.page-title {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(700px, 1fr));
  gap: 20px;
}

.card-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  color: var(--knot-navy);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.time {
  font-weight: bold;
  margin-right: 8px;
  color: var(--knot-gold);
}

/* 円形進捗（簡易版） */
.progress-wrapper {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.progress-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--knot-gold) 0% 65%, #ddd 65% 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.progress-circle .inner {
  background: #fff;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: var(--knot-navy);
  font-size: 20px;
}

.progress-info {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}

.kanban-board {
  display: flex;
  gap: 20px;
}

.kanban-column {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.kanban-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  color: var(--knot-navy);
}

.kanban-list {
  min-height: 300px;
  padding: 10px;
  background: var(--knot-gray);
  border-radius: 6px;
}

.kanban-card {
  background: #fff;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  cursor: grab;
  border-left: 4px solid var(--knot-gold);
}

.kanban-card:active {
  cursor: grabbing;
}

/* --- モーダル --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  width: 92%;
  max-width: 460px;
  padding: 28px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- タイトル --- */
.modal-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--knot-navy);
  margin-bottom: 20px;
  text-align: center;
}

/* --- フォーム --- */
.task-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.form-input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--knot-gold);
  box-shadow: 0 0 0 2px rgba(212, 168, 87, 0.25);
  outline: none;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* --- ボタン --- */
.btn-primary {
  background: var(--knot-navy);
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #16212e;
}

.modal-close {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  background: #e5e5e5;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.2s;
}

.modal-close:hover {
  background: #d5d5d5;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.priority-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
}

/* 通常 */
.priority-1 {
  background: #7a7a7a;
}

/* 高 */
.priority-2 {
  background: var(--knot-navy);
}

/* 緊急 */
.priority-3 {
  background: var(--knot-gold);
  color: #000;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--knot-navy);
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.1s;
}

.card-actions button:hover {
  opacity: 1;
  transform: scale(1.1);
}

.card-actions i {
  font-size: 16px;
}

.btn-danger {
  background: #c0392b;
  /* 落ち着いた赤 */
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
}

.btn-danger:hover {
  background: #a93226;
  transform: scale(1.02);
}

.btn-danger:active {
  transform: scale(0.98);
}

.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
}

.search-input:focus {
  border-color: var(--knot-gold);
  box-shadow: 0 0 0 2px rgba(212, 168, 87, 0.25);
  outline: none;
}

.search-btn {
  background: var(--knot-navy);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-btn:hover {
  background: #16212e;
}

.history-item {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.history-title {
  font-weight: bold;
}

.history-date {
  font-size: 13px;
  color: var(--text-light);
}

.search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.search-input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
}

.search-btn {
  background: var(--knot-navy);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.history-link {
  color: var(--knot-navy);
  font-weight: bold;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f3f4f6;
  transition: background 0.2s;
}

.history-link:hover {
  background: #e5e7eb;
}

/* --- 履歴一覧 --- */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  list-style: none;
  padding-inline-start: 0px;
}

.history-item {
  background: #fff;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s, box-shadow 0.15s;
}

.history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.history-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--knot-navy);
  margin-bottom: 4px;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #6b7280;
}

.history-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* アイコン */
.history-meta i {
  color: var(--knot-gold);
}

/* 優先度バッジ */
.priority-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
}

.priority-1 {
  background: #7a7a7a;
}

.priority-2 {
  background: var(--knot-navy);
}

.priority-3 {
  background: var(--knot-gold);
  color: #000;
}

.pagination-wrapper {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  gap: 6px;
}

.page {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  color: var(--knot-navy);
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.page:hover {
  background: var(--knot-navy);
  color: #fff;
}

.page.active {
  background: var(--knot-navy);
  color: #fff;
}

.page.disabled {
  opacity: 0.4;
  cursor: default;
}

.notification-wrapper {
  position: relative;
}

.notification-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  font-size: 20px;
  color: var(--knot-navy);
}

.notification-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--knot-gold);
  color: #000;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: bold;
}

.notification-dropdown {
  position: absolute;
  right: 0;
  top: 36px;
  width: 260px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 50;
}

.notification-item {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  color: var(--knot-navy);
  text-decoration: none;
}

.notification-item:hover {
  background: #f3f4f6;
}

.notification-empty {
  padding: 12px;
  text-align: center;
  color: #777;
}

.hidden {
  display: none;
}

.dashboard-card {
  text-align: center;
  padding: 20px;
  border-left: 4px solid var(--knot-gold);
}

.card-title {
  font-size: 14px;
  color: #6b7280;
}

.card-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--knot-navy);
}

/* --- 円グラフ（CSSだけで作る） --- */
.progress-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background:
    conic-gradient(var(--knot-gold) calc(var(--progress) * 1%),
      #e5e7eb 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.progress-circle .inner {
  width: 85px;
  height: 85px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  color: var(--knot-navy);
}

#calendar {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* モーダル */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  width: 400px;
}

.input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 12px;
}

.btn {
  background: var(--knot-navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  width: 100%;
}

@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }

  .header,
  .content {
    margin-left: 0;
    height: 90px;
  }
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

}
/* 子要素のラッパー：初期状態は非表示（高さ0） */
.nav-admin-children-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out; /* アニメーション速度 */
    background-color: #6a6262; /* 必要に応じて背景色 */
}

/* 開いている状態のクラス（JSで付与） */
.nav-admin-group.is-open .nav-admin-children-wrapper {
    max-height: 500px; /* 十分な高さを設定 */
}

/* アクティブなページが含まれる場合は最初から開いておく */
.nav-admin-group.has-active .nav-admin-children-wrapper {
    max-height: 500px;
}

/* 矢印アイコンの演出（任意） */
.arrow {
    float: right;
    transition: transform 0.3s;
}
.is-open .arrow {
    transform: rotate(90deg);
}