/* モックアップ共通スタイル - Corporate / Professional type */

/* Pico CSS v2 defines primary colors under :root:not([data-theme=dark]) —
   use same selector to ensure our overrides win the cascade */
:root:not([data-theme="dark"]),
[data-theme="light"],
:root {
  --pico-primary: #004a99;
  --pico-primary-hover: #003a7a;
  --pico-primary-background: #004a99;
  --pico-primary-underline: rgba(0, 74, 153, 0.5);
  --pico-primary-focus: rgba(0, 74, 153, 0.25);
  --pico-primary-inverse: #fff;
  --pico-secondary: #2c3e50;
  --pico-border-radius: 0.2rem;
  --pico-font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  --pico-font-size: 15px;
  --pico-border-width: 1px;
  --pico-block-spacing-vertical: 1.25rem;
  --pico-block-spacing-horizontal: 1.25rem;
  --pico-form-element-spacing-vertical: 0.5rem;
  --pico-form-element-spacing-horizontal: 0.75rem;
  --corp-header-bg: #002d5e;
  --corp-header-text: #ffffff;
  --corp-nav-height: 56px;
  --corp-sidebar-width: 220px;
  --corp-accent: #f0a500;
}

button {
  word-break: keep-all;
}

/* ============================================================
   Header / Navigation
   ============================================================ */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: var(--corp-header-bg);
  color: var(--corp-header-text);
  padding: 0 1.5rem;
  height: var(--corp-nav-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 100;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

header nav .site-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--corp-header-text);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header nav .site-name::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 22px;
  background: var(--corp-accent);
  border-radius: 1px;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
  align-items: stretch;
  height: var(--corp-nav-height);
}

header nav ul li {
  display: flex;
  align-items: stretch;
}

header nav ul li a,
header nav ul li button {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

header nav ul li a:hover,
header nav ul li button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-bottom-color: var(--corp-accent);
}

header nav ul li button {
  cursor: pointer;
  border-top: none;
  border-left: none;
  border-right: none;
  margin: 0;
}

/* ============================================================
   Page wrapper: breadcrumb bar + content
   ============================================================ */
.page-bar {
  background: #f4f6f9;
  border-bottom: 1px solid #dce3ec;
  padding: 0.6rem 2rem;
  font-size: 0.8rem;
  color: #5a6473;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.page-bar .sep {
  color: #aab3be;
}

main {
  flex: 1;
  padding: 1.75rem 2rem;
  background: #f9fbfd;
}

main h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a2740;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #dce3ec;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

main h1::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.2rem;
  background: var(--pico-primary);
  border-radius: 2px;
}

/* ============================================================
   Cards / Panels
   ============================================================ */
.card {
  background: #ffffff;
  border: 1px solid #dce3ec;
  border-radius: 0.3rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a6473;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eef0f4;
}

/* ============================================================
   Search form
   ============================================================ */
.search-form {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.search-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3a4557;
}

/* ============================================================
   Toolbar / action bar
   ============================================================ */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 0.5rem;
}

.toolbar-right {
  display: flex;
  gap: 0.5rem;
}

/* ============================================================
   Tables
   ============================================================ */
table {
  width: 100%;
  font-size: 0.875rem;
}

thead th {
  background: #eef2f8;
  color: #2c3e50;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid #d0d9e6;
}

tbody tr:hover {
  background: #f4f7fc;
}

tbody td {
  padding: 0.6rem 0.75rem;
  vertical-align: middle;
}

/* ============================================================
   Form elements
   ============================================================ */
.form-section {
  background: #ffffff;
  border: 1px solid #dce3ec;
  border-radius: 0.3rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.form-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a6473;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eef0f4;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #3a4557;
}

.required-badge {
  display: inline-block;
  font-size: 0.65rem;
  background: #dc2626;
  color: #fff;
  padding: 0.05rem 0.3rem;
  border-radius: 0.15rem;
  vertical-align: middle;
  margin-left: 0.25rem;
}

.form-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #eef0f4;
  margin-top: 1.25rem;
}

.form-actions .spacer {
  flex: 1;
}

/* ============================================================
   Buttons — secondary / danger variants
   ============================================================ */
button[data-action="delete"] {
  --pico-background-color: #dc2626;
  --pico-border-color: #dc2626;
  --pico-color: #fff;
  background-color: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

button[data-action="delete"]:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
}

a[data-action="back"],
a[data-action="newEntity"] {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ============================================================
   Status / display items
   ============================================================ */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
}

.data-item dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7a8d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.data-item dd {
  font-size: 1rem;
  color: #1a2740;
  font-weight: 500;
  margin: 0;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: #f4f6f9;
  border-top: 1px solid #dce3ec;
  padding: 0.6rem 2rem;
  font-size: 0.75rem;
  color: #8a96a3;
  text-align: center;
}
