@charset "UTF-8";

/* レスポンシブ */
@media all and (min-width: 769px){
    .pc-disp{display: inline;}
    .mp-disp{display: none;}
}
@media screen and (max-width: 768px){

    :root {
        --color-border: #333;
    }
    .pc-disp{display: none;}
    .mp-disp{display: inline;}
    .mp-hidden{display:none !important;}


    #body-member #main{
        min-width:auto;
        max-width:768px;
    }

    /* ロゴ画像 */
    .logo-block a img {
        width: 200px;
    }

    /* 左サイドメニューをモバイルでは一旦隠す（スライドパネルにする） */
    #actions-sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 240px;
        height: 100vh;
        padding-top: 60px; /* ヘッダーぶんの余白 */
        box-shadow: 2px 0 8px rgba(0,0,0,0.2);
        transform: translateX(-100%);
        transition: transform 0.25s ease-out;
        z-index: 999;
    }
    /* メニュー表示中の状態（body に .menu-open が付いたとき） */
    body.menu-open #actions-sidebar {
        transform: translateX(0);
    }
    /* メニュー表示中のときのオーバーレイ（背景暗くする） */
    body.menu-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 998;
    }

    /* コンテナを全幅に */
    .container.clearfix {
        padding-left: 10px;
        padding-right: 10px;
    }
    .content {
        width: 100%;
        float: none;
        padding:5px;
    }

    /* 上部バー（ヘッダー） */
    .top-bar {
        position: relative;
        z-index: 1000;
    }
    #body-member #main{
        width: 100% !important;
    }

    /* メニューボタン */
    .open-button {
        background-color: var(--color-main);
    }
    #actions-sidebar .sp-open-menu ul li a {
        background-color: var(--color-main);
        font-size:11px;
        font-weight:normal;
    }

    /* ダッシュボードのメニュー */
    .dashboard-menu .menu-card {
        width:100% !important;
        min-width:100% !important;
    }

    .index-block {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 10px 0;
    }

    .index-block h2 {
        margin-bottom: 5px;
        font-size: 18px;
    }

    /* add-button を縦に並べる */
        .index-block .add-button {
        width: 100%;
    }

    /* ボタンを全幅にする */
    .index-block .add-button a.button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 0;
        font-size: 15px;
        border-radius: 6px;
        box-sizing: border-box;
    }


    /* 入力テーブル */
    /* テーブル全体 */
    .form-table {
        width: 100%;
    	border:none;
    	border-radius:0px !important;
        border-collapse: collapse;
    }
    /* form-table の各丸解除 */
    .form-table tr:first-child th:first-child,
    .form-table tr:first-child th:last-child,
    .form-table tr:last-child th:first-child,
    .form-table tr:last-child td:first-child,
    .form-table tr:last-child th:last-child,
    .form-table tr:last-child td:last-child,
    .form-table tr:last-child td:first-child:last-child,
    .form-table tr:first-child:last-child th:first-child,
    .form-table tr:first-child:last-child td:last-child{
        border-radius: 0 0 0 0;
    }

    /* 行を縦積みに */
    .form-table tr {
        display: block;
        margin-bottom: 12px;
        padding: 10px 0;
        border-bottom: 1px solid var(--color-main);
    }

    /* 見出しセル（th） */
    /* 入力エリアのセル（td） */
    .form-table th,
    .form-table td{
        display:block;
        width:auto;
        padding:10px !important;
    }

    /* テキスト入力・セレクトを全幅に */
        .form-table input[type="text"],
        .form-table input[type="email"],
        .form-table select {
        width: 100%;
        box-sizing: border-box;
        padding: 8px;
        font-size: 15px;
    }

    /* 必須マーク位置を調整 */
    .form-table th.required::after {
        content: " *";
        color: red;
        font-weight: bold;
    }

    .entry-block{
        margin: 10px auto 10px;
    }
    .submit-block {
        margin: 10px;
    }

    .form-table td #destination_name,
    .form-table td #parent_destination_name{
        width:80% !important;
    }
    .form-table td #password,
    .form-table td #password-check{
        width:70% !important;
    }


    /* 検索ブロック */
    .search-block.top-search-block {
        margin: 0px;
        background: #f8f8f8;
        border-radius: 4px;
    }

    /* フォーム全体を縦並びに */
    .search-block.top-search-block form {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .search-block.top-search-block .form-block {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .search-block input, .search-block select {
        margin-bottom: 0px;
    }

    /* テキスト入力 */
    .search-block.top-search-block input[type="text"] {
        width: 100%;
    }

    /* 拠点名入力＋クリアボタン */
    .search-block.top-search-block .form-block > div:first-child {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    /* 横並びグループ化する */
    .search-block.top-search-block .mobile_one-line {
        display: inline-flex;
    }

    .search-block .order-button-block{
        display: block;
    }

    /* ボタンブロック（横並び） */
    .search-block.top-search-block .button-block {
        margin-top:10px;
        display: flex;
        gap: 8px;
    }
    .search-block.top-search-block .button-block .button,
    .search-block.top-search-block .button-block .reset-button {
        flex: 1 1 auto;
    }

    .content .paginator {
        margin-bottom: 10px;
    }

    /* リスト */
    .list-table {
        border-top: none;
    }
    .list-table {
        width: 100%;
        border-collapse: collapse;
    }
    /* PC用ヘッダーは非表示 */
    .list-table thead {
        display: none;
    }
    /* 各行をカード化 */
        .list-table tbody tr {
        display: block;
        background: #fff;
        margin-bottom: 12px;
        padding: 10px;
        border: 1px solid  var(--color-border);
        border-radius: 6px;
    }
    /* 1セルずつ縦並び */
    .list-table tbody td {
        display: flex;
        padding: 6px 0 !important;
        font-size: 14px;
        border: none;
        border-bottom:1px solid #ddd;
    }
    /* 左側に項目名を表示（擬似要素）*/
    .list-table tbody td::before {
        content: attr(data-label);
        flex: 0 0 100px;
        font-weight: bold;
        color: #333;
    }
    /* 編集や削除のボタン行 */
    .list-table tbody td.actions::before{
        content:none;
    }
    .list-table tbody td.actions {
        justify-content: flex-end;
        gap: 0px;
    }

    /* 拠点一覧 */
    .list-table.destination-table .level1,
    .list-table.destination-table .level2,
    .list-table.destination-table .level3,
    .list-table.destination-table .level4,
    .list-table.destination-table .level5{
        margin: auto 0px !important;
    }
    .list-table.destination-table .level1 i,
    .list-table.destination-table .level2 i,
    .list-table.destination-table .level3 i,
    .list-table.destination-table .level4 i,
    .list-table.destination-table .level5 i{
        margin-right: 8px;
    }
    /* 項目名の幅 */
    .list-table.destination-table tbody td::before {
        flex: 0 0 60px;
    }

    /* 備蓄品 */
    .list-table tr.editStockpile th,
    .list-table tr.editStockpile td {
        align-items: center; 
    }

    .list-table tr.editStockpile {
        height: auto;
        flex: 0 0 50px;
    }
    .list-table tr.editStockpile td{
        text-align:left !important;
    }

    /* 拠点名 */
    .stockpile-list th[data-label="拠点名"],
    .stockpile-list td[data-label="拠点名"] {
        max-width: none !important;
    }

    /* 商品名（可変幅の本命） */
    .stockpile-list th[data-label="商品"],
    .stockpile-list td[data-label="商品"] {
        min-width: 190px;
    }


    .member-table.list-table.stockpile-list{
        table-layout: fixed !important;
    }


    .mode-change{
        display: flex;
        gap: 20px;
        justify-content: flex-end;
    }

    #mainteStockFrm, #viewStockFrm,#alertDeadlineFrm{
        width: 95%;
        height: auto;
    }
    #mainteStockFrm th, #viewStockFrm th {
        width: 100%;
    }
    #mainteStockFrm #destination_name{
        width:65% !important;
    }
    #viewStockFrm #destination_name{
        width: 100% !important;
    }

    #mainteStockFrm .form-table th,
    #mainteStockFrm .form-table td,
    #viewStockFrm .form-table th,
    #viewStockFrm .form-table td{
        padding: 5px !important;
    }

    a.delete_stockpile{
        white-space: nowrap;
        display: block !important;
        margin-top:5px;
        margin-left: auto !important;
    }

    #alertDeadlineFrm tr{
        border-bottom: none !important;
    }

    /* ログイン、パスワード忘れ */
    .login-block {
        width: auto !important;
    }

    .login-block .comment{
        width: auto !important;
    }

    .login-block button{
        width: 80% !important;
    }

}
