/* admin/admin.css */

/* ヘッダー周り */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.btn-back {
    color: #fff;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-back:hover {
    background-color: rgba(255, 255, 255, 0.35);
}

/* ボタン・グリッド配置 */
.admin-grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.admin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    background-color: #2b6cb0;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
}

.admin-btn:hover {
    background-color: #2c5282;
    transform: translateY(-2px);
}

.admin-btn.warning {
    background-color: #dd6b20;
}
.admin-btn.warning:hover {
    background-color: #c05621;
}

.admin-btn.spreadsheet {
    background-color: #2f855a;
}
.admin-btn.spreadsheet:hover {
    background-color: #276749;
}

/* マニュアルカード一覧 */
.manual-links-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.manual-card {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.2s ease;
}

.manual-card:hover {
    background-color: #ebf8ff;
    border-color: #3182ce;
    transform: translateX(4px);
}

.manual-card .icon {
    font-size: 1.4rem;
    margin-right: 12px;
}

.manual-card .title {
    font-weight: bold;
    flex-grow: 1;
}

.manual-card .arrow {
    color: #a0aec0;
    font-weight: bold;
}

.manual-card:hover .arrow {
    color: #3182ce;
}

/* マニュアル本文用スタイル */
.manual-content {
    line-height: 1.8;
}

.manual-step {
    background: #f8fafc;
    border-left: 4px solid #3182ce;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

.manual-step h3 {
    margin-top: 0;
    color: #2b6cb0;
}

/* 画像挿入用の枠 */
.img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e0;
    background-color: #edf2f7;
    border-radius: 6px;
    padding: 30px;
    margin: 15px 0;
    color: #718096;
    text-align: center;
}

.img-placeholder img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ==========================================
   1. ローディング画面 (共通)
   ========================================== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   アコーディオン＆詳細テーブル
   ========================================== */
.accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: #fff;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background-color: #f7fafc;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    transition: background-color 0.2s;
}

.accordion-header:hover {
    background-color: #edf2f7;
}

.accordion-header .title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accordion-header .badge {
    background-color: #3182ce;
    color: white;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
}

.accordion-content {
    display: none;
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    overflow-x: auto;
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-item.active .arrow-icon {
    transform: rotate(180deg);
}

.arrow-icon {
    transition: transform 0.2s;
    font-size: 0.8rem;
    color: #718096;
}

/* 詳細テーブル用 */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 650px;
}

.detail-table th, .detail-table td {
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    text-align: left;
}

.detail-table th {
    background-color: #edf2f7;
    color: #4a5568;
    white-space: nowrap;
}

.status-ok {
    color: #38a169;
    font-weight: bold;
}

.status-ng {
    color: #e53e3e;
    font-weight: bold;
}

.folder-tag {
    background-color: #e2e8f0;
    color: #2d3748;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}

/* ==========================================
   mypagedata フォルダツリー表示
   ========================================== */
.tree-container {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

.tree-container ul {
    list-style: none;
    padding-left: 20px;
    margin: 0;
}

.tree-container > ul {
    padding-left: 0;
}

.tree-folder {
    color: #569cd6;
    font-weight: bold;
}

.tree-file {
    color: #ce9178;
}