/* static/css/styles.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* メインレイアウト */
.container {
    display: flex;
    min-height: 100vh;
}

/* グローバルサイドバー */
.global-sidebar {
    width: 240px;
    background-color: #343a40;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 1.5rem;
    color: white;
}

.global-sidebar nav {
    flex: 1;
}

.global-sidebar nav ul {
    list-style: none;
}

.global-sidebar nav li {
    margin-bottom: 5px;
}

.global-sidebar nav a {
    display: block;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.global-sidebar nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.global-sidebar nav li.active a {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-left: 4px solid #007bff;
    padding-left: 16px;
}

/* サイトフッター */
.site-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0;
}

/* メインコンテンツエリア */
.content-wrapper {
    flex: 1;
    margin-left: 240px;
    padding: 20px;
}

header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

header h1 {
    color: #343a40;
}

/* 共通テーブルスタイル */
table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 8px 10px;
    text-align: left;
    border: 1px solid #ddd;
}

table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table a {
    color: #007bff;
    text-decoration: none;
}

table a:hover {
    text-decoration: underline;
}

/* 折り畳み */
.collapsible-rows {
    max-height: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    opacity: 0;
}

.collapsible-rows td {
    padding: 0 15px;
    border: none;
    line-height: 0;
}

.collapsible-rows.expanded {
    max-height: 100%;
    opacity: 1;
}

.collapsible-rows.expanded td {
    padding: 8px 10px;
    border: 1px solid #ddd;
    line-height: 1.6;
}

.collapse-button {
    background-color: rgba(33, 33, 33, 1);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.collapse-button:hover {
    background-color: rgba(33, 33, 33, 0.8);
}

.button-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.3s;
}

.collapse-button.expanded .button-icon {
    transform: rotate(180deg);
}

/* ダッシュボードページスタイル */
.dashboard-container {
    display: flex;
    max-width: 1980px;
}

/* 統計エリア */
.stats-section-container {
    display: flex;
}

