:root {
    --primary-color: #F39C12; /* カイポケ風オレンジ */
    --text-color: #333;
    --bg-color: #f5f5f5;
    --border-color: #ddd;
    --sidebar-width: 250px;
    --header-height: 60px;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: #fff;
}

/* --- ログイン画面用 --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #fff;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    text-align: center;
}

.login-logo {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #eee;
    background-color: #f2f2f2;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

.btn-login {
    width: 200px;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    font-weight: bold;
}

.btn-login:hover {
    opacity: 0.9;
}

.forgot-password {
    margin-top: 2rem;
    font-size: 0.9rem;
}

.forgot-password a {
    color: #666;
    text-decoration: underline;
}

/* --- レイアウト（ヘッダー・サイド・メイン） --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ヘッダー */
.app-header {
    height: var(--header-height);
    background-color: #fff;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    /* 下線が必要なら */
    /* border-bottom: 1px solid var(--border-color); */
}

.header-logo {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

/* PCではスマホ用パーツを隠す */
/* .mobile-menu-btn, .mobile-spacer, .mobile-page-header, .mobile-arrow {
    display: none;
} */

.mobile-menu-btn, .mobile-spacer, .mobile-page-header, .mobile-arrow, .mobile-user-list-view {
    display: none;
}

/* サイドバー */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    position: fixed;
    /* top: var(--header-height); */
    /* ヘッダーの高さ + 20px の隙間を開ける */
    top: calc(var(--header-height) + 20px);
    bottom: 20px;
    left: 20px;
    /* 線の代わりに影をつけて浮かせる */
    border: none; /* 元の線を消す */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); /* ふんわりとした影 */
    /* 角を丸くする */
    border-radius: 20px;
    /* padding-top: 20px;
    overflow-y: auto; */
    /* 内側の余白 */
    padding: 20px 15px; /* 上下20px, 左右15px */
    overflow-y: auto;
    z-index: 90;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;

    /* ▼▼▼ 追加: 丸みと余白 ▼▼▼ */
    border-radius: 8px;       /* 角を丸くする */
    margin: 4px 0;         /* 左右に隙間を空けて丸みを見やすくする */
    transition: background-color 0.3s; /* ホバー時の色変化を滑らかに */
}

.sidebar-menu li a.active {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: bold; /* 選択中は少し太字にすると見やすいです */
}

.sidebar-menu li a:hover:not(.active) {
    background-color: #f9f9f9;
}

/* メインコンテンツ */
.app-main {
    /* margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 40px;
    flex: 1; */
    /* サイドバーの幅(250px) + 左の隙間(20px) + メインとの間隔(20px) = 290px */
    margin-left: calc(var(--sidebar-width) + 40px);
    margin-top: var(--header-height);
    padding: 40px;
    flex: 1;
    background-color: #fff;
}

/* 事業所リスト */
.page-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.facility-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--border-color);
}

.facility-item {
    border-bottom: 1px solid var(--border-color);
}

.facility-link {
    display: block;
    padding: 20px 0;
    text-decoration: underline;
    color: var(--text-color);
    font-size: 1rem;
}

.facility-link:hover {
    color: var(--primary-color);
}

/* --- 利用者一覧テーブルのスタイル --- */

.table-responsive {
    overflow-x: auto; /* 横幅が狭いときにスクロールさせる */
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.9rem; /* 文字サイズを少し調整 */
    min-width: 1000px; /* 横幅を確保して崩れないようにする */
}

.user-table th {
    background-color: #fff;
    padding: 15px 10px;
    border-bottom: 2px solid #ddd;
    text-align: left;
    font-weight: bold;
    color: #333;
    white-space: nowrap; /* ヘッダーの折り返し防止 */
}

.user-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    color: #333;
}

.user-table tr:hover {
    background-color: #f9f9f9;
}

/* 利用者名 */
.user-name {
    color: #333;
    font-weight: normal;
    text-decoration: underline; /* リンクっぽく見せるなら */
}

