/* Dashboard Dark Theme Styles */
/*
テーマ管理
 */
@import url("theme.css");

/*
全体
 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    /*background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #ffffff;*/
    background-color: var(--primary-bg);
    color: var(--text-color);
}

/*
ヘッダー部　スタイル
 */
.toolbar {
    /*position: fixed;*/
    /* base.css の定義を、headerの高さに合わせて配置する修正 */
    display: flex;
    flex-wrap: wrap; /* 画面から切れなくなるが、下のautoを設定しないと要素の表示が優先される */
    overflow-x: auto; /* ❗画面幅が小さい時に横スクロールバーが表示される */
    justify-content: space-between; /* ✅ 左・中央・右の配置 */
    align-items: center;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 50px;
    background-color: var(--secondary-bg); /* テーマに応じて変化可 */
    color: var(--text-color, #333333);
    padding: 0 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 100vw; /* ✅ 画面幅を下限とする */
    max-width: 100vw; /* ✅ 親要素のオーバーフローを防ぐ */

}

.toolbar a {
    font-size: 1.2rem;
    text-decoration: none;
    padding: 0.2rem;
    transition: transform 0.2s ease;
}

.toolbar a:hover {
    /*マウスを乗せたときに大きく表示する*/
    /*transform: scale(1.2);*/
}

.toolbar h1, h2, h3, h4 {
    color: var(--text-color, #333333);
}

.toolbar input[type="text"],
.toolbar select {
    padding: 6px;
    font-size: 1rem;
}

.toolbar .icon-button {
    font-size: 1.5rem;
    cursor: pointer;
}

.toolbar .left,
.toolbar .right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}


/* ロゴを左側に配置 */
.logo-container {
    display: flex;
    min-width: 100px;
    align-items: center;
    flex-shrink: 0; /* 縮まない */
}

.logo {
    height: 32px;
    width: auto;
}

/* タイトルを中央に配置 */
.title-container {
    flex-grow: 2; /* ✅ 中央に配置 */
    text-align: center;
}

/* アバターを右端に配置 */
.avatar-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 40px;
    margin-right: 10px;
    flex-grow: 1; /* ✅ 右端に固定 */
}
.avatar-container a span{
    font-size: 0.8rem;
}
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    /*border: 1px solid white;*/
    cursor: pointer;
}

.links {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* ← 左寄せ */
    gap: 5px; /* ← アイコン間の間隔 */
    /*flex-grow: 1;*/ /* ← 幅を自動的に広げる */
    margin-left: 5px; /* ← 左の余白（オプション） */
}

.links-desktop {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* ← 左寄せ */
    gap: 5px; /* ← アイコン間の間隔 */
    flex-grow: 1; /* ← 幅を自動的に広げる */
    margin-left: 10px; /* ← 左の余白（オプション） */
}
.links-desktop a {
  font-size: 1em !important;
}
.links-mobile {
    display: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 10px;
    padding: 5px 10px;           /* ✅ 十分な余白を確保 */
    scroll-padding-left: 10px;  /* ✅ スクロール開始位置に余白 */
    justify-content: flex-start;
    align-items: center;
    background-color: var(--secondary-bg);
}

.links-mobile a ,.links-mobile button {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 4px;
    min-width: 70px;
    flex-shrink: 0;
}

.links-mobile a span:first-child {
    font-size: 1.6rem; /* アイコンサイズ */
    line-height: 1.2;
}

@media (max-width: 768px) {
    .links-desktop {
        display: none;
    }

    .links-mobile {
        display: flex;
    }
}

