/* ===========================
   SUBPAGE COMMON STYLES
   subpage.css — ひきしまクリニック
   =========================== */

/* ===== PAGE HERO ===== */
.page-hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--brown-900) 0%, var(--brown-700) 60%, var(--brown-500) 100%);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 80% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero-label {
    font-size: 0.75rem;
    letter-spacing: 0.28em;
    color: var(--brown-200);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.3;
}

.page-hero-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.9;
}

/* Accent colors per page */
.page-hero--covid {
    background: linear-gradient(135deg, #2d1a0e 0%, #7a3018 60%, #b87248 100%);
}

.page-hero--visit {
    background: linear-gradient(135deg, #0e1a2d 0%, #184a7a 60%, #4882b8 100%);
}

.page-hero--nursing {
    background: linear-gradient(135deg, #1a0e2d 0%, #5a187a 60%, #9048b8 100%);
}

.page-hero--community {
    background: linear-gradient(135deg, #0e2d1a 0%, #187a5a 60%, #48b890 100%);
}

.page-hero--recruit {
    background: linear-gradient(135deg, #2d0e1a 0%, #7a1848 60%, #b84878 100%);
}

.page-hero--map {
    background: linear-gradient(135deg, #1a2d0e 0%, #4a7a18 60%, #82b848 100%);
}

.page-hero--medical {
    background: linear-gradient(135deg, #0e1a2d 0%, #18487a 60%, #4878b8 100%);
}

/* ===== MAIN CONTENT ===== */
.subpage-main {
    padding: 80px 0 120px;
}

.content-section {
    margin-bottom: 64px;
}

.content-title {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: var(--brown-900);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brown-200);
    position: relative;
}

.content-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: var(--brown-600);
}

.content-card {
    background: #fff;
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    line-height: 1.9;
    color: var(--text-mid);
}

.content-card+.content-card {
    margin-top: 16px;
}

.card-subtitle {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--brown-800);
    margin-bottom: 12px;
}

.hero-text-card {
    border-left: 4px solid var(--brown-500);
}

.lead-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--brown-800);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.text-link {
    color: var(--brown-600);
    text-decoration: underline;
    transition: var(--transition);
}

.text-link:hover {
    color: var(--brown-800);
}

/* ===== INFO GRID ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.info-card {
    background: #fff;
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
}

.info-card:hover {
    border-color: var(--brown-400);
    box-shadow: var(--shadow-sm);
    transform: translateY(-4px);
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    line-height: 1;
}

.info-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--brown-800);
    margin-bottom: 8px;
}

.info-card p,
.info-card ul {
    font-size: 0.88rem;
    color: var(--text-mid);
    line-height: 1.8;
}

.info-notice {
    background: var(--brown-50);
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--text-mid);
    line-height: 1.7;
}

/* ===== TAG GRID ===== */
.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-badge {
    background: var(--brown-100);
    color: var(--brown-800);
    border: 1px solid var(--brown-300);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== ALERT BANNER ===== */
.alert-banner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fff8f0;
    border: 2px solid var(--brown-300);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 40px;
}

.alert-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.alert-banner strong {
    display: block;
    font-size: 1rem;
    color: var(--brown-900);
    margin-bottom: 6px;
}

.alert-banner p {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.7;
}

/* ===== TIMELINE ===== */
.timeline-card {
    padding: 28px 32px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 20px 80px 1fr;
    gap: 0 16px;
    padding-bottom: 28px;
    position: relative;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: var(--brown-200);
}

.timeline-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brown-600);
    border: 3px solid var(--brown-200);
    flex-shrink: 0;
    margin-top: 2px;
}

.timeline-year {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brown-500);
    padding-top: 1px;
    white-space: nowrap;
}

.timeline-body strong {
    display: block;
    font-size: 0.95rem;
    color: var(--brown-800);
    margin-bottom: 4px;
}

.timeline-body p {
    font-size: 0.88rem;
    color: var(--text-mid);
    line-height: 1.7;
}

/* ===== PROFILE ===== */
.profile-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.profile-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brown-900);
    margin-bottom: 8px;
}

.profile-title {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
}

.profile-desc {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 12px;
}

.profile-list {
    list-style: none;
}

.profile-list li {
    font-size: 0.88rem;
    color: var(--text-mid);
    padding: 5px 0;
    border-bottom: 1px dashed var(--brown-200);
}

