/**
 * 관리자 페이지 스타일
 */

.admin-body {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-header h1 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h1 i {
    color: var(--primary-color);
}

.sidebar-header .demo-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 사이드바 스크롤바 스타일 */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-section {
    margin-bottom: 25px;
}

.nav-section-title {
    padding: 0 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 10px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-nav a.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.sidebar-nav a i,
.sidebar-nav span i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* 권한 없는 메뉴 스타일 */
.sidebar-nav span.disabled {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: not-allowed;
    user-select: none;
    position: relative;
}

.sidebar-nav span.disabled i {
    opacity: 0.5;
}

/* 권한 없음 툴팁 */
.sidebar-nav span.disabled:hover::after {
    content: '권한이 없습니다';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.2s ease;
}

.sidebar-nav span.disabled:hover::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: rgba(239, 68, 68, 0.95);
    margin-left: -2px;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* 메뉴 알림 배지 */
.menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: auto;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 2px 10px rgba(239, 68, 68, 0.6);
    }
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.admin-header {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-header .sidebar-toggle {
    background: none;
    border: none;
    padding: 8px 12px;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.admin-header .sidebar-toggle:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.admin-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.admin-header .breadcrumb a {
    color: var(--text-muted);
}

.admin-header .breadcrumb a:hover {
    color: var(--primary-color);
}

.admin-header .user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-header .user-info {
    text-align: right;
}

.admin-header .user-info .name {
    font-weight: 600;
    color: var(--text-primary);
}

.admin-header .user-info .role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-header .btn-site-view {
    padding: 6px 12px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.admin-header .btn-site-view:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

.admin-header .btn-site-view i {
    font-size: 0.75rem;
}

.admin-content {
    padding: 30px;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 25px;
}

.dashboard-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--light-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--primary-color);
}

.card-body {
    padding: 20px 25px;
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 15px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--light-border);
}

.admin-table td {
    padding: 14px 12px;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--light-border);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table a {
    color: var(--text-primary);
}

.admin-table a:hover {
    color: var(--primary-color);
}

.admin-table code {
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

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

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    margin: 1px 2px 1px 0;
    background: #f1f5f9;
    color: var(--text-secondary);
}

.badge-primary {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar .form-control {
    padding: 8px 12px;
    min-width: auto;
    width: auto;
}

.filter-bar select.form-control {
    min-width: 100px;
}

.filter-bar input[type="date"].form-control {
    width: auto;
}

.filter-bar .search-input {
    min-width: 180px;
    flex: 1;
    max-width: 280px;
}

.filter-bar .btn {
    padding: 8px 14px;
    white-space: nowrap;
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
}

.actions .btn {
    padding: 6px 12px;
}

/* Form in Card */
.form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.form-card .card-body {
    padding: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Checkbox/Radio Group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

/* Admin Footer */
.admin-footer {
    margin-top: 40px;
    padding: 20px 30px;
    background: #fff;
    border-top: 1px solid var(--light-border);
}

.admin-footer .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.admin-footer .footer-brand {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.admin-footer .footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.admin-footer .footer-links a {
    color: var(--text-secondary);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.admin-footer .footer-links a:hover {
    color: var(--primary-color);
}

.admin-footer .footer-links .divider {
    color: var(--text-muted);
    opacity: 0.5;
}

/* 랭킹 리스트 */
.ranking-list {
    padding: 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--light-border);
    transition: background 0.2s;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background: #f8fafc;
}

.ranking-position {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    background: #f1f5f9;
    color: #64748b;
}

.ranking-position.top1 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.ranking-position.top2 {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: #fff;
}

.ranking-position.top3 {
    background: linear-gradient(135deg, #cd7c32, #a3632a);
    color: #fff;
}

.ranking-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #94a3b8;
    font-size: 16px;
    flex-shrink: 0;
}

.ranking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-value {
    font-size: 15px;
    font-weight: 700;
    color: #f59e0b;
    white-space: nowrap;
}

/* Sidebar Collapsed State */
.sidebar-collapsed .admin-sidebar {
    transform: translateX(-260px);
}

.sidebar-collapsed .admin-main {
    margin-left: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        gap: 6px;
    }

    .filter-bar .form-control {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .filter-bar .search-input {
        min-width: 120px;
        max-width: none;
    }

    .filter-bar .btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    /* Admin Content Mobile */
    .admin-content {
        padding: 15px;
    }

    /* Page Header Mobile */
    .page-header {
        margin-bottom: 20px;
    }

    .page-header h1 {
        font-size: 1.2rem;
    }

    .page-header p {
        font-size: 0.85rem;
    }

    /* Admin Header Mobile */
    .admin-header {
        padding: 10px 12px;
        gap: 8px;
    }

    .admin-header .header-left {
        gap: 8px;
        flex-shrink: 0;
    }

    .admin-header .header-right {
        gap: 8px;
        flex-shrink: 0;
        min-width: 0;
    }

    .admin-header .breadcrumb {
        display: none;
    }

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

    .admin-header .user-menu {
        gap: 8px;
    }

    .admin-header .btn-site-view {
        padding: 6px 10px;
        font-size: 0.7rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .admin-header .btn-site-view i {
        font-size: 0.65rem;
    }

    .admin-header .sidebar-toggle {
        padding: 6px 10px;
        font-size: 16px;
    }

    /* Notification button mobile */
    .admin-header .notification-btn,
    .admin-header .header-icon-btn {
        padding: 6px 8px !important;
        font-size: 14px !important;
    }

    /* User avatar mobile */
    .admin-header .user-avatar,
    .admin-header .header-avatar {
        width: 32px !important;
        height: 32px !important;
    }

    .admin-header .user-name-text {
        display: none;
    }

    .admin-header .dropdown-toggle {
        padding: 4px 8px !important;
        gap: 4px !important;
    }

    .admin-header .dropdown-toggle .fa-chevron-down {
        font-size: 10px !important;
    }

    /* Dashboard Cards Mobile */
    .dashboard-card {
        margin-bottom: 15px;
    }

    .card-header {
        padding: 15px 18px;
    }

    .card-header h2 {
        font-size: 0.9rem;
    }

    .card-body {
        padding: 15px 18px;
    }

    /* Dashboard Stats Grid Mobile */
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .mini-stat-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .mini-stat-card .icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .mini-stat-card .info h4 {
        font-size: 18px;
    }

    .mini-stat-card .info p {
        font-size: 11px;
    }

    .mini-stat-card .info .change {
        font-size: 10px;
    }

    /* Dashboard Row Mobile */
    .dashboard-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dashboard-row-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Quick Links Mobile */
    .quick-links {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .quick-link-item {
        padding: 12px 8px;
    }

    .quick-link-item i {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .quick-link-item span {
        font-size: 10px;
    }

    /* Tables Mobile */
    .admin-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Ranking List Mobile */
    .ranking-item {
        padding: 10px 15px;
    }

    .ranking-position {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .ranking-avatar {
        width: 32px;
        height: 32px;
    }

    .ranking-name {
        font-size: 12px;
    }

    .ranking-value {
        font-size: 13px;
    }

    /* Chart Container Mobile */
    .chart-container {
        height: 180px;
    }

    /* Admin Footer Mobile */
    .admin-footer {
        padding: 15px;
    }

    .admin-footer .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .admin-footer .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Actions Mobile */
    .actions {
        flex-wrap: wrap;
    }

    .actions .btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    /* Badge Mobile */
    .badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    /* Stats Card Mobile */
    .stat-card {
        padding: 15px;
        gap: 12px;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .stat-info h3 {
        font-size: 1.4rem;
    }

    .stat-info p {
        font-size: 0.8rem;
    }

    /* Form Card Mobile */
    .form-card .card-body {
        padding: 20px;
    }

    /* Checkbox Group Mobile */
    .checkbox-group {
        gap: 12px;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .admin-content {
        padding: 12px;
    }

    .page-header h1 {
        font-size: 1.1rem;
    }

    /* Dashboard Stats Grid Extra Small */
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }

    .mini-stat-card {
        flex-direction: row;
        text-align: left;
    }

    /* Quick Links Extra Small */
    .quick-links {
        grid-template-columns: repeat(3, 1fr);
    }

    .quick-link-item span {
        font-size: 9px;
    }

    /* Tables Extra Small */
    .admin-table th,
    .admin-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
}

/* Mobile Sidebar Toggle Button */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s;
}

.mobile-sidebar-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .mobile-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

@media (max-width: 768px) {
    .sidebar-overlay.active {
        display: block;
    }

    /* Stats Row Mobile */
    .stats-row {
        flex-direction: column;
        gap: 12px;
    }

    /* Settings Tabs Mobile */
    .settings-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    .settings-tabs::-webkit-scrollbar {
        display: none;
    }

    .settings-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Tab Content Mobile */
    .tab-content,
    .settings-content {
        padding: 15px;
    }

    /* Form Grid Mobile */
    .form-grid,
    .form-2col {
        grid-template-columns: 1fr;
    }

    /* Level Grid Mobile */
    .level-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Preview Grid Mobile */
    .preview-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Menu Grid Mobile */
    .menu-grid {
        grid-template-columns: 1fr;
    }

    /* Reward Grid Mobile */
    .reward-grid {
        grid-template-columns: 1fr;
    }

    /* Mode Cards Mobile */
    .mode-cards {
        grid-template-columns: 1fr;
    }

    /* Service Cards Mobile */
    .service-cards {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Prevent Horizontal Scroll on Mobile
   ======================================== */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
    }

    .admin-body {
        width: 100%;
        max-width: 100vw;
    }

    .admin-main {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .admin-content {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .dashboard-card,
    .card-body,
    .form-card {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Dashboard Stats Grid - 2 columns on mobile */
    .dashboard-stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100%;
    }

    .mini-stat-card {
        padding: 12px !important;
        flex-direction: column !important;
        text-align: center !important;
        gap: 8px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .mini-stat-card .icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
        flex-shrink: 0;
    }

    .mini-stat-card .info {
        min-width: 0;
        width: 100%;
    }

    .mini-stat-card .info h4 {
        font-size: 20px !important;
        word-break: break-all;
    }

    .mini-stat-card .info p {
        font-size: 13px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mini-stat-card .info .change {
        font-size: 11px !important;
    }

    /* Dashboard Row - force single column */
    .dashboard-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        width: 100%;
    }

    .dashboard-row-3 {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        width: 100%;
    }

    /* Quick Links - 3 columns on mobile for better readability */
    .quick-links {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        width: 100%;
    }

    .quick-link-item {
        padding: 15px 8px !important;
        min-width: 0;
    }

    .quick-link-item i {
        font-size: 22px !important;
        margin-bottom: 8px !important;
    }

    .quick-link-item span {
        font-size: 12px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* Tables scroll within their container */
    .admin-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Form inputs */
    input, textarea, select {
        max-width: 100%;
        box-sizing: border-box;
    }

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

    /* Filter bar - 2 row layout on mobile */
    .filter-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 8px !important;
    }

    .filter-bar select.form-control {
        min-width: 0;
        width: 100%;
    }

    /* 필터가 하나뿐일 때 검색 입력창과 동일한 너비 */
    .filter-bar select.form-control:only-of-type {
        grid-column: 1 / 3 !important;
    }

    .filter-bar .search-input {
        grid-column: 1 / 3 !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .filter-bar .btn {
        height: auto !important;
        padding: 22px 12px !important;
    }

    .filter-bar .btn-primary {
        grid-row: 1 / 3 !important;
        grid-column: 3 !important;
    }

    .filter-bar .btn-outline {
        grid-column: 1 / 4 !important;
    }

    /* Stats row - 2x2 grid on mobile */
    .stats-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        flex-direction: unset;
    }

    .stat-card {
        width: 100%;
        flex-direction: column !important;
        text-align: center !important;
        padding: 15px 10px !important;
        gap: 10px !important;
    }

    .stat-card .icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
        margin: 0 auto;
    }

    .stat-card .info {
        width: 100%;
    }

    .stat-card .info h4 {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }

    .stat-card .info p {
        font-size: 20px !important;
    }

    /* Card headers and body */
    .card-header {
        padding: 12px 15px !important;
        flex-wrap: wrap;
        gap: 10px;
    }

    .card-header h2 {
        font-size: 0.85rem !important;
    }

    .card-body {
        padding: 12px 15px !important;
    }

    /* Bulk action area in card header */
    .card-header select.form-control {
        padding: 6px 10px !important;
        font-size: 13px !important;
        height: auto !important;
        min-height: 34px !important;
        line-height: 1.4 !important;
    }

    .card-header .btn-sm {
        padding: 6px 12px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        height: 34px !important;
        line-height: 1 !important;
        min-width: fit-content !important;
        flex-shrink: 0 !important;
    }

    /* Chart container */
    .chart-container {
        height: 160px !important;
        max-width: 100%;
    }

    /* Ranking list mobile */
    .ranking-item {
        padding: 10px 12px !important;
        gap: 10px !important;
    }

    .ranking-position {
        width: 22px !important;
        height: 22px !important;
        font-size: 10px !important;
        flex-shrink: 0;
    }

    .ranking-avatar {
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0;
    }

    .ranking-info {
        min-width: 0;
        flex: 1;
    }

    .ranking-name {
        font-size: 12px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ranking-value {
        font-size: 12px !important;
        flex-shrink: 0;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .admin-content {
        padding: 10px !important;
    }

    .dashboard-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .mini-stat-card {
        padding: 12px !important;
    }

    .mini-stat-card .icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
    }

    .mini-stat-card .info h4 {
        font-size: 18px !important;
    }

    .mini-stat-card .info p {
        font-size: 12px !important;
    }

    .quick-links {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .quick-link-item {
        padding: 12px 6px !important;
    }

    .quick-link-item i {
        font-size: 20px !important;
    }

    .quick-link-item span {
        font-size: 11px !important;
    }
}
