:root {
    --header-bg-color: #004682;

    --ratio: 1.5;
    --s-5: calc(var(--s-4) / var(--ratio));
    --s-4: calc(var(--s-3) / var(--ratio));
    --s-3: calc(var(--s-2) / var(--ratio));
    --s-2: calc(var(--s-1) / var(--ratio));
    --s-1: calc(var(--s0) / var(--ratio));
    --s0: 1rem;
    --s1: calc(var(--s0) * var(--ratio));
    --s2: calc(var(--s1) * var(--ratio));
    --s3: calc(var(--s2) * var(--ratio));
    --s4: calc(var(--s3) * var(--ratio));
    --s5: calc(var(--s4) * var(--ratio));
}

body {
    /* background-color: #004682; */
    margin: 0;
}

.allWrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    margin: 0;
}

/* Stack用 */
.stack>*+* {
    margin-top: 1.5rem;
}

.stack-small>*+* {
    margin-top: 0.75rem;
}

/* ヘッダー */
header {
    background-color: var(--header-bg-color);
    margin: 0;
    padding: 8px;
    color: #FFF;
    height: 24px;
}

header .system-name {
    display: flex;
    gap: 4px;
    align-items: center;
}

header .system-name .logo {
    display: flex;
}

.user-menu-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.user-menu-link img {
  margin-right: 4px;
}

.user-icon-name {
    width: 9.5rem;
}

.header-user-name {
    width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* フッター */
footer {
    background-color: var(--header-bg-color);
    margin-top: auto;
    padding: 8px;
    color: #FFF;
    display: flex;
    justify-content: end;
}

/* 管理者用ヘッダー */
.header-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 16px;
}

/* ログアウトボタン */
.logout-btn {
    background: none;
    border: none;
    color: blue;
    text-decoration: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
}

/*スマホ*/
@media screen and (max-width: 666px){
    .logout-btn {
        padding: 10px;
    }
}

.logout-btn:hover,
.logout-btn:focus {
    text-decoration: none;
    outline: none;
}


.header-admin nav ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    list-style: none;
    /*
    flex-wrap: nowrap;
    gap: 32px;
    padding: 0;*/

    /* 余白
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;*/
}

.header-admin li {
/*余白*/
    margin-left: 32px;
}

.header-admin a {
    text-decoration: none;
    color: white;
}

.header-admin ul.management-menu-list,
.header-admin ul.user-menu-list,
.header-admin ul.summary-menu-list {
    display: none;
}

ul.management-menu-list {
    width: 15rem;
}

.header-admin ul.management-menu-list li a,
.header-admin ul.user-menu-list li a,
.header-admin ul.summary-menu-list li a {
    color: blue;
}

.header-admin ul.management-menu-list.is-open,
.header-admin ul.user-menu-list.is-open,
.header-admin ul.summary-menu-list.is-open{
    display: block;
    background-color: #D9D9D9;
    position: absolute;
    padding:0 30px 0 0;
}

/*PC*/
@media screen and (min-width: 667px){
    .header-admin ul.summary-menu-list.is-open {
        right: 22.5rem;
    }

    .header-admin ul.management-menu-list.is-open {
        right: 2.5rem;
    }

    .header-admin ul.user-menu-list.is-open {
        right: 1.8rem;
    }
}

.hamburger {
    display: none;
}

@media screen and (max-width: 666px) {

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    z-index: 9999;
    overflow: visible;
  }

  .hamburger span {
    display: block;
    height: 3px;
    background-color: white;
    border-radius: 999px;
  }

  /* 初期状態は閉じる */
  .header-menu-area {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    background-color: #004b8d;
    z-index: 999;
  }

  /* 開いた時 */
  .header-menu-area.is-open {
    display: block;
  }

  nav ul {
    flex-direction: column;
  }

  nav li {
    width: 100%;
  }

  nav a {
    display: block;
    padding: 10px;
  }

  .management-menu-list,
  .summary-menu-list,
  .user-menu-list {
    position: static;
    width: 100%;
  }
}

/* メイン部 */
main {
    margin: 16px;
    color: #000000;
}

/* ボタン */
.btn {
/*
    color: #FFF;
    background-color: blue;
    padding: 8px 16px;
    outline: none;
    border: black 1px solid;
    box-shadow: none;
    border-radius: 8px;
    cursor: pointer;
    height: fit-content;
    text-decoration: none;
    font-size: 16px;
    */

    color: #000000;
        background-color: #d1def7;
        padding: 8px 16px;
        outline: none;
        border: #173b1c 1px solid;
        box-shadow: none;
        border-radius: 8px;
        cursor: pointer;
        height: fit-content;
        text-decoration: none;
        font-size: 16px;
}

