/* ============================================
   크림서버 관리사이트 — SourceBans++ 테마 v4.1
   ============================================ */

/* CSS 변수 정의 */
:root {
    /* 크림서버 시그니처 컬러 팔레트 */
    --brand:              #f47c20; /* 메인 오렌지 */
    --brand-dark:         #d96618;
    --brand-deep:         #b85210;
    --brand-light:        #fff1e6;
    --brand-pale:         #fff9f5;
    
    /* 세컨더리 및 시스템 컬러 */
    --secondary:          #2d3436;
    --success:            #00b894;
    --warning:            #fdcb6e;
    --danger:             #d63031;
    --info:               #0984e3;
    
    /* 텍스트 및 배경 */
    --text-main:          #2d3436;
    --text-muted:         #636e72;
    --text-light:         #b2bec3;
    --bg-main:            #f8f9fa;
    --bg-card:            #ffffff;
    --border:             #e9ecef;
    --border-light:       #f1f3f5;
    
    /* 디자인 요소 */
    --shadow-sm:          0 2px 4px rgba(0,0,0,0.04);
    --shadow-md:          0 8px 16px rgba(0,0,0,0.06);
    --shadow-lg:          0 16px 32px rgba(0,0,0,0.1);
    --radius-sm:          8px;
    --radius-md:          12px;
    --radius-lg:          20px;
    --transition:         all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 전역 스타일 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--brand-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   모바일 메뉴
   ============================================ */

#mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1998;
    backdrop-filter: blur(2px);
}

#mobile-menu-overlay.open {
    display: block;
}

#mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    z-index: 1999;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

#mobile-menu.open {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--brand-pale);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.mobile-site-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-deep);
}

.mobile-site-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.mobile-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-close-btn:hover {
    background: var(--border);
    color: var(--text-dark);
}

.mobile-nav {
    flex: 1;
    padding: 12px 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.mobile-nav-item:hover {
    background: var(--brand-light);
    color: var(--brand-deep);
    border-left-color: var(--brand);
}

.mobile-nav-item i {
    width: 18px;
    text-align: center;
    color: var(--brand);
}

.mobile-menu-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.mobile-user-info {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.mobile-btn {
    width: 100%;
    justify-content: center;
}

/* ============================================
   헤더 스타일
   ============================================ */

#header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border);
    z-index: 1000;
    height: 72px;
    transition: var(--transition);
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 16px;
}

/* 햄버거 버튼 */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: var(--brand-light);
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* 헤더 좌측 (로고) */
.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: var(--transition);
}

.logo-link:hover {
    opacity: 0.85;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.site-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--brand-deep);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.site-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* 헤더 중앙 (네비게이션) */
.header-nav {
    display: flex;
    gap: 2px;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-item:hover {
    background-color: var(--brand-light);
    color: var(--brand);
}

.nav-item.active {
    background-color: var(--brand);
    color: white;
}

.nav-item.active .nav-icon {
    color: white;
}

.nav-item:hover {
    background-color: var(--brand-light);
    color: var(--brand-deep);
    border-bottom-color: var(--brand);
}

.nav-item.active {
    background-color: var(--brand-light);
    color: var(--brand);
    font-weight: 700;
    border-bottom-color: var(--brand);
}

.nav-icon {
    font-size: 12px;
    color: var(--brand);
}

/* 헤더 우측 */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.lang-switcher {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.lang-item {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.lang-item:hover {
    color: var(--brand);
}

.lang-item.active {
    background: var(--brand);
    color: white;
}

.lang-divider {
    width: 1px;
    height: 12px;
    background: var(--border);
    margin: 0 2px;
}

.btn-lang {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border);
    background: white;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.btn-lang.active {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: var(--brand);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-login:hover {
    background-color: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 124, 32, 0.35);
}

/* ============================================
   배너 섹션
   ============================================ */

.banner-section {
    position: relative;
    min-height: 500px;
    background-image: url('../images/hero_bg.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.banner-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(255,255,255,0.96) 0%,
        rgba(255,255,255,0.80) 45%,
        rgba(255,255,255,0.20) 100%
    );
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding: 80px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.banner-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--brand);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 0.5px;
    width: fit-content;
}

.banner-title {
    font-size: 52px;
    font-weight: 900;
    color: var(--brand);
    text-shadow: 1px 2px 6px rgba(0,0,0,0.08);
    letter-spacing: -2px;
    line-height: 1.1;
}

.banner-subtitle {
    font-size: 20px;
    color: var(--text-dark);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.banner-description {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 480px;
}

/* 배너 통계 */
.banner-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 6px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-number {
    font-size: 24px;
    font-weight: 900;
    color: var(--brand);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* 배너 우측 */
.banner-right {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 검색 박스 */
.search-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.search-box-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-box-title i {
    color: var(--brand);
}

.search-item {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.search-item:last-child {
    margin-bottom: 0;
}

.search-input {
    flex: 1;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--brand);
    background: white;
    box-shadow: 0 0 0 3px rgba(244, 124, 32, 0.12);
}

.search-input::placeholder {
    color: #bbb;
}

.search-btn {
    padding: 9px 14px;
    background-color: var(--brand);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Noto Sans KR', sans-serif;
    white-space: nowrap;
}

.search-btn:hover {
    background-color: var(--brand-dark);
    transform: translateY(-1px);
}

/* 커뮤니티 정보 카드 */
.community-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--brand-deep);
}

.card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-light);
}

.card-content {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 14px;
    background: var(--brand-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.card-link:hover {
    background: var(--brand);
    color: white;
    gap: 10px;
}

/* ============================================
   메인 콘텐츠
   ============================================ */

.main-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 48px 32px 100px;
}

.section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    margin-bottom: 48px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.section:hover {
    box-shadow: var(--shadow-lg);
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--brand);
    font-size: 18px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--brand);
    border-radius: 2px;
    flex-shrink: 0;
}