/* 詳細ボタン（オレンジ色に変更） */
.btn-detail {
    display: inline-block;
    padding: 6px 12px;
    background-color: #F39C12; /* カイポケ風オレンジ */
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    border: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.btn-detail:hover {
    opacity: 0.8;
    background-color: #e67e22; /* ホバー時は少し濃く */
}

/* 利用状況のテキスト */
.status-text.active {
    color: #333;
}
.status-text.inactive {
    color: #999;
}

/* 介護度バッジ（必要なければ削除可、画像では数字だけなのでシンプルに） */
/* もし画像のように数字だけにするなら td の中身を調整してください */


/* =========================================
   利用者一覧 (User List) 用スタイル
   ========================================= */

/* --- 五十音検索コンテナ --- */
.kana-search {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap; /* 画面幅が狭いときに折り返す */
}

/* --- 五十音検索ボタン（カプセル型） --- */
.kana-btn {
    display: inline-block;
    padding: 6px 18px;       /* 横幅を少し広げてバランスを取る */
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    
    /* 端を丸くする（カプセル型） */
    border-radius: 50px; 
    
    margin: 4px;             /* ボタン同士の間隔 */
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

/* アクティブ時・ホバー時のスタイル（オレンジ色） */
.kana-btn:hover, 
.kana-btn.active {
    background-color: #F39C12; /* カイポケ風オレンジ */
    color: white;
    border-color: #F39C12;
}

/* --- テーブル全体のスタイル --- */
.user-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 1000px; /* 横スクロール用に最低幅を確保 */
}

.user-table th, 
.user-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
}

.user-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
    white-space: nowrap; /* ヘッダーの折り返し防止 */
}

.user-table tr:hover {
    background-color: #fdfdfd;
}

/* 利用者名 */
.user-name {
    color: #333;
    font-weight: bold;
}

/* 介護度バッジ（もし使用する場合） */
.badge-care-level {
    background: #e0f2f1;
    color: #00695c;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
}