.profile-list li:last-child {
    border-bottom: none;
}

/* ===== CHECK LIST ===== */
.check-list {
    list-style: none;
}

.check-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px dashed var(--brown-200);
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.7;
}

.check-list li:last-child {
    border-bottom: none;
}

.check-list li::before {
    content: '✓';
    color: var(--brown-600);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ===== PLAIN LIST ===== */
.plain-list {
    list-style: none;
}

.plain-list li {
    font-size: 0.88rem;
    color: var(--text-mid);
    padding: 4px 0;
    line-height: 1.7;
}

.plain-list li::before {
    content: '・';
    color: var(--brown-400);
}

/* ===== FLOW LIST ===== */
.flow-list {
    list-style: none;
    counter-reset: none;
}

.flow-list li {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--brown-100);
    margin-bottom: 20px;
}

.flow-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.flow-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--brown-700);
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    font-family: var(--font-heading);
}

.flow-list li strong {
    display: block;
    font-size: 0.95rem;
    color: var(--brown-800);
    margin-bottom: 4px;
}

.flow-list li p {
    font-size: 0.88rem;
    color: var(--text-mid);
    line-height: 1.7;
}

/* ===== COMPARE TABLE ===== */
.compare-table-wrap {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.compare-table thead {
    background: var(--brown-100);
}

.compare-table th {
    padding: 12px 16px;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--brown-800);
}

.compare-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--brown-100);
    color: var(--text-mid);
    text-align: center;
}

.compare-label {
    text-align: left !important;
    font-weight: 600;
    color: var(--brown-700) !important;
    background: var(--brown-50);
}

/* ===== CTA BLOCK ===== */
.cta-block {
    text-align: center;
    background: var(--brown-50);
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    margin-top: 32px;
}

.cta-block p {
    font-size: 1rem;
    color: var(--text-mid);
    margin-bottom: 20px;
}

/* ===== 360 VIEW ===== */
.view-360-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.view-360-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius-sm);
}

.gallery-360 .content-card + .content-card {
    margin-top: 20px;
}

/* ===== PHOTO GALLERY ===== */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.photo-gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--brown-200);
    transition: var(--transition);
}

.photo-gallery-item:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-4px);
}

.photo-gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.photo-gallery-item[data-lightbox] img {
    cursor: pointer;
}

/* ===== EYECATCH ===== */
.eyecatch-card {
    padding: 0;
    overflow: hidden;
}

.eyecatch-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

/* ===== SECTION LEAD ===== */
.section-lead {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

/* ===== PAGE NAV ===== */
.page-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--brown-200);
}

.page-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    min-width: 0;
    flex: 1;
}

.page-nav-link:hover {
    border-color: var(--brown-400);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.page-nav-next {
    text-align: right;
    justify-content: flex-end;
}

.page-nav-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.page-nav-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--brown-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-nav-link i {
    font-size: 1.2rem;
    color: var(--brown-500);
    flex-shrink: 0;
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.6rem;
    padding: 12px;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close {
    top: 16px;
    right: 16px;
    font-size: 2rem;
}

.lightbox-prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
}

.lightbox-next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .page-hero {
        padding: 120px 0 60px;
    }

    .content-card {
        padding: 20px;
    }

    .timeline-item {
        grid-template-columns: 18px 64px 1fr;
    }

    .profile-card {
        flex-direction: column;
        gap: 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .page-nav {
        flex-direction: column;
    }

    .page-nav-next {
        text-align: left;
        justify-content: flex-start;
        flex-direction: row-reverse;
    }

    .photo-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 1.8rem;
    }
}

/* ===========================
   NEWS DETAIL — お知らせ詳細ページ
   =========================== */
.news-detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.news-detail-meta time {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.04em;
}

.news-detail-meta .news-tag {
    font-size: 0.78rem;
}

.news-detail-body {
    background: #fff;
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-md);
    padding: 40px 48px;
    line-height: 2;
    color: var(--text-mid);
    font-size: 0.95rem;
    margin-bottom: 48px;
}

.news-detail-body h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brown-900);
    margin: 2rem 0 1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brown-200);
}

.news-detail-body h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brown-800);
    margin: 1.5rem 0 0.8rem;
}

.news-detail-body p {
    margin-bottom: 1rem;
}

.news-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.news-detail-body ul,
.news-detail-body ol {
    padding-left: 1.5em;
    margin-bottom: 1rem;
}