.btn-info {
    color: #FFF;
    background-color: #939393;
    padding: 8px 16px;
    outline: none;
    border: black 1px solid;
    box-shadow: none;
    border-radius: 8px;
    cursor: pointer;
    height: fit-content;
    text-decoration: none;
    font-size: 16px;
}

.btn-select {
    color: #000;
    background-color: #ffe8a4;
    padding: 1px 12px;
    outline: none;
    border: black 1px solid;
    box-shadow: 1px 1px 1px black;
    border-radius: 8px;
    cursor: pointer;
    height: fit-content;
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 3px;
}

.btn-add-user {
    color: #FFF;
    background-color:#64b519;
    padding: 1px 8px;
    outline: none;
    border: black 1px solid;
    box-shadow: 1px 1px 1px black;
    border-radius: 8px;
    cursor: pointer;
    height: fit-content;
    text-decoration: none;
    font-size: 16px;
}

.btn-save {
    color: #000;
    background-color: orange;
}

.btn-clear {
    color: #000;
    background-color: #fffef0;
    cursor: pointer;
    border:1px solid black;
    border-radius:5px;
}

/* テーブル共通 */
table {
    border-spacing: 0;
    width: 100%;
}

table tr th {
    color: #FFF;
    background-color: var(--header-bg-color);
    border: 1px #FFF solid;
}

table tr.sub th {
    background-color: #d1def7;
    color: #000;
}

table tr td {
    padding: 8px;
    margin: 0;
    border: none;
    border: 1px #FFF solid;
    color: #000;
}

table tr td {
    background-color: #ededed;
}


/* 検索エリア共通 */
.search-condition {
/*
    border: 1px solid #000;
    border-radius: 8px;
    padding: 16px;
    width: fit-content;
    */

    border: 1px solid #ededed;
    border-radius: 8px;
    padding: 1.4rem;
    width: fit-content;
    background-color: #ededed;
}

.search-condition label {
    display: flex;
    min-width: 260px;
    align-items: center;
}

.search-condition label span {
    min-width: 80px;
}

.search-area2 {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 32px;
}

.width-hundred{
    width: 100%;
}

/* form, input関連 */

select,
input[type="text"],
input[type="date"],
input[type="password"],
input[type="email"],
input[type="time"],
input[type="number"],
textarea {
    padding: 8px;
    border-radius: 8px;
    height: fit-content;
    box-shadow: none;
    border: 1px solid black;
    background-color: #fffef0;
}

input:disabled, select:disabled, textarea:disabled {
    background-color: #e3e3e3;
    color: black;
    opacity: 1;
}

input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    appearance: none;
    border: 1px solid #000;
    border-radius: 4px;
    background-color: #feffe9; /* 未チェック時の背景色 */
    cursor: pointer;
    position: relative;
}

/* チェックマーク（✔）を疑似要素で描く */
input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 5px;
  width: 6px;
  height: 12px;
  border-right: 3px solid white;
  border-bottom: 3px solid white;
  transform: rotate(45deg);
  opacity: 0; /* 未チェック時は非表示 */
}

/* チェック時の背景色とチェックマーク表示 */
input[type="checkbox"]:checked {
  background-color: #507ee2; /* チェック時の背景色 */
  border-color: #000;
}

input[type="checkbox"]:checked::after {
  opacity: 1; /* チェックマーク表示 */
}

input[type="checkbox"]:disabled {
  appearance: none;
  width: 1.2rem;
  height: 1.2rem;
  border: 1px solid #bbb;
  border-radius: 4px;
  background-color: #bbb; /* 未チェック時の背景色 */
  cursor: pointer;
  position: relative;
}

select {
    width: 100px;
}

.user-select {
    width: 185px;
}

.date-input {
    width: 70px;
}

.date-input-index {
    width: 70px;
    z-index: 9;
    position: relative;
}
.time-select {
    width: 60px;
}

.short-width {
    width: 50px;
}

/* エラー用 */
.error {
    color: red;
}

.update-message {
    text-align: center;
    color: #4CAF50;
    font-weight: bold;
    margin: 10px 0;
    min-height: 20px;
}

div.list {
    overflow-x: auto;
}

.required {
    color: red;
}

.uploaded-image {
    max-width: 100%;
    height: auto;
}

.small {
    font-size: small;
}

