.history-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 120px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.history-header h1 {
    margin: 0;
    color: #333;
    font-size: 28px;
}

.history-header h1 i {
    margin-right: 10px;
    color: #409eff;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Statistics Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-icon {
    font-size: 24px;
    margin-right: 15px;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Controls Section */
.controls-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #409eff;
    outline: none;
}

.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-controls select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    min-width: 120px;
    font-size: 14px;
}

.batch-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    background: #409eff;
    color: white;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn.btn-secondary {
    background: #6c757d;
}

.btn.btn-danger {
    background: #dc3545;
}

.btn.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* History List */
.history-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.history-item:hover {
    background-color: #f8f9fa;
}

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

.item-checkbox {
    margin-right: 15px;
}

.item-checkbox input[type="checkbox"] {
    transform: scale(1.2);
}

.item-icon {
    margin-right: 15px;
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    word-break: break-all;
}

.item-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.encrypted-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-icon:hover {
    background: #f0f0f0;
    color: #333;
}

.btn-icon.btn-danger:hover {
    background: #dc3545;
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    padding: 20px 0;
}

.pagination-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.pagination-btn:hover {
    border-color: #409eff;
    color: #409eff;
}

.pagination-btn.active {
    background: #409eff;
    border-color: #409eff;
    color: white;
}

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

.empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.empty-state p {
    margin: 0 0 30px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .history-container {
        padding: 15px;
    }

    .history-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .header-actions {
        justify-content: center;
    }

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

    .filter-controls {
        flex-direction: column;
    }

    .filter-controls select {
        min-width: 100%;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .item-meta {
        flex-direction: column;
        gap: 5px;
    }

    .item-actions {
        align-self: flex-end;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .history-container {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .controls-section {
        background: #2d2d2d;
        border-color: #404040;
    }

    .search-box input,
    .filter-controls select {
        background: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }

    .history-list {
        background: #2d2d2d;
    }

    .history-item {
        border-bottom-color: #404040;
    }

    .history-item:hover {
        background-color: #353535;
    }

    .item-name {
        color: #e0e0e0;
    }

    .pagination-btn {
        background: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
}
