/* 관리자 대시보드 전용 스타일 */

.admin-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 대시보드 헤더 */
.dashboard-header {
    margin-bottom: 30px;
    text-align: center;
}

.dashboard-subtitle {
    color: #666;
    font-size: 16px;
    margin-top: 8px;
    font-weight: 400;
}

/* 통계 카드 그리드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 24px;
    color: #fff;
}

/* 아이콘 색상 */
.user-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.store-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.event-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.news-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.qr-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.board-icon {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 4px 0;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 500;
}

.stat-sub {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 2px;
}

/* 섹션 제목 */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
}

/* 관리 메뉴 영역 */
.admin-menu-section {
    margin-bottom: 40px;
}

.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.admin-menu-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.admin-menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.admin-menu-card:hover::before {
    transform: scaleX(1);
}

.menu-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.menu-icon i {
    font-size: 28px;
    color: #fff;
}

.admin-menu-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.admin-menu-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* 사용자 목록 영역 */
.user-list-section,
.store-list-section,
.event-list-section,
.qr-list-section {
    margin-bottom: 40px;
}

.user-table-wrapper,
.store-table-wrapper,
.event-table-wrapper,
.qr-table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    padding: 20px;
    overflow-x: auto;
}

.user-table,
.store-table,
.event-table,
.qr-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.user-table th,
.user-table td,
.store-table th,
.store-table td,
.event-table th,
.event-table td,
.qr-table th,
.qr-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #2c3e50;
}

.user-table th,
.store-table th,
.event-table th,
.qr-table th {
    background: #f8f9fc;
    font-weight: 600;
    color: #3a3f51;
}

.user-table tbody tr:hover,
.store-table tbody tr:hover,
.event-table tbody tr:hover,
.qr-table tbody tr:hover {
    background: #f9fbff;
}

.user-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.user-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.user-delete-button:hover {
    background: #fecaca;
    box-shadow: 0 6px 14px rgba(248, 113, 113, 0.25);
}

.user-delete-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.user-delete-button.admin-action-btn {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid #f87171;
    background: #fff5f5;
    color: #b91c1c;
    font-size: 14px;
    box-shadow: none;
}

.user-delete-button.admin-action-btn:hover {
    background: #fee2e2;
    border-color: #ef4444;
    box-shadow: none;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 600;
    font-size: 12px;
}

.user-table-empty,
.store-table-empty,
.event-table-empty,
.qr-table-empty {
    text-align: center;
    padding: 24px 0;
    color: #999;
    font-size: 14px;
}

.store-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.store-meta {
    font-size: 13px;
    color: #64748b;
}

.store-info {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.store-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-info__body {
    flex: 1;
}

.store-tags {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #475569;
    font-size: 12px;
}

.store-description {
    margin-top: 6px;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.4;
}

.store-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    border: 1px solid #e2e8f0;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
}

.store-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin: 4px 6px 4px 0;
    border-radius: 999px;
    background: #eef2ff;
    color: #4c51bf;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e0e7ff;
}

.store-chip::before {
    content: "#";
    font-weight: 700;
}

.store-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569 !important;
    font-size: 13px;
}

.store-meta-date i,
.store-meta i {
    color: #64748b;
}

.event-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.event-info__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.event-thumb {
    width: 128px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-description {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.event-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
}

.event-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 13px;
}

.event-meta-date i,
.event-meta i {
    color: #64748b;
}