.section-description {
    font-size: 13px;
    color: var(--text-muted);
}

.section-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    background: var(--brand-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}

.section-more-btn:hover {
    background: var(--brand);
    color: white;
}

/* 테이블 래퍼 */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

/* ============================================
   테이블 스타일
   ============================================ */

.listtable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.listtable_top {
    background: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    padding: 16px 20px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.listtable_1 {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-card);
    vertical-align: middle;
    transition: var(--transition);
}

.listtable_2 {
    padding: 12px 16px;
    background: var(--brand-pale);
    vertical-align: top;
}

.listtable tr:last-child .listtable_1 {
    border-bottom: none;
}

.listtable tr:hover .listtable_1 {
    background-color: var(--brand-pale);
}

/* 테이블 내 특수 요소 */
.player-name {
    font-weight: 600;
    color: var(--text-dark);
}

.ban-length {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--brand-light);
    color: var(--brand-deep);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.text-muted {
    color: var(--text-muted) !important;
    font-size: 12px;
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    padding: 32px 16px !important;
    font-size: 14px;
}

.empty-row i {
    margin-right: 6px;
    color: var(--border);
    font-size: 18px;
}

/* ============================================
   서버 목록 버튼 (page_servers.tpl)
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Noto Sans KR', sans-serif;
    margin: 4px;
}

.btn.game {
    background-color: var(--brand);
    color: white;
}

.btn.game:hover {
    background-color: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 124, 32, 0.3);
}

.btn.refresh {
    background-color: #f0f0f0;
    color: var(--text-dark);
}

.btn.refresh:hover {
    background-color: #e0e0e0;
}

/* ============================================
   내부 페이지 공통 스타일
   ============================================ */

#mainwrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
}

#innerwrapper {
    padding-bottom: 60px;
}

#content_title {
    font-size: 26px;
    font-weight: 800;
    color: var(--brand-deep);
    margin: 36px 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#content_title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 28px;
    background: var(--brand);
    border-radius: 3px;
}

#breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

#breadcrumb a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
}

#breadcrumb a:hover {
    text-decoration: underline;
}

#content {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 80px;
    border: 1px solid rgba(232, 216, 196, 0.5);
}

/* 다이얼로그 */
#dialog-placement {
    z-index: 9999 !important;
}

.dialog-holder {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.box-content {
    padding: 24px;
}

/* 폼 요소 */
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    color: var(--text-dark);
    background: white;
    transition: var(--transition);
    width: 100%;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(244, 124, 32, 0.12);
}

input[type="submit"],
input[type="button"] {
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer;
}

.textbox, .loginmedium {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'Noto Sans KR', sans-serif;
    transition: var(--transition);
}

.textbox:focus, .loginmedium:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(244, 124, 32, 0.12);
}

/* 레거시 호환 */
.tbl_out { background-color: transparent; }
.tbl_hover { background-color: var(--brand-pale) !important; }
.sortable { cursor: default; }
.sortable th, .sortable td { cursor: pointer; }

/* ============================================
   푸터
   ============================================ */

