/* 全体の基本スタイル */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

/* ======== ヘッダー(PC / SP 共通) ======== */
.header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ======== ヘッダー(PC) - 横並びナビゲーション ======== */
@media (min-width: 769px) {
    .nav-list {
        display: flex;
        gap: 16px;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .nav-toggle,
    .nav-close {
        display: none;
    }
}

/* ======== ヘッダー(SP) - ハンバーガーメニュー対応 ======== */
@media (max-width: 768px) {
    .header-container {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 90%; /* メニューの横幅 90% */
        height: 100vh;
        background: white;
        padding: 0 20px;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%);
    }

    .nav-list.nav-active {
		background:#004e79;
        display: flex;
        transform: translateX(0);
    }

    .nav-close {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        text-align: right;
        width: 100%;
        padding: 10px;
        color:#fff;
    }
}

/* ======== ヘッダーロゴ (共通) ======== */
.header-logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #111;
}
.header-logo span {
    font-size: 1rem;
    color: #004e79;
}
@media (max-width: 768px) {
	.header-logo{
		font-size:1rem;
	}
	.header-logo span {
		font-size:0.8rem;
	}
}

/* ======== ナビゲーション共通スタイル ======== */
.nav-link {
    color: #111;
    text-decoration: none;
    display: block;
    padding: 10px;
}
.nav-link:hover {
    text-decoration: underline;
}

.logout-button {
    background: none;
    border: none;
    color: #111;
    cursor: pointer;
}
.logout-button:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
    .nav-link {
        color: #fff;
    }
}


/* メインコンテンツ */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    border-radius: 8px;
}

/* フッター */
.footer {
    background-color: white;
    text-align: center;
    padding: 16px;
    margin-top: 20px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}
.footer-text {
    font-size: 0.875rem;
    color: #666;
}

/* 共通のフォームデザイン */
.form-container {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    background-color: #f9f9f9;
}
.form-input {
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
}
.form-button {
    background-color: #007BFF;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.form-button:hover {
    background-color: #0056b3;
}