.news-detail-body li {
    margin-bottom: 0.4em;
}

.news-detail-body a {
    color: var(--brown-600);
    text-decoration: underline;
}

.news-detail-body a:hover {
    color: var(--brown-800);
}

.news-detail-back {
    text-align: center;
    margin-bottom: 40px;
}

@media (max-width: 640px) {
    .news-detail-body {
        padding: 24px 20px;
    }
}

/* ===========================
   NEWS LIST — お知らせ一覧ページ
   =========================== */
.news-list--full {
    max-width: 800px;
    margin: 0 auto;
}

.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--brown-300);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--brown-700);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pagination-btn:hover {
    background: var(--brown-100);
    border-color: var(--brown-500);
}

.pagination-btn.active {
    background: var(--brown-700);
    color: #fff;
    border-color: var(--brown-700);
    pointer-events: none;
}

.pagination-num {
    min-width: 40px;
    padding: 8px;
}

@media (max-width: 640px) {
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 0.82rem;
    }
}

/* ===== FAQ LIST ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 0;
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-q {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    padding-left: 1.6rem;
    position: relative;
    font-size: 0.97rem;
}

.faq-q::before {
    content: 'Q';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: var(--primary);
}

.faq-a {
    color: var(--text-mid);
    padding-left: 1.6rem;
    position: relative;
    font-size: 0.93rem;
    line-height: 1.7;
    margin: 0;
}

.faq-a::before {
    content: 'A';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: var(--brown-500);
}

/* ===== HOURS TABLE ===== */
.hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.hours-table th,
.hours-table td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.5rem;
    text-align: center;
}

.hours-table thead th {
    background: var(--brown-50);
    font-weight: 600;
    color: var(--text-dark);
}

.hours-table tbody tr:first-child td {
    color: var(--primary);
    font-weight: 600;
}

.hours-table td small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 400;
}

/* ===== INFO TABLE ===== */
.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}

.info-table th,
.info-table td {
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
}

.info-table th {
    background: var(--brown-50);
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    width: 30%;
}

@media (max-width: 640px) {
    .hours-table {
        font-size: 0.78rem;
    }

    .hours-table th,
    .hours-table td {
        padding: 0.4rem 0.25rem;
    }

    .info-table th {
        width: auto;
        display: block;
        border-bottom: none;
    }

    .info-table td {
        display: block;
        border-top: none;
    }
}

/* ===========================
   BOOTSTRAP ICONS INTEGRATION
   =========================== */

/* サブページ info-card アイコン */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--brown-100);
    border-radius: 14px;
    color: var(--accent);
    font-size: 1.45rem;
}

/* アラートバナーアイコン */
.alert-icon {
    color: var(--accent);
    font-size: 1.8rem;
}

/* 院長プロフィールアイコン */
.profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--brown-100);
    border-radius: 50%;
    color: var(--brown-700);
    font-size: 1.8rem;
}

/* プロフィールリスト内インラインアイコン */
.profile-list .bi {
    color: var(--brown-500);
    margin-right: 4px;
}

/* tag-badge 内インラインアイコン */
.tag-badge .bi {
    font-size: 0.85em;
    vertical-align: -0.1em;
    margin-right: 2px;
}

/* --primary / --border 変数の定義（style.css の変数を参照） */
:root {
    --primary: var(--brown-700);
    --border: var(--brown-200);
}

/* ===========================
   MONSHIN（事前問診）
   =========================== */