.pagination button {
    padding: 5px 10px;
    font-size: 0.8em;
    cursor: pointer;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.pagination span {
    min-width: 50px;
    text-align: center;
    font-weight: bold;
}


/* カテゴリ別の配色 */
/* ホーム（オレンジ） */
.icon-default {
    color: #FF9800;
}


/* レシピ（青） */
.icon-recipe {
    color: #00cbff;
}

/* 管理者向けダッシュボード（グレー） */
.icon-admin {
    color: #757575;
}

/* 食材在庫管理（赤） */
.icon-inventory {
    color: #E53935;
}

/* 献立計画（グリーン） */
.icon-planning {
    color: #4CAF50;
}


/*
コンテンツ全体スタイル
 */
.container {
    background-color: var(--primary-bg);
    color: var(--text-color);
    position: relative; /* ✅ 必須: `top` を適用するために必要 */
    /*top:52px;*/
    display: flex;
    width: 100%;
    overflow-y: auto; /* ✅ スクロールを可能に */
    height: calc(100vh);
    /* height: calc(100vh - 50px);*/ /* ✅ 画面全体からツールバー分を引いた高さ */
}


.badge {
    background-color: red;
    color: white;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    margin-left: auto;
}


/*
サイドバー上のサブメニューボタンのスタイル
 固有の管理ボタンをサイドバーの下部に配置
 */

.management-actions {
    margin-top: 20px;
    padding: 10px;
    background-color: var(--secondary-bg);
    border-left: 3px solid var(--accent-color); /* テーマカラーでアクセント */
    border-radius: 5px;
}

.management-actions h4 {
    margin: 10px 0;
    font-size: 16px;
    color: var(--text-color);
    /*border-bottom: 1px solid var(--secondary-hover);*/
    padding-bottom: 5px;
}

.management-actions button {
    display: block;
    width: 100%;
    margin: 5px 0;
    padding: 8px 10px;
    background-color: var(--primary-bg);
    color: var(--text-color);
    border: 1px solid var(--secondary-hover);
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease;
}

.management-actions button:hover {
    background-color: var(--secondary-hover);
}

/*
セクションスタイル
 */
.content {
    flex-grow: 1;
    padding: 20px;
}

.section {
    display: none;
    background-color: var(--primary-bg); /* テーマに応じて変化可 */
    color: var(--text-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.active-section {
    display: block;
}

.card i {
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
}

/* 共通フォームスタイル */
/* 共通フォームスタイル */
.form-container {
    background: var(--secondary-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    margin: 20px auto;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
}

.form-container h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    transition: 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #66a3ff;
    box-shadow: 0px 0px 5px rgba(102, 163, 255, 0.5);
    outline: none;
}

/* ✅ select のデザイン統一 */
.form-group select {
    appearance: none; /* ブラウザデフォルトのスタイルを無効化 */
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M7 10l5 5 5-5H7z"/></svg>') no-repeat right 10px center;
    background-size: 15px;
    cursor: pointer;
}

/* ✅ トグルボタン (MFA 設定) */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 25px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 25px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #66a3ff;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* ✅ ボタンを中央配置＆隣接 */
.form-actions {
    display: flex;
    justify-content: center; /* ✅ 中央揃え */
    gap: 10px; /* ✅ ボタン間の間隔 */
    margin-top: 15px;
}

.button {
    background-color: #ff4c4c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
    width: 110px;
}

.button:hover {
    background-color: #cc3c3c;
}

/*
MFA modal dialog
 */
.mfa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.mfa-modal {
    background: var(--secondary-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.2);
}

.mfa-modal h3 {
    margin-top: 0;
    color: #ffffff;
}

.mfa-modal img {
    width: 200px;
    height: 200px;
    margin: 15px 0;
}

.mfa-modal button {
    background: #ff4c4c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.mfa-modal button:hover {
    background: #cc3c3c;
}

/*
テーブルスタイル
 */
/* メンバー管理テーブルのスタイル */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--primary-bg);
    color: var(--text-color);

}

th, td {
    padding: 10px;
    /*border-bottom: 1px solid #444;*/
    text-align: center;
    border: 1px solid #999;

}

th {
    background: var(--secondary-bg);
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/*
button {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
*/
.edit-btn {
    background-color: #ff9800;
    color: white;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

button:hover {
    opacity: 0.8;
}

/* ユーザ編集ボタン */
.editUser {
    background-color: #0000ff;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
}

.editUser:hover {
    background-color: #0000ff;
}

/* ユーザ削除ボタン */
.deleteUser {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
}

.deleteUser:hover {
    background-color: #d32f2f;
}

.table-controls {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.table-button {
    background-color: #e74c3c;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.edit-user {
    background-color: #ff9800;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.table-button:hover, .edit-user:hover {
    opacity: 0.8;
}


/*
--- カスタム UIKit モーダルスタイル ---
*/
/* --- カスタム UIKit モーダルスタイル --- */
.custom-modal {
    background-color: var(--section-bg)   ; /* テーマに応じて変化可 */
    color: var(--text-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* フォームラベル・入力欄の見た目統一 */
.custom-modal label {
    color: var(--text-color);
    /*font-weight: bold;*/
}

.custom-modal select,
.custom-modal input[type="text"],
.custom-modal input[type="radio"] {
    background-color: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 5px;
    display: inline-block;
}

/* ラジオボタンとラベルの間隔 */
.custom-modal input[type="radio"] {
    margin-right: 5px;
}

.custom-modal fieldset {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.custom-modal legend {
    /*font-weight: bold;*/
    color: var(--text-color, #333333);
}

/* ボタンの色調整 */
.custom-modal .uk-button-primary {
    background-color: var(--accent-color, #1e87f0);
    color: white;
    border: none;
}

.custom-modal .uk-button-default {
    background-color: #f0f0f0;
    color: #333;
}

.custom-modal ul li span {
    font-size: 16px;
    padding: 10px 20px;
    color: var(--text-color, #333);
}

.custom-modal .uk-tab > li > a {
    font-size: 14px;
    padding: 10px 20px;
    color: var(--text-color, #333);
}

.custom-modal .uk-tab > li.uk-active > a {
    font-weight: bold;
    border-bottom: 3px solid var(--accent-color, #1e87f0);
    background-color: rgba(0, 0, 0, 0.05);
}

/* ラジオボタンを整列 */
.custom-modal input[type="radio"] {
    margin-right: 6px;
    margin-left: 0;
}

/*
ワークフロ履歴表示簡易モーダルスタイル
*/
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* 背景を半透明に */
}

.modal-content {
    background-color: var(--section-bg, #ffffff); /* テーマに応じて変化可 */
    color: var(--text-color, #333333);
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px; /* ✅ 最大幅を制限 */
    width: 90%; /* ✅ モバイル対応 */
    position: relative;
}

.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 16px;
    top: 10px;
    cursor: pointer;
}

.close-btn:hover {
    color: black;
}

.hidden {
    display: none !important;
}

/* ✅ ハイライトスタイル */
a.active-link {
    background-color: var(--primary-bg); ;  /* 強調したい色を選んでください */
    color: var(--secondary-bg);
    border-radius: 5px;
    padding: 5px 10px;
    font-weight: bold;
}
/*
ツールバーアイコンの文字色を強制的にセットする
 */
.links-mobile a span:last-child {
    color: var(--text-color);
}
/* 情報ボックスのスタイル（中央揃えに） */
.info-box {
    background-color: #f0f8ff; /* 淡い青背景 */
    border-left: 5px solid #4CAF50; /* 緑の縦ライン */
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 90%; /* userFormと同じ幅 */
    text-align: left; /* テキストは左寄せ */
}

.info-box p {
    color: #333;
    margin: 0;
    line-height: 1.5;
}

.info-box strong {
    color: #2c3e50;
}

.info-box label {
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #333;
    font-weight: normal;
}