/* ======== ログインページ専用スタイル ======== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 100px); /* ヘッダー＆フッターを除いた高さ */
    padding: 20px;
}
.login-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 350px; /* モバイルに対応しつつ、PCでは適切な幅 */
    text-align: center;
}
.form-group {
    margin-bottom: 15px;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.login-button {
	background: linear-gradient(135deg, #25558f 0%, #25558f 50%, #174781 50%, #174781 100%);
    background: #002f67;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}
.login-button:hover {
    background-color: #0056b3;
}
.note {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}
.error-messages p {
    color: red;
    font-size: 14px;
}

/* ======== スマホ対応（レスポンシブデザイン） ======== */
@media (max-width: 768px) {
    .main-content {
        width: 90%;
        margin: 5% auto;
        padding: 0;
    }
    
    .login-container {
        width: 100%;
        max-width: 90%;
    }
}

/* ======== お客様番号選択ページ (PC / SP 共通) ======== */
.customer-select-container {
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.customer-select-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}
.customer-select-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.customer-select-item {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}
.customer-select-link {
    color: #002f67;
    text-decoration: none;
    display: block;
    padding: 10px;
}
.customer-select-link:hover {
    text-decoration: underline;
}
.customer-select-empty {
    color: #666;
    text-align: center;
    padding: 10px;
}

/* ======== スマホ対応 (レスポンシブ) ======== */
@media (max-width: 768px) {
    .customer-select-container {
        max-width: 90%;
        padding: 15px;
    }
	.customer-select-item{
		padding:0;
	}
    .customer-select-title {
        font-size: 1rem;
    }
    .customer-select-link {
        padding: 8px;
    }
}

/* ======== ガス料金表示ページ (共通) ======== */
.billing-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.billing-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

.billing-box {
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}
.billing-box .billing-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.billing-box .billing-header a{
    display: block;
    background:#2477b5;
    color:#fff;
    font-weight: bold;
    padding:.5em 1.5em;
    border-radius: 10px;
    font-size:0.8em;
}
.billing-box h2{
    font-weight: bold;
    color:#003366;
}
.billing-box_contents{
    margin-bottom: 20px;
}

.billing-label {
    color:#003366;
    font-size: 1rem;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.billing-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.billing-info-wrap{
    display: flex;
    justify-content: space-between;
}

.billing-info{
    width: 48%;
    border-collapse: collapse;
    border-spacing: 0;
}
.billing-info th{
    padding: 10px;
    background:#fbfaf5;
    border: solid 1px #ccc;
    font-weight: normal;
    width: 50%;
}
.billing-info td{
    padding: 10px;
    border: solid 1px #ccc;
    width: 50%;
}

.billing-info p {
    margin: 5px 0;
}

.billing-total {
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: bold;
}
.billing-total-txt{
    color:#003366;
    font-size:1.2rem;
}

.billing-current-balance {
    font-size: 0.9rem;
    color: #666;
}

.backBtn {
    max-width: 500px;
    margin: 20px auto 0;
}
.backBtn button{
    width: 100%;
    border-radius: 10px;
    background:#004e79;
    color:#fff;
    display: block;
    text-align: center;
    padding:.5rem 0;
}

/* ======== テーブル (共通) ======== */
.billing-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc;
    margin-top: 10px;
}

.billing-table th,
.billing-table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
    width: 25%;
}

.billing-table th {
    background: #fbfaf5;
    font-weight: normal;
}

/* ======== ボタン (共通) ======== */
.billing-download {
    text-align: center;
    margin-top: 20px;
}

.billing-download-button {
    display: inline-block;
    background: #0056b3;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
}

.billing-download-button:hover {
    background: #004080;
}

/* ======== スマホ対応 (レスポンシブ) ======== */
@media (max-width: 768px) {
    .billing-container {
        width: 100%;
        padding:5%;
    }
    .billing-title{
        font-size:1.2rem;
    }
    .billing-box .billing-header{
        flex-wrap: wrap;
    }
    .billing-box .billing-header h2{
        width: 100%;
        margin-bottom: 10px;
    }
    .billing-box .billing-header a{
        /* width: 100%; */
        margin-left: auto;
    }
    .billing-info-wrap{
        flex-direction: column;
    }
    .billing-info{
        width: 100%;
    }
    .billing-info:first-of-type{
        margin-bottom: 10px;
    }
    .billing-info th,
    .billing-info td{
        width: 50%;
        font-size:0.9rem;
        text-align: left;
    }
    .billing-total-txt{
        font-size: 1.1rem;
    }
    .billing-table {
        width: 100%;
        border-collapse: collapse;
        display: flex;
        border: none;
        border: 1px solid #ccc;
    }

    .billing-table tbody,
    .billing-table tr {
        display: block;
        width: 100%;
    }

    .billing-table thead,
    .billing-table tbody{
        width: 50%;
    }

    .billing-table tr {
        display: flex;
        flex-direction: column;
    }

    .billing-table th,
    .billing-table td {
        width: 100%;
        padding: 10px;
        font-size:0.9rem;
        text-align: left;
    }

    .other-billing-box .billing-table thead {
        display: none; /* テーブルのヘッダーを非表示 */
    }

    .other-billing-box .billing-table tbody {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .other-billing-box .billing-table tr {
        display: flex;
        flex-direction: column;
        padding: 12px;
        border-bottom: 1px solid #ccc;
    }
    .other-billing-box .billing-table tr:last-of-type{
        border:none;
    }

    .other-billing-box .billing-table th,
    .other-billing-box .billing-table td{
        font-size:0.9rem;
        font-weight: normal;
    }

    .other-billing-box .billing-table td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border: none;
        border-bottom: 1px solid #ccc;
    }

    .other-billing-box .billing-table td:last-child {
        border-bottom: none;
    }

    /* 各項目の見出しを擬似要素で追加 */
    .other-billing-box .billing-table td:nth-of-type(1)::before { content: "日付"; color: #333; }
    .other-billing-box .billing-table td:nth-of-type(2)::before { content: "品目"; color: #333; }
    .other-billing-box .billing-table td:nth-of-type(3)::before { content: "数量"; color: #333; }
    .other-billing-box .billing-table td:nth-of-type(4)::before { content: "金額"; color: #333; }

    /* スマホでのリストアイテムのレイアウトを整える */
    .other-billing-box .billing-table td::before {
        flex: 1;
        text-align: left;
    }

    .other-billing-box .billing-table td span {
        flex: 2;
        text-align: right;
    }

    .backBtn a{
        font-size: 0.9rem;
        padding: 1rem 0;
    }

}

/* ======== ガス料金表ページ (共通) ======== */
.pricelist_container{
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.pricelist_notice a{
    color: #0056b3;
    text-decoration: underline;
}
@media (max-width: 768px) {
    .billing-container {
        width: 100%;
        padding:5%;
    }
}
