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

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Noto Sans KR', 'Malgun Gothic', '맑은 고딕', sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

:root {
    --primary-color: #2c5282;
    --secondary-color: #4a90e2;
    --accent-color: #00b4d8;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border-color: #ddd;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

h1, .h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }
h2, .h2 { font-size: 2rem; font-weight: 700; line-height: 1.3; }
h3, .h3 { font-size: 1.75rem; font-weight: 600; line-height: 1.3; }
h4, .h4 { font-size: 1.5rem; font-weight: 600; line-height: 1.4; }
h5, .h5 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h6, .h6 { font-size: 1rem; font-weight: 600; line-height: 1.5; }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-light { color: var(--text-light); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #234163;
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #3a7bc8;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-control.error {
    border-color: var(--error-color);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
}

.form-error {
    color: var(--error-color);
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-error.active {
    display: block;
}

.card {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.pt-10 { padding-top: 10px; }
.pt-20 { padding-top: 20px; }
.pb-10 { padding-bottom: 10px; }
.pb-20 { padding-bottom: 20px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.flex-column { flex-direction: column; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ========================================
   Dashboard 전용 스타일
======================================== */
body {
    background-color: var(--bg-light);
}

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

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--primary-color);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar-logo i {
    font-size: 1.75rem;
    color: var(--accent-color);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section-title {
    padding: 16px 20px 8px;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-left: 4px solid var(--accent-color);
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

/* Header */
.header {
    background-color: var(--bg-white);
    padding: 20px 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

.header-search {
    position: relative;
}

.header-search input {
    width: 300px;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.header-search input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
    outline: none;
}

.header-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

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

.header-icon {
    position: relative;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.header-icon:hover {
    color: var(--primary-color);
}

.header-icon .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--error-color);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.profile-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 24px;
    transition: background-color 0.3s ease;
}

.profile-wrapper:hover {
    background-color: var(--bg-light);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-light);
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-secondary);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

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

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

.stat-icon.blue {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--secondary-color);
}

.stat-icon.green {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.stat-icon.orange {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.stat-icon.red {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
}

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

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.stat-change.positive {
    color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.stat-change.negative {
    color: var(--error-color);
    background-color: rgba(220, 53, 69, 0.1);
}

/* Chart Section */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

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

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-filter {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.chart-placeholder {
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

/* Recent Activity */
.activity-list {
    background: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.activity-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

.activity-icon.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.activity-icon.warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.activity-icon.info {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--secondary-color);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.activity-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-light);
}

/* Mobile Sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Profile Dropdown */
.profile-dropdown {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 220px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--bg-white);
    transform: rotate(45deg);
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-user-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.dropdown-user-email {
    font-size: 12px;
    color: var(--text-light);
}

.dropdown-menu {
    padding: 8px 0;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu-link:hover {
    background-color: var(--bg-light);
}

.menu-link i {
    width: 20px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

.menu-link.logout-link {
    color: var(--error-color);
}

.menu-link.logout-link:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.menu-link.logout-link i {
    color: var(--error-color);
}

/* Responsive */
@media (max-width: 1200px) {
    .container { max-width: 960px; }
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .container { max-width: 720px; }
    h1, .h1 { font-size: 2rem; }
    h2, .h2 { font-size: 1.75rem; }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header {
        padding: 16px 20px;
    }
    
    .header-search input {
        width: 250px;
    }
    
    .header-right {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .container { max-width: 540px; }
    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    .btn { padding: 10px 20px; }
    
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar-overlay.active {
        display: block;
    }

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

    .menu-toggle {
        display: block;
    }

    .header {
        padding: 14px 15px;
    }

    .header-search input {
        width: 180px;
        padding: 8px 12px 8px 36px;
        font-size: 13px;
    }

    .header-search i {
        left: 12px;
        font-size: 0.9rem;
    }

    .header-right {
        gap: 12px;
    }

    .header-icon {
        font-size: 1.1rem;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .user-name {
        font-size: 13px;
    }

    .user-role {
        font-size: 11px;
    }

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

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

    .dashboard-content {
        padding: 20px;
    }

    .profile-dropdown {
        top: 65px;
        right: 15px;
    }
}

@media (max-width: 576px) {
    .container { padding: 0 15px; }
    h1, .h1 { font-size: 1.5rem; }
    h2, .h2 { font-size: 1.25rem; }
    
    .header {
        padding: 12px 15px;
    }

    .header-search {
        display: none;
    }

    .header-right {
        gap: 10px;
    }

    .header-icon {
        font-size: 1rem;
    }

    .header-icon .badge {
        font-size: 9px;
        padding: 1px 4px;
    }

    .profile-wrapper {
        padding: 6px 8px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .user-info {
        display: none;
    }

    .profile-wrapper i.fa-chevron-down {
        display: none;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .dashboard-content {
        padding: 15px;
    }

    .profile-dropdown {
        top: 60px;
        right: 10px;
        width: calc(100% - 20px);
        max-width: 280px;
    }

    .profile-dropdown::before {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 12px;
    }

    .header-left {
        gap: 10px;
    }

    .menu-toggle {
        font-size: 1.3rem;
    }

    .header-right {
        gap: 8px;
    }

    .header-icon {
        font-size: 0.95rem;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .dashboard-content {
        padding: 12px;
    }

    .profile-dropdown {
        top: 55px;
        right: 10px;
        width: calc(100% - 20px);
        max-width: 260px;
    }
}

@media (max-width: 360px) {
    .header {
        padding: 10px;
    }

    .header-icon {
        font-size: 0.9rem;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .dashboard-content {
        padding: 10px;
    }

    .profile-dropdown {
        right: 5px;
        width: calc(100% - 10px);
        max-width: 250px;
        top: 55px;
    }

    .dropdown-header {
        padding: 12px;
    }

    .dropdown-user-name {
        font-size: 13px;
    }

    .dropdown-user-email {
        font-size: 11px;
    }

    .menu-link {
        padding: 10px 12px;
        font-size: 13px;
    }

    .menu-link i {
        font-size: 0.9rem;
    }
}

/* Detail Page Styles */
.page-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

.page-action {
    display: flex;
    gap: 12px;
}

.btn-danger {
    background-color: var(--error-color);
    color: #fff;
}

.btn-danger:hover {
    background-color: #c82333;
    box-shadow: var(--shadow-md);
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.detail-item {
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
}

.detail-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.detail-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.status-inactive {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
}

.count-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.image-container {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: #f0f0f0;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.photo-order {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.overlay-btn {
    background: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.overlay-btn:hover {
    transform: scale(1.1);
}

.file-info {
    padding: 12px;
}

.file-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 12px;
    color: var(--text-light);
}

.file-actions {
    padding: 0 12px 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-download, .btn-preview, .btn-delete {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-download {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-download:hover {
    background-color: #3a7bc8;
}

.btn-preview {
    background-color: var(--success-color);
    color: #fff;
}

.btn-preview:hover {
    background-color: #218838;
}

.btn-delete {
    background-color: var(--error-color);
    color: #fff;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 16px;
}

/* Custom Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.custom-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
}

.modal-container {
    position: relative;
    background: var(--bg-white);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    z-index: 2001;
}

.modal-fullscreen {
    max-width: 95%;
    max-height: 95vh;
}

.modal-large {
    max-width: 1000px;
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-image-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    min-height: 400px;
}

.modal-image-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Alert Styles */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert i {
    font-size: 1.25rem;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.alert-info {
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--primary-color);
}

/* Preview Styles */
.preview-image-container {
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.preview-info {
    margin-top: 16px;
    color: var(--text-light);
}

.preview-iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 8px;
}

.file-download-info {
    text-align: center;
    padding: 20px;
}

.file-detail {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .page-action {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .page-action .btn {
        flex: 1;
        min-width: 100px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .file-actions {
        flex-direction: column;
    }
    
    .file-actions .btn {
        width: 100%;
    }
}