.qr-thumb {
    width: 150px;
    height: 150px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-thumb__fallback {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    padding: 16px;
}

/* 대시보드 라이트 테마 보정 */
.admin-dashboard .dashboard-surface {
    background: transparent;
    border: 1px solid #d1d5db;
    box-shadow: none;
}

.admin-dashboard .dashboard-surface :is(h1, h2, h3, h4, h5, h6, p, span, strong, em, li, dt, dd) {
    color: #1f2937;
}

.admin-dashboard .dashboard-surface .stat-number {
    color: #0f172a;
}

.admin-dashboard .dashboard-surface :is(.stat-label, .stat-sub, .activity-date, .activity-empty, .admin-menu-card p) {
    color: #475569;
}

.qr-token {
    font-weight: 600;
    color: #4b5563 !important;
}

.qr-payload {
    margin-top: 4px;
    color: #4b5563;
    font-size: 13px;
}

.qr-activation {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6366f1;
    font-size: 12px;
}

.qr-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.qr-status--reserved {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.qr-status--active {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.qr-status--revoked {
    background: rgba(248, 113, 113, 0.15);
    color: #dc2626;
}

.qr-status--deleted {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

.qr-link {
    display: inline-block;
    max-width: 320px;
    color: #2563eb;
    font-size: 13px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qr-link:hover {
    text-decoration: underline;
}

.qr-link--empty {
    color: #94a3b8;
    font-size: 13px;
}

.qr-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 13px;
}

.qr-meta-date i {
    color: #64748b;
}

.admin-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

.admin-page__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 24px;
}

.admin-page__title {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-page__title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.admin-page__title p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.admin-page__stats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 14px;
}

.admin-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-filter-bar .search-input {
    min-width: 260px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    padding: 10px 14px;
    font-size: 14px;
}

.admin-filter-bar .action-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-filter-bar .action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.25);
}

/* 최근 활동 영역 */
.recent-activity-section {
    margin-bottom: 40px;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.activity-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.activity-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-title i {
    color: #667eea;
}

.activity-list {
    space-y: 12px;
}

.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.activity-date {
    font-size: 12px;
    color: #999;
}

.activity-empty {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .admin-dashboard {
        padding: 16px;
    }

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

    .stat-card {
        padding: 20px;
    }

    .stat-number {
        font-size: 28px;
    }

    .admin-menu-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .admin-menu-card {
        padding: 20px;
    }

    .user-table-wrapper,
    .store-table-wrapper,
    .event-table-wrapper,
    .qr-table-wrapper {
        padding: 16px;
    }

    .activity-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .activity-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        margin-bottom: 24px;
    }

    .dashboard-subtitle {
        font-size: 14px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .stat-content {
        width: 100%;
    }

    .admin-menu-card {
        padding: 16px;
        text-align: center;
    }

    .menu-icon {
        margin: 0 auto 12px;
    }

    .user-table,
    .store-table,
    .event-table,
    .qr-table {
        min-width: 600px;
    }
}

/* 다크모드 대응 (미래 확장성) */
@media (prefers-color-scheme: dark) {
    .stat-card,
    .admin-menu-card,
    .activity-card,
    .user-table-wrapper,
    .store-table-wrapper,
    .event-table-wrapper,
    .qr-table-wrapper {
        background: #1e1e1e;
        border-color: #333;
        color: #fff;
    }

    .stat-number,
    .admin-menu-card h3,
    .activity-title,
    .activity-name,
    .store-name,
    .store-meta-date,
    .store-chip,
    .store-category-badge,
    .event-title,
    .qr-token {
        color: #fff;
    }

    .stat-label,
    .admin-menu-card p,
    .activity-date,
    .user-table td,
    .user-table-empty,
    .store-table td,
    .store-table-empty,
    .store-description,
    .store-meta,
    .store-tags,
    .event-description,
    .event-meta,
    .event-meta-date,
    .qr-payload,
    .qr-activation,
    .qr-link,
    .qr-link--empty,
    .qr-meta-date {
        color: #ccc;
    }

    .section-title {
        color: #fff;
        border-bottom-color: #333;
    }

    .user-table th,
    .store-table th,
    .event-table th,
    .qr-table th {
        background: #262626;
        color: #f0f0f0;
    }

    .user-table tbody tr:hover,
    .store-table tbody tr:hover,
    .event-table tbody tr:hover,
    .qr-table tbody tr:hover {
        background: #1f1f1f;
    }

    .store-category-badge {
        border-color: #3f3f3f;
        background: #2a2a2a;
    }

    .store-chip {
        background: #2d2d4a;
        border-color: #3a3a5c;
    }

    .store-thumb {
        background: #2b2b2b;
    }

    .event-thumb {
        background: #2b2b2b;
    }

    .qr-thumb {
        background: #252525;
        border-color: #2f2f2f;
    }

    .qr-status--reserved {
        background: rgba(59, 130, 246, 0.2);
    }

    .qr-status--active {
        background: rgba(34, 197, 94, 0.2);
    }

    .qr-status--revoked {
        background: rgba(248, 113, 113, 0.2);
    }

    .qr-status--deleted {
        background: rgba(100, 116, 139, 0.3);
    }

}