#footer {
    background: var(--nav-bg);
    color: rgba(255,255,255,0.85);
    padding: 56px 24px 0;
    border-top: 3px solid var(--brand);
}

.footer-container {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    padding-bottom: 48px;
}

.footer-section h3 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section p, .footer-section a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 2.2;
    text-decoration: none;
    display: block;
}

.footer-section a:hover {
    color: var(--brand);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    max-width: 1600px;
    margin: 0 auto;
}

.footer-bottom a {
    color: var(--brand);
    text-decoration: none;
}

/* ============================================
   반응형 디자인
   ============================================ */

/* 1200px 이하: 헤더 네비게이션 숨기고 햄버거 표시 */
@media (max-width: 1200px) {
    .header-nav {
        display: none;
    }

    .hamburger-btn {
        display: flex;
    }
}

/* 992px 이하: 배너 세로 정렬 */
@media (max-width: 992px) {
    .banner-content {
        flex-direction: column;
        align-items: stretch;
        padding: 36px 20px;
        gap: 28px;
    }

    .banner-left {
        align-items: flex-start;
    }

    .banner-title {
        font-size: 40px;
    }

    .banner-right {
        flex: none;
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
    }

    .section {
        padding: 20px 16px;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
    }
}

/* 768px 이하: 모바일 */
@media (max-width: 768px) {
    #header {
        height: 56px;
    }

    .logo-text {
        display: none;
    }

    .header-right .user-info {
        display: none;
    }

    .banner-title {
        font-size: 34px;
    }

    .banner-subtitle {
        font-size: 16px;
    }

    .banner-description {
        font-size: 14px;
    }

    .main-container {
        padding: 20px 16px 60px;
    }

    .section {
        padding: 18px 14px;
        border-radius: var(--radius-md);
    }

    .section-title {
        font-size: 17px;
    }

    .listtable_top,
    .listtable_1 {
        padding: 10px 12px;
        font-size: 12px;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

/* 480px 이하: 소형 모바일 */
@media (max-width: 480px) {
    .banner-stats {
        flex-wrap: wrap;
        gap: 12px;
    }

    .banner-right {
        max-width: 100%;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   유틸리티
   ============================================ */

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ============================================
   SourceBans++ 2026 관리자 탭/사이드바 호환 패치
   - core/admin_tabs.tpl 및 core/admin_sidebar.tpl 표시 보정
   ============================================ */

.admin-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px 0;
    padding: 12px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.admin-tabs .btn,
.btn.btn--ghost,
.btn--ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    min-height: 34px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--brand-pale);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: var(--transition);
}

.admin-tabs .btn:hover,
.btn.btn--ghost:hover,
.btn--ghost:hover,
.admin-tabs .btn[aria-current="page"],
.btn.btn--ghost[aria-current="page"],
.btn--ghost[aria-current="page"] {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn--sm {
    padding: 7px 10px;
    font-size: 12px;
}

.admin-tabs__back {
    margin-left: auto;
}

.admin-sidebar-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.admin-sidebar {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-sidebar__details {
    padding: 0;
}

.admin-sidebar__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    color: var(--brand-deep);
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(180deg, #fdfaf7 0%, #f9f4ee 100%);
    border-bottom: 1.5px solid var(--border);
    list-style: none;
}

.admin-sidebar__summary::-webkit-details-marker {
    display: none;
}

.admin-sidebar__summary-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-sidebar__chevron {
    transition: transform 0.2s ease;
}

.admin-sidebar__details[open] .admin-sidebar__chevron {
    transform: rotate(180deg);
}

.admin-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.sidebar__link,
.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar__link i,
.admin-sidebar__link i {
    width: 16px;
    height: 16px;
    color: var(--brand);
    flex: 0 0 auto;
}

.sidebar__link:hover,
.admin-sidebar__link:hover,
.sidebar__link[aria-current="page"],
.admin-sidebar__link[aria-current="page"] {
    background: var(--brand-light);
    color: var(--brand-deep);
    border-left-color: var(--brand);
}

.admin-sidebar-content {
    min-width: 0;
}

@media (min-width: 1024px) {
    .admin-sidebar-shell {
        grid-template-columns: 14rem minmax(0, 1fr);
    }

    .admin-sidebar {
        position: sticky;
        top: 16px;
    }

    .admin-sidebar__summary {
        display: none;
    }

    .admin-sidebar__details {
        display: block;
    }

    .admin-sidebar__nav {
        padding: 12px;
    }
}

@media (max-width: 640px) {
    .admin-tabs__back {
        margin-left: 0;
        width: 100%;
    }
}