/* Page Hero */
.page-hero--monshin {
    background: linear-gradient(135deg, #0e2d1a 0%, #1a6b4a 60%, #48b88a 100%);
}

/* Progress Bar */
.monshin-progress {
    margin-bottom: 32px;
    text-align: center;
}

.monshin-progress-bar {
    height: 8px;
    background: var(--brown-100);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.monshin-progress-fill {
    height: 100%;
    background: var(--brown-700);
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 12.5%;
}

.monshin-progress-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Step sections */
.monshin-step .content-card {
    max-width: 680px;
    margin: 0 auto;
}

.monshin-subtitle {
    text-align: center;
    color: var(--text-mid);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.monshin-small {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Notice box */
.monshin-notice {
    background: var(--brown-50);
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    line-height: 1.8;
}

.monshin-notice p {
    margin-bottom: 8px;
}

.monshin-notice p:last-child {
    margin-bottom: 0;
}

/* Info box */
.monshin-info-box {
    background: #fff8f0;
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Section title */
.monshin-section-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--brown-800);
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--brown-200);
}

/* Merit list */
.monshin-merit-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 24px;
}

.monshin-merit-list li {
    padding: 12px 0 12px 0;
    border-bottom: 1px solid var(--brown-100);
    line-height: 1.7;
}

.monshin-merit-list li:last-child {
    border-bottom: none;
}

/* Info definition list */
.monshin-info-dl {
    margin: 12px 0 24px;
}

.monshin-info-dl dt {
    font-weight: 700;
    color: var(--brown-800);
    margin-top: 12px;
    font-size: 0.9rem;
}

.monshin-info-dl dd {
    margin-left: 0;
    padding-left: 16px;
    color: var(--text-mid);
    font-size: 0.88rem;
    line-height: 1.8;
}

/* Warn */
.monshin-warn {
    text-align: center;
    font-size: 0.85rem;
    margin: 24px 0 0;
}

/* Question box */
.monshin-question-box {
    margin-bottom: 24px;
}

.monshin-question {
    font-weight: 700;
    color: var(--brown-800);
    font-size: 1rem;
    margin-bottom: 12px;
    line-height: 1.6;
}

/* Choice buttons (large select) */
.monshin-choice-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.monshin-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.monshin-choice-btn {
    display: block;
    cursor: pointer;
}

.monshin-choice-btn input {
    display: none;
}

.monshin-choice-btn span {
    display: block;
    padding: 14px 20px;
    border: 2px solid var(--brown-200);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 500;
    font-family: var(--font-heading);
    color: var(--brown-800);
    transition: all 0.2s ease;
    background: var(--warm-white);
}

.monshin-choice-btn input:checked + span {
    border-color: var(--brown-700);
    background: var(--brown-700);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.monshin-choice-btn:hover span {
    border-color: var(--brown-500);
}

/* Radio / Checkbox groups */
.monshin-radio-group,
.monshin-radio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 4px;
}

.monshin-radio-list {
    flex-direction: column;
}

.monshin-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 6px 0;
}

.monshin-radio input {
    accent-color: var(--brown-700);
    width: 18px;
    height: 18px;
}

.monshin-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.monshin-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 8px 12px;
    border: 1px solid var(--brown-100);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.monshin-checkbox:hover {
    background: var(--brown-50);
}

.monshin-checkbox input {
    accent-color: var(--brown-700);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Form fields */
.monshin-field {
    margin-bottom: 20px;
}

.monshin-label {
    display: block;
    font-weight: 700;
    color: var(--brown-800);
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.monshin-required {
    color: #c43e3e;
    font-weight: 700;
    font-size: 0.8rem;
}

.monshin-optional {
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.8rem;
}

.monshin-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-body);
    background: var(--warm-white);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.monshin-input:focus {
    outline: none;
    border-color: var(--brown-700);
    box-shadow: 0 0 0 3px rgba(122, 66, 40, 0.1);
}

.monshin-input-short {
    width: 120px;
}

.monshin-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: var(--warm-white);
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.monshin-textarea:focus {
    outline: none;
    border-color: var(--brown-700);
    box-shadow: 0 0 0 3px rgba(122, 66, 40, 0.1);
}

.monshin-select {
    padding: 10px 14px;
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: var(--warm-white);
    min-width: 80px;
}

.monshin-inline-selects {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.monshin-inline-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Conditional fields */
.monshin-conditional {
    margin-top: 12px;
    padding-left: 24px;
    border-left: 3px solid var(--brown-200);
}

/* Sub actions */
.monshin-sub-actions {
    margin-top: 8px;
}

.monshin-link-btn {
    background: none;
    border: none;
    color: var(--brown-600);
}

/* ===========================
   MONSHIN ADMIN（問診結果閲覧）
   =========================== */

.madmin-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.madmin-ym-select {
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid var(--brown-300);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: #fff;
}

.madmin-load-btn {
    padding: 8px 24px !important;
    font-size: 0.9rem !important;
}

.madmin-record-count {
    font-size: 0.9rem;
    color: var(--brown-600);
    font-weight: 500;
}

/* ---- 絞り込み検索バー ---- */
.madmin-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.madmin-filter-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}

.madmin-filter-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brown-400);
    font-size: 0.9rem;
    pointer-events: none;
}

