@charset "UTF-8";

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

a {
    color: #ff0055;
    text-decoration: none;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* サイドバー */
.admin-sidebar {
    width: 250px;
    background-color: #181818;
    border-right: 1px solid #2a2a2a;
    flex-shrink: 0;
}

.sidebar-brand {
    padding: 20px 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 1px solid #2a2a2a;
    background-color: #141414;
}

.sidebar-brand a {
    color: #fff;
}

.sidebar-brand-logo {
    display: block;
    max-width: 100%;
    height: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav .nav-header {
    padding: 15px 15px 5px 15px;
    font-size: 0.85rem;
    color: #ddd;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-nav .nav-header::after {
    content: "▼";
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.sidebar-nav .nav-header.open::after {
    transform: rotate(180deg);
}

.sidebar-nav .nav-group {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.sidebar-nav .nav-group.open {
    max-height: 500px;
    opacity: 1;
}

.sidebar-nav .nav-item a {
    display: block;
    padding: 12px 15px;
    color: #aaa;
    font-size: 0.9rem;
    border-bottom: 1px solid #222;
    transition: background 0.2s, color 0.2s;
}

.sidebar-nav .nav-item a:hover {
    background-color: #252525;
    color: #fff;
}

.sidebar-nav .root-item a {
    color: #fff;
    font-weight: bold;
    background-color: #222;
}

/* メインコンテンツ */
.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-header {
    height: 60px;
    padding: 0 20px;
    background-color: #181818;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title h2 {
    font-size: 1.1rem;
    color: #fff;
}

.header-user {
    font-size: 0.85rem;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-logout {
    color: #ff0055;
    padding: 5px 12px;
    border: 1px solid #ff0055;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.btn-logout:hover {
    background-color: rgba(255, 0, 85, 0.1);
}

.admin-content {
    padding: 20px;
    flex-grow: 1;
}

.admin-footer {
    padding: 15px 20px;
    background-color: #141414;
    border-top: 1px solid #2a2a2a;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}

/* ページ最上部ナビゲーション */
.page-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-link {
    color: #aaa;
    font-size: 0.85rem;
    text-decoration: none;
}

.back-link:hover {
    color: #fff;
    text-decoration: underline;
}

.page-info {
    color: #aaa;
    font-size: 0.85rem;
}

/* メッセージ表示 */
.alert-msg {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* カード & グリッド */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background-color: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 20px;
}

.card-title {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.card-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
}

/* ポータルカード装飾 */
.portal-card-antenna {
    border-left: 4px solid #ff0055;
}

.portal-card-video {
    border-left: 4px solid #007bff;
}

.portal-card-doujin {
    border-left: 4px solid #28a745;
}

.portal-card-heading {
    font-size: 1.1rem;
    color: #fff;
    font-weight: bold;
    margin-bottom: 10px;
}

.portal-card-desc {
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.portal-card-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #ccc;
    flex-wrap: wrap;
}

.portal-card-stats-sm {
    gap: 10px;
    font-size: 0.8rem;
}

.portal-card-stats strong {
    color: #fff;
}

.portal-card-action {
    text-align: right;
}

.btn-portal-action {
    display: inline-block;
    padding: 8px 16px;
    color: #fff;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
}

.btn-portal-antenna {
    background-color: #ff0055;
}

.btn-portal-video {
    background-color: #007bff;
}

.btn-portal-doujin {
    background-color: #28a745;
}

/* 検索パネル */
.search-card {
    margin-bottom: 20px;
    padding: 15px;
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #222;
    color: #fff;
}

.btn-search-video {
    padding: 8px 16px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-search-doujin {
    padding: 8px 16px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-search-clear {
    padding: 8px 12px;
    background-color: #6c757d;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

/* データテーブル */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.85rem;
}

.data-table th, .data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}

.data-table th {
    background-color: #141414;
    color: #aaa;
    font-weight: bold;
}

.data-table td {
    color: #ddd;
}

.data-table tbody tr:hover {
    background-color: #252525;
}

.cell-center {
    text-align: center;
}

.link-article-title {
    color: #fff;
    text-decoration: underline;
}

.sub-info-text {
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
}

.inline-form {
    margin: 0;
}

.btn-status-toggle {
    padding: 3px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    color: #fff;
}

.btn-status-active {
    background-color: #28a745;
}

.btn-status-inactive {
    background-color: #6c757d;
}

.btn-delete-row {
    padding: 4px 8px;
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.col-center-empty {
    text-align: center;
    color: #888;
}

/* ページネーション */
.pagination-wrapper {
    margin-top: 20px;
    text-align: center;
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.pagination-btn {
    padding: 5px 10px;
    background-color: #2a2a2a;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.pagination-current {
    padding: 5px 10px;
    color: #888;
}