.stats-content {
    min-width: 250px;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.stats-content-value {
    font-size: 28px;
    font-weight: bold;
}

.stats-content-percentage {
    display: flex;
}

.stats-content-percentage p {
    margin-right: 10px;
}

.positive {
    color: #10b981;
}

.negative {
    color: #ef4444;
}

/* グラフセレクター */
.figure-selector {
    margin-top: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.figure-selector label {
    font-weight: bold;
    color: #495057;
    font-size: 14px;
    white-space: nowrap;
    margin: 0;
}

.figure-selector select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.figure-selector select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.figure-selector.invisible {
    margin-top: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    visibility:hidden;
}

/* グラフエリア */
.graph-content {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* 推移グラフ */
.trend-graph-container {
    display: flex;
}

.trend-graph-figure {
    max-width: 400px;
}

/* 円グラフ */
.pie-chart-section {
    display: flex;
}

.pie-chart-figure {
    max-height: 250px;
}

/* ヒートマップ */
.heatmap-section {
    display: flex;
}

.heatmap-figure {
    max-width: 450px;
}

/* 表エリア */
.tables-section {
    max-width: 1000px;
    display: flex;
    flex: 1;
    align-items: flex-start;
}

/* 施設統計表 */
.facility-table {
    min-width: 450px;
    width: calc(50% - 20px);
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    height: fit-content;
}

.facility-table table {
    height: auto;
}

.facility-table-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

/* 統計ページスタイル */
.stats-main-content {
    display: flex;
    flex: 1;
}

.stats-container {
    display: flex;
}

.map-table-section {
    max-width: 1000px;
    flex: 1;
}

/* 期間セレクター */
.month-selector {
    width: 210px;
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 10px;
    align-self: flex-start;
}

.month-selector h3 {
    margin-bottom: 10px;
}

.month-selector ul {
    list-style: none;
}

.month-selector li {
    margin-bottom: 5px;
}

.month-selector a {
    display: block;
    padding: 5px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
}

.month-selector a:hover {
    background-color: #e9ecef;
    color: #333;
}

.month-selector li.active a {
    background-color: #007bff;
    color: white;
}

/* カテゴリートグルボタン */
.category-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background-color: #f8f9fa;
    border: none;
    border-radius: 3px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.category-toggle:hover {
    background-color: #e9ecef;
}

.category-toggle.expanded .button-icon {
    transform: rotate(180deg);
}

/* サブカテゴリー */
.period-subcategory {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding-left: 10px;
}

.period-subcategory.expanded {
    max-height: 100%;
    opacity: 1;
    margin-top: 5px;
}

.period-subcategory li {
    margin-bottom: 3px;
}

/* マップエリア */
.map-container {
    min-width: 700px;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 10px;
}

.map-container h2 {
    margin-bottom: 15px;
}

.map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.map-legend {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.legend-element {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.legend-beige {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: #f5f5dc;
}

.legend-orange {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: #ffa500;
}

.legend-red {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: #ff0000;
}

/* マップフルスクリーン機能 */
.iframe-fullscreen-button {
    bottom: 30px;
    left: 30px;
    background-color: rgba(33, 33, 33, 1);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
}

.iframe-fullscreen-button.active {
    display: flex;
}

.iframe-fullscreen-button:hover {
    background-color: rgba(33, 33, 33, 0.8);
}

.enter-fullscreen {
    z-index: 1000;
    display: flex;
}

.exit-fullscreen {
    position: fixed;
    z-index: 10001;
    display: none;
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    z-index: 10000;
    display: none;
}

.fullscreen-overlay.active {
    display: block;
}

.fullscreen-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 利用状況ページスタイル */
.usage-container {
    display: flex;
}

.usage-main-content {
    flex: 1;
}

.usage-section {
    max-width: 1000px;
    background-color: white;
    margin: 10px;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.usage-section h2 {
    margin-bottom: 15px;
}

/* 利用状況詳細ページスタイル */
.usage-detail-container {
    max-width: 1000px;
}

.usage-info {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 10px;
}

.usage-info h2 {
    margin-bottom: 15px;
}

.actions {
    margin-top: 20px;
}

.back-button {
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #5a6268;
}

/* 欠損データページスタイル */
.missing-container {
    display: flex;
}

.missing-main-content {
    flex: 1;
}

/* インフォメーションページスタイル */
.info-content {
    width: 100%;
    min-width: 650px;
    max-width: 950px;
}

.welcome-section {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.welcome-section p {
    margin-bottom: 5px;
}

.welcome-section ul {
    margin-left: 20px;
}

.attention-text {
    color: rgba(0, 0, 0, 0.5);
    font-size: 0.75rem;
}

/* 施設辞書エリア */
.type-dictionary-container {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.type-dictionary-section {
    padding: 10px;
}

.type-dictionary-section h2 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 300;
}
        
.type-dictionary-section h3 {
    color: #333;
    border-bottom: 3px solid #333;
    padding-bottom: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.type-dictionary-section  ul {
    list-style-type: none;
    padding: 0;
}
        
.type-dictionary-section li {
    background-color: #ecf0f1;
    margin: 8px 0;
    padding: 12px 20px;
    border-left: 4px solid #333;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* ログインページスタイル */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-section {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.logo-section h1 {
    font-size: 1.8rem;
    color: #343a40;
    margin-bottom: 5px;
}

.logo-section p {
    color: #6c757d;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #343a40;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.flashes {
    list-style: none;
    margin-bottom: 1.5rem;
}

.flashes li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.flashes li {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flashes .error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flashes .success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flashes .warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.login-button {
    width: 100%;
    background-color: #007bff;
    color: white;
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 20px;
}

.login-button:hover {
    background-color: #0056b3;
}

@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* お知らせページスタイル */
.notice-content {
    max-width: 900px;
}

.notice-section {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.notice-header {
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.notice-header h2 {
    color: #343a40;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.notice-section.general {
    border-left: 4px solid #007bff;
}

.notice-section.updates {
    border-left: 4px solid #28a745;
}

.notice-section.contact {
    border-left: 4px solid #ffc107;
}

.notice-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 3px solid #dee2e6;
    position: relative;
}

.notice-item:last-child {
    margin-bottom: 0;
}

.notice-item.important {
    border-left-color: #dc3545;
    background-color: #fff5f5;
    border: 2px solid #dc3545;
    border-left-width: 4px;
}

.important-badge {
    position: absolute;
    top: -8px;
    right: 15px;
    background-color: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.notice-section.general .notice-item:not(.important) {
    border-left-color: #007bff;
}

.notice-section.updates .notice-item {
    border-left-color: #28a745;
    background-color: #f8fff9;
}

.notice-date {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.notice-title {
    font-weight: bold;
    color: #343a40;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.notice-summary {
    color: #495057;
    line-height: 1.5;
}

.notice-summary ul {
    margin: 10px 0 0 20px;
}

.notice-summary li {
    margin-bottom: 5px;
}

/* お知らせがない場合のスタイル */
.no-notice {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 30px 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px #dee2e6;
}

.contact-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
}

.contact-info p {
    margin-bottom: 15px;
    color: #495057;
}

.contact-details {
    margin-top: 15px;
}

.contact-item {
    padding: 8px 0;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item strong {
    color: #343a40;
    display: inline-block;
    width: 100px;
}


/* エラーメッセージ */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}