.madmin-filter-input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid var(--brown-300);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.madmin-filter-input:focus {
    outline: none;
    border-color: var(--brown-500);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.12);
}

.madmin-filter-select {
    padding: 9px 12px;
    border: 1px solid var(--brown-300);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
    min-width: 120px;
}

.madmin-filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: none;
    border: 1px solid var(--brown-300);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--brown-600);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

.madmin-filter-clear:hover {
    background: var(--brown-100, #f0e8dd);
    color: var(--brown-800);
}

.madmin-filter-count {
    font-size: 0.85rem;
    color: var(--brown-500);
    font-weight: 500;
    white-space: nowrap;
}

.madmin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.madmin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.madmin-table thead th {
    background: var(--brown-800);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.madmin-table tbody tr {
    border-bottom: 1px solid var(--brown-200);
    transition: background 0.15s;
}

.madmin-table tbody tr:hover {
    background: var(--brown-50, #faf7f4);
}

.madmin-table td {
    padding: 10px 14px;
    vertical-align: middle;
}

.madmin-unum {
    font-weight: 700;
    color: var(--brown-700);
}

.madmin-detail-btn {
    padding: 5px 16px !important;
    font-size: 0.8rem !important;
    border-radius: var(--radius-sm) !important;
}

.madmin-no-data {
    text-align: center;
    padding: 40px 0;
    color: var(--brown-400);
    font-size: 1rem;
}

/* モーダル */
.madmin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.madmin-modal {
    background: #fff;
    border-radius: var(--radius-md);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

.madmin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--brown-200);
}

.madmin-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--brown-900);
    margin: 0;
}

.madmin-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--brown-500);
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.madmin-modal-close:hover {
    color: var(--brown-800);
}

.madmin-modal-body {
    padding: 20px 24px 28px;
}

.madmin-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.madmin-detail-table th,
.madmin-detail-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--brown-100);
    font-size: 0.9rem;
    vertical-align: top;
}

.madmin-detail-table th {
    width: 35%;
    background: var(--brown-50, #faf7f4);
    color: var(--brown-700);
    font-weight: 600;
    white-space: nowrap;
}

.madmin-detail-table td {
    color: var(--brown-900);
    word-break: break-word;
}

.madmin-photo-thumb {
    max-height: 120px;
    max-width: 200px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--brown-200);
}

/* モバイル対応 */
@media (max-width: 640px) {
    .madmin-filter-bar {
        gap: 8px;
    }

    .madmin-filter-search {
        min-width: 0;
        max-width: none;
        flex-basis: 100%;
    }

    .madmin-filter-select {
        flex: 1;
        min-width: 0;
    }

    .madmin-table thead {
        display: none;
    }

    .madmin-table tbody tr {
        display: block;
        padding: 12px;
        margin-bottom: 8px;
        border: 1px solid var(--brown-200);
        border-radius: var(--radius-sm);
    }

    .madmin-table td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        border: none;
    }

    .madmin-table td::before {
        font-weight: 600;
        color: var(--brown-600);
        margin-right: 12px;
    }

    .madmin-table td:nth-child(1)::before { content: '受付番号'; }
    .madmin-table td:nth-child(2)::before { content: 'フリガナ'; }
    .madmin-table td:nth-child(3)::before { content: '電話番号'; }
    .madmin-table td:nth-child(4)::before { content: '診察券'; }
    .madmin-table td:nth-child(5)::before { content: '登録日時'; }

    .madmin-detail-table th {
        display: block;
        width: 100%;
        border-bottom: none;
        padding-bottom: 2px;
    }

    .madmin-detail-table td {
        display: block;
        padding-top: 0;
        padding-left: 14px;
    }

    .madmin-modal {
        max-height: 90vh;
    }
}
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 0;
}

.monshin-link-btn:hover {
    color: var(--brown-800);
}

/* Time slots */
.monshin-time-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.monshin-time-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--brown-100);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.monshin-time-slot:hover {
    background: var(--brown-50);
}

.monshin-time-slot input {
    accent-color: var(--brown-700);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.monshin-time-name {
    font-weight: 500;
    min-width: 130px;
}

.monshin-time-status {
    font-size: 0.85rem;
}

.monshin-time-separator {
    padding: 8px 14px;
    background: var(--brown-50);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    text-align: center;
}

/* Privacy box */
.monshin-privacy-box {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--brown-200);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 24px;
    background: var(--warm-white);
    font-size: 0.88rem;
    line-height: 1.8;
}

