/* ===== リセット & 基本 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Meiryo", "Segoe UI", Arial, sans-serif;
  background-color: #f0f4f8;
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== ヘッダー ===== */
header {
  background-color: #185FA5;
  color: white;
  padding: 16px 20px;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

header h1 {
  font-size: clamp(15px, 4vw, 20px);
  font-weight: 600;
  line-height: 1.3;
}

header p {
  font-size: clamp(11px, 3vw, 13px);
  color: #B5D4F4;
  margin-top: 2px;
}

/* ===== メインコンテンツ ===== */
.container {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px;
}

/* ===== メニューカード ===== */
.menu-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #e4eaf0;
  border-radius: 12px;
  padding: 20px 16px;
  margin-bottom: 12px;
  text-decoration: none;
  color: #1a1a1a;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.menu-card:hover,
.menu-card:focus {
  border-color: #b5cde8;
  box-shadow: 0 2px 8px rgba(24, 95, 165, 0.10);
  text-decoration: none;
  outline: none;
}

.menu-card:active {
  background-color: #f5f9ff;
}

.menu-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-icon.notice {
  background: #E6F1FB;
  color: #185FA5;
}

.menu-icon.forms {
  background: #EAF3DE;
  color: #3B6D11;
}

.menu-text {
  flex: 1;
  min-width: 0;
}

.menu-title {
  font-size: clamp(14px, 3.5vw, 16px);
  font-weight: 600;
  color: #1a1a1a;
}

.menu-desc {
  font-size: clamp(12px, 3vw, 13px);
  color: #888;
  margin-top: 3px;
}

.menu-arrow {
  color: #b5cde8;
  min-width: 18px;
}

/* ===== フッター ===== */
footer {
  text-align: center;
  font-size: 11px;
  color: #999;
  padding: 20px 16px;
  border-top: 1px solid #e4eaf0;
  margin-top: 20px;
}

/* ===== リンク ===== */
a {
  color: #185FA5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== レスポンシブ（スマートフォン）===== */
@media (max-width: 480px) {
  header {
    padding: 14px 16px;
  }

  .header-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .container {
    margin: 16px auto;
    padding: 0 12px;
  }

  .menu-card {
    padding: 16px 12px;
    gap: 12px;
  }

  .menu-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
}

/* ===== サブフォルダーページ（header.html / AutoIndex）===== */

/* パンくず */
.breadcrumb-bar {
  background: #0C447C;
  padding: 10px 20px;
  font-size: 13px;
}

.breadcrumb-bar a {
  color: #B5D4F4;
  text-decoration: none;
}

.breadcrumb-bar a:hover {
  color: #fff;
  text-decoration: underline;
}

.breadcrumb-bar span {
  color: #fff;
  margin: 0 6px;
}

.breadcrumb-bar .current {
  color: #fff;
}

/* 検索ボックス */
.search-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.search-area h2 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #d1dae4;
  border-radius: 8px;
  padding: 7px 12px;
  min-width: 220px;
  max-width: 100%;
}

.search-box svg {
  flex-shrink: 0;
  color: #888;
}

.search-box input {
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  width: 100%;
  background: transparent;
}

.search-box input::placeholder {
  color: #aaa;
}

/* AutoIndex テーブル */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

thead tr {
  background: transparent !important;
}

thead th {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-bottom: none !important;
  background: transparent !important;
}

tbody tr {
  background: #fff;
  border-radius: 10px;
  transition: box-shadow 0.15s;
}

tbody tr:hover {
  box-shadow: 0 1px 4px rgba(24, 95, 165, 0.10);
}

tbody td {
  padding: 10px 12px;
  border: none;
  vertical-align: middle;
}

tbody td:first-child {
  border-radius: 10px 0 0 10px;
  border-left: 1px solid #e4eaf0;
  border-top: 1px solid #e4eaf0;
  border-bottom: 1px solid #e4eaf0;
  padding-left: 14px;
}

tbody td:last-child {
  border-radius: 0 10px 10px 0;
  border-right: 1px solid #e4eaf0;
  border-top: 1px solid #e4eaf0;
  border-bottom: 1px solid #e4eaf0;
  padding-right: 14px;
}

tbody td:not(:first-child):not(:last-child) {
  border-top: 1px solid #e4eaf0;
  border-bottom: 1px solid #e4eaf0;
}

tbody td a {
  color: #185FA5;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  word-break: break-all;
}

tbody td a:hover {
  text-decoration: underline;
}

/* 月ラベル行 */
.month-label-row td {
  padding: 16px 4px 6px !important;
  background: transparent !important;
  border: none !important;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  letter-spacing: 0.05em;
}

/* 日時・サイズ列 */
tbody td:nth-child(3),
tbody td:nth-child(4) {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

/* 空状態メッセージ */
.empty-msg {
  text-align: center;
  padding: 48px 0;
  color: #aaa;
  font-size: 13px;
  display: none;
}

.empty-msg svg {
  margin-bottom: 8px;
}

/* 戻るボタン */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #185FA5;
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 14px;
  padding: 6px 0;
}

.back-link:hover {
  text-decoration: underline;
}

/* フッター */
.portal-footer {
  text-align: center;
  font-size: 11px;
  color: #999;
  padding: 20px 16px;
  border-top: 1px solid #e4eaf0;
  margin-top: 20px;
}

/* ===== サブフォルダーページ レスポンシブ ===== */
@media (max-width: 600px) {
  .breadcrumb-bar {
    padding: 8px 16px;
    font-size: 12px;
  }

  .portal-body {
    margin: 16px auto;
    padding: 0 12px;
  }

  .search-area {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-box {
    min-width: 100%;
    width: 100%;
  }

  /* スマホでは日時・サイズ列を非表示 */
  tbody td:nth-child(3),
  tbody td:nth-child(4) {
    display: none;
  }

  thead th:nth-child(3),
  thead th:nth-child(4) {
    display: none;
  }

  tbody td a {
    font-size: 13px;
  }
}