[v-cloak] {
    display: none;
}

input:disabled, select:disabled {
    color: #000;
}

.cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space, 1rem);
    align-items: center;
}

.disabled-bg{
    background-color: #e0e0e0;
    opacity: 0.6;
}

/* 日報・チェックリストのバリデーション用 */
.highlight {
    background-color: red;
    color: black;
}

button:disabled {
    background-color: #ccc;
}

/* 検索エリア */
.search-condition-box form {
    border: 1px solid #ededed;
    border-radius: 8px;
    padding: 1.4rem;
    width: fit-content;
    background-color: #ededed;
}

.search-condition-box p {
      font-size: 20px;
      text-align: center;
      width: 50px;
      color: #000000;
      position: relative;
      margin: 2px 0 -15px 15px;
}

  /* 全体配置 */
  .search-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* チェックボックスを非表示 */
  .search-checkbox-group input[type="checkbox"] {
    display: none;
  }

  /* ラベルをボタン風に */
  .search-checkbox-group label {
    padding: 10px 36px 10px 9px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    background-color: #bcbcbc;
    color: white;
    border: 1px solid #000000;
    height: 17px;
    display: flex;
    align-items: center;
    position: relative;
    width: 6rem;
  }

  /* 状態チェックボックス */
  .status-checkbox label {
    justify-content: center;
    display: flex;
    color: #8f8f8f;
  }

  /* ホバー */
  .search-checkbox-group label:hover {
    opacity: 0.85;
  }

  /* チェック時 */
  .search-checkbox-group label:has(input[type="checkbox"]:checked) {
    background-color: #004682;
  }

  /* チェック時×ボタン */
  .search-checkbox-group label:has(input[type="checkbox"]:checked)::after{
    content: "✕";
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid white;
    border-radius: 50%;
    font-size: 7px;
    color: white;
    font-weight: bold;
    position: absolute;
    right: 8px;
  }

  /* 状態チェック時 */
  .status-checkbox label:has(input[type="checkbox"]:checked) {
    color: #004682;
    font-weight: bold;
  }

  .text-align-left{
    text-align: left;
  }

  .align-items-center{
    align-items: center;
  }

  .align-self-center{
     align-self: center;
   }

/* 文字サイズ */
.font-size-target.font-medium {
    font-size: 16px;
}

.font-size-target.font-large {
    font-size: 20px;
}

.font-size-target.font-xlarge {
    font-size: 24px;
}

.fixed-font-size{
    font-size: 16px;
}

.small.font-medium {
  font-size: 13px;
}

.small.font-large {
  font-size: 16px;
}

.small.font-xlarge {
  font-size: 19px;
}

@media screen and (min-width: 667px) and (max-width: 744px){
    header.font-large {
      min-height: 73px;
    }
}

@media screen and (min-width: 745px){
    header.font-large {
      min-height: 40px;
    }
}

@media screen and (min-width: 667px) and (max-width: 825px){
    header.font-xlarge {
      min-height: 90px;
    }
}

@media screen and (min-width: 826px){
    header.font-xlarge {
      min-height: 52px;
    }
}

/* 文字サイズ変更ボタン */
.font-size-area {
    display: inline-flex;
    margin-bottom: 20px;
    align-items: center;
    border: 2px solid #a9a9a9;
    border-radius: 999px;
    overflow: hidden;
    background-color: white;
    font-family: sans-serif;
}

.mypage-title {
    padding: 8px 12px;
    font-weight: bold;
    color: #333333;
    white-space: nowrap;
}

.font-btn {
    min-width: 60px;
    border: none;
    border-left: 1px solid #d0d0d0;
    background-color: white;
    color: #1f4fa3;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
    padding: 8px 16px;
}

.font-btn.active {
    background-color: #004682;
    color: white;
}

.font-btn:first-of-type {
    border-left: none;
}

.font-btn:hover {
    background-color: #f3f3f3;
}

.font-btn.active:hover {
    background-color: #7a7a7a;
}
.text-align-left{
    text-align: left;
}

.nowrap{
  white-space: nowrap;
}

.notice-message{
    background-color: #ffff00;
    padding: 5px;
    display: flex;
    align-items: center;
}

.info-icon{
    width: 25px;
    height: 25px;
    border: 2px solid red;
    border-radius: 50%;
    color: red;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 1000;
    margin-right: 10px;
    flex-shrink: 0;
    font-style: italic;
    font-family: serif;
    padding-right: 2px;
}
.yellow-highlight {
    background-color: yellow;
    color: black;
}