.monshin-privacy-box h4 {
    margin: 16px 0 8px;
    color: var(--brown-800);
}

/* Photo upload */
.monshin-upload-box {
    padding: 16px;
    border: 2px dashed var(--brown-200);
    border-radius: var(--radius-sm);
    text-align: center;
    background: var(--brown-50);
}

.monshin-upload-box input[type="file"] {
    margin-bottom: 8px;
}

/* Actions */
.monshin-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--brown-100);
}

.monshin-btn {
    min-width: 140px;
    padding: 14px 28px;
    font-size: 1rem;
}

/* Complete card */
.monshin-complete-card {
    text-align: center;
}

.monshin-result-box {
    background: var(--brown-50);
    border: 2px solid var(--brown-700);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    margin: 24px auto;
    max-width: 400px;
}

.monshin-result-label {
    font-size: 0.9rem;
    color: var(--text-mid);
    margin-bottom: 8px;
}

.monshin-result-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--brown-800);
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}

/* Error toast */
.monshin-error-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #c43e3e;
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 9999;
    font-size: 0.9rem;
    max-width: 90%;
    text-align: center;
    animation: monshinToastIn 0.3s ease;
}

.monshin-error-toast.monshin-info-toast {
    background: #2d7d46;
}

@keyframes monshinToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Utility */
.text-red {
    color: #c43e3e;
}

.text-sub {
    color: var(--text-light);
    font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 640px) {
    .monshin-choice-grid {
        grid-template-columns: 1fr;
    }

    .monshin-time-slot {
        flex-wrap: wrap;
    }

    .monshin-time-name {
        min-width: auto;
    }

    .monshin-actions {
        flex-direction: column;
    }

    .monshin-btn {
        width: 100%;
    }

    .monshin-result-number {
        font-size: 2.4rem;
    }

    .monshin-inline-selects {
        gap: 6px;
    }
}

/* Inline field error highlight */
.monshin-field-error {
    border-color: #c43e3e !important;
    box-shadow: 0 0 0 2px rgba(196, 62, 62, 0.2);
}

.monshin-field-error-msg {
    color: #c43e3e;
    font-size: 0.82rem;
    margin-top: 4px;
}

/* ===========================
   ADMIN PAGE（管理ページ）
   =========================== */

.page-hero--admin {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
}

/* タブナビゲーション */
.admin-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--brown-200);
    margin-bottom: 32px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brown-500);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    margin-bottom: -2px;
}

.admin-tab:hover {
    color: var(--brown-700);
}

.admin-tab.active {
    color: var(--brown-900);
    border-bottom-color: var(--brown-700);
}

.admin-tab i {
    font-size: 1.1rem;
}

/* パネル表示切替 */
.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
}

/* 統計カード */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--brown-50, #faf7f4);
    border-radius: var(--radius-md);
    border: 1px solid var(--brown-100);
    transition: box-shadow 0.2s;
}

.admin-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brown-700);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.admin-stat-label {
    font-size: 0.82rem;
    color: var(--brown-500);
    margin-bottom: 4px;
}

.admin-stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brown-900);
}

.admin-sub-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brown-800);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--brown-100);
}