/* --- 詳細ボタン（常にオレンジ色） --- */
.btn-detail,
.btn-detail:visited,
.btn-detail:link,
.btn-detail:active {
    display: inline-block;
    padding: 6px 16px;
    
    /* 常にオレンジ色を強制 */
    background-color: #F39C12 !important; 
    color: white !important;
    
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.btn-detail:hover {
    background-color: #e67e22 !important; /* ホバー時は少し濃く */
    opacity: 1;
}

/* 利用状況テキスト */
.status-text.active {
    color: #333;
    font-weight: bold;
}
.status-text.inactive {
    color: #999;
}

/* --- タブ切り替え用のスタイル --- */

/* タブのボタンが並ぶエリア */
/* .tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
    background: #fff;
}

/* タブのボタン */
/* .tab-link {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    font-weight: bold;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-link:hover {
    color: #F39C12;
    background-color: #fcfcfc;
}

.tab-link.active {
    color: #F39C12;
    border-bottom: 3px solid #F39C12;
}

/* ▼▼▼ ここが重要：コンテンツエリア ▼▼▼ */
/* .tab-content { */
    /* display: none; デフォルトで非表示にする */
    /* animation: fadeIn 0.3s; フェードインアニメーション */
/* } */

/* フェードインの定義 */
/* @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
} */

/* --- 詳細テーブルのスタイル --- */
/* .detail-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 20px;
}
.detail-table th {
    width: 25%;
    background: #f9f9f9;
    padding: 12px;
    text-align: left;
    border: 1px solid #eee;
    font-weight: bold;
    color: #555;
}
.detail-table td {
    padding: 12px;
    border: 1px solid #eee;
    color: #333;
}
.section-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
    border-left: 4px solid #F39C12;
    padding-left: 10px;
} */
/* .no-data {
    color: #999;
    padding: 10px;
}  */


/* --- タブメニュー (カプセル型・オレンジ) --- */
.tabs {
    display: flex;
    gap: 10px; /* ボタン同士の間隔 */
    margin-bottom: 20px;
    background: transparent;
    border-bottom: none; /* 下線を消す */
    flex-wrap: wrap;
}

.tab-link {
    padding: 8px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50px; /* 角丸（カプセル型） */
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    font-weight: normal;
    transition: all 0.2s;
    text-decoration: none;
}

.tab-link:hover {
    background-color: #F39C12;
    color: white;
    border-color: #F39C12;
}

.tab-link.active {
    background-color: #F39C12; /* アクティブ時はオレンジ */
    color: white;
    border-color: #F39C12;
    font-weight: bold;
}

/* --- コンテンツエリア --- */
.tab-content {
    display: none; /* デフォルト非表示 */
    animation: fadeIn 0.3s;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- 詳細テーブル (枠線デザイン修正) --- */
.detail-table {
    width: 100%;
    border-collapse: collapse; /* 枠線を重ねる */
    background: #fff;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.detail-table th, 
.detail-table td {
    padding: 12px 15px;
    border: 1px solid #ccc; /* すべてのセルに枠線をつける */
    text-align: left;
    vertical-align: middle;
}

.detail-table th {
    width: 25%;
    background-color: #f5f5f5; /* ヘッダー背景色 */
    font-weight: bold;
    color: #333;
}

.detail-table td {
    color: #333;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
    border-left: 5px solid #F39C12;
    padding-left: 10px;
    font-weight: bold;
}

.no-data {
    color: #888;
    padding: 10px 0;
}


/* =========================================
   介護記録・月間シフト画面 (Care Record)
   ========================================= */

/* メインコンテナ */
.shift-container {
    padding: 30px;
    background-color: #fff;
    min-height: 100vh;
    color: #333;
    min-width: 1200px; /* 横崩れ防止 */
    overflow-x: auto;
}

/* ヘッダーエリア */
.shift-header-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.shift-back-link {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 15px;
    text-decoration: none;
    transition: color 0.2s;
}
.shift-back-link:hover {
    color: #e67e22;
}

.shift-page-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
}

/* 月ナビゲーション */
.shift-nav {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}
.shift-nav input {
    width: 60px;
    padding: 6px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.btn-shift-display {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 7px 15px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* -------------------------------------------
   レイアウト: [保険区分] [予定] [矢印] [実績]
   ------------------------------------------- */

/* ヘッダー行 */
.shift-grid-head {
    display: flex;
    background-color: #fafafa;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    font-weight: bold;
    text-align: center;
    color: #333;
}

/* データ行 */
.shift-grid-row {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    align-items: stretch; /* 高さ揃え */
}

/* カラム幅 */
.col-insurance {
    width: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
    font-size: 1rem;
}

.col-data-area {
    flex: 1; /* 左右均等 */
    padding: 0 15px;
}

.col-arrow-center {
    width: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ccc;
}

/* -------------------------------------------
   ボックス (カード) デザイン
   ------------------------------------------- */
.shift-box {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: flex;
    height: 100%;
}

/* 色分け */
.box-plan {
    background-color: #fdfdfd; /* 白系 */
}
.box-actual {
    background-color: #f6fae8; /* 薄い黄緑 */
    border-color: #dbe4c0;
}

/* 左側：削除エリア */
.box-left {
    width: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(0,0,0,0.05);
    font-size: 0.8rem;
    color: #666;
    padding: 10px 0;
}
.box-left input[type="checkbox"] {
    transform: scale(1.3);
    margin-top: 5px;
    cursor: pointer;
}

/* 右側：フォームエリア */
.box-right {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px; /* 行間 */
}

/* フォーム行 */
.shift-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shift-label {
    width: 90px;
    text-align: right;
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    flex-shrink: 0;
}

/* 入力欄ラッパー */
.shift-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.shift-input-wrap i {
    position: absolute;
    right: 10px;
    color: #888;
    pointer-events: none;
}

/* 入力フィールド */
.input-field {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}
.input-field[readonly] {
    background-color: #f0f0f0;
    border-color: #ddd;
    box-shadow: none;
    color: #555;
}

/* 時間入力 (右寄せ用) */
.time-group {
    display: flex;
    align-items: center;
    gap: 5px;
}
.input-time {
    width: 140px;
    text-align: center;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
}
.input-time[readonly] {
    background-color: #f0f0f0;
}

/* 備考欄 */
.shift-remarks {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}
.label-remarks {
    width: 90px;
    text-align: right;
    font-weight: bold;
    font-size: 0.9rem;
    padding-top: 5px;
}
textarea.input-field {
    resize: vertical;
    height: 60px;
    line-height: 1.4;
}

/* 保存エリア */
.shift-save-area {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 60px;
}
.btn-shift-save {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 80px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.3s;
}
.btn-shift-save:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* --- 事業所選択（PC用） --- */
.pc-page-header { margin-bottom: 2rem; }
.facility-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid #ddd; }
.facility-item { border-bottom: 1px solid #ddd; }
.facility-link { display: block; padding: 20px 0; color: var(--text-color); text-decoration: underline; }


/* =========================================
   スマホ専用レスポンシブデザイン (768px以下)
   ========================================= */
@media screen and (max-width: 768px) {
    /* サイドバーとPC用ビューを隠す */
    .app-sidebar, .pc-page-header, .pc-user-list-view {
        display: none !important;
    }
    
    /* スマホ用ビューを表示 */
    .mobile-user-list-view, .mobile-page-header {
        display: block;
    }

    /* メインエリアの余白を詰める */
    .app-main {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    /* ヘッダー調整 */
    .app-header {
        justify-content: space-between;
        padding: 0 15px;
        border-bottom: 1px solid #eee;
    }
    .mobile-menu-btn { display: block; font-size: 1.4rem; width: 40px; }
    .header-logo { position: absolute; left: 50%; transform: translateX(-50%); }
    .mobile-spacer { display: block; width: 40px; }

    /* タイトルバー（黄色） */
    .mobile-page-header {
        background-color: #FFEBAF;
        padding: 15px 20px;
        border-bottom: 1px solid #ddd;
        display: flex;
        align-items: center;
        gap: 15px;
    }
    .mobile-back-link {
        color: #F39C12; /* オレンジ色の戻る矢印 */
        font-size: 1.2rem;
        text-decoration: none;
        font-weight: bold;
    }
    .mobile-title {
        font-size: 1rem;
        font-weight: bold;
        margin: 0;
        color: #333;
    }

    /* コンテンツエリア */
    .mobile-content-body {
        padding: 20px;
    }

    .mobile-facility-name {
        font-size: 1rem;
        margin-bottom: 20px;
        font-weight: normal;
    }

    /* 検索ボックス */
    .mobile-search-form {
        margin-bottom: 20px;
    }
    .search-input-wrapper {
        background-color: #f2f2f2;
        border-radius: 30px;
        padding: 10px 15px;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .search-icon {
        color: #333;
        font-size: 1.1rem;
    }
    .search-input {
        border: none;
        background: transparent;
        width: 100%;
        font-size: 1rem;
        outline: none;
    }

    /* リストヘッダー */
    .mobile-list-label {
        font-weight: bold;
        font-size: 0.9rem;
        color: #333;
        margin-bottom: 10px;
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
    }

    /* 利用者リスト */
    .mobile-user-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .mobile-user-item {
        border-bottom: 1px solid #eee;
    }
    .mobile-user-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 0;
        text-decoration: none;
        color: #333;
    }
    .mobile-user-name {
        font-size: 1rem;
        text-decoration: underline; /* 画像に合わせるなら下線あり */
        text-decoration-color: #333;
    }
    .mobile-arrow {
        color: #F39C12;
        font-size: 1.2rem;
    }

    /* 事業所選択リストのスタイル再定義（スマホ用） */
    .facility-list { border-top: none; }
    .facility-link {
        display: flex; justify-content: space-between; align-items: center;
        padding: 18px 20px; text-decoration: none; color: #333;
    }
    .facility-link i { color: var(--primary-color); font-size: 1.2rem; }
}



/* --- style.css 追記分 --- */

/* 共通：スマホのみ表示するクラス */
.mobile-only-view {
    display: none;
}

@media screen and (max-width: 768px) {
    .mobile-only-view {
        display: block;
    }
    
    /* 一覧画面：PCグリッドを隠す */
    .pc-record-grid, .pc-only {
        display: none !important;
    }

    /* 利用者名エリア */
    .user-info-area {
        padding: 10px 0;
        margin-bottom: 10px;
    }
    .user-name-large {
        font-size: 1.2rem;
        font-weight: bold;
    }

    /* --- リスト表示デザイン (care_record.html) --- */
    .mobile-record-list {
        width: 100%;
    }
    .mobile-list-header {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        font-weight: bold;
        font-size: 0.9rem;
        border-bottom: 1px solid #333;
        padding-bottom: 5px;
        margin-bottom: 0;
    }
    .mobile-record-item {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        padding: 15px 5px;
        border-bottom: 1px solid #eee;
        align-items: center;
    }
    /* 背景色 */
    .bg-pink { background-color: #ffeaea; } /* 未介護 */
    .bg-white { background-color: #fff; }   /* 介護済 */

    .date-text { font-size: 0.85rem; color: #555; }
    .time-text-bold { font-size: 1rem; font-weight: bold; }
    .item-kubun { display: flex; justify-content: center; color: #555; }
    
    /* ボタン */
    .status-btn {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 15px;
        font-size: 0.8rem;
        text-decoration: none;
        text-align: center;
        width: 60px;
    }
    .btn-todo {
        background-color: #FFA500; /* オレンジ */
        color: white;
        border: 1px solid #FFA500;
    }
    .btn-done {
        background-color: #fff;
        color: #FFA500;
        border: 1px solid #FFA500;
    }

    /* --- 詳細入力フォーム (care_record_detail.html) --- */
    .detail-container {
        padding: 15px;
        background: #fff;
    }
    .detail-user-info h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    /* 予定情報表示 */
    .plan-info-grid {
        display: grid;
        grid-template-columns: 100px 1fr;
        gap: 10px;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    .plan-label { font-weight: bold; font-size: 0.9rem; }
    .plan-value { font-size: 1rem; }
    .plan-date { margin-right: 10px; }

    /* 入力フォーム */
    .form-section {
        margin-bottom: 25px;
    }
    .form-section label {
        display: block;
        font-weight: bold;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    .input-with-icon {
        position: relative;
        display: flex;
        align-items: center;
    }
    .detail-input {
        width: 100%;
        padding: 12px;
        border: 1px solid #eee;
        background-color: #f9f9f9;
        border-radius: 8px;
        font-size: 1rem;
        box-sizing: border-box;
    }
    .time-range-inputs {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }
    .time-box {
        text-align: center;
    }
    .icon-right {
        position: absolute;
        right: 15px;
        color: #888;
        pointer-events: none;
    }

    /* テキストエリア＋マイク */
    .input-with-mic {
        display: flex;
        gap: 10px;
        align-items: flex-start;
    }
    .detail-textarea {
        flex: 1;
        height: 120px;
        padding: 12px;
        border: 1px solid #eee;
        background-color: #f9f9f9;
        border-radius: 8px;
        font-size: 1rem;
        resize: none;
    }
    .mic-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: #FFA500;
        color: white;
        border: none;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        cursor: pointer;
    }
    
    /* 登録ボタン */
    .detail-submit-area {
        text-align: center;
        margin-top: 40px;
    }
    .btn-detail-submit {
        background-color: #FFA500;
        color: white;
        border: none;
        padding: 15px 0;
        width: 200px;
        border-radius: 30px;
        font-size: 1.1rem;
        font-weight: bold;
        box-shadow: 0 4px 10px rgba(255, 165, 0, 0.4);
    }
}

/* デフォルト（PC）ではスマホ用エリアを非表示 */
.mobile-record-view {
    display: none;
}

/* スマホ表示時（768px以下）の設定 */
@media screen and (max-width: 768px) {
    /* PC用エリアを非表示 */
    .pc-record-view {
        display: none !important;
    }
    
    /* スマホ用エリアを表示 */
    .mobile-record-view {
        display: block;
    }

    /* スマホ用のスタイル調整 */
    .detail-container {
        padding: 10px;
        background: #fff;
    }
    
    /* .mobile-list-header {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        font-weight: bold;
        font-size: 0.9rem;
        border-bottom: 1px solid #333;
        padding: 5px 10px;
        margin-bottom: 0;
        background-color: #fff;
    }
    .mobile-record-item {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        padding: 15px 10px;
        border-bottom: 1px solid #eee;
        align-items: center;
    } */

    /* --- リスト表示デザイン (care_record.html) --- */
    .mobile-list-header {
        display: grid;
        /* 列定義を変更: 時間 | 内容 | 区分 | 記録 */
        grid-template-columns: 2.2fr 3fr 0.8fr 1.5fr; 
        font-weight: bold;
        font-size: 0.85rem;
        border-bottom: 1px solid #333;
        padding: 5px 5px;
        margin-bottom: 0;
        background-color: #fff;
        text-align: center;
    }
    .mobile-record-item {
        display: grid;
        /* 列定義を変更: 時間 | 内容 | 区分 | 記録 */
        grid-template-columns: 2.2fr 3fr 0.8fr 1.5fr;
        padding: 15px 5px;
        border-bottom: 1px solid #eee;
        align-items: center;
        font-size: 0.9rem;
    }
    
    .item-content {
        padding: 0 5px;
        word-break: break-all; /* 長い内容でも折り返す */
    }

    .bg-pink { background-color: #ffeaea; }
    .bg-white { background-color: #fff; }

    .status-btn {
        display: inline-block;
        padding: 6px 0;
        border-radius: 20px;
        font-size: 0.8rem;
        text-decoration: none;
        text-align: center;
        width: 70px;
        font-weight: bold;
    }
    .btn-todo {
        background-color: #FFA500;
        color: white;
        border: 1px solid #FFA500;
    }
    .btn-done {
        background-color: #fff;
        color: #FFA500;
        border: 1px solid #FFA500;
    }
    .status-btn {
        display: inline-block;
        padding: 6px 0;
        border-radius: 20px;
        font-size: 0.75rem; /* 少し小さくして収まりよくする */
        text-decoration: none;
        text-align: center;
        width: 100%; /* 親要素に合わせて広げる */
        max-width: 70px;
        font-weight: bold;
    }
}

/* 無効なレコード（グレーアウト） */
.inactive-record {
    background-color: #dcdcdc !important; /* 濃いめのグレー */
    color: #888 !important;
    border: 1px solid #ccc;
    opacity: 0.7;
    pointer-events: none; /* 編集不可にする場合 */
}

/* グレーアウト時の入力欄も見にくくする */
.inactive-record input,
.inactive-record textarea {
    background-color: #eee !important;
    color: #888 !important;
}