/* モバイル対応 */
@media (max-width: 640px) {
    .admin-tabs {
        gap: 0;
    }

    .admin-tab {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .admin-tab span {
        display: none;
    }

    .admin-tab i {
        font-size: 1.3rem;
    }

    .admin-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .admin-stat-card {
        padding: 16px 20px;
    }

    .admin-stat-value {
        font-size: 1.3rem;
    }
}

/* ===========================
   ERROR PAGE (404 etc.)
   =========================== */

.page-hero--error {
    background: linear-gradient(135deg, #2d1a0e 0%, #6b3a1e 60%, #9b5a38 100%);
}

.error-page-content {
    text-align: center;
    padding: 40px 0 60px;
}

.error-icon {
    font-size: 4rem;
    color: var(--brown-400);
    margin-bottom: 24px;
    line-height: 1;
}

.error-heading {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: var(--brown-900);
    margin-bottom: 20px;
}

.error-message {
    font-size: 1rem;
    color: #555;
    line-height: 2;
    margin-bottom: 40px;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.error-actions .btn-primary,
.error-actions .btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.error-contact {
    padding: 32px;
    background: var(--brown-50);
    border-radius: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.error-contact p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 12px;
}

.error-tel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brown-700);
    text-decoration: none;
}

.error-tel:hover {
    color: var(--brown-500);
}

@media (max-width: 600px) {
    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .error-actions .btn-primary,
    .error-actions .btn-outline {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* エディター共通 */
.admin-panel-desc {
    color: var(--brown-600);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.admin-edit-label {
    display: block;
    font-weight: 700;
    color: var(--brown-800);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.admin-edit-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.admin-edit-table th,
.admin-edit-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--brown-100);
}

.admin-edit-table th {
    background: var(--brown-50);
    color: var(--brown-700);
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-edit-table td:last-child {
    width: 50px;
    text-align: center;
}

.admin-edit-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--brown-200);
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
    color: var(--brown-900);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.admin-edit-input:focus {
    outline: none;
    border-color: var(--brown-500);
    box-shadow: 0 0 0 3px rgba(139, 119, 101, 0.12);
}

.admin-textarea {
    width: 100%;
    min-height: 180px;
    padding: 14px;
    border: 1px solid var(--brown-200);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
    background: #fff;
    color: var(--brown-900);
    box-sizing: border-box;
}

.admin-textarea:focus {
    outline: none;
    border-color: var(--brown-500);
    box-shadow: 0 0 0 3px rgba(139, 119, 101, 0.12);
}

.admin-preview-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brown-600);
    margin-bottom: 8px;
    display: block;
}

.admin-preview-box {
    background: var(--brown-50);
    border: 1px solid var(--brown-100);
    border-radius: 8px;
    padding: 16px 20px;
    min-height: 60px;
    line-height: 1.7;
    color: var(--brown-800);
    font-size: 0.95rem;
}

.admin-preview-box p {
    margin: 0 0 4px 0;
}

.admin-edit-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.admin-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--brown-50);
    color: var(--brown-700);
    border: 1px dashed var(--brown-300);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-add-btn:hover {
    background: var(--brown-100);
    border-color: var(--brown-500);
}

.admin-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--brown-400);
    cursor: pointer;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s;
}

.admin-delete-btn:hover {
    background: #fce4e4;
    color: #c0392b;
}

.admin-save-status {
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 6px;
    display: none;
}

.admin-save-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-save-error {
    background: #fce4e4;
    color: #c0392b;
}

.admin-ip-current {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--brown-50);
    border: 1px solid var(--brown-100);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--brown-700);
}

.admin-ip-current strong {
    color: var(--brown-900);
}

@media (max-width: 640px) {
    .admin-edit-table th,
    .admin-edit-table td {
        padding: 8px;
        font-size: 0.85rem;
    }

    .admin-edit-input {
        padding: 6px 8px;
        font-size: 0.85rem;
    }

    .admin-edit-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---- Admin Topbar ---- */
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 10px 16px;
    background: var(--brown-50);
    border-radius: 8px;
    border: 1px solid var(--brown-100);
}

.admin-topbar-label {
    font-size: 0.88rem;
    color: var(--brown-600);
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-logout-btn {
    padding: 6px 16px;
    font-size: 0.85rem;
    border: 1px solid var(--brown-300);
    border-radius: 6px;
    background: #fff;
    color: var(--brown-700);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.admin-logout-btn:hover {
    background: var(--brown-100);
    border-color: var(--brown-400);
}

/* ---- Loading Overlay ---- */
.admin-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.admin-loading-overlay.active {
    display: flex;
}

.admin-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--brown-200);
    border-top-color: var(--brown-600);
    border-radius: 50%;
    animation: adminSpin 0.7s linear infinite;
}

@keyframes adminSpin {
    to { transform: rotate(360deg); }
}

/* ---- Drag & Drop ---- */
.admin-drag-handle {
    cursor: grab;
    text-align: center;
    color: var(--brown-400);
    user-select: none;
    padding: 4px 6px;
    font-size: 1.1rem;
}

.admin-drag-handle:active {
    cursor: grabbing;
}

.admin-drag-active {
    opacity: 0.4;
    background: var(--brown-50);
}

.admin-drag-over td {
    border-top: 2px solid var(--brown-600);
}

@media (max-width: 640px) {
    .admin-topbar {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .admin-drag-handle {
        font-size: 1rem;
        padding: 2px 4px;
